This is done using two MSP430G2252 microcontrollers, one bit-banging out 38kHz continuous wave modulated serial, and the other using a fixed frequency 38kHz receiver to demodulate the IR and decode it. Both processors use a seven segment LED display to display their current state, which can range from 0-9 or an E(rror) state.
The limiting factor in the baud rate is the IR receiver, which has a 200us response delay, which means if we try and modulate information faster than that, the receiver will just ignore it. That being said, the 512 baud rate I tested is still perfectly useful for basic telemetry information like "change channel" or "Turn on/off" like is used in television remotes.
Video:
The range is quite good, covering most of a room with 40mA into the IR LED. The software leaves something to be desired, since it consumes almost all of the processor time bit-banging out 38kHz and trying to do anything else would likely glitch the modulation. Error detection coding will be the next priority.
Transmitter parts list:
- 1x MSP430G2252 (TI)
- 1x IR LED
- 1x 50Ω resistor
- 1x 32kHz crystal
- 2x push buttons
- 1x seven segment LED display
- 8x 100Ω resistors for LED display
- 1x MSP430G2252 (TI)
- 1x 38kHz IR receiver (TSOP39338 Digikey $0.91)
- 1x 32kHz crystal
- 1x seven segment LED display
- 8x 100Ω resistors for LED display
Basic idea should also work well for turning on lights as we drive in, with a IR LED mounted on a car.
ReplyDeleteGreat post and nice video will be useful. Thanks!!
ReplyDeletehi, can you send to me circuit schema ? bahadir.karaman91@gmail.com
ReplyDeleteThe pin uses are in the comments at the top of each source file, and the specific seven segment pin assignments is long-lost, but can be completely changed by changing the digits[] bitmap.
DeleteThe LEDs need current limiting resistors, and the IR receiver circuit was pulled straight out of it's datasheet.
Hi kenneth, Good Day. Can you please send me a circuit diagram of these IR Serial Communication project because I need it badly if it's okay for you sir. This is my email address, janry_malon@yahoo.com. I hope you can help me, Thank you.
ReplyDeleteHi kenneth, Good Day. Can you please send me a circuit diagram of these IR Serial Communication project because I need it badly if it's okay for you sir. This is my email address, janry_malon@yahoo.com. I hope you can help me, Thank you.
ReplyDeletehi,
ReplyDeletei have a problem in your code:
TAIV &= ~(0x02); - Error[Pe137]: expression must be a modifiable lvalue.
can you help me?
i'm using IAR.
Thank you.
I only use CCS. Are you maybe using the wrong macro for the registers?
Delete