tag:blogger.com,1999:blog-7763117497297224225.post5824879805296333534..comments2022-02-02T11:00:59.084-08:00Comments on Harnessing the Electron: Controlling Model Trains with an ArduinoMartyhttp://www.blogger.com/profile/09291544028617899870noreply@blogger.comBlogger21125tag:blogger.com,1999:blog-7763117497297224225.post-83371944021318351512012-10-29T16:17:43.253-07:002012-10-29T16:17:43.253-07:00@Ray: Yeah, that cct diagram showing the transisto...@Ray: Yeah, that cct diagram showing the transistors and the rails is bad. Thanks for spotting that.<br /><br />I've no idea how to go about reprogramming the address of a DCC receiver, sorry...Martyhttps://www.blogger.com/profile/09291544028617899870noreply@blogger.comtag:blogger.com,1999:blog-7763117497297224225.post-17054345046460003352012-10-22T13:18:58.865-07:002012-10-22T13:18:58.865-07:00Nice work so far but your component diagram for th...Nice work so far but your component diagram for the H-bridg doesnt seem right to me. Surely when eith 1A or 2A goes high, both the uper and lower transistors will switch on and there will be a short from the 12v to gnd.<br /><br />Or have i missed something?<br /><br />Also, do you have any idea of how you would be able to programme a new address to a train with this setup?<br /><br />Thanks<br /><br />RayUnknownhttps://www.blogger.com/profile/02599308105313243143noreply@blogger.comtag:blogger.com,1999:blog-7763117497297224225.post-58834014598641487662012-10-11T18:35:38.065-07:002012-10-11T18:35:38.065-07:00@Phillip: What is the amps rating on your 12VDC su...@Phillip: What is the amps rating on your 12VDC supply? If it's anywhere near 1A, then why not use that instead of the AC supply?<br /><br />I can't think of a way of using the AC supply, unless you want to put it thru a bridge rectifier first.<br />Martyhttps://www.blogger.com/profile/09291544028617899870noreply@blogger.comtag:blogger.com,1999:blog-7763117497297224225.post-33489147214499450172012-10-11T10:19:32.027-07:002012-10-11T10:19:32.027-07:00Apologies for my last comment, thinking about it a...Apologies for my last comment, thinking about it again it wouldn't work.<br /><br />Any suggestions on the best way to add DCC "bytes" into a 16VAC power supply from the Arduino?<br /><br />Regards,<br />PhilipF1phttps://www.blogger.com/profile/09789907460577850472noreply@blogger.comtag:blogger.com,1999:blog-7763117497297224225.post-74257874459993743002012-10-11T09:06:17.074-07:002012-10-11T09:06:17.074-07:00Hey Marty,
Many thanks for the reply.
I have buil...Hey Marty,<br /><br />Many thanks for the reply.<br />I have built my H-Bridge to your circuit diagram as above out of N-Channel MOSFETS.<br /><br />I have a 16VAC power supply from an old DCC controller, or i use a 12VDC power supply.<br />What would you recommend? <br />I can supply my circuit diagram if it would help.<br /><br />Regards,<br />PhilipF1phttps://www.blogger.com/profile/09789907460577850472noreply@blogger.comtag:blogger.com,1999:blog-7763117497297224225.post-18171242716558941262012-10-10T07:39:51.692-07:002012-10-10T07:39:51.692-07:00Hehe nice, i started googling the dcc arduino and ...Hehe nice, i started googling the dcc arduino and came up here. Gonna try that too =)LThttps://www.blogger.com/profile/17628991061749094518noreply@blogger.comtag:blogger.com,1999:blog-7763117497297224225.post-65409395668772551622012-10-09T19:08:43.348-07:002012-10-09T19:08:43.348-07:00@Dan John: Yeah, the trains will need a decoder, I...@Dan John: Yeah, the trains will need a decoder, I probably should've mentioned that! You can buy trains with decoders in them, or buy a decoder board and install it yourself.<br /><br />@F1p: code is in github: https://github.com/Harnesser/DCC-ControllerMartyhttps://www.blogger.com/profile/09291544028617899870noreply@blogger.comtag:blogger.com,1999:blog-7763117497297224225.post-66574600958328737402012-10-09T01:27:28.963-07:002012-10-09T01:27:28.963-07:00Is your code available?
Regards,
PhilipIs your code available?<br /><br />Regards,<br />PhilipF1phttps://www.blogger.com/profile/09789907460577850472noreply@blogger.comtag:blogger.com,1999:blog-7763117497297224225.post-54699623673642301942012-08-26T10:44:09.139-07:002012-08-26T10:44:09.139-07:00wont the train need to have a decoder installed in...wont the train need to have a decoder installed in it firstAnonymoushttps://www.blogger.com/profile/08948033072314017863noreply@blogger.comtag:blogger.com,1999:blog-7763117497297224225.post-83052443915211401292012-08-26T03:18:38.551-07:002012-08-26T03:18:38.551-07:00@Dan: You can get L293Ds anywhere that sells elect...@Dan: You can get L293Ds anywhere that sells electronic components: Element14, Sparkfun, Adafruit etc.<br />As for the trains, they'll need to be DCC compatable - it usually is written on them.Martyhttps://www.blogger.com/profile/09291544028617899870noreply@blogger.comtag:blogger.com,1999:blog-7763117497297224225.post-18248360598983208152012-08-26T02:09:44.969-07:002012-08-26T02:09:44.969-07:00hi there
where can i buy an ld93d
and what sort o...hi there<br /> where can i buy an ld93d<br />and what sort of decoder will be requiered in trains<br />thanksAnonymoushttps://www.blogger.com/profile/08948033072314017863noreply@blogger.comtag:blogger.com,1999:blog-7763117497297224225.post-16920669909563997682012-01-25T01:58:15.396-08:002012-01-25T01:58:15.396-08:00 Hi
This is an interesting project, I' am just... Hi<br />This is an interesting project, I' am just in the start of trying to put sorting together with DCC controlled train and arduino.<br />It would be nice to see what you have come up with Jon<br /><br />Best regards JanJanhttps://www.blogger.com/profile/00020663467225481033noreply@blogger.comtag:blogger.com,1999:blog-7763117497297224225.post-21016843244011091562012-01-04T20:33:08.823-08:002012-01-04T20:33:08.823-08:00@Jon: Thanks for letting me know you found this st...@Jon: Thanks for letting me know you found this stuff useful! It's always interesting to know what folks do with your stuff.<br /><br />Sounds like you've made lots of mods that one or two other commenters would be interested in, for example the packet formats for other controllers. Do you have your mods documented anywhere? I'd also love to see the code...Martyhttps://www.blogger.com/profile/09291544028617899870noreply@blogger.comtag:blogger.com,1999:blog-7763117497297224225.post-21905572309862493112012-01-03T19:05:33.499-08:002012-01-03T19:05:33.499-08:00Hello Martin,
Thanks for posting your project!
...Hello Martin,<br />Thanks for posting your project! <br /><br />I tried it out myself and generalized your code to handle any arbitrary DCC command packet from the PC (for controlling track switches, special decoder functions, or other accessories). I also had the Arduino read a potentiometer and some buttons to control the speed of the train and turn on the head light etc. <br /><br />It turns out that a TamvalleyDepot 5Amp DCC booster I got at my local train shop will run right off the 5V output from the Arduino so you don't even need the h-bridge if you go that route. That might work with other DCC boosters but I don't know.<br /><br />Anyway, it's been great fun learning about DCC right down to the bare bits and since I can manipulate each data packet directly, I'm not limited to just the options provided by a particular controller or manufacturer.<br /><br />Thanks again,<br />JonJonhttps://www.blogger.com/profile/07370843687367670365noreply@blogger.comtag:blogger.com,1999:blog-7763117497297224225.post-18364655300618588062011-10-24T12:20:06.913-07:002011-10-24T12:20:06.913-07:00@Sam:
My DCC controller as it stands, does not kno...@Sam:<br />My DCC controller as it stands, does not know how to talk to points. If we knew what packet format the points expect, it probably wouldn't be a huge job to update the code.<br /><br />The touchosc thing sounds like a cool idea. I'd imagine that using touchosc to send commands to the arduino would be possible. As long as the ipod can recognise the USB connection to the Arduino as a serial port, and as long as it can send text over this serial link from touchosc, I'd say it could work, but I've no experience working with either ipods or touchosc so I can't say for sure. (Do ipods even have USB ports?)<br /><br />Put another way, the GUI I built for my DCC driver is not required, but you do need to send text commands over the USB serial port to the Arduino board. See the Python script examples in the code - I've one for finding train addresses and another just to move a train forwards and backwards.<br /> <br />I'm not a railway modeler myself, so tbh I don't know what the DCC booster boxes are designed to do. If you find out, I'd be interested to know.Martyhttps://www.blogger.com/profile/09291544028617899870noreply@blogger.comtag:blogger.com,1999:blog-7763117497297224225.post-58107924820805137342011-10-24T03:09:16.321-07:002011-10-24T03:09:16.321-07:00Hi i really like this project
At the moment i hav...Hi i really like this project<br /><br />At the moment i have used my ipod and touchosc to send data over the serial port and that changes the points for me. do you think i could insted of using your GUI i could use sliders in touchosc to control the trains. <br /><br />Another thing was that i was woundering if you could link the output pins from the arduino straight up to a booster box or something like that so there is definatly no chance of damaging things. finally does a booster box remaster or rectify the packets so to speak or does it just boost them. <br /><br />Im only 14 and i would like to take my modeling a bit further. <br /><br />Thanks for the great project.Samhttps://www.blogger.com/profile/04587371327043431794noreply@blogger.comtag:blogger.com,1999:blog-7763117497297224225.post-26488451272383534022011-10-16T15:50:33.694-07:002011-10-16T15:50:33.694-07:00@Chris - I have no idea!
I had a quick look on t...@Chris - I have no idea! <br /><br />I had a quick look on the internet for an R8216 datasheet, but I couldn't find anything that shows the packet format that it expects. If we had this, we'd be flying. Or, rolling if you prefer!<br /><br />If you had:<br />* a point controller<br />* a hornby command station <br />* some track <br />* and oscilloscope<br />you could reverse engineer the packets.<br /><br />Sorry I can't help more, but I'm chuffed you've found the project useful. If you wouldn't mind, I'd love to see your web GUI when you're done with it!Martyhttps://www.blogger.com/profile/09291544028617899870noreply@blogger.comtag:blogger.com,1999:blog-7763117497297224225.post-69968442019372153212011-10-11T13:36:39.407-07:002011-10-11T13:36:39.407-07:00This is an excellent project good work. I am tryin...This is an excellent project good work. I am trying to build a layout using your DCC controller with a web gui frontend. I have an issue which i was hoping you could help me with. I need to get the controller to controlthe R8216point decoder, I have been trying to get my head around the packet that I need to build but I am not having any luck. Could you help me out?Chrishttps://www.blogger.com/profile/05487631667685693973noreply@blogger.comtag:blogger.com,1999:blog-7763117497297224225.post-72690102611394539162011-03-31T08:28:19.088-07:002011-03-31T08:28:19.088-07:00Hi Martin,
Any specific email i can catch you on?...Hi Martin,<br /><br />Any specific email i can catch you on? <br /><br />Thanks<br /><br />RyanUnknownhttps://www.blogger.com/profile/04263606092463549727noreply@blogger.comtag:blogger.com,1999:blog-7763117497297224225.post-50801683510131579862011-03-16T20:15:25.545-07:002011-03-16T20:15:25.545-07:00@will:
1: Yip, an arduino, an L293D, a DC power su...@will:<br />1: Yip, an arduino, an L293D, a DC power supply and a few resistors. Oh, and a laptop to run the GUI to control the trains.<br /><br />2: What would you like pictures of? The stripboard? What instructions did I miss (I thought I'd explained most of what was needed to get this going, I'd be interested to find out what I missed)<br /><br />3: As far as damaging the train - I don't think so. AFAICT, the only way to damage a train would be to supply too-high a voltage on the rails.<br /><br />4: I haven't tried extending this. I just wanted to see if I could get the train to move.<br /><br />5: Again, I just wanted to get the train to move. The code is my github repo if you want to take it and use it as the basis for an opensource hardware/software project.<br /><br />I take it you're into model railways then?Martyhttps://www.blogger.com/profile/09291544028617899870noreply@blogger.comtag:blogger.com,1999:blog-7763117497297224225.post-4599948091350343242011-03-14T19:40:48.296-07:002011-03-14T19:40:48.296-07:00So I'm curious, do you actually have a working...So I'm curious, do you actually have a working dcc controller that uses only an Arduino and a few bits of hardware?<br /><br />I wonder if you could post some pictures, or some further instructions? Is this thing safe, or will it risk damaging the train you might be trying to control? <br /><br />Have you tried to extend this enough to control everything the decoder is capable of?<br /><br />Could this be developed into a real open source project?<br /><br />-- WillUnknownhttps://www.blogger.com/profile/09138961654219516476noreply@blogger.com