Infrared Obstacle Detector with MSP430


In many hobby projects people use some ready-to-use infrared sensors for obstacle avoidance, which are usually working great but power hungry devices. Here is a infrared detector which works with very low power if you code MSP430G2333 wisely. It uses a 940 nm IR emitter,  TSSP58038 IR receiver, and “74AHC1G08 AND gate” for generating a 38 kHz pulse.

The mosfet  power-up and power-down the IR receiver, so that it does not consume power when we do not need it. The main idea is to send 38 kHz modulated IR pulse and look for the  feedback from the IR receiver(TSSP58038). With this circuit I am able to detect obstacles up to 30 cm. You can adjust the range with adjusting the current of IR emitter, so maybe connecting a 1K POT instead of R70 is better if you want to adjust the detection range.

To generate 38 kHz you can use the timers of MSP430G2333 or you can hard code the toggling at 38khz in a while loop.

My detection routine works 10 times in a second which is about 500 micro seconds, then the device sleeps in LPM3 mode. With this configuration the detector consumes under 8 micro amperes which is great.  The MSP430G2333 use its own oscillator for timers (BCSCTL3 |= LFXT1S_2) which consumes very little power and the device wakes-up it works at 1MHZ just for a small moment.

Below is the schematic for IR detector, I will also share the code in the following posts.



infrared obstacle detector-schematic
Infrared obstacle detector, click for high-res version.

Notes: Jtag port for MSP430 is not compatible to the original FET Programmer, I have a adaptor between the FET and connector so be careful.

Leave a Reply

Your email address will not be published. Required fields are marked *