Skip to content

Sofia" locomotive controlled by Infrared, with Ultrasound speed control and Arduino multipurpose superior engine (Lego Duplo)

3D model description

  • Locomotive "SOFIA" compatible with Lego Duplo train tracks, controlled by infrared, with speed control by Ultrasound Sensor and with a second magnet motor for varied use. Works with ARDUINO NANO.

  • A "SMALL MANUAL" is left in .pdf format to be able to carry out this project. A file is also left where the assembly diagram is shown as well as the functions currently programmed in the remote control.

  • We leave the program that we must load to our Arduino Nano (in tests), it is quite commented, called "Tren_Lego_Duplo_Sofia.ino", it is necessary to have installed the library "IRLib2" so that our infrared controller works correctly, also included in the downloads, as well as the USB drivers to communicate correctly with our Arduino Nano.

  • Small animation of the design (possibly some modifications will be added in the future):

  • We have a little video of it working on:

  • By means of an infrared control and an Arduino Nano we control the "SOFIA" Locomotive, which is compatible with the tracks of the LEGO DUPLO TRAIN.

  • This has an ultrasonic distance sensor to reduce speed or brake before colliding in the direction of the train, which we can enable or disable.

  • You can also increase the speed manually by pressing the forward or reverse button on the infrared control several times (wheel motor) until the maximum speed is reached. The same applies to the second "magnet carrier" motor located at the top of the locomotive (it has a wheel with neodymium magnets for future magnetic games.

  • We can turn the "headlights" on/off for better visibility when driving at night...

  • The locomotive is powered by 2 rechargeable 18650 batteries, which are located in a battery box inside.

  • It has a small active speaker (we can only give small beeps) to signal various functions. Sounds can be turned on or off.

  • UPDATE: We have added the option from the same infrared control (model VS1838) to be able to control 2 locomotives, we will simply have to load each locomotive with a different program (left in the downloads).

  • Several covers were also added where the infrared sensor is mounted with different names (ALICIA, NORA, LAURA, MARCOS, DANIELA, THIAGO, and one No Name).

  • A small merry-go-round is added for the upper engine, prepared for 4 neodymium magnets 4x4mm cylinders, a piece of metal could also be inserted.

  • A small catapult is added for the upper motor, 2 neodymium magnets are needed as those mounted on the 10x3mm round magnetic wheel. See images at the end

3D printing settings

0.2 layer height

100% padding


  • 3D file format: PDF, STL, and ZIP





Page translated by automatic translation. See the original version.

Add a comment