funkdis Posted March 19, 2015 Posted March 19, 2015 I've just purchased a raspberry PI after seeing plenty of automation projects. As I have never heard of Arduino, could this also be possible to replicated with the Raspberry? i suspect the need for a power converter to produce 9v-12v. Quote
Richfilth Posted March 19, 2015 Author Posted March 19, 2015 You can probably do some of the basic things, but a Raspberry Pi isn't really an input/output board, so you will still need to buy some interface boards to connect sensors and control the motor controllers (since the Pi doesn't have PWM capabilities). So really you need an Arduino-equivalent too, but you can connect it to the Pi so that they work together: they're not mutually exclusive. Quote
MajorAlvega Posted March 19, 2015 Posted March 19, 2015 (edited) You can use the PiFace Digital extension for the Pi, it has 8 outputs and 8 inputs. The outputs are open-colector darlingtons, can drive most LEGO motors but just one direction. Two of those outputs are also relays so you can drive one LEGO motor both-directions with 2 outputs. Or you can add H-bridge modules to drive up to 4 motors (each H-bridge uses two outputs). The inputs can be connected to LEGO 9v touch sensors or PF switches. 4 of the inputs are also connected to tactile buttons. You can use software interrupts or just carefull timings as an alternative to the lack of PWM in the Pi. Here a configuration I used one year ago, using just one motor (but could use 2, it's a dual H-bridge board). I like the PiFace Digital because it isn't intended for any particular purpose but there are also extensions intended for motor control with H-bridges included like the RasPi Robot Board v2 by MonkMakes. Edited March 19, 2015 by MajorAlvega Quote
Richfilth Posted March 21, 2015 Author Posted March 21, 2015 (edited) New video Motorized track switches this time. Edited March 28, 2015 by Richfilth Quote
Richfilth Posted March 28, 2015 Author Posted March 28, 2015 (edited) Not sure if anyone's still interested But here's the tutorial for Ultrasonic-managed Sidings: Edited March 28, 2015 by Richfilth Quote
mostlytechnic Posted March 28, 2015 Posted March 28, 2015 Yep, still interested :) Thanks for the videos! Quote
v6TransAM Posted March 28, 2015 Posted March 28, 2015 Anyone apply this stuff to the new style Lego remote control(Power Functions) as used currently? Always look for projects I can teach my boy. Quote
Dave21 Posted March 29, 2015 Posted March 29, 2015 (edited) Yes, I'm still interested :D Because of your videos I want to buy an Arduino myself. Dave Edited March 29, 2015 by Dave21 Quote
ritztoys Posted March 29, 2015 Posted March 29, 2015 Yes, I'm still interested :D Because of your videos I want to buy me a Arduino myself. Dave What He said! I'm in myself Quote
toxicbananna Posted March 29, 2015 Posted March 29, 2015 Yes, I'm still interested :D Because of your videos I want to buy an Arduino myself. Dave What He said! I'm in myself Same here, I'm still waiting for all of his video to understand more about Arduino programming before jumping into it! Quote
detjensrobert Posted March 29, 2015 Posted March 29, 2015 What's the difference between the Raspberry Pi and Arduino? Would they both work for these sort of things? . Quote
mostlytechnic Posted March 30, 2015 Posted March 30, 2015 Anyone apply this stuff to the new style Lego remote control(Power Functions) as used currently? Always look for projects I can teach my boy. There is arduino code that generates the PF infrared codes, and you need an IR LED to blast it out. I've done it and I know there's posts around talking about it, but my setup is crude and I haven't worked on it in ages. But yes, it is possible. What's the difference between the Raspberry Pi and Arduino? Would they both work for these sort of things? They're both small programmable boards, but they're completely different. It's like mac vs pc. I'm sure you could run a train from a Pi, but I've never used a Pi. The Pi is definitely more powerful, but I don't know how it does with simple things like this. Quote
detjensrobert Posted March 31, 2015 Posted March 31, 2015 They're both small programmable boards, but they're completely different. It's like mac vs pc. I'm sure you could run a train from a Pi, but I've never used a Pi. The Pi is definitely more powerful, but I don't know how it does with simple things like this. Ok. I've heard varying opinions about them. It does seem that the Pi is more powerful though (there's even a version of Minecraft for it, believe it or not). Thanks for the clarification. . Quote
Richfilth Posted March 31, 2015 Author Posted March 31, 2015 Thanks for all the support guys It's much appreciated! I'm still waiting for all of his video to understand more about Arduino programming before jumping into it! Don't wait! You only really learn this stuff by playing around with it. Also, it takes me so long to make each video that I have no time to work with the Arduino, so I don't know when "all" of the videos will be made :) Anyone apply this stuff to the new style Lego remote control(Power Functions) as used currently? I will be covering Infrared LEDs and phototransistors in future videos, which is how the Power Functions systems work - however, I don't know how to control one directly since I don't have any PF stuff. But if someone wants to donate a PF remote... What's the difference between the Raspberry Pi and Arduino? Would they both work for these sort of things? It's already been answered once in this thread The Pi isn't really an input/output controller, it's more of a general computer for running software (like media file centres etc). The arduino is specifically built to read sensors and power physical switches like lights, relays and motors. You can do this sort of stuff with a Pi, but it's more expensive and more complex - you don't need 1Gb of RAM to drive a lego train forwards and backwards. Quote
Richfilth Posted April 5, 2015 Author Posted April 5, 2015 Here's the latest video - adding an LCD display board to your stations Quote
Younge Posted April 5, 2015 Posted April 5, 2015 Where is the "like" button for these videos!!! Top quality, keep up the good work. Quote
Richfilth Posted April 25, 2015 Author Posted April 25, 2015 (edited) Here's the latest vid in the series: Controlling your junctions/crossings with an Arduino. Edited April 25, 2015 by Richfilth Quote
Gioppa Posted April 26, 2015 Posted April 26, 2015 Really nice tutorial, you give me a lot of idea, ok is not lego part, but if lego don't do something like that meanwhile i use Arduino Now i'm out of Italy and i can't play with arduino(i just order), I have one question about the electronic Parts, there is something to control one motor and maybe one sensor, wirless? For understand very well my question, i need a motor and one sensor on a moveable part, so i can't connect it with wire, there is some component to made it? I hope to explain it in a good english, thanks! Quote
Richfilth Posted April 27, 2015 Author Posted April 27, 2015 I have one question about the electronic Parts, there is something to control one motor and maybe one sensor, wirless? For understand very well my question, i need a motor and one sensor on a moveable part, so i can't connect it with wire, there is some component to made it? You can't have a wireless motor (they need power :D), but you CAN get an Arduino Nano. This very small arduino can be located next to your motor/sensor so that your machine is "independent" - it does not need long cables to anything. But you must always think how you will power these machines - a motor needs a lot of batteries, unfortunately. Quote
Gioppa Posted April 27, 2015 Posted April 27, 2015 You can't have a wireless motor (they need power :D), but you CAN get an Arduino Nano. This very small arduino can be located next to your motor/sensor so that your machine is "independent" - it does not need long cables to anything. But you must always think how you will power these machines - a motor needs a lot of batteries, unfortunately. You get the point, my proget is a stand alone, but made short movement, like a switch, but is no possible to have the cable from Computer to my project. so i can insert a 9 volt battery, the arduino Nano, and a motor( we can use your switch like example). the Arduino Nano, is possible to program or control via wireless with computer or mobile, or need the arduino connected to computer and wireles control the arduino nano? And what is the best program for Iphone to control Arduino?( remember, i'm not going off topic, my project is about Lego train!) Thanks for your attention! Quote
Richfilth Posted April 27, 2015 Author Posted April 27, 2015 ALL arduinos can run without a cable to the computer - that is what Arduino is designed to do. You only connect them with a cable when you want to program them, but after you write your program and send it to the Arduino, you can remove the cable. I only have the cable in my videos to supply 5V power. Some people add a Bluetooth module to their Arduino so that they can read the sensor inputs and control motors - a simple HC05 Bluetooth module is all you need for this. Some people have connected an arduino with wifi and were able to program it, but I don't have any experience with that. Quote
Richfilth Posted May 9, 2015 Author Posted May 9, 2015 Hi again! This latest video demonstrates how to decode an infrared (IR) remote control, and how to use those codes to control your 9V trains! Enjoy! Quote
Richfilth Posted November 7, 2015 Author Posted November 7, 2015 Hey Lego fans! It's been a long while, but I finally made another video. A simple concept - LEDS - but used to do something cool; two trains on one loop, in opposite directions :D Hope you like it! Quote
toxicbananna Posted November 9, 2015 Posted November 9, 2015 (edited) Hey Lego fans! It's been a long while, but I finally made another video. A simple concept - LEDS - but used to do something cool; two trains on one loop, in opposite directions :D Hope you like it! great job! was wondering where have you been. looking forward to your next video! Edited November 9, 2015 by toxicbananna 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.