TomKett Posted June 28, 2011 Share Posted June 28, 2011 Hi all I am planning on using an Arduino Board as a webservice to control the points and isolation circuits on my circuit. The arduino board is a mini computer that can be programmed as a webserver (website which computer programs can talk to ) to turn on and off output pins, these output pins are at 5v dc. I have no problems with the computer programming side of my project but its back to basics for me with regards to the electrical components. I am planing on making a Capacitor Discharge Unit and have found the following diagram on the web, does this look suitable? Can you please take a look at the below diagram, does this look correct for wiring the point into the CDU? Also I am planning on using a 5v relay and will be throwing 5v across the coil, however can the switch part of CDU take the output voltage from the CDU? Also is there a way of using one output pin and one relay to switch the point rather than 2? Thanks for taking your time in reading this post. regards Tom Link to comment Share on other sites More sharing options...
Grovenor Posted June 28, 2011 Share Posted June 28, 2011 If you are going to the trouble of using an Arduino it would be better to use a more suitable point motor, such as a tortoise or a servo motor, servos work off 5V and you should be able to program the arduino to operate the servos directly without any extra components, you just need to generate adjustable pulses on the arduino outputs, and suitable servos for point motors can be had for under £3. As servo drives are used in typical arduino applications, such as robotics, I'm sure a little websearching will give you the details needed. Regards Keith Link to comment Share on other sites More sharing options...
RMweb Premium melmerby Posted June 28, 2011 RMweb Premium Share Posted June 28, 2011 Any reason why you chose the Arduino board? This http://www.maplin.co.uk/usb-experiment-interface-board-42857 could also be used to drive point motors e.g. servos or Tortoises. Connect by USB to computer, programming examples included with DLLs. Keith Link to comment Share on other sites More sharing options...
TomKett Posted June 29, 2011 Author Share Posted June 29, 2011 Thanks for the replies. Firstly I am using Arduino boards because they are more flexible and cheaper to start (£20.95). I Also want to eventually expand it so its wireless between the PC and the railway as my railway is not a permanent layout due to space, I can therefore add a wireless card to the arduino board and that will connect to my home network. With regards to using servo's instead of point motors. I am not sure how to connect these to the points and a couple of points are near the edge of the board join so I am reluctant to cut into the foam board near the edge. Have you got any examples of how to connect them to the points? For the points near board joins I was planning on using Horny top mounted point motors. regards Tom Link to comment Share on other sites More sharing options...
RMweb Premium melmerby Posted June 29, 2011 RMweb Premium Share Posted June 29, 2011 Thanks for the replies. Firstly I am using Arduino boards because they are more flexible and cheaper to start (£20.95). regards Tom The one you show is an Arduino Mega, which when I checked the price was £76.99! That's why I asked. Keith Link to comment Share on other sites More sharing options...
TomKett Posted June 29, 2011 Author Share Posted June 29, 2011 The one you show is an Arduino Mega, which when I checked the price was £76.99! That's why I asked. Keith Ahh - I am using TinyCad to draw my circuit diagrams and that only seems to have a diagram for the mega board. I currently have a UNO board, this has 14 digital output and 6 analog output so a good start for what I need. I may use a couple of these boards to keep wiring between the different boards to a minimum. Cheers Tom Link to comment Share on other sites More sharing options...
RMweb Premium melmerby Posted June 29, 2011 RMweb Premium Share Posted June 29, 2011 Ahh - I am using TinyCad to draw my circuit diagrams and that only seems to have a diagram for the mega board. I currently have a UNO board, this has 14 digital output and 6 analog output so a good start for what I need. I may use a couple of these boards to keep wiring between the different boards to a minimum. Cheers Tom Sounds like an interesting project. Keith Link to comment Share on other sites More sharing options...
Gordon H Posted June 29, 2011 Share Posted June 29, 2011 Have you checked to see whether the output of the Arduino is suitable for driving 5V relay coils? 5V relays tend to have quite a low coil resistance, and it may be that the output stages might struggle to deliver that kind of current. Just an observation, but from an engineering standpoint, it seems a bit of a shame to have all the 'high-tech' Arduino capability, immediately followed by use of electromechanical relays on its outputs. Solid state interfacing would be a better bet, and could be arranged not to load the Arduino outputs like several relay coils would. There are many circuits about which use simple transistors to interface between logic systems and (relatively) high power devices like point motors. Link to comment Share on other sites More sharing options...
TomKett Posted June 29, 2011 Author Share Posted June 29, 2011 Hi Gordon Thanks for the reply, I am completely open to ideas. I studied electrics at college about 20 years ago and at the time I had it in my stubborn head that it was all too complicated for me and I think I spent to much time down the pub! I am a programemr by trade so know I can get my head around the arduino side of the board but once that knowledge is turned into electrical output I am flumixed. Are you able to point me in the direction of a suitable diagram that I can use. The reason I said about CDU and relays is thats the only way I have heard of. regards Tom Link to comment Share on other sites More sharing options...
meil Posted June 29, 2011 Share Posted June 29, 2011 Why don't you consider the MERG CBUS system? It has been specifically designed (with software supplied) to do what you want and it is cheaper than an Arduino Link to comment Share on other sites More sharing options...
Grovenor Posted June 29, 2011 Share Posted June 29, 2011 With regards to using servo's instead of point motors. I am not sure how to connect these to the points and a couple of points are near the edge of the board join so I am reluctant to cut into the foam board near the edge. Have you got any examples of how to connect them to the points? For the points near board joins I was planning on using Horny top mounted point motors. servos are very simple to connect to points, especially above the board, they come with a crank and you just need a wire link from the crank to the tie bar. I'll see if I can find any photos. This might be useful, download and read the article, MRH back issue Keith Link to comment Share on other sites More sharing options...
RMweb Premium melmerby Posted June 29, 2011 RMweb Premium Share Posted June 29, 2011 As this project is about computer control is there any reason why you haven't gone the DCC route? I was building a computer controlled DC system some years ago and abandoned it in favour of DCC which gives more flexibility. Keith Link to comment Share on other sites More sharing options...
Gordon H Posted June 30, 2011 Share Posted June 30, 2011 At the risk of being accused of promoting the group again, within MERG there are several designs available for point motor driving. No doubt there are others about on-line, but I am not aware of them. You would be able to see the DCC Accessory decoder designs in the public pages of the website: http://www.merg.org.uk/merg_resources/dcc_download.php Or, as mentioned previously, there are CBUS versions here: http://www.merg.org.uk/merg_resources/cbus.php You should be able to get the gist of the design concepts, even if the details are not directly compatible with your Arduino. You might choose simply to use the output stages of such a design which are undoubtedly logic level compatible to make them work as-is. DCC is but one option for computer control, several others exist. It is very good for train on-board controls where only two connections are available (the running rails), but was not really conceived with full-blown accessory control in mind. Many people use a combination of methods - DCC for controlling the trains and (say) CBUS for Acceessories. Link to comment Share on other sites More sharing options...
TomKett Posted June 30, 2011 Author Share Posted June 30, 2011 Thanks for everyones replies. DCC would be great but unfortunatly my finances do not stretch that far. The MERG information looks great, but again the cost of each component will soon mount up and also you cannot network the devise therefore it needs a direct link between the PC and the base boad. I think I will be going down the servo route as these seems the cheapest and easiest to implement so long as I can work out how to mount the servo to my baseboard. I may use the odd point motor as well just to widen my electrical knowledge. ideally with a solid state interface. Once I have a solution I will post it here for you all to see. regards Tom Link to comment Share on other sites More sharing options...
meil Posted June 30, 2011 Share Posted June 30, 2011 also you cannot network the devise therefore it needs a direct link between the PC and the base boad. But that is precisley what you can do with CBUS because that is how it works. Four wires (two power and two control) for the whole layout including PC control if you want or self control, the choice is yours. Link to comment Share on other sites More sharing options...
Crosland Posted June 30, 2011 Share Posted June 30, 2011 But that is precisley what you can do with CBUS because that is how it works. Four wires (two power and two control) for the whole layout including PC control if you want or self control, the choice is yours. Tom was talking earluier about a wireless network, which is not available for CBUS (yet). Almost certainly someone, somewhere, makes a WiFi to USB or CAN adapter that could be pressed into service. Andrew Crosland Link to comment Share on other sites More sharing options...
TomKett Posted July 25, 2011 Author Share Posted July 25, 2011 Hi guys, My main reason for using the Arduino is keep cost down. I have the Arduino and also the programming skills, I think I am going to use the servo idea as these appear very cheap and an ideal solution. If you are interested I have posted my first attempt at my control panel below. Web Control Panel This will be locally hosted so I do not need to worry about static IP addresses, but I have put it on the web for your views and reviews. Just click on part of the circuit with the green highlight, and this will change the flow of the system. Using a simple webservice call from the website to the Arduino board and the motors will change. I can also control the isolator sections this way as budget is restricting me going the DCC route. I am hoping by September to have the first couple of motors wired in. Cheers T Link to comment Share on other sites More sharing options...
Deev Posted September 20, 2012 Share Posted September 20, 2012 Did you ever get this working? I'd be very interested if anyone has managed to control an Arduino using DCC! Link to comment Share on other sites More sharing options...
GilesW Posted August 20, 2013 Share Posted August 20, 2013 There are several uses I can imagine the Arduino is perfect for, multiplexing switch inputs, servo/stepper motor control to make things like the Peco LK55 turntable move with programmable indexing, or maybe traverser control, I agree there are products which do the job just as well and just as cheap, but it should not be forgotten what the Arduino main objective is, to learn electronics in an easy way. Have you checked to see whether the output of the Arduino is suitable for driving 5V relay coils?5V relays tend to have quite a low coil resistance, and it may be that the output stages might struggle to deliver that kind of current.Just an observation, but from an engineering standpoint, it seems a bit of a shame to have all the 'high-tech' Arduino capability, immediately followed by use of electromechanical relays on its outputs.Solid state interfacing would be a better bet, and could be arranged not to load the Arduino outputs like several relay coils would.There are many circuits about which use simple transistors to interface between logic systems and (relatively) high power devices like point motors. I agree with Gordon H, for controlling the servos/steppers/dc motors power output, it is simply a matter of controlling a separate power supply, controlled by the Arduino via a Transistor, which would use a low mA PWM signal to control a higher voltage on the breadboard side, see chapter 8 of the utterly brilliant book. Arduinos for Dummies. Purchase from Amazon Polite Notice: If you buy this book from this link Amazon will pay me a small amount, you are free to search and pay for this item without using this link. Some useful links: http://eu.dummies.com/how-to/content/arduino-for-dummies-cheat-sheet.html http://eu.dummies.com/how-to/content/arduino-projects-for-dummies-cheat-sheet.html http://eu.dummies.com/DummiesTitle/productCd-1118446372,descCd-DOWNLOAD.html Did you ever get this working? I'd be very interested if anyone has managed to control an Arduino using DCC! As for DCC there is an open source DCC group which has started to link JMRI to Arduino's called OpenDCC http://opendcc.sourceforge.net/ or mrrwa.org/ Hope this helps. Cheers GilesW Link to comment Share on other sites More sharing options...
Robin2 Posted August 20, 2013 Share Posted August 20, 2013 I am using an Arduino Uno to control a pair of "fiddle yard" turntables on my small N Gauge layout. I started a topic on it here http://www.rmweb.co.uk/community/index.php?/topic/71363-computer-controlled-fiddle-turntable/ I have most of it working now, I just haven't joined all the bits together because I've been distracted by other stuff. I'm also planning to use the Arduino to operate some points using servos and to detect the train location using Light Dependent Resistors (LDRs) under the track. The ultimate plan is a short out and back layout on which I can sit back and watch the trains going by under computer control. I am also using Deltinos http://www.deltino.com and http://forum.arduino.cc/index.php?topic=174358.0 to make my N Gauge locos work with Battery Powered Radio Control (BPR/C) http://www.rmweb.co.uk/community/index.php?/topic/64616-battery-poweredradio-controlled-locos/ I will be happy to try to answer any questions. ...R Link to comment Share on other sites More sharing options...
GilesW Posted November 5, 2013 Share Posted November 5, 2013 Hi all I am planning on using an Arduino Board as a webservice to control the points and isolation circuits on my circuit. The arduino board is a mini computer that can be programmed as a webserver (website which computer programs can talk to ) to turn on and off output pins, these output pins are at 5v dc. I have no problems with the computer programming side of my project but its back to basics for me with regards to the electrical components. I am planing on making a Capacitor Discharge Unit and have found the following diagram on the web, does this look suitable? Capacitor Discharge Unit.png Can you please take a look at the below diagram, does this look correct for wiring the point into the CDU? Also I am planning on using a 5v relay and will be throwing 5v across the coil, however can the switch part of CDU take the output voltage from the CDU? Point Wiring - Arduino.png Also is there a way of using one output pin and one relay to switch the point rather than 2? Thanks for taking your time in reading this post. regards Tom I think if you want to control relays using Arduino you should look into IC2 connectable relays: Here are some, I have not used them but it is possible to get 2, 4, 8, 16 way relay boards for little money. http://www.amazon.co.uk/s/?ie=UTF8&keywords=arduino+relay&tag=googhydr-21&index=aps&hvadid=28643803380&hvpos=1o1&hvexid=&hvnetw=g&hvrand=2430843161000095055&hvpone=&hvptwo=&hvqmt=b&hvdev=t&ref=pd_sl_366m9v356a_b Hope this helps G Link to comment Share on other sites More sharing options...
GilesW Posted November 5, 2013 Share Posted November 5, 2013 Sorry meant to say i2c and use the 16 channel driver from AdaFruit to drive the relays and servos. http://proto-pic.co.uk/adafruit-16-channel-12-bit-pwm-servo-driver-i2c-interface-pca9685/ Cheers G Link to comment Share on other sites More sharing options...
richard-g8jvm Posted November 7, 2013 Share Posted November 7, 2013 FWIW the ACK pulse back from I2C devices can be very fast, and often causes contention, especially when using PICs to control an I2C device. Something you will need to be aware of when writing the I2C comms routine, and something to be aware of if using a bi-directional level shifter from 5V to 3V3. The symptoms are intermittent comms between the controller and device. If you get that have a look at the data with a DSO triggering off the clock. The Adrino should be OK , but if you are writing your own code something to be aware of if you are switching IO states on your interface. HTH Richard Link to comment Share on other sites More sharing options...
Crosland Posted November 7, 2013 Share Posted November 7, 2013 FWIW the ACK pulse back from I2C devices can be very fast, and often causes contention, especially when using PICs to control an I2C device. Something you will need to be aware of when writing the I2C comms routine, and something to be aware of if using a bi-directional level shifter from 5V to 3V3. The symptoms are intermittent comms between the controller and device. If you get that have a look at the data with a DSO triggering off the clock. The Adrino should be OK , but if you are writing your own code something to be aware of if you are switching IO states on your interface. I2C is designed for contention. The signal lines are open collector and the specification is multi-master with collision detection. Andrew Link to comment Share on other sites More sharing options...
Robin2 Posted November 7, 2013 Share Posted November 7, 2013 I can't help feeling that the context of the recent posts has been dead for two years ...R Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.