Arduino Lego Trains
Arduino Lego Trains
  • 15
  • 6 836 201
Arduino for Lego Trains #14: 433Mhz Wireless Communications
Send signals from a trackside Arduino to another Arduino on your train, using 433Mhz radio transmitter and receiver. This tutorial shows you how to use the VirtualWire library to send data wirelessly, and how to replace the Power Functions infra-red receiver with a dedicated L9110 motor controller.
Переглядів: 36 952

Відео

Arduino for Lego Trains #13: Bluetooth and Digispark
Переглядів 24 тис.7 років тому
Learn how to embed an arduino directly into your Power Functions train, power it from the Lego battery back, and control it via your phone or tablet!
Arduino for Lego Trains #12: Onboard Arduino for Power Functions
Переглядів 47 тис.7 років тому
Integrate an Arduino into your train and take it with you as you move! Features an Arduino Nano, two ultrasonic sensors and a full Power Functions control via infra red led!
Arduino for Lego Trains #11: Controlling Power Functions Trains
Переглядів 154 тис.7 років тому
This introduction tutorial explains the basic steps to control a Lego Power Functions train with an arduino! From wiring up an infrared LED to writing the code, this tutorial has everything you need to know to automate your Power Functions train! Power Functions library: tinyurl.com/2p8wjt8r NEW LINK 12/12/2021 LED Resistor calculator: led.linear1.org/led.wiz
Inside the Arduino Lego Trains control box
Переглядів 7 тис.7 років тому
Check out what's inside the monolithic Control Box featured in Tutorial 10. See how I've wired up six motor controllers to an arduino mega, created rows of powered input and output pins, and organised a rainbow spaghetti of wiring!
Arduino for Lego Trains #10: The Automated Marshall Yard
Переглядів 41 тис.8 років тому
See the full power of an Arduino Mega unleashed in the final video for this series of Arduino for Lego Trains. Learn about interrupts and how to use them for sensors, use the enum variable for a finite state machine, and gain tips on power management for running multiple trains at once. Features all the cool stuff from the previous Arduino for Lego Trains tutorials, including light sensors, mot...
Arduino for Lego Trains #9: Automatic Decoupler
Переглядів 147 тис.8 років тому
Seperate your wagons from your locomotive using this awesome Arduino-powered decoupler! Using a single motor and some infra-red sensors, this clever construction of gears, axles and plates can block one side of the track, preventing individual rolling stock from moving forward. From there, just power your train forward to uncouple your wagons! This tutorial incorporates the decoupler into a sid...
Arduino for Lego Trains #8: LEDs and Infra-Red Sensors
Переглядів 140 тис.8 років тому
Create strings of LEDs, set up train signals and build your own infrared sensors for your Arduino Lego projects! Features Lego sets 10205, 10015, 10017 and 4512.
Arduino for Lego Trains #7: Infra-red Remote Control
Переглядів 193 тис.9 років тому
Use an infra-red sensor and an Arduino to control your 9V trains! This video features all the code you need to read the signals from any IR remote (including your TV or hi-fi), and then use those signals to control your 9V train. Features Lego sets 3741 and 10014 from the My Own Train series. INTRO MUSIC: "Hep Cats" Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution...
Arduino for Lego Trains #6: Controlled Junctions
Переглядів 1,7 млн9 років тому
Learn how to control train traffic through a pair of crossings with your Arduino. Program your own Finite State Machine to shut down each track in turn, using just two light sensors and a motor controller. Features Lego 9V train sets 4559 (Cargo Railway) and 4560 (Railway Express), as well as copious amounts of cranberry jam.
Arduino for Lego Trains #5: LCD Screen
Переглядів 104 тис.9 років тому
This tutorial explains how to wire up and code an HD44780 LCD screen to your Arduino, and uses a shift register to reduce the number of output pins needed. The station name updates when a light sensor is triggered. Features train sets 7937, 4558 and 4547, plus 6519 (Turbo Tiger), 5934 (Dino Explorer), and 9464 (Vampyre Hearse)
Arduino for Lego Trains #4: Ultrasonic Sensors
Переглядів 122 тис.9 років тому
This tutorial explains how to set up an HC-SR04 ultrasonic sensor for track control in your sidings. WARNING: I accept no responsibility for any mutations that occur after consuming toxic waste. Features sets 4512 (loco), 4549, 4555,10170, and 2126 (toxic waste wagon).
Arduino for Lego Trains #3: Motorized Track Switches
Переглядів 4 млн9 років тому
This tutorial explains how to switch your Lego 9V points using an old Lego Technic motor and an Arduino. Code explains State Change / Edge Detection, as well as using counters. Features Lego train set 4564. PARTS LIST: 1x2 plate (2) 1x3 plate (1) 1x4 plate (2) 1x6 plate (1) 1x8 plate (2) 2x2 corner plate (1) 2x2 plate (1) 2x3 plate (2) 2x4 plate (2) 2x6 plate (1) 1x2 brick (1) 1x2 slope (1) 2x3...
Arduino for Lego Trains #2: Light Sensors
Переглядів 123 тис.9 років тому
This tutorial explains how to wire up and program a light sensor to stop your Lego 9V train using an Arduino Mega. Features an explanation on reading analog inputs, storing readings as variables, and a guide on the millis timer. WARNING: This video contains generous amounts of cranberry jam. Features Lego sets 4554 and 4558.
Arduino for Lego Trains #1: Introduction
Переглядів 85 тис.9 років тому
This beginner's guide explains the process, parts and code needed to automate your Lego 9V trains with an Arduino. Parts list: 1 x Arduino (preferably a Mega) 1 x L298N motor controller 1 x 12V DC Power supply 1 x Lego Technic 9V cable 1 x Lego train set some male-to-female wires and some 0.35mm (28AWG) wire. The code section describes how to drive a simple motor using the Arduino Mega's PWM pi...

КОМЕНТАРІ

  • @goldfing5898
    @goldfing5898 12 днів тому

    2:40 An interesting design, but IMHO has a big drawback: since the slider is upside down, it only works on a smooth surface like the desk in the video. But it would not work if the track is built on a carpet, as is often the case. So it would be better to have a design with plates on the bottom, then tiles (all upside up, not down), then the slide consisting of a plate and the gear rack on top.

  • @goldfing5898
    @goldfing5898 15 днів тому

    As if you had predicted that Lego trains would use Bluetooth controlling a few years later (PoweredUp system).

  • @goldfing5898
    @goldfing5898 2 місяці тому

    One question: the original Lego 9V switch has a very strong spring (locking mechanism), and thus it takes lots of force to actuate it. Did you have to remove the spring on the downside (interior) of the switch, prior to building the motor onto it? Or is the Technic 9V motor, in combination with the clutch, strong enough?

    • @goldfing5898
      @goldfing5898 2 місяці тому

      Regarding the version of the Technic 9V Motor: I saw that you used the version called "Heavier Weight", not the version called "Lighter Weight" on BrickLink. I am going to try out both versions and see if the weight affects the performance of the switching. Also, whether the locking mechanism must be removed from the switch or not.

    • @goldfing5898
      @goldfing5898 2 місяці тому

      Correction to your Parts List: you need three rather than two Plate 2x3, as depicted in your video at 1:20.

  • @glowytheglowbug
    @glowytheglowbug 7 місяців тому

    very cool!

  • @Bombiedude.
    @Bombiedude. 7 місяців тому

    4:53 quick question what is that little red button on the arduino board is that like a power button so you could toggle it if you want to

  • @riemerdijkstra5974
    @riemerdijkstra5974 9 місяців тому

    I always like to watch my lego tutorials for the blood and gore

  • @riemerdijkstra5974
    @riemerdijkstra5974 9 місяців тому

    lowest resitor I had was 560 ohm so I guess my raqnge will be limited by a lot

  • @dr.trains119
    @dr.trains119 Рік тому

    they did make a track switch for the gray 12v trains but the are very rare so its just easier to make this

  • @mbogobot
    @mbogobot Рік тому

    super puper automat !

  • @andrew9275
    @andrew9275 Рік тому

    Question do you have a code for PU trains. Your code for Bluetooth and Power Functions i go also use this year. I have in total 5 trains. 2 PU and 3 PF (bluethooth and some with Sbrick)

  • @itanc1
    @itanc1 Рік тому

    Awesome! Love this! I’ve just started printing track for an aerial line round my living room. Will be implementing full Arduino control. Thanks for sharing1!

  • @Twoloosebricks
    @Twoloosebricks Рік тому

    so how do I add in a second sensor for station #2, so that it stops and starts at both, Ive been working on it for a week and cannot get it.. tried just about everything, but im not that great at it either. any help is appriciated.

  • @quboss2008
    @quboss2008 Рік тому

    Siemka Polaku , niezła robota ❤

  • @antalervin19-
    @antalervin19- 2 роки тому

    Can i use TSAL6100 instead of TSAL6400?

  • @giuliafiore7821
    @giuliafiore7821 2 роки тому

    I know this video is 7 years old, but if you used 4 sensors (one on each side of the junction in each direction) you could tell when the junction was clear without the need for timers. This would easily scale up for people with larger train setups where timers would eventually cause crashes.

  • @KarlthefirstofAustria
    @KarlthefirstofAustria 2 роки тому

    Were all waiting for your big return :)

  • @JoeParkerAndThePower
    @JoeParkerAndThePower 2 роки тому

    Also I'm puzzled by you referring to the methods via their return types eg 'void Loop' etc. Is this a thing Arduino ppl do routinely? I thought you couldn't overload method names in Arduino, so the namespace would prevent a (say) 'void Loop' and an 'int Loop' both compiling? Sorry if I've missed something mind you, not an Arduino dev. Great vid tho.

  • @JoeParkerAndThePower
    @JoeParkerAndThePower 2 роки тому

    Expect lots of ppl know this but there was a magnetically switched set for the older (12-15VDC) sets

  • @markuskernocker392
    @markuskernocker392 2 роки тому

    Is it save to use a 12V power supply. I tought it is a 9v motor?

  • @-minecraftyt9985
    @-minecraftyt9985 2 роки тому

    Top

  • @-minecraftyt9985
    @-minecraftyt9985 2 роки тому

    Nice

  • @sinus4784
    @sinus4784 2 роки тому

    i just remembered this channel existed, and now i'm sad there isn't anymore

  • @ManBrickStudios
    @ManBrickStudios 2 роки тому

    ty for this video!!!!

  • @AndrzejSkrobski
    @AndrzejSkrobski 2 роки тому

    I realise this is an old video but I just found it recently and just wanted to thank you for posting it. It inspired me to play with my Lego trains again - this time in a more advanced way, with an Arduino. I’m very happy I found your channel! Very interesting topic and great info. Thanks again!

  • @wolfgangrind1803
    @wolfgangrind1803 2 роки тому

    Are there circuit diagrams for the hardware wiring, if so would they have them for me?

  • @evelgenius7541
    @evelgenius7541 2 роки тому

    Is there a way to write our own power functions library? I don't have access to the PFlibrary in the link he shared

  • @joeybruins
    @joeybruins 2 роки тому

    im planning on trying to do the same thing but then for the old 7725 train set that runs on 12v wold that work the same or not?

  • @joeybruins
    @joeybruins 2 роки тому

    i like to use the i2c backpack for simpler connecting

  • @nordemoniac
    @nordemoniac 2 роки тому

    9:50 Don't drink and train.

  • @JavaU18C
    @JavaU18C 2 роки тому

    I want to control multiple trains at once😥

  • @contactATashleygriffin
    @contactATashleygriffin 3 роки тому

    Lego made kits to solve that problem..... kit 7858

  • @charelvanbiljon4823
    @charelvanbiljon4823 3 роки тому

    Only found your videos now while looking at adding arduino to my model train projects. Putty you are not active anymore as your videos and explanations are very clear, informative and with just the right amount of humor added. I will be referring back to these videos regularly as I now start my aurduino journey. Thank you

  • @steinlaus5605
    @steinlaus5605 3 роки тому

    Why does nobody care about the accident? With the CAT?! I wanted this cat so bad when I was a kid! So moral of this video: You need to spot your cat, use ultrasonic or so cause other times it's bad! :) Meow.

  • @vadimsalomatin4903
    @vadimsalomatin4903 3 роки тому

    cool!!!!

  • @vadimsalomatin4903
    @vadimsalomatin4903 3 роки тому

    Cool!

  • @jjspudz4013
    @jjspudz4013 3 роки тому

    I've checked maybe once every 2 or 3 months for 4 years to see if I've accidently missed a video... and will continue to

  • @magicguystudios7940
    @magicguystudios7940 3 роки тому

    R-I-P wires

  • @TooBaldeh
    @TooBaldeh 3 роки тому

    2:22 how do i buy that part inside the train.

  • @magicguystudios7940
    @magicguystudios7940 3 роки тому

    It’s been 6 years why haven’t you uploaded any videos

  • @magicguystudios7940
    @magicguystudios7940 3 роки тому

    Awesome

  • @TheCodex808
    @TheCodex808 3 роки тому

    But you have 120 volt not 220 like shown it shows 🔌 from another country come on here. I live in the United States. And play with my train sets too and set them up also but the settings are off I need to check the local Lego sales office I guess to help me out!

    • @TheCodex808
      @TheCodex808 3 роки тому

      Will keep this saved too to help me with my layout ideas also!!

  • @Echolic
    @Echolic 3 роки тому

    you really know your storytelling. good job ;)

  • @Chrisbc1989
    @Chrisbc1989 3 роки тому

    Come back!!!!!

  • @super_games_and_lego
    @super_games_and_lego 3 роки тому

    Do this with pf system

  • @Kazashimo1
    @Kazashimo1 3 роки тому

    Lego released an automatic decoupling unit 40 years ago for the 12v train system - set 7862

  • @PabloVivCo
    @PabloVivCo 3 роки тому

    Excelent, this totally works, thanks to the master hacker!

  • @jpest17
    @jpest17 3 роки тому

    That decoupling looks pretty aggressive, Does the train itself have a throttle threshold that can be manipulated so at it's lowest speed it uses only the required amount of force to decouple?

  • @syaduinotech3681
    @syaduinotech3681 3 роки тому

    Hello sir.. very good video.. thanks so much. I got inquiry, can we used the tsal6200 instead of tsal6400?

  • @rugaag
    @rugaag 3 роки тому

    Very brutal, but absolutly awesome 👍

  • @TheGamingMansubscribe
    @TheGamingMansubscribe 3 роки тому

    Czy pan jest z Polski?