Monday, October 7, 2013

IR top board

















Top board

The IR board consisted of five IR detectors (and 0.1uF capacitors) and five accompanying IR leds.  There was also the PWM booster transistors and variable resistors to control the range of the IR leds.  I needed to be careful to try and avoid the PWM lines and the IR detector cabling from interfering with each other.  Otherwise the 38khz on the PWM wires could cause the IR detectors to falsely trigger.  So all the cabling was kept apart or if the wires had to cross then I tried to do so at right angles to reduce EMF.

Once all the parts were soldered up I did detection tests by measuring the voltage on the signal pin of the IR detector.  I found that to get the range I wanted I was almost at minimum resistor value of the IR led variable resistor circuit.  Instead of 100 ohms and a 1K variable resistor I probably should have gone of the absolute safe minimum of 50 ohms and a 500 ohm variable resistor.  However what I have worked ok.

Initially I was driving 3 IR leds off one transistor for the right side/left side / rear leds.  However I wasn't getting any signal from two of the IR leds.  It seems with the resistor value so low the voltage drop across the 3 leds was more than 5V.  The first led in series worked, but the second and third leds didn't.  I worked this out by measuring the frequency on the led pins and finding only the first led was at 38khz.  The others were zero.  However there was still voltage on each pin.  Odd.  So I added a third transistor of the rear IR led.  This means I have three transistor / resistor circuits for the leds.  One for the front two leds, one of the two side leds, one for the single rear led.  Perhaps I might add a second rear led, but space is very tight on the rear of the board.

With the IR detectors the two side detectors were up high and peering over the wheels.  Originally the front IR detectors were on top of the board looking down.  However due to the height of the front board this left a blind spot right at the front of pennybot.  Not the place you want a blind spot.  So I desoldered the front IR leds and detectors and put them under the board to get them lower.