Jump to content

username

Members
  • Content Count

    305
  • Joined

  • Last visited

  • Days Won

    8

Reputation Activity

  1. Like
    username reacted to abecedarian in Manifold absolute pressure sensing   
    I have to mention RobG and cubeberg have helped with this. THANKS!!!!
     
    What it is, is one pressure sensor affecting two, 16 bit DAC output channels.
     
    What it will do (hopefully ;-)) is read an (automotive) industry standard MAP (manifold absolute pressure) sensor- in this case an MPX4250A 20-250 kPa (kilo Pascal) / 2.9-36.3 PSI sensor (~100 kPa / 14.7 PSI is ambient pressure at sea level), and appear as up to two potentially different sensors. Possible uses could include: replacing obsolete MAP sensors with more readily available ones because of different output range / scaling; fooling a vehicle's engine control unit to allow for bigger injectors or turbocharging; splitting one MAP signal for two purposes; or affecting pressure controlled devices.
     
    The aforementioned MAP sensor will be connected to whatever vacuum / pressure source. The MCU will sample that and generate an output. But instead of doing a mathematical conversion, there will be look-up tables. This will permit non-linear adjustments to be made, allowing for compensation factors to be applied to the output, tuning.
     
    What I am uploading now, is a Booster Pack version of this, which should be usable with MSP430 and Stellaris/Tiva LaunchPads. Eventually, I want to have a complete stand-alone, with software to interface with it from a PC. I think we are close to that too; but still some details to work out.
     
    Hardware is:
    - MPX4250AP absolute pressure sensor- http://www.freescale.com/files/sensors/doc/data_sheet/MPX4250A.pdf
    - AD8644A quad op-amp- http://www.analog.com/static/imported-files/data_sheets/AD8614_8644.pdf
    - LTC2602IM dual-channel, 16 bit DAC- http://cds.linear.com/docs/en/datasheet/2602fa.pdf
    - 25AA512 eeprom- http://ww1.microchip.com/downloads/en/DeviceDoc/22021F.pdf
    - supporting resistors, capacitors, do dad's and whatnot's.
     
    Should probably mention I have added jumpers to disconnect V+ from either of the output sensor connections... the board is meant to be connected to the sensors and use their 5V+ to power the op-amp and provide external voltage reference for the ADC, but on my motorcycle one of the sensors has 12v and an internal voltage regulator. Therefore, I put the jumpers in so any sensor with inappropriate V+ could be kept out of the system. I've also put a jumper between the 5v from the sensors and the 3.3v LDO so that the LDO can be disabled if the LaunchPad is operating off USB.
     
    I do not have any presentable code to offer at the moment but am working on it; suggestions will be appreciated... and I'm working in Energia, which might have been evident with my post in the Energia forum: http://forum.43oh.com/topic/4292-multiple-slaves-on-spi/, so be kind. ;-)
     
    SingleBP.brdSingleBP.sch
     
    Comments and suggestions greatly appreciated.
     
    * Please ignore the name "SingleBP". I used that because the 500T version of my motorcycle uses 4 MAP sensors, and the 650T uses two. So "Single" means one unit needed for the 650T.

  2. Like
    username reacted to RobG in 2.2" 320x240 Color LCD Booster Pack   
    Back in stock (revision 2.)
     
     
     

  3. Like
    username reacted to timothynd28 in Reflow Oven Booster Pack   
  4. Like
    username reacted to RobG in 2.2" Color LCD Booster Pack with Touch   
    Quick update, new version of this board coming in about 3 weeks.
  5. Like
    username reacted to jpnorair in STM32L vs. MSP430F5: What's left for MSP430?   
    Here's my latest board using STM32L+SPIRIT1 -- I just got it today.  It's designed to be for sale.    I'm going to debug it first, though.
     

  6. Like
    username got a reaction from bluehash in Saving data to flash on power down   
    Note.... TI made one rather interesting  :crazy:  memory controller that only works with a clk of 476khz to 257khz. See Section 7.3.1 of the G series usermanual. Basically your going to have to tweak the divider values of FCTL2 to get this to work consistently with your MCU as well as force block erases.
  7. Like
    username got a reaction from bluehash in Ultrasound Garage Car Stopper   
    A Ultrasonic car stopper project I made for my garage to inform as to how far I should pull my car forward. This project uses a MSP430 launchpad and a HSC - 04 ultrasonic range module as well as a RGB LED and a photosensitive resistor.
     
    Youtube video: (uploading)


     
     
    Schematic here: garage_msp430.pdf
     
    Source here:
    (i'll clean it up in abit, was having trouble with my debugger hence all the globals)
    /*  * Author: Nathan Zimmerman  * Date: 6/22/13  *  * Description: A simple program to turn on a LED with the HC-SR04  * module to turn on a LED if the module detects a object closer  * than the trip point which is set by a pot  *  */ #include "msp430g2553.h" #include "stdint.h" //GPIO Pins #define trigger_pin           BIT2 #define echo_input_pin        BIT1 #define pot                   BIT0 #define bled                 BIT0 #define bled_setup            P2DIR #define bled_output        P2OUT #define bled_setup_on        bled_setup |= bled #define bled_on               bled_output |= bled #define bled_off            bled_output &=~bled #define rled                 BIT1 #define rled_setup            P2DIR #define rled_output        P2OUT #define rled_setup_on         rled_setup |= rled #define rled_on               rled_output |= rled #define rled_off            rled_output &=~rled #define gled                 BIT2 #define gled_setup            P2DIR #define gled_output           P2OUT #define gled_setup_on        gled_setup |= gled #define gled_on               gled_output |= gled #define gled_off             gled_output &=~gled //Ultrasound parameters #define timer_period        62500 // 4 * 62500 = 250ms #define trigger_pulse        (timer_period - 5) #define us_per_cm            58 #define time_to_trigger_us   450 #define distance_check        100 #define count_clk_divider    4 #define bad_measurement       40000 #define max_distance         400 //centimeters //Statics static uint16_t echo_pulse_counts = 0; static uint16_t distance_set_value =0; static uint16_t adc_val=0; static uint16_t distance=0; //Functions void clk_setup_1mhz(); void setup_trigger_pulse(); void setup_gpio_echo_interrupt(); void setup_adc_input(); uint16_t compare_distance_vs_threshold(); uint16_t get_adc_counts(); uint16_t get_distance_cm(); //Main void main(void) {     clk_setup_1mhz();     setup_trigger_pulse();     setup_gpio_echo_interrupt();     setup_adc_input();     bled_setup_on;     gled_setup_on;     rled_setup_on;     bled_off;     gled_off;     rled_off;     while(1)     {             distance = get_distance_cm();             if(distance)    //Check for out of range measurement             {                 if(distance<compare_distance_vs_threshold())                 {                     gled_off;                     rled_on;                 }                 else                 {                     gled_on;                     rled_off;                 }             }         }     } } // End of main void clk_setup_1mhz() {     BCSCTL1 = CALBC1_1MHZ;     DCOCTL = CALDCO_1MHZ;     WDTCTL = WDTPW + WDTHOLD; } void setup_trigger_pulse() {     P1DIR |= trigger_pin;     P1OUT &= ~trigger_pin;     P1SEL |= trigger_pin;     CCR0 = timer_period;     CCTL1 = OUTMOD_7;     CCR1 = trigger_pulse;     TACTL = TASSEL_2 + MC_1+ ID_2;     __enable_interrupt(); } void setup_gpio_echo_interrupt() {     P1DIR &= ~echo_input_pin;     P1OUT &= ~echo_input_pin;     P1IE |= echo_input_pin;     P1IES |= echo_input_pin;     P1IFG &= ~echo_input_pin; } void setup_adc_input() {     ADC10CTL1 |= CONSEQ1;     ADC10CTL0 |= ADC10SHT_2 + ADC10ON + MSC;     ADC10AE0 |= pot;     ADC10CTL0 |= ADC10SC + ENC; } uint16_t get_distance_cm() {     if(echo_pulse_counts>bad_measurement)         return 0;     else         return (echo_pulse_counts*count_clk_divider - (time_to_trigger_us))/ us_per_cm; } uint16_t get_adc_counts() {     return ADC10MEM; } uint16_t compare_distance_vs_threshold() {     uint32_t trip_threshold =0;     adc_val=0;     adc_val = get_adc_counts();     _delay_cycles(1);     trip_threshold = ((unsigned long)0x190*((unsigned long)adc_val))>>10;     _delay_cycles(1);     return (uint16_t)(trip_threshold & 0xFFFF); } #pragma vector=PORT1_VECTOR __interrupt void Port_1(void) {     echo_pulse_counts = TAR;     P1IFG &= ~echo_input_pin;     _delay_cycles(10); }  
  8. Like
    username got a reaction from swampdonkeykami in Ultrasound Garage Car Stopper   
    A Ultrasonic car stopper project I made for my garage to inform as to how far I should pull my car forward. This project uses a MSP430 launchpad and a HSC - 04 ultrasonic range module as well as a RGB LED and a photosensitive resistor.
     
    Youtube video: (uploading)


     
     
    Schematic here: garage_msp430.pdf
     
    Source here:
    (i'll clean it up in abit, was having trouble with my debugger hence all the globals)
    /*  * Author: Nathan Zimmerman  * Date: 6/22/13  *  * Description: A simple program to turn on a LED with the HC-SR04  * module to turn on a LED if the module detects a object closer  * than the trip point which is set by a pot  *  */ #include "msp430g2553.h" #include "stdint.h" //GPIO Pins #define trigger_pin           BIT2 #define echo_input_pin        BIT1 #define pot                   BIT0 #define bled                 BIT0 #define bled_setup            P2DIR #define bled_output        P2OUT #define bled_setup_on        bled_setup |= bled #define bled_on               bled_output |= bled #define bled_off            bled_output &=~bled #define rled                 BIT1 #define rled_setup            P2DIR #define rled_output        P2OUT #define rled_setup_on         rled_setup |= rled #define rled_on               rled_output |= rled #define rled_off            rled_output &=~rled #define gled                 BIT2 #define gled_setup            P2DIR #define gled_output           P2OUT #define gled_setup_on        gled_setup |= gled #define gled_on               gled_output |= gled #define gled_off             gled_output &=~gled //Ultrasound parameters #define timer_period        62500 // 4 * 62500 = 250ms #define trigger_pulse        (timer_period - 5) #define us_per_cm            58 #define time_to_trigger_us   450 #define distance_check        100 #define count_clk_divider    4 #define bad_measurement       40000 #define max_distance         400 //centimeters //Statics static uint16_t echo_pulse_counts = 0; static uint16_t distance_set_value =0; static uint16_t adc_val=0; static uint16_t distance=0; //Functions void clk_setup_1mhz(); void setup_trigger_pulse(); void setup_gpio_echo_interrupt(); void setup_adc_input(); uint16_t compare_distance_vs_threshold(); uint16_t get_adc_counts(); uint16_t get_distance_cm(); //Main void main(void) {     clk_setup_1mhz();     setup_trigger_pulse();     setup_gpio_echo_interrupt();     setup_adc_input();     bled_setup_on;     gled_setup_on;     rled_setup_on;     bled_off;     gled_off;     rled_off;     while(1)     {             distance = get_distance_cm();             if(distance)    //Check for out of range measurement             {                 if(distance<compare_distance_vs_threshold())                 {                     gled_off;                     rled_on;                 }                 else                 {                     gled_on;                     rled_off;                 }             }         }     } } // End of main void clk_setup_1mhz() {     BCSCTL1 = CALBC1_1MHZ;     DCOCTL = CALDCO_1MHZ;     WDTCTL = WDTPW + WDTHOLD; } void setup_trigger_pulse() {     P1DIR |= trigger_pin;     P1OUT &= ~trigger_pin;     P1SEL |= trigger_pin;     CCR0 = timer_period;     CCTL1 = OUTMOD_7;     CCR1 = trigger_pulse;     TACTL = TASSEL_2 + MC_1+ ID_2;     __enable_interrupt(); } void setup_gpio_echo_interrupt() {     P1DIR &= ~echo_input_pin;     P1OUT &= ~echo_input_pin;     P1IE |= echo_input_pin;     P1IES |= echo_input_pin;     P1IFG &= ~echo_input_pin; } void setup_adc_input() {     ADC10CTL1 |= CONSEQ1;     ADC10CTL0 |= ADC10SHT_2 + ADC10ON + MSC;     ADC10AE0 |= pot;     ADC10CTL0 |= ADC10SC + ENC; } uint16_t get_distance_cm() {     if(echo_pulse_counts>bad_measurement)         return 0;     else         return (echo_pulse_counts*count_clk_divider - (time_to_trigger_us))/ us_per_cm; } uint16_t get_adc_counts() {     return ADC10MEM; } uint16_t compare_distance_vs_threshold() {     uint32_t trip_threshold =0;     adc_val=0;     adc_val = get_adc_counts();     _delay_cycles(1);     trip_threshold = ((unsigned long)0x190*((unsigned long)adc_val))>>10;     _delay_cycles(1);     return (uint16_t)(trip_threshold & 0xFFFF); } #pragma vector=PORT1_VECTOR __interrupt void Port_1(void) {     echo_pulse_counts = TAR;     P1IFG &= ~echo_input_pin;     _delay_cycles(10); }  
  9. Like
    username got a reaction from Tribes in Sensorless BLDC motor control   
    Ya bum, you beat me to it! Very cool idea, what amp current are you hoping for? I assume this is for a quad copter ESC project?
    Lookin forward to seeing more and best of luck!
  10. Like
    username reacted to Tribes in Sensorless BLDC motor control   
    Hi there,
     
    my current project is to build a controller for a sensorless BLDC motor using a MSP430G2553. I want to realize trapezoidal control with Back-EMF/zero-crossing detection. I plan to detect zero-crossing with the Comparator(CA2/3/4 vs. CA1) and generate PWM using Timer1. Timer0 will be used for things like 30
    BLMC_.zip




  11. Like
    username got a reaction from lavaanalog in HC - SR04 Ultrasound Module Driver Code   
    Hey Kent,

    Here is what I did with the trig pin and the echo pin. The Vin pin was set to 5V on the module.
  12. Like
    username got a reaction from Kent in HC - SR04 Ultrasound Module Driver Code   
    Hey all,
     
    Heres some code I wrote for an upcoming project which uses an ultrasound range detector. It uses a GPIO falling edge interrupt to determine time of echo pulse and uses a capture/compare pin w/ timer 1A for a ~100us pin trigger. The module is 5V so I power that off a test point on the launchpad and I use a open drain configuration bjt to get my 5V GPIO output for the trigger pin, then I use a resistor divider for the echo input.
     
    Acouple drawbacks of using these modules:
    -Distance measurement is relative to the module you buy
    -Max sampling speed is relative to the module you buy
     
    Code drawback:
    -Apparently the MPS430G2553 GPIO falling edge interrupts can't detect short pulses so this doesn't work for super close proximity to the sensor.
    /*  * Author: Nathan Zimmerman  * Date: 6/22/13  *  * Description: A simple program to turn on a LED with the HC-SR04  * module if the module detects a object closer than 100 centimeters  *  *  */ #include "msp430g2553.h" #include "stdint.h" //GPIO Pins #define trigger_pin            BIT1 #define echo_input_pin        BIT3 #define led                    BIT0 //Ultrasound parameters #define timer_period        62500 // 4 * 62500 = 250ms #define trigger_pulse        (timer_period - 10) #define us_per_cm            14.5 // Depends on module #define time_to_trigger_us    450 #define distance_check        100 //centimeters //Statics static uint16_t echo_pulse_counts = 0; //Functions void clk_setup_1mhz(); void setup_trigger_pulse(); void setup_gpio_echo_interrupt(); uint16_t get_distance_cm(); //Main void main(void) {     clk_setup_1mhz();     setup_trigger_pulse();     setup_gpio_echo_interrupt();     P1DIR |= led;     P1OUT &= ~led;     while(1)     {         if (get_distance_cm() < distance_check)         {             P1OUT |= led;         }         else         {             P1OUT &= ~led;         }     } } // End of main void clk_setup_1mhz() {     BCSCTL1 = CALBC1_1MHZ;     DCOCTL = CALDCO_1MHZ;     WDTCTL = WDTPW + WDTHOLD; } void setup_trigger_pulse() {     P2DIR |= trigger_pin;     P2OUT &= ~trigger_pin;     P2SEL |= trigger_pin;     TA1CCR0 = timer_period;     TA1CCTL1 = OUTMOD_7;     TA1CCR1 = trigger_pulse;     TA1CTL = TASSEL_2 + MC_1+ ID_2;     __enable_interrupt(); } void setup_gpio_echo_interrupt() {     P1DIR &= ~echo_input_pin;     P1OUT &= ~echo_input_pin;     P1IE |= echo_input_pin;     P1IES |= echo_input_pin;     P1IFG &= ~echo_input_pin; } uint16_t get_distance_cm() {     return (echo_pulse_counts - time_to_trigger_us)/ us_per_cm; } #pragma vector=PORT1_VECTOR __interrupt void Port_1(void) {     echo_pulse_counts = TA1R;     P1IFG &= ~echo_input_pin; }
  13. Like
    username got a reaction from Kent in HC - SR04 Ultrasound Module Driver Code   
    Hey Kent,

    Here is what I did with the trig pin and the echo pin. The Vin pin was set to 5V on the module.
  14. Like
    username got a reaction from bluehash in HC - SR04 Ultrasound Module Driver Code   
    Hey Kent,

    Here is what I did with the trig pin and the echo pin. The Vin pin was set to 5V on the module.
  15. Like
    username reacted to swampdonkeykami in garden irrigation controller   
    Here's a trivial little controller that uses a Chinese soil moisture sensor, a relay and Adafruit solenoid valve to keep my wife's raised bed garden from dying.
     
    My thinking was that a timer is a stupid way to water a garden. What if it rains all spring (like it has been)? 
     
    The MSP430's analog pin is used to monitor the sensor and then fires the relay to open the solenoid valve if the reading is too low. There's a 30 second delay in the void loop to keep the solenoid from floating... 
     
    http://arduinoforgoodnotevil.blogspot.ca/2013/04/forget-to-water-your-garden-no-problem.html
     
    Unfortunately, after about a week the sensor cathode completely corroded!! I came home to a not so happy wife with a flooded garden! Ooops... it's on a timer until I make (and test) a stainless steel probe.
     
     
  16. Like
    username got a reaction from oPossum in Reflow Oven Booster Pack   
    Hey all, thanks for the comments. Video added, source will be added later if any interest.
     

  17. Like
    username got a reaction from EngIP in Reflow Oven Booster Pack   
    Hey all, thanks for the comments. Video added, source will be added later if any interest.
     

  18. Like
    username got a reaction from oPossum in HC - SR04 Ultrasound Module Driver Code   
    Hey all,
     
    Heres some code I wrote for an upcoming project which uses an ultrasound range detector. It uses a GPIO falling edge interrupt to determine time of echo pulse and uses a capture/compare pin w/ timer 1A for a ~100us pin trigger. The module is 5V so I power that off a test point on the launchpad and I use a open drain configuration bjt to get my 5V GPIO output for the trigger pin, then I use a resistor divider for the echo input.
     
    Acouple drawbacks of using these modules:
    -Distance measurement is relative to the module you buy
    -Max sampling speed is relative to the module you buy
     
    Code drawback:
    -Apparently the MPS430G2553 GPIO falling edge interrupts can't detect short pulses so this doesn't work for super close proximity to the sensor.
    /*  * Author: Nathan Zimmerman  * Date: 6/22/13  *  * Description: A simple program to turn on a LED with the HC-SR04  * module if the module detects a object closer than 100 centimeters  *  *  */ #include "msp430g2553.h" #include "stdint.h" //GPIO Pins #define trigger_pin            BIT1 #define echo_input_pin        BIT3 #define led                    BIT0 //Ultrasound parameters #define timer_period        62500 // 4 * 62500 = 250ms #define trigger_pulse        (timer_period - 10) #define us_per_cm            14.5 // Depends on module #define time_to_trigger_us    450 #define distance_check        100 //centimeters //Statics static uint16_t echo_pulse_counts = 0; //Functions void clk_setup_1mhz(); void setup_trigger_pulse(); void setup_gpio_echo_interrupt(); uint16_t get_distance_cm(); //Main void main(void) {     clk_setup_1mhz();     setup_trigger_pulse();     setup_gpio_echo_interrupt();     P1DIR |= led;     P1OUT &= ~led;     while(1)     {         if (get_distance_cm() < distance_check)         {             P1OUT |= led;         }         else         {             P1OUT &= ~led;         }     } } // End of main void clk_setup_1mhz() {     BCSCTL1 = CALBC1_1MHZ;     DCOCTL = CALDCO_1MHZ;     WDTCTL = WDTPW + WDTHOLD; } void setup_trigger_pulse() {     P2DIR |= trigger_pin;     P2OUT &= ~trigger_pin;     P2SEL |= trigger_pin;     TA1CCR0 = timer_period;     TA1CCTL1 = OUTMOD_7;     TA1CCR1 = trigger_pulse;     TA1CTL = TASSEL_2 + MC_1+ ID_2;     __enable_interrupt(); } void setup_gpio_echo_interrupt() {     P1DIR &= ~echo_input_pin;     P1OUT &= ~echo_input_pin;     P1IE |= echo_input_pin;     P1IES |= echo_input_pin;     P1IFG &= ~echo_input_pin; } uint16_t get_distance_cm() {     return (echo_pulse_counts - time_to_trigger_us)/ us_per_cm; } #pragma vector=PORT1_VECTOR __interrupt void Port_1(void) {     echo_pulse_counts = TA1R;     P1IFG &= ~echo_input_pin; }
  19. Like
    username got a reaction from pine in HC - SR04 Ultrasound Module Driver Code   
    Hey all,
     
    Heres some code I wrote for an upcoming project which uses an ultrasound range detector. It uses a GPIO falling edge interrupt to determine time of echo pulse and uses a capture/compare pin w/ timer 1A for a ~100us pin trigger. The module is 5V so I power that off a test point on the launchpad and I use a open drain configuration bjt to get my 5V GPIO output for the trigger pin, then I use a resistor divider for the echo input.
     
    Acouple drawbacks of using these modules:
    -Distance measurement is relative to the module you buy
    -Max sampling speed is relative to the module you buy
     
    Code drawback:
    -Apparently the MPS430G2553 GPIO falling edge interrupts can't detect short pulses so this doesn't work for super close proximity to the sensor.
    /*  * Author: Nathan Zimmerman  * Date: 6/22/13  *  * Description: A simple program to turn on a LED with the HC-SR04  * module if the module detects a object closer than 100 centimeters  *  *  */ #include "msp430g2553.h" #include "stdint.h" //GPIO Pins #define trigger_pin            BIT1 #define echo_input_pin        BIT3 #define led                    BIT0 //Ultrasound parameters #define timer_period        62500 // 4 * 62500 = 250ms #define trigger_pulse        (timer_period - 10) #define us_per_cm            14.5 // Depends on module #define time_to_trigger_us    450 #define distance_check        100 //centimeters //Statics static uint16_t echo_pulse_counts = 0; //Functions void clk_setup_1mhz(); void setup_trigger_pulse(); void setup_gpio_echo_interrupt(); uint16_t get_distance_cm(); //Main void main(void) {     clk_setup_1mhz();     setup_trigger_pulse();     setup_gpio_echo_interrupt();     P1DIR |= led;     P1OUT &= ~led;     while(1)     {         if (get_distance_cm() < distance_check)         {             P1OUT |= led;         }         else         {             P1OUT &= ~led;         }     } } // End of main void clk_setup_1mhz() {     BCSCTL1 = CALBC1_1MHZ;     DCOCTL = CALDCO_1MHZ;     WDTCTL = WDTPW + WDTHOLD; } void setup_trigger_pulse() {     P2DIR |= trigger_pin;     P2OUT &= ~trigger_pin;     P2SEL |= trigger_pin;     TA1CCR0 = timer_period;     TA1CCTL1 = OUTMOD_7;     TA1CCR1 = trigger_pulse;     TA1CTL = TASSEL_2 + MC_1+ ID_2;     __enable_interrupt(); } void setup_gpio_echo_interrupt() {     P1DIR &= ~echo_input_pin;     P1OUT &= ~echo_input_pin;     P1IE |= echo_input_pin;     P1IES |= echo_input_pin;     P1IFG &= ~echo_input_pin; } uint16_t get_distance_cm() {     return (echo_pulse_counts - time_to_trigger_us)/ us_per_cm; } #pragma vector=PORT1_VECTOR __interrupt void Port_1(void) {     echo_pulse_counts = TA1R;     P1IFG &= ~echo_input_pin; }
  20. Like
    username got a reaction from bluehash in HC - SR04 Ultrasound Module Driver Code   
    Hey all,
     
    Heres some code I wrote for an upcoming project which uses an ultrasound range detector. It uses a GPIO falling edge interrupt to determine time of echo pulse and uses a capture/compare pin w/ timer 1A for a ~100us pin trigger. The module is 5V so I power that off a test point on the launchpad and I use a open drain configuration bjt to get my 5V GPIO output for the trigger pin, then I use a resistor divider for the echo input.
     
    Acouple drawbacks of using these modules:
    -Distance measurement is relative to the module you buy
    -Max sampling speed is relative to the module you buy
     
    Code drawback:
    -Apparently the MPS430G2553 GPIO falling edge interrupts can't detect short pulses so this doesn't work for super close proximity to the sensor.
    /*  * Author: Nathan Zimmerman  * Date: 6/22/13  *  * Description: A simple program to turn on a LED with the HC-SR04  * module if the module detects a object closer than 100 centimeters  *  *  */ #include "msp430g2553.h" #include "stdint.h" //GPIO Pins #define trigger_pin            BIT1 #define echo_input_pin        BIT3 #define led                    BIT0 //Ultrasound parameters #define timer_period        62500 // 4 * 62500 = 250ms #define trigger_pulse        (timer_period - 10) #define us_per_cm            14.5 // Depends on module #define time_to_trigger_us    450 #define distance_check        100 //centimeters //Statics static uint16_t echo_pulse_counts = 0; //Functions void clk_setup_1mhz(); void setup_trigger_pulse(); void setup_gpio_echo_interrupt(); uint16_t get_distance_cm(); //Main void main(void) {     clk_setup_1mhz();     setup_trigger_pulse();     setup_gpio_echo_interrupt();     P1DIR |= led;     P1OUT &= ~led;     while(1)     {         if (get_distance_cm() < distance_check)         {             P1OUT |= led;         }         else         {             P1OUT &= ~led;         }     } } // End of main void clk_setup_1mhz() {     BCSCTL1 = CALBC1_1MHZ;     DCOCTL = CALDCO_1MHZ;     WDTCTL = WDTPW + WDTHOLD; } void setup_trigger_pulse() {     P2DIR |= trigger_pin;     P2OUT &= ~trigger_pin;     P2SEL |= trigger_pin;     TA1CCR0 = timer_period;     TA1CCTL1 = OUTMOD_7;     TA1CCR1 = trigger_pulse;     TA1CTL = TASSEL_2 + MC_1+ ID_2;     __enable_interrupt(); } void setup_gpio_echo_interrupt() {     P1DIR &= ~echo_input_pin;     P1OUT &= ~echo_input_pin;     P1IE |= echo_input_pin;     P1IES |= echo_input_pin;     P1IFG &= ~echo_input_pin; } uint16_t get_distance_cm() {     return (echo_pulse_counts - time_to_trigger_us)/ us_per_cm; } #pragma vector=PORT1_VECTOR __interrupt void Port_1(void) {     echo_pulse_counts = TA1R;     P1IFG &= ~echo_input_pin; }
  21. Like
    username got a reaction from MatteoGalet in Reflow Oven Booster Pack   
    Howdy all,
     
    Got out of college recently so I got a tad bit more time. Figured I finish off my reflow project properly since i've been getting alot of requests for kits. I'm in the process of developing a through-hole based reflow oven kit that would be easy for any hobbyist to assemble.
     
    Source Code: https://github.com/NateZimmer/Reflow_Oven_Kit
    Schematic: Printing Print Schematic.pdf
     
     



     


     


     
    Deluxe Kit includes and features:
    - 1x 2.2" Touch LCD Display
    - Discrete Cold Compensation Circuit 
    - A high temp low thermal mass thermocouple
    - A high Current Solid State Relay
    - A RGB LED
    - Optional Female Header interface for launchpad
    - Optional External Power interface for wall supply.
    Price: 50 USD + Shipping
     
    Standard kit includes and features:
    - 1x Nokia 5110 Display
    - Discrete Cold Compensation Circuit 
    - A high temp low thermal mass thermocouple
    - A high Current Solid State Relay
    - Optional Female Header interface for launchpad
    - Optional External Power interface for wall supply.
    Price: 40 USD + Shipping
     
    I'll try to get a video up soon. Anyhow, standard kit is on hold for now. A couple deluxe kits would be available in a few days hopefully.
    Pushed back 4 weeks so I can do some more testing, development, and get parts from china =P
  22. Like
    username got a reaction from carpin in Reflow Oven Booster Pack   
    Howdy all,
     
    Got out of college recently so I got a tad bit more time. Figured I finish off my reflow project properly since i've been getting alot of requests for kits. I'm in the process of developing a through-hole based reflow oven kit that would be easy for any hobbyist to assemble.
     
    Source Code: https://github.com/NateZimmer/Reflow_Oven_Kit
    Schematic: Printing Print Schematic.pdf
     
     



     


     


     
    Deluxe Kit includes and features:
    - 1x 2.2" Touch LCD Display
    - Discrete Cold Compensation Circuit 
    - A high temp low thermal mass thermocouple
    - A high Current Solid State Relay
    - A RGB LED
    - Optional Female Header interface for launchpad
    - Optional External Power interface for wall supply.
    Price: 50 USD + Shipping
     
    Standard kit includes and features:
    - 1x Nokia 5110 Display
    - Discrete Cold Compensation Circuit 
    - A high temp low thermal mass thermocouple
    - A high Current Solid State Relay
    - Optional Female Header interface for launchpad
    - Optional External Power interface for wall supply.
    Price: 40 USD + Shipping
     
    I'll try to get a video up soon. Anyhow, standard kit is on hold for now. A couple deluxe kits would be available in a few days hopefully.
    Pushed back 4 weeks so I can do some more testing, development, and get parts from china =P
  23. Like
    username got a reaction from dpharris in Reflow Oven Booster Pack   
    Howdy all,
     
    Got out of college recently so I got a tad bit more time. Figured I finish off my reflow project properly since i've been getting alot of requests for kits. I'm in the process of developing a through-hole based reflow oven kit that would be easy for any hobbyist to assemble.
     
    Source Code: https://github.com/NateZimmer/Reflow_Oven_Kit
    Schematic: Printing Print Schematic.pdf
     
     



     


     


     
    Deluxe Kit includes and features:
    - 1x 2.2" Touch LCD Display
    - Discrete Cold Compensation Circuit 
    - A high temp low thermal mass thermocouple
    - A high Current Solid State Relay
    - A RGB LED
    - Optional Female Header interface for launchpad
    - Optional External Power interface for wall supply.
    Price: 50 USD + Shipping
     
    Standard kit includes and features:
    - 1x Nokia 5110 Display
    - Discrete Cold Compensation Circuit 
    - A high temp low thermal mass thermocouple
    - A high Current Solid State Relay
    - Optional Female Header interface for launchpad
    - Optional External Power interface for wall supply.
    Price: 40 USD + Shipping
     
    I'll try to get a video up soon. Anyhow, standard kit is on hold for now. A couple deluxe kits would be available in a few days hopefully.
    Pushed back 4 weeks so I can do some more testing, development, and get parts from china =P
  24. Like
    username got a reaction from yyrkoon in Reflow Oven Booster Pack   
    Howdy all,
     
    Got out of college recently so I got a tad bit more time. Figured I finish off my reflow project properly since i've been getting alot of requests for kits. I'm in the process of developing a through-hole based reflow oven kit that would be easy for any hobbyist to assemble.
     
    Source Code: https://github.com/NateZimmer/Reflow_Oven_Kit
    Schematic: Printing Print Schematic.pdf
     
     



     


     


     
    Deluxe Kit includes and features:
    - 1x 2.2" Touch LCD Display
    - Discrete Cold Compensation Circuit 
    - A high temp low thermal mass thermocouple
    - A high Current Solid State Relay
    - A RGB LED
    - Optional Female Header interface for launchpad
    - Optional External Power interface for wall supply.
    Price: 50 USD + Shipping
     
    Standard kit includes and features:
    - 1x Nokia 5110 Display
    - Discrete Cold Compensation Circuit 
    - A high temp low thermal mass thermocouple
    - A high Current Solid State Relay
    - Optional Female Header interface for launchpad
    - Optional External Power interface for wall supply.
    Price: 40 USD + Shipping
     
    I'll try to get a video up soon. Anyhow, standard kit is on hold for now. A couple deluxe kits would be available in a few days hopefully.
    Pushed back 4 weeks so I can do some more testing, development, and get parts from china =P
  25. Like
    username got a reaction from Donny M. Carter in Reflow Oven Booster Pack   
    Howdy all,
     
    Got out of college recently so I got a tad bit more time. Figured I finish off my reflow project properly since i've been getting alot of requests for kits. I'm in the process of developing a through-hole based reflow oven kit that would be easy for any hobbyist to assemble.
     
    Source Code: https://github.com/NateZimmer/Reflow_Oven_Kit
    Schematic: Printing Print Schematic.pdf
     
     



     


     


     
    Deluxe Kit includes and features:
    - 1x 2.2" Touch LCD Display
    - Discrete Cold Compensation Circuit 
    - A high temp low thermal mass thermocouple
    - A high Current Solid State Relay
    - A RGB LED
    - Optional Female Header interface for launchpad
    - Optional External Power interface for wall supply.
    Price: 50 USD + Shipping
     
    Standard kit includes and features:
    - 1x Nokia 5110 Display
    - Discrete Cold Compensation Circuit 
    - A high temp low thermal mass thermocouple
    - A high Current Solid State Relay
    - Optional Female Header interface for launchpad
    - Optional External Power interface for wall supply.
    Price: 40 USD + Shipping
     
    I'll try to get a video up soon. Anyhow, standard kit is on hold for now. A couple deluxe kits would be available in a few days hopefully.
    Pushed back 4 weeks so I can do some more testing, development, and get parts from china =P
×
×
  • Create New...