{"id":843,"date":"2014-12-16T18:44:14","date_gmt":"2014-12-16T18:44:14","guid":{"rendered":"http:\/\/ofalcao.pt\/blog\/?p=843"},"modified":"2016-06-14T15:29:04","modified_gmt":"2016-06-14T14:29:04","slug":"how-to-remote-control-a-lego-duplo-train","status":"publish","type":"post","link":"https:\/\/ofalcao.pt\/blog\/2014\/how-to-remote-control-a-lego-duplo-train","title":{"rendered":"How to remote control a LEGO DUPLO Train"},"content":{"rendered":"<p>Some weeks ago, a fellow from my LEGO User Group reached me for some Infrared electronics insights. He was trying to <a title=\"Comboio DUPLO controlado por IV - WIP\" href=\"www.plug.pt\/forum\/index.php?topic=8974.msg130817\">remote control his LEGO DUPLO Train with an infrared remote<\/a>.<\/p>\n<p>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 <a title=\"Infrared Remote Control\" href=\"\/blog\/en\/2014\/infrared-remote-control\">remote control LEGO from my laptop via the audio output<\/a>.<\/p>\n<p>Then it was the anniversary of one the kids and he asked granny for a major upgrade of their DUPLO train track:<\/p>\n<figure style=\"width: 640px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/shop.lego.com\/en-PT\/Deluxe-Train-Set-10508\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"\" src=\"https:\/\/i0.wp.com\/www.bricklink.com\/SL\/10508-1.jpg?resize=640%2C427\" alt=\"\" width=\"640\" height=\"427\" \/><\/a><figcaption class=\"wp-caption-text\">LEGO\u00ae DUPLO\u00ae Deluxe Train Set<\/figcaption><\/figure>\n<p>So I thought it would be great if they could control the train back and forth&#8230; and ordered a used <a href=\"http:\/\/www.bricklink.com\/catalogItem.asp?P=5135c01\">DUPLO Train <\/a><span style=\"font-family: Geneva,Arial,Helvetica;\"><b><a href=\"http:\/\/www.bricklink.com\/catalogItem.asp?P=5135c01\">Locomotive Base (<span style=\"font-family: Arial;\">5135c01<\/span>)<\/a> <b>from <b>Brick<b>L<\/b>ink.<\/b><\/b><\/b><\/span><\/p>\n<p>Opening it was difficult but I managed to do it without breaking anything, thanks to these two previous brave pioneers:<\/p>\n<ul>\n<li><a href=\"http:\/\/www.robertcailliau.eu\/Alphabetical\/L\/Lego\/Duplo\/Train\/Locomotives\/\">Robert Cailliau &#8211; Dismantling a locomotive<\/a><\/li>\n<li><a href=\"http:\/\/pimvanderzwet.wordpress.com\/2011\/03\/21\/how-to-take-apart-a-duplo-train\/\">Pim van der Zwet &#8211; How to take apart a Duplo train <\/a><\/li>\n<\/ul>\n<p>(their locomotives are from a different set but the idea is the same)<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/i0.wp.com\/www.brickshelf.com\/gallery\/jorgepereira\/DuploTrainRC\/duplotrainmod04.jpg?resize=480%2C270\" alt=\"\" width=\"480\" height=\"270\" \/><\/p>\n<p>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 &#8211; 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).<\/p>\n<p>The PCB has 6 wires soldered at points labeled J1 to J6:<\/p>\n<ul>\n<li>J1 and J3 &#8211; buzzer<\/li>\n<li>J2 and J4 &#8211; batteries<\/li>\n<li>J5 and J6 &#8211; motor<\/li>\n<\/ul>\n<p>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.<\/p>\n<p>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.<\/p>\n<p>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 &#8211; 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&#8230; but a USB 5.0V battery pack will be perfect.<\/p>\n<p>Since I didn&#8217;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 &#8211; so no more \u00abtchoo-tchoo!\u00bb nor breaks (some may consider this a feature, not a bug).<\/p>\n<p>Some more photos are available <a href=\"http:\/\/www.brickshelf.com\/cgi-bin\/gallery.cgi?f=550468\">at this Brickshelf folder<\/a>.<\/p>\n<p>The final result is a LEGO DUPLO train that:<\/p>\n<ul>\n<li>can be remotely controlled by Infrared or Bluetooth, manually or programatically<\/li>\n<li>can move forward AND backward<\/li>\n<li>can use LEGO batteries (PF or 9V) with a special cable or a USB battery pack<\/li>\n<\/ul>\n<div class=\"jetpack-video-wrapper\"><iframe loading=\"lazy\" title=\"LEGO DUPLO Train remotely controlled with Power Functions IR\" width=\"840\" height=\"630\" src=\"https:\/\/www.youtube.com\/embed\/6bgRH9Z3L4g?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/div>\n<div class=\"jetpack-video-wrapper\"><iframe loading=\"lazy\" title=\"LEGO DUPLO Train remotely controlled with SBrick\" width=\"840\" height=\"630\" src=\"https:\/\/www.youtube.com\/embed\/53sO5qrXAF0?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/div>\n","protected":false},"excerpt":{"rendered":"<p>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 &hellip; <a href=\"https:\/\/ofalcao.pt\/blog\/2014\/how-to-remote-control-a-lego-duplo-train\" class=\"more-link\">Continuar a ler<span class=\"screen-reader-text\"> &#8220;How to remote control a LEGO DUPLO Train&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[1],"tags":[243,136,201],"series":[],"class_list":["post-843","post","type-post","status-publish","format-standard","hentry","category-sem-categoria","tag-duplo-pt","tag-remote-control","tag-train-pt"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2Mhyv-dB","_links":{"self":[{"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/posts\/843","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/comments?post=843"}],"version-history":[{"count":0,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/posts\/843\/revisions"}],"wp:attachment":[{"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/media?parent=843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/categories?post=843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/tags?post=843"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/series?post=843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}