I have always been a firm believer in that if you put technology into toys, then kids will WANT to learn - and what more universal toy than a train set - being a Lego train set, this now combines 3 hobbies into one - model trains, Lego and Arduino! Well done!
I understand that there's effectively nothing too complicated in this, but I'd just like you to know that you just blew my mind. I've never coded and you just hit hero status in my book. That would be a "Like" and a Subscribe!
I didn't even know LEGO had a clutch! All the LEGO trains stuff is fairly unknown to me, I didn't know it was quite this sophisticated, but that might also be the impression your setup gives. Also; your videos are well presented and entertaining. Watching the one presented on hack-a-day made me want to watch more.
Thank you so much for this video. It helped me a lot. But I use old 4,5v motors and a 12v train transformer to remote control it. It works perfect. Just like the old 12v stuff but with 9v tracks
Yes, one of the hardest parts of this design is finding all the pieces in one colour! The old 9v points use dark grey (not dark blue grey), which isn't easy to find any more... especially when you have 12 points!
I tried to get the parts in dark grey, but I would had to buy in 6 different shops and it would cost me 3 times as much. That's why I use dark blue gray.
@@ArduinoLegoTrains I wouldn't mind chosing a different color, as long as it looks good. After all, the 12V switches of the 1980s had light grey rails and housings of the switch motors, but dark grey sleepers. Another channel here shows several colors of the gearbox, like red, yellow, blue etc., which helps color coding different switches and looks nice.
Ich ärgere mich auch noch immer das LEGO hier keine elektrischen Weichen anbietet. So eine große Firma, und sie geben uns Kunden nicht das was wir möchten.. schade. Mal sehen wann endlich was rauskommt. Danke für dies Video !!
Great video! I have a comment about your programming, and you have probably figured this out, but I feel I should put in my two cents worth. It's not a void. It's a subroutine. Void is the return type, which is to say, some subroutines return some value to the calling code, kind of like a function, and some don't. When a subroutine is meant to return a value you have to specify what type of value, like integer or float so the compiler knows how much memory to reserve for the return value. When a subroutine is meant to just perform some action and not return any value the return type is void (none, null or N/A) so the compiler knows it doesn't have to reserve any memory for the return value.
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?
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.
This series is really great! However, right now you are demonstrating how to modify the old 9V lego train kits, which are no longer produced. It'd be great if you could show us how to modify the newer RC ones.
Hello, your videos are very helpfull and i would like to control my lego 9v trains too. I have already an arduino and driver motor, coud you explain me in more details how the Motorized Track Switches works, and where i can find the 9V Motor with Gear Reduction 5225 ( i suppose)? thanks!
Amazing! Thank you for explaining this so simply. Would you be able to post a list of parts used? I can't quite tell from the video which size gears and axles you used. Thanks!
Amazing!, thank you, your elaboration are so useful, do you suggest another motor instead of Electric, Motor 9V Mini-Motor, newer/older versions (43362c01/71427c01), as its price is high and few lots on Bricklink?
Yes, but mindstorms cost a huge amount of money compared to Arduinos, and can only control what, four motors? My arduino setup controls 12 (check out video 10 for details).
+LEGO CREATIONS | SpartaGames Remote Control is covered in #7, so it's really easy to combine that code with this tutorial to make a remote-controlled switch. No need for servo motors; my solution uses the cheapest combination of motors and bricks available.
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.
Why on earth are you calling functions "voids"?! Void is the return type of those particular functions, that is, they do not return anything, they are not "voids", they are functions without return values.
Because this series of tutorials is designed for people with no prior coding experience. Using the word "function" when it doesn't show up anywhere on the screen gets very confusing for beginners. But you're completely correct, of course.
+Zippo NVR Yes, the PF servo motor has more torque. But it is a much bigger motor, which makes the whole mechanism extend past the length of the switch track (so you can only connect the switch to straights, not curves). It also requires an extra cable to convert from PF to old technic 9V (unless you want to cut the PF motor cable), and is much more expensive than the old 9V motors.
+Arduino Lego Trains Yes, but the main advantage is that it is rotated only by 90 degrees, so you will not need to use the clutch. Although you did not use it in your video =)
I like that you put a clutch in there, most other versions connect the motor directly to the switch.
Yeah I put a solid gear and it always grinded until I put the clutch on it
What an amazing instructor - love the approach, humor, and keeping it simple by using plain English... more, more!!
I have always been a firm believer in that if you put technology into toys, then kids will WANT to learn - and what more universal toy than a train set - being a Lego train set, this now combines 3 hobbies into one - model trains, Lego and Arduino! Well done!
I understand that there's effectively nothing too complicated in this, but I'd just like you to know that you just blew my mind. I've never coded and you just hit hero status in my book.
That would be a "Like" and a Subscribe!
I didn't even know LEGO had a clutch! All the LEGO trains stuff is fairly unknown to me, I didn't know it was quite this sophisticated, but that might also be the impression your setup gives.
Also; your videos are well presented and entertaining. Watching the one presented on hack-a-day made me want to watch more.
Electra Flarefire ķ
Please come back man, I love your tutorials
A Brit dude with brilliant story telling educating me about arduino and trains? YES PLEASE
Expect lots of ppl know this but there was a magnetically switched set for the older (12-15VDC) sets
they did make a track switch for the gray 12v trains but the are very rare so its just easier to make this
I built a couple of these, they're great! :)
Can be modified easily to work with power functions motors as well.
Great to hear!
Arduino Lego Trains Jdbxhye
The older 12V system had switches that were remote controlled. 753 and 754 seems to be an older version (blue) while I had two in grey.
7858 for the grey 12v switcher, they did ALOT, lights that stopped the trains and de-couplers
Amazing. Like that you can build a city and make it intelliegent.
Thank you so much for this video. It helped me a lot. But I use old 4,5v motors and a 12v train transformer to remote control it. It works perfect. Just like the old 12v stuff but with 9v tracks
+NeoSephirothVal Great to hear! Why not make a short video showing us what you've done?
Sure, I will do that when the parts from bricklink arrive. Atm it's way to colorfull. I want that complete dark blue gray.^^
Yes, one of the hardest parts of this design is finding all the pieces in one colour! The old 9v points use dark grey (not dark blue grey), which isn't easy to find any more... especially when you have 12 points!
I tried to get the parts in dark grey, but I would had to buy in 6 different shops and it would cost me 3 times as much. That's why I use dark blue gray.
@@ArduinoLegoTrains I wouldn't mind chosing a different color, as long as it looks good. After all, the 12V switches of the 1980s had light grey rails and housings of the switch motors, but dark grey sleepers. Another channel here shows several colors of the gearbox, like red, yellow, blue etc., which helps color coding different switches and looks nice.
Any suggestions for when the switch is too stiff and the clutch engages too soon?
You can try switching the position of the large gear and the clutch gear. This has helped me with some stiff switches.
This seems to do the trick, thanks!
Ich ärgere mich auch noch immer das LEGO hier keine elektrischen Weichen anbietet. So eine große Firma, und sie geben uns Kunden nicht das was wir möchten.. schade. Mal sehen wann endlich was rauskommt. Danke für dies Video !!
Es ist LEGO, wir brauchen keine speziellen Weichen.
Very clever.A very nice video to see.
Great video!
I have a comment about your programming, and you have probably figured this out, but I feel I should put in my two cents worth.
It's not a void. It's a subroutine.
Void is the return type, which is to say, some subroutines return some value to the calling code, kind of like a function, and some don't.
When a subroutine is meant to return a value you have to specify what type of value, like integer or float so the compiler knows how much memory to reserve for the return value.
When a subroutine is meant to just perform some action and not return any value the return type is void (none, null or N/A) so the compiler knows it doesn't have to reserve any memory for the return value.
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?
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.
Correction to your Parts List:
you need three rather than two Plate 2x3, as depicted in your video at 1:20.
I typed out my code but is failing to compile...
what does '!' mean in LDR2state?
and what does
LightSensorCounter % 2 == 0 mean?
thanks
PJ
This series is really great! However, right now you are demonstrating how to modify the old 9V lego train kits, which are no longer produced. It'd be great if you could show us how to modify the newer RC ones.
EricTheYounger vvğ
EricTheYounger hf
EricTheYounger ducat I don't know
EricTheYounää
EricTheYounger ั
Hello, your videos are very helpfull and i would like to control my lego 9v trains too. I have already an arduino and driver motor, coud you explain me in more details how the Motorized Track Switches works, and where i can find the 9V Motor with Gear Reduction
5225 ( i suppose)? thanks!
Amazing! Thank you for explaining this so simply. Would you be able to post a list of parts used? I can't quite tell from the video which size gears and axles you used. Thanks!
He added a parts list in the description, which was very helpful to me, too.
awesome love it
Good work mate I love it.
Im not into the new gear, but as a child I am sure we had electronic points in the 12v days.
Yes 12V did have that and more
5
Lego DID solve this problem. The old 12v train system had motorised switches available.
Yes, but they never solved it for the 9v switches introduced later in 1991.
Can you provide the part numbers for the components used to build this for beginners?
i really want to do this but i don't know how to code with arduino. do you suggest any getting started tutorials for working with lego
Sure, just check out my channel and start from video 1!
Blue Bear Creel to no no
Great videos
Amazing!, thank you, your elaboration are so useful, do you suggest another motor instead of Electric, Motor 9V Mini-Motor, newer/older versions (43362c01/71427c01), as its price is high and few lots on Bricklink?
ty for this video!!!!
Very good
this is my favourite video
Futny XD knvnjen
Great Nice Good Job
nice
that moment when he says fuck when the train fell off XD
.h
Anyone used a different motor for this? Or perhaps an stl file to print out this lego motor case and add hobby motor in instead?
Nice
love 🇫🇴🇫🇲🇫🇯🇫🇮🇪🇷🇪🇹🇪🇺🇫🇲🇬🇩🇬🇱🇬🇮🇬🇮🇬🇭🇬🇲🇬🇲🇬🇪🇬🇬🇫🇴🇫🇴🇫🇲🇫🇲🇫🇲
Thank you!
@Arduino Lego Trains
can you supply the code?
DO you mind stating the parts needed in words?:)
I've added the parts list to the video description for you.
can you tell the number of the motor? i can't find it on bricklink. is the motor you show all in one part or there are more than one connected? thanks
Faris Khan j
At 6:40 u can hear him swear
Hazzer who cares
Hazzer hai
poornima
Hazzer I
Hazzer هتتتاب
very clever.
super puper automat !
if you don't wana listen to the code stuff then skip to 6:02 and youl skip how the stuff works
great serious. thanks. one question - how you build motor itself?
Michael Akopov hjj
It's a Technic 9V motor part. It's one brick.
How to use to point switch sir i want to know this
you dont need to use arduino, you can also use lego mindstorms to control the train etc
Yes, but mindstorms cost a huge amount of money compared to Arduinos, and can only control what, four motors? My arduino setup controls 12 (check out video 10 for details).
Nice project
very nice
how can we get station detector ????
Lego train swiches looked better 45 years ago.
Lego made kits to solve that problem..... kit 7858
I liked
ok
train videos and the games videos videos good
why not a remote control with a lego servo motor?
+LEGO CREATIONS | SpartaGames but this is friggin brilliant
+LEGO CREATIONS | SpartaGames Remote Control is covered in #7, so it's really easy to combine that code with this tutorial to make a remote-controlled switch. No need for servo motors; my solution uses the cheapest combination of motors and bricks available.
Arduino Lego Trains ok :D
when are you going to upload a new video?
Good
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.
I heard you say a bad word whenever the train stopped
This settles it, I'm getting an arduino. And Legos. For science.
Also, how did you connect the arduino? Did it have pins?
+Austin Hunter all connection info is in Tutorial 1: Introduction.
12v legos have remote controlled stuffies such as crossings, points and decouplers. I recommend u to get it working somehow with 9v.
I love Lego trains
Lego king Lego king I too ilove Arduino And lego
Can you please give the code?
nereden satın alabilirim turkhis
Adem Güney
Nice
Wao »beautiful
areal car kitena ke milta hai
Why on earth are you calling functions "voids"?! Void is the return type of those particular functions, that is, they do not return anything, they are not "voids", they are functions without return values.
Because this series of tutorials is designed for people with no prior coding experience. Using the word "function" when it doesn't show up anywhere on the screen gets very confusing for beginners. But you're completely correct, of course.
Or "procedures" (e.g. in Pascal).
how
6:40 did you just swear?
I heard it too! 😂
how u made wireless connection
There is no wireless connection in this video. Watch video #14 to see how you can control motors wirelessly (requires two Arduinos).
Old news. The automatic infrared train detector is much better...... Trust me.
Is this dude darth vader
6:41 listen
it would be better to work with a PF servo motor
+Zippo NVR Yes, the PF servo motor has more torque. But it is a much bigger motor, which makes the whole mechanism extend past the length of the switch track (so you can only connect the switch to straights, not curves). It also requires an extra cable to convert from PF to old technic 9V (unless you want to cut the PF motor cable), and is much more expensive than the old 9V motors.
+Arduino Lego Trains
Yes, but the main advantage is that it is rotated only by 90 degrees, so you will not need to use the clutch. Although you did not use it in your video =)
this is soo hard
Wwwo super
The easy is to use both hands
have you handsweat
take a invisible wire and pull it bruh
hallo
I don't have Lego technic :(
Ya
ok
y do you swear.
imtiyaj khan
Try t
Now waht
hiii
Thomas the train
this area so much and that this would like to follow the train is the engine vs has known as this is a very poor video and not like it I comment with
sos maot mana!
he whispers all the time
COUCH NERD txt HSBC à tous les z
bricker.info/parts/73696/ this is another link
I like your video ....
But do something new....
You book
Ada
Deepak Kumar
C
cpl
Hindi. Mea. Bolo
V. Munilal
.
nice . action u have to make comedian
,😎😎😍😍😎😎😍😍😎😎