Infrared Remote

Filled under: Electronics

Date posted: March 3, 2010

It’s the mysterious animal living in the couch.

A PicMirco based infrared remote to control a RGB LED project station.

The backside.

Up close of the PIC16F616 and it’s custom etched breakout board.

The test setup receiver.  A PIC18F44K20 driving nine RGB LEDs.

A close up of the IR decoder. Setup for 38KHz modulation. Model # TSOP34838. Connected directly to the MCU’s UART input.

Technical:

Modulated infrared beams are pulsed out at 2400 bits per second. The 38KHz modulation is achieved by the built in PWM hardware of the PIC16F616. For simplicity two transistors act as an AND gate between the UART and the PWM modulation. The BAUD is slow enough to not be effected by the 38KHz modulation. The # TSOP34838 IR decoder is a phototransistor that only actuates when it detects an infrared presence oscillating at the frequency of 38KHz.

 

Range Test:

The first range test produced a dismal result, one foot. Yep, that’s it. It really was not that disappointing because I had an inclination when 4800bps was first coded in it would be too fast. After lowering the clock speed of the receiver test station from 64MHz to 32MHz the BAUD was able to be lowered to 2400bps. The next test’s outcome was favorsome, ~36feet.

The next test is to lower the baud rate as low as possible to say around 600bps, this should increase the range a bit more. The only issue with this is the PIC MCU will need to have it’s internal clock lowered in order to use the built in UART hardware. Considering the receiver is also a PIC generating software PWM signals to drive RGB LEDs too low of a clock speed will result in obvious flicking of the LEDs. Two possible solutions are to connect the IR signal to the PORTB interrupt and make a special firmware decoding routine or to use a BAUD translator.  The BAUD translator could be another PIC using both hardware UART and software UART.

 

Schematic:

  • U1 – PIC16F616
  • R1, R2, R3 – 10K Ohm
  • U2, U3 – 2N2222 NPN
  • D1 – TSAL5300
  • BT1 – CR2025

Note: The schematic is missing a resistor for the IR LED. However, considering the IR emitting diode required 1.35v, the supply voltage from the battery is 3.6v, and a 50% PWM/2400bps BAUD should fall under the peak current rating for the IR LED.