Developer Log

Version 0.2: IR sensors + USB port (Arduino)

Because of some problems with the LDR sensores in version 0.1, in August/2011 I decided to make a prototype with IR (infrared) sensors. The idea is to put an IR emitter and a IR phototransistor that, analog to the LDR system, identifies when car passes the sensor.

Phototransistors, photodiodes and IR LEDs.IR Sensor Track - top view.IR Sensor Track - bottom view.Close up on phototransistors.IR Sensore Track with emitters.

In this project I changed the power, track and accelerator connectors by the P4 component, which helps any future changes in the power supply model without having to cut and patch wires together. Since I've changed all my slot cars' power supplies plugs, I made a small board to connect the track, power and accelerator together without the race controller hardware -- to change the track direction, just invert the connectors on the tips.

P4 connectors.Connection Board: connects the power, track and accelerator without using the requiring a relay board.Power Track - top view.Power Track - bottom view.Relay Board (20/august/2011) - top view.Relay Board (20/august/2011) - bottom view.

Implementing the infrared sensors was relatively simple, even the Arduino code itself got simpler, because the IR sensors output a clean on-off signal, without needing to calibrate thresholds all the time. With the LDRs, it was required to keep measuring the light and calibrating it according to the minimuns and maximuns. On the con side, aligning the emitter and the sensor is not trivial, since we cannot see the IR light with naked eye.

In my opinion the alignment problem is nothing compared to the benefits: the number of invalid readings plummeted even with vibrations or changes in room lighting. If the car hits the emitter and the alignment is completely lost, then we will have problems, that is why it is very important to properly fixate the emitters and put in sections less prone to accidents.

Track with sensors and emitters assembled.Suggestion of assembling the IR emitters.Notice the IR LED on, it appears as a dim light in my camera because it has no night mode.

PS.: To see the IR light, try using an old cheap camera (without IR filter) or a newer camera with night vision (use night vision mode). In the software I created, I made a debug mode to check if the sensor is aligned, which was good enough to properly align without seeing it.

Check also the development of version 0.3, where I used reed (magnetic) switches underneath the track so no light bridge or IR emitter is needed anymore.