dr_spock Posted December 13, 2016 Posted December 13, 2016 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. Quote
cptkent Posted December 15, 2016 Posted December 15, 2016 Very nice. I initially looked at using Arduino, but found it a little more work for me (only because im not that familiar with it) than I wanted, and I wasn't sure about how it would scale to do multiple switches (I'm sure it would, if you knew what you were doing!) My solution (that you saw here) isn't quite as elegant, but should be compact and sufficient when I get it running. Arduino may be the best option for creating some kind of track layout / point display board, which I would love. I figure, having installed the point servos and wiring, I can always scale up to that, from my manual dial control, in the future if I feel the need. The only thing that would change is the controller. Regards Quote
Lowa Posted December 15, 2016 Posted December 15, 2016 Nice to hear I helped inspiring you to reach for your Arduino boards... Very cool project and an interesting way to connect an SG90 to a LEGO switch. Judging for the video you didn't modify the switch, i.e. you didn't remove the notches, I like that... How much strain does this setup put on that green 4x4 plate ? Does it ever come loose ? Quote
sitfaris Posted February 1, 2017 Posted February 1, 2017 hello,are you able to share with us the lego parts used to make this ? Thank you so much(: Quote
dr_spock Posted February 2, 2017 Author Posted February 2, 2017 On 12/14/2016 at 7:09 PM, cptkent said: Very nice. ... On 12/14/2016 at 10:00 PM, Lowa said: Nice to hear I helped inspiring you to reach for your Arduino boards... Very cool project and an interesting way to connect an SG90 to a LEGO switch. Judging for the video you didn't modify the switch, i.e. you didn't remove the notches, I like that... How much strain does this setup put on that green 4x4 plate ? Does it ever come loose ? Thank you. The 4x4 plate hasn't come loose yet. More plates can be used to stiffen up the 16x6 plate. Although, it is fun watching it flex. I demo'ed to my LUG at a meeting. I think they'd prefer to go with a LEGO solution of 9V mini-motors or PF motors to operate the switches. Maybe I can use the servos to operate a PF switch to momentarily turn on/off the motor on the swtich tracks. 16 hours ago, sitfaris said: hello,are you able to share with us the lego parts used to make this ? Thank you so much(: Looking at my picture above: 1 - 16x6 plate 1 - 4x4 plate 4 - 4x2 plates 2 - 2x2 plates 1 - 3x2 plate 1 - 9L Technic liftarm 2 - Technic half pins 1 - 3D printed servo motor mount Most of the small plates are used to hold down the printed motor mount. The PLA plastic loses its clutch power over time. It might hold better if printed in ABS plastic. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.