Search the Community

Showing results for tags 'arduino'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Frontpage, Forum Information and General LEGO Discussion
    • Frontpage News
    • Forum Information and Help
    • General LEGO Discussion
  • Themes
    • LEGO Licensed
    • LEGO Star Wars
    • LEGO Historic Themes
    • LEGO Action and Adventure Themes
    • LEGO Pirates
    • LEGO Sci-Fi
    • LEGO Town
    • LEGO Train Tech
    • LEGO Technic, Mindstorms & Model Team
    • LEGO Action Figures
    • Special LEGO Themes
  • Special Interests
    • Minifig Customisation Workshop
    • LEGO Digital Designer and other digital tools
    • Brick Flicks & Comics
    • LEGO Mafia and Role-Play Games
    • LEGO Media and Gaming
  • Eurobricks Community
    • Hello! My name is...
    • LEGO Events and User Groups
    • Buy, Sell, Trade and Finds
    • Community
    • Culture & Multimedia




Website URL








Special Tags 1

Special Tags 2

Special Tags 3

Special Tags 4

Special Tags 5

Special Tags 6

Country flag

Found 19 results

  1. Hello all, I'm trying to find a way to create a power/data coupling between train cars that can be connected/disconnected like the car coupling magnets. Has anyone done anything like this? Background: This is so that I can supply power and control to LED lights (and maybe other devices) in the cars being pulled behind the engine, which will provide the power and control unit (Arduino based MCU) I've tried using a micro USB magnetic connector, but they are too bulky and don't flex easily enough for this. I'd love to find out if anyone has engineered anything similar. Thanks in advance! Arlo
  2. Hi Guys, I got a bit carried away with my latest lighting setup and thought I would share my progress. I started off just wanting front and rear white/red lights but... well video's speak louder than words.. I have an ESP8266 onboard programmed with the Arduino IDE. The motor is controlled with a RC brushed motor ESC and the LED's (6 in total) are all programmable so they only need 1 output pin for all 6. It is communicating by MQTT and at the moment I am using Home Assistant just as a test controller but the plan is to use it with 4DBrix's nControl software as the features become available. A benefit of using Home Assistant lets me control it from my phone or PC. It will work across the web as well but I don't really have the need to control my trains from outside the house. Not yet anyway... I'll get some video's about the build up when I can Mike
  3. To all LEGO train automation enthusiasts, This is a short clip of the final version of our LEGO compatible track switch motor. It has a digital servo embedded in a 3D printed housing. This is a 'plug & play' solution: the motor is strong enough that it doesn't require any modification of the switch (you don't need to open the switch and remove the notch to reduce the force needed to flip it). I also added a picture of the back side so you can see how it can fit onto a LEGO® switch. The housing is made in a custom dark bluish gray ABS filament that matches the LEGO® tracks. The motor has a 6 by 6 stud footprint and it's 2 bricks + 2 plates high. We'll be making controllers for these motors as well, so you can connect them to your PC. However, the motors are fully Arduino compatible, so you can integrate them in you own DIY control system. What do you think ? We're working on a full range of automation gadgets for LEGO trains. What other automation challenges would you like to see solved ?
  4. Greetings. Thanks to herwin's Arduino trains and Lowa's nicely printed track switch motor, I feel Arduino inspired again. I remember I had bought some eBay SG90 servo motors and 3D printed a servo mount at my local public library last year. I dug them out and in 1 - 2 hrs I have it working. I was pleasantly surprised how easy it was to build and code. I reused my Arduino PF train module and code sketch. I connected the servo motor to +/- power and one of the PWM pins. Measured the angles needed for the servo arm to be at to flip the switch. Put the values in the servo.write() function and viola! The pinouts on this servo motor are brown wire is ground, red wire is +5V, and orange is control signal. It can be used with a push button switch to activate instead of fancy Bluetooth devices. That could be useful for public displays where the kids (or adults) can press buttons and watch the train as one half goes one way and the other half tries to go the other way.
  5. Hey all, I'm working on a big automation project and I needed some automated rail crossings for that. This was already a project on itself which I like to share with you. I work with the 9V system and make trains stop by disabling isolated segments in the rails. That princicple is also used in the automated rail crossing. The crossing is controlled by a printed circuit board which I have designed myself. The PCB is multifunctional and can control two single crossings or one double crossing. This means that the board has two connections for sensors, two connections for signals and two connections for isolated track segments. Printed Circuit Board The heart of the system is stand alone Arduino chip. When the sensor is triggered by a train that is passing by, the non-priority track is disabled and the concerning signal is put to red. As long as the train triggers the sensor, the non-priority track remains disabled. When the train has cleared the sensor, a timer is started to make sure the train has left the crossing before the non-priority track is enabled again. This timer is adjustable by means of an adjustable resistor. Since the PCB can control two crossings, it contains also two adjustable resistors. The value of the delays is displayed on a 4-digit display. This way the system is flexible and can cope with slower or faster trains. Sensor Ofcourse you want to see the thing in action, so I also made a video. In this layout a double crossing is controlled by the PCB.
  6. I'm working on a range of bricks for Arduino - mechanically compatible with LEGO technic, electronically compatible with Arduino - which I plan to make available in our bricklink store early next year. Below you have a short video with a demo: a servo motor controlled by a rotation sensor, both are connected to an Arduino nano board. What do you think ? What else would be useful? Both the motor and sensor are fully LEGO compatible: Some technical details on the motor and sensor: Motor: 0-180 digital servo housing dimensions: 3 x 4 x 5 studs technic axle connection to motor 4 technic peg connectors on the front 4 technic axle connectors on the sides (2 on each side) Sensor: measures rotation with a resolution up to 1 degree variable resistor 360 rotation capabilities housing dimensions: 3 x 4 x 2 studs technic axle connection to sensor 4 technic peg connectors on the top
  7. Hi, I'm new to this forum and what to share my project of the last months: Arduino Powered LEGO train! Check this video to get the first look: What i can do right now: Arduino MEGA powered trains Up to 3 trains (can be more, not tested yet) Self written C++ code for controlling the trains. Trains chooses random his path, no predefined paths yet. HTML5 Web Interface Canvas dynamic train layout Control trains and Points Check status of tracks and Points reset MEGA MEGA connected to Raspberry Pi with send/receive commands via SocketIO (temp solution, waiting for the Ethernet Shield!) Working crossover Working red/green signals (not on video) Magnets in Trains to let reed sensors detect the trains Differente speeds per tracks Multiple station segment (wait a couple of seconds on that segment) Cargo segment (wait couple of seconds and reverse) Track in video has 18 track segments, 4 normal points, 1 double point, 1 crossover, 1 red/green signal, 2 station segments, 1 cargo segment. Some issues left: Speed of the MEGA, not always fast enough to check reed sensors. USB connection to Raspberry Pi not as stable Lots of crashed :) longest stable run with 3 trains: 4 minutes... with 2 trains: 10 minutes Components used (most bought at BangGood) Arduino Mega with shield for connections modified points 3 HW-95 Motor drivers 1 powerfull IR led lots of wires (used old CAT5 wires!) LOTS of time... So far for today! post pictures of details later. Herwin
  8. As part of my quest to control my Lego train layout with an FPGA controller, I decided that I would want some railway signals that would change as the train passed by. I then realized how much of a mess that would be with wires running to and from each LED in the signal and the control board, so I thought to myself: "I wonder if there's something I can build that will help with this problem?" I'm curious to see if there's enough interest in this gadget for me to be able to make and sell them, so that's the main point of this post. Here's the result: EDIT 8-2-2016: Board version 2.1 images In addition, here's a video of one of the first versions of the circuit, before I had even started on designing a PCB. This demonstrates the basic functionality of the controller with a single three-aspect 'signal'. Description: This board can drive up to two three-aspect (light) LED train signals with as few as two I/O pins on the chosen microcontroller. It can be run off of either 3.3V or 5V supplies* a 5V, and will interface with logic signals of the same voltage. If you'd like to drive the two signals independently, it will take four I/O pins. Dimensions: 4 studs by 4 studs, not including the male header pins. As I have yet to receive the prototype for this board, I don't know if the mounting holes fit a typical Lego stud, or if they line up with the corner studs on a 4x4 space - however, I should be able to adjust this without too many problems. The header pins are the standard 2.54 mm/.1 inch pitch popularized by Arduino microcontrollers. Technical Specifications: Supply voltage should either be 3.3V or 5V* be 5V. Absolute maximum current draw should be ~85-90mA, typically ~41mA**. Operation: The IC used to make this board work is the SN74HC139DR, a two-line to four-line decoder. There are two decoder units in each chip, and as a result this board will happily drive two signals at a time, either independently or synchronized together. The A0 and B0 connectors are the least significant bit of the two-bit signal, with A1 and B1 being the most significant bit. There is also an active-low 'Enable' pin for each decoder, which is not broken out to a header; it is permanently tied to ground so that the board is always ready to change the signal. If the value sent to Signal A is 00 (A1=0 and A0=0), all of the LEDs in the signal remain off. If the value sent to Signal A is 01 (A1=0 and A0=1), the green LED will turn on and remain on as long as the 01 signal is applied. If the value sent to Signal A is 10 (A1=1 and A0=0), the yellow LED will turn on (and remain on as above). If the value sent to Signal A is 11 (A1=1 and A0=1), the red LED will turn on (and remain on as above). Signal B works in the same manner. If you want to set both signals to the same light, simply tie A0 and B0 together, as well as A1 and B1 together. If you want to drive the signals independently, don't do that Cost: My calculations for the cost of the components, the PCB, and the time it takes for me to assemble and test each board tells me I should be selling these for $21.99 (USD) apiece. If I was to have these mass-produced, it'd likely be cheaper - however, I'd have to be buying them in quantities of 100, or 1000, and there's no guarantee I could sell them all. As such, I would prefer to take orders from anyone who's interested in buying these and essentially produce them on-demand so I don't have to keep inventory around. Sales Pitch: You should buy this device because it reduces the amount of I/O pins required to drive two three-aspect signals by 33% (four pins instead of six for independent operation) or even 66% (two pins instead of six for synchronized operation). This reduces the amount of programming work that has to be done by the user. In addition, the board is thin enough that it can fit in a single brick's height; as such, it can easily be hidden under some landscaping or even placed under the ballast for a section of track! Moreover, it comes in a lovely purple color with a gold plated finish, thanks to the company who I get my PCBs from. <~~~~~~~~~> *The only change that this would require would be different values for the resistors; I currently have resistors on hand for a 3.3V version, as that is what my FPGA operates at. Typically, Arduinos operate at 5V, so I could potentially offer either variant to suit your needs 5V supply only! More will burn out LEDs and resistors, less will cause undervoltage problems. **The LEDs I prototyped with (and will use on my layout) have a maximum current draw of 20mA apiece, with the IC drawing ~1uA. If there's a problem with floating inputs, it is possible for two LEDs on each signal to be lit at a time, resulting in double the current draw. I have yet to see all three LEDs on at the same time! Now, having read all of this above: Would you buy this gadget? If so, how many do you think would buy, and how much would you be willing to pay for each one? As sad as it is to admit, I'm not able to compete on cost with cheap PCB assemblers in China. Another question: Would you want mounting holes on the board, similar to what I've show here? If so, would you want them to fit a Lego stud? Finally, just to make this clear: I'm not ready to sell these yet. I still have to receive and assemble my prototype, which isn't even the board pictured above (it is functionally identical, just without the helpful pin labels and slightly cheaper because it's a tad smaller). I'd be thrilled to be able to sell these to people once I've verified that it works and doesn't explode, however!
  9. After a month, my Arduino clone has arrived from China. I plan to use it to add some inexpensive automation to our LUG's ad hoc layout. We are starting to display trains and don't have anything permanently built. Some of our events are outside in the park where there is no plug in power. One of the requirements would be battery power option. We are basically starting new with the current LEGO train and power offerings. We agreed to make Power Functions our club standard. I selected an Arduino clone. I figured for $4 USD, it is not a big lost if I fried it. There is a reason it is $4. The clone is not quite exactly the same as the real Arduino UNO. It uses a CH340 USB to serial chip instead of the FTDI USB to serial chip found on the real Arduino. In order for the Arduino IDE to communicate with the board, the CH341 driver has to be installed. It doesn't come with the IDE software from the Arduino website. The driver can be downloaded from the Chinese manufacturer's website. Note the site is in Chinese: For a quick test, I hooked up an IR LED desoldered from an old DVD player remote to the board and wrote a simple sketch. I made use of a LEGO Power Function library (http://forum.arduino...p?topic=89310.0) Some resources on the Internet say IR LED in the 940nm range works best for Power Function IR receivers. It worked! And it was not as difficult as I thought it would be. I've never used an Arduino before. More eBay parts are to arrive from China. I'm planning to use reed switches for detection. I think they are the simplest to set up and tear down with just two wires to connect. I ordered inexpensive SG90 servo motors to control the switches. I still have to figure out how to mount them on other club members switch tracks and remove at the end of events. I think this is going to be fun.
  10. brebo Hi, I have launched a KickStarter (crowdfunding) campaign for a simple, low cost and intuitive system to invent and recycle electronics using Lego. Have a look [removed url] Let me know what you think. Thanks!
  11. Some time ago a group I'm engaged in got some money to create projects for our city festival (sort of). For a bunch of reasons one of the main projects fell through and we needed a replacement. I suggested a display with Lego trains controlled by Arduino. Last week was presentation time. It's a first iteration so I wanted to make it simple yes a fit fun to look at. The trains go in opposite directions in an oval. There are two stations where the trains either wait five seconds or wait until the upcoming track part is clear. If the waiting time is up and there is no other train in the way it's go-time. Since the trains go in opposite directions, the switches can be static. You can check out a more in-depth description on my site: Let me know if you have any questions or comments.
  12. I've created an Arduino shield to control Lego Power Functions: An Arduino is a small, programmable microcontroller with lots of I/O (input/output) pins. It can be programmed from a computer, and it can interface with various devices. An Arduino shield is a circuit board that mounts onto the top of an Arduino to give it extra functionality. It is powered from a Power Functions plug, and has 3 channels that can be controlled via bluetooth, or programmed with the Arduino. See the kickstarter for more info:, and if you want one, please consider backing it. I will post some images of it in various models if you guys like it. What are your opinions on it, or do you have any improvements to suggest?
  13. Update september 2015: I have build a new extruder for this printer. It's now capable of printing chocolate. ------------------------------ Although it's not a 100% lego build. I think it's worth mentioning in this forum. This fully-functional 3D printer is capable of printing 3D objects, including Lego bricks. The printed PLA bricks look like the first lego bricks from the early '70s. Switching to ABS will be a next step. The LEGO printer is based on the Prusa I3 rework printer. LEGO and Nema 17 stepper motors are a perfect match. A default LEGO brick of 4 by 2 studs is 32 x 16 x 9.6 mm. Nema stepper motors have m3 holes at a distance of 31 mm. Attaching the Nema 17 stepper with LEGO technic, using a felt damper/isolator and m3 x 15 bolts, gives a solid base. It's not a 100% LEGO printer. I don't have any LEGO Mindstorms products. Another reason is that LEGO motors are servo motors and 3d printers use stepper motors. Last reason is the software used to control the printer. I'm using Marlin for the Atmega 2560 and Pronterface on my laptop to control the printer. The base of the printer is 34 x 64 studs (19.2 x 51.2 cm) and is about 44 blocks high (42 cm). Y carrier belt: Attaching linear bearings. Z-azis motor and smooth rod: It took some time to calibrate the printer. But everything is working like it should. A picture of my latest print: The advantage of using LEGO is the possibility to alter the printer after building. More pictures, a video of this printer in action and building instructions are on: http://www.instructa...EGO-3d-Printer/.
  14. Hi to all, From the MTRkustoms factory we have the pleasure to present the ARDUINO AUTOMATED LEGO RAILCAR Here you can see the Railcar in detail This use modification pass the following phases PF --> 9v --> Arduino Control The original idea was very simple, have an autonomous and continuous Railcar in open circuits. I based the function in a great cheap invent, The Arduino Board, this small, easy programming and low cost, gives me the chance to make it real with a cost below 10€, including a PWM motor controller L298N Only 1 9v cable was "damaged" to convert its connection. The cycle work is very simple, Railcar goes from end to end regulated by the L298N with a PWM velocity. When the Railcar hit the final of the track (switch detection) stops 5sec and go to the other end and stops 10sec (and able to the passengers to go down) Time, velocity and stops time can be easy fixed by the programming. Some pictures of the system Stop No.1 Stop No.2 Switch Detail Cable connection boxes To hide the Arduino board and the L298N I made a modern prefabricated transformation Station Detail of the track connection Interior of the Transformation station All Full resolution pictures here A little video Enjoy it
  15. After 7 months of engineering and building, I'm proud that I can present you my new video! In the video you'll see three coal trains riding around. They can load at two silos and unload at the main terminal. The unloaded coals are delivered by conveyor belts and an excavator to the loading silos, so a continuous loop is possible! The unloading part is the most complicated part of the structure: pneumatic cilinders will push a conductor to the bottom of the wagons, where also a conductor is located. These conductors power motors in the wagon which open a hatch in the bottom of the Lego coal wagon. The coals drop on a conveyor belt and are transported with other conveyor belts and an excavator to the silos. It's all automated by 6 Arduino controllers (including the arduino that controls the passenger trains). I cleared out the living room (GF was away for a few days, as planned) with a friend of mine and after 12 hours of setting the whole thing up we could finally begin with running some trains and commission the whole thing! Obviously the whole thing didn't work at once, so a hilarious fails-video is on the way too. Enjoy, share and let me know what you think of it!
  16. Hi all, Im so glad to present my MOD of the 21108 Ghostbuster car with custom SMD LEDs controlled by an ARDUINO UNO. In the process no Original set pieces was modified, but 10 vault pieces were modified and glued in order to fix the leds and pass the cables trought the model. And the best way to see it, a little demostration video. PS: The process of soldering the SMDs and cable routing was a nightmare, but the result deserves it. A small update with pictures Full model with a street display (arduino housing included) Detail of the instalation of the SMD leds, Front lights (modified round bricks and some kragel to fix it) Upper lights (plate with right holder modified and round plate kragelized) Upper principal lights (no kragel or modification, just the SMD led placed and fixed with 4 round plates below the cheese slopes) Some details of the cable routing Detail of the soldering plate with all cables and resistances soldered Arduino housing and cables for conect all lights Hope you enjoy it
  17. I came up with the idea to build a robot that can get me a beer or soda from the fridge while I'm watching Die Hard... I'm building it completely from Lego Technic, mostly studded. I use my own designed electronics to control the motors, pneumatic valves and read out the sensors. It saves me hundreds of Euro's by not using the NXT platform ;) Next to that: the NXT platform is not as flexible as other programming platforms. I have been busy with it for a few months now and there were some problems to be solved so I've divided "the project" in smaller goals: 1. Get the rover over a bump in the living room (success!) There's a nasty bump between the kitchen and the living room. Since the robot is going to be well over 10kg, I had to find a way to get it over the bump. The solution was to use caterpillar tracks (the robot needs to be able to turn around its own axle) with on top of that studless beams for extra grip. I've put some filt on top of the beams so my wooden floor doesn't get damaged. Video 1: 2. Make the robot move sideward to be able to position itself (success!) Not being sure about the precision of the tracks, I need the robot to be able to move sideward for positioning itself in front of the fridge (to be able to grap the handle). I designed a pneumatic system with 8 pistons that push down 8 wheels, that lift up the robot just a bit. That way the robot can move sideward, which is impossible with caterpillar tracks. As you will see in video 3, the accuracy of the distance sensors is good enough that the robot doesn't need to move sideward. If the system isn't needed when the robot is completed, I could remove it. Video 2: 3. Indoor navigation: make the robot find its way to the frigde, couch and back (success!) Using 4 ultrasonic distance sensors and a digital compass, I make the robot navigate around the house. It works just perfect! Video 3: 4. Think of a way to make the robot open the fridge I'm working on this one now. This one is by far the hardest to complete. I have already a pneumatic system that can grab the handle and open the fridge a few centimeters by setteling itself against the fridge. As you know: sometimes the fridge door is a bit stuck and you need some force to open it. Grabbing the handle and just drive backward doesn't work because of the height of the robot. Right now I need to find a way to open the fridge door further and move the robot to the inside side of the door. This is tricky and I haven't figured it out yet. If you have any suggestions: let me know! Further things to do: 5. Make the robot able to grab a can of beer/soda 6. Make the robot do the whole thing: getting out of hibernation, getting a beer, bring it to the couch and go back to the hibernation spot 7. Design an Android app that communicates with the robot through Bluetooth so I can order a beer from the couch
  18. Hello! My Rescue Helicopter (9396) is about to be delivered ( ) and I have this idea to put enormous amount of LEDs in it. I have a plan to use Arduino to program proper blinking sequence. I was thinking about mounting also 2 M-motors to motorize rotor and functions. I would love to control them via Arduino but I do not have an idea how to connect motors in a proper way. Has anyone ever done it? Thanks in advance for any tips!