Some weeks ago, a fellow from my LEGO User Group reached me for some Infrared electronics insights. He was trying to remote control his LEGO DUPLO Train with an infrared remote.
I never played with IR before but got curious. I love the idea of remote controlling something. But not manually, it has to be programmatically so one can use it for automation or robotic purposes. So after some weeks I found the LIRC definitions for LEGO Power Functions IR and used it to remote control LEGO from my laptop via the audio output.
Then it was the anniversary of one the kids and he asked granny for a major upgrade of their DUPLO train track:
Opening it was difficult but I managed to do it without breaking anything, thanks to these two previous brave pioneers:
(their locomotives are from a different set but the idea is the same)
The locomotive has a pair of free wheels at front and another pair drived by a motor and some gears at back where there is also a piezo buzzer, a printed circuit board and a pair of wires comming from the batteries holder. There are also two rubber buttons that press some small metal rings against the surface of the PCB to act as switches – the smaller one, hidden in a small hole, makes the sound of fuel being pumped into the tank when the fuel hose is inserted, the bigger one controls starts/stops the train but also indirectly controls the sound of the locomotive (when in movement) and the sound of the breaks (when stopping).
The PCB has 6 wires soldered at points labeled J1 to J6:
- J1 and J3 – buzzer
- J2 and J4 – batteries
- J5 and J6 – motor
As the batteries holder is for just 3 AA batteries, the board works with 4.5V. Not much but enough for a LEGO Power Functions IR receiver or a Vengit SBrick.
We could just dessolder the wires at J2/J4 (power) and J5/J6 (motor), get a LEGO Power Functions cable, cut it in half and solder the tips from one half to J2/J4 and the tips from the other half to J5/J6. But that will make the buzzer useless.
As the buzzer is controlled by an IC on the PCB, I choose to keep the power lines going to the PCB (J2/J4) and deriving from there to the Power Functions cable (but still dessoldering J5/J6). This way, when the batteries are inserted, both the remote and the PCB are ON so the two buttons maintain their functionality. This gives us as an unexpected possibility: we can also use the PF cable to power the train instead of using 3 AA batteries – with special caution because LEGO PF batteries or LEGO 9V batteries give more than 4.5V so some reduction has to be done, like adding some 1N4001 diodes or a voltage regulator… but a USB 5.0V battery pack will be perfect.
Since I didn’t want to drill or cut the plastic, I managed to pass the PF cables through the start/stop button hole (before soldering it) but later found out that it was to tight for the rubber button – so no more «tchoo-tchoo!» nor breaks (some may consider this a feature, not a bug).
Some more photos are available at this Brickshelf folder.
The final result is a LEGO DUPLO train that:
- can be remotely controlled by Infrared or Bluetooth, manually or programatically
- can move forward AND backward
- can use LEGO batteries (PF or 9V) with a special cable or a USB battery pack