MY NEW LAYOUT ARDUINO CONTROLLED
Re: MY NEW LAYOUT ARDUINO CONTROLLED
Somehow even though it looks different, it reminds me of Laugharne Castle not that many miles from here.
Modelling On A Budget ---》 https://www.newrailwaymodellers.co.uk/F ... 22&t=52212
- TimberSurf
- Posts: 2536
- Joined: Wed Jan 08, 2014 5:47 pm
- Location: N.Wales
- Contact:
Re: MY NEW LAYOUT ARDUINO CONTROLLED
The House row front seems odd to me, most cheap housing I know of hade 4 pane windows, 9 pane windows reminds me of factories, but who knows! I have not seen every street in the country!
The back gardens look great, love all the detail, a real "scene" going on.
When I look at your thread title, I think I am further on than you! I now have several programs written for "animated" (or animotion as I call it) accessories. The program to run both car lifts is written! I am a fan of the Arduino principle, I just hate programming!
The back gardens look great, love all the detail, a real "scene" going on.
When I look at your thread title, I think I am further on than you! I now have several programs written for "animated" (or animotion as I call it) accessories. The program to run both car lifts is written! I am a fan of the Arduino principle, I just hate programming!
-
- Posts: 372
- Joined: Wed Sep 18, 2013 6:39 am
- Location: Hazeldene Victoria Australia ( in the bush )
Re: MY NEW LAYOUT ARDUINO CONTROLLED
As Mr Greenslades always says it's all in the mind.
What is and what isn’t nobody really knows.
Therefore what you see, is what it is, and what you don't see, it is not.
My Arduino stuff came to a standstill when I ran out of bits awhile ago. The track is set up in blocks so I can run 4 trains on a single track doing different things at the same time. It is run by 4 Arduino's talking to each other 1 master and 3 slaves. The track detection and the throttles are mostly installed.
I have had 1 train running around on what was connected and all runs pretty nicely.
But been doing a lot of building lately so have not got back to the electronics. And currently designing my own 3D printer that will print at 0.025mm resolution X and Y, for those really fine pieces.
So much to do and not enough time to do it it. At least all the main track is laid, just one siding area to lay.
And I have built all my slow motion point controllers using servo motors they work very nicely controlled by an Arduino that controls several points. I modified the servo motors so I can read the actual position of the servo so I know at all times the actual position of the point not just where it was last sent.
I like Your car hoist and the swing.
What is and what isn’t nobody really knows.
Therefore what you see, is what it is, and what you don't see, it is not.
My Arduino stuff came to a standstill when I ran out of bits awhile ago. The track is set up in blocks so I can run 4 trains on a single track doing different things at the same time. It is run by 4 Arduino's talking to each other 1 master and 3 slaves. The track detection and the throttles are mostly installed.
I have had 1 train running around on what was connected and all runs pretty nicely.
But been doing a lot of building lately so have not got back to the electronics. And currently designing my own 3D printer that will print at 0.025mm resolution X and Y, for those really fine pieces.
So much to do and not enough time to do it it. At least all the main track is laid, just one siding area to lay.
And I have built all my slow motion point controllers using servo motors they work very nicely controlled by an Arduino that controls several points. I modified the servo motors so I can read the actual position of the servo so I know at all times the actual position of the point not just where it was last sent.
I like Your car hoist and the swing.
-
- Posts: 372
- Joined: Wed Sep 18, 2013 6:39 am
- Location: Hazeldene Victoria Australia ( in the bush )
Re: MY NEW LAYOUT ARDUINO CONTROLLED
Hi folks
Seem to have forgot to submit my last post. So shall have to make up for it.
Last month or so have been working on the electronics and the track wiring for the layout, busily writing code for the Arduino's and the computer.
The Arduino's the code is in C and the computer is C++ and QT. I have attached a screen shot of the current controller, very basic at this point of time mainly using it to sort out the comms between the computer and the 4 Arduino's. At the moment as the trains run around the layout the block occupancy indicators change to show the current location of the train. Yes I have had 2 trains going at the same time on a single track. Next post I will include the track layout as I do not have it as an image file just the cad drawing.
At present I have several blocks joined together as I had run out of network cable.
The photo is of the Arduino panel, was taken for the post I forgot to submit, it looks a lot worse now more cabling.
The final control will probably use a Beaglebone Black instead of the computer as the software will easily be ported over as my computer runs Linux and the Beaglebone runs Linux also.
Seem to have forgot to submit my last post. So shall have to make up for it.
Last month or so have been working on the electronics and the track wiring for the layout, busily writing code for the Arduino's and the computer.
The Arduino's the code is in C and the computer is C++ and QT. I have attached a screen shot of the current controller, very basic at this point of time mainly using it to sort out the comms between the computer and the 4 Arduino's. At the moment as the trains run around the layout the block occupancy indicators change to show the current location of the train. Yes I have had 2 trains going at the same time on a single track. Next post I will include the track layout as I do not have it as an image file just the cad drawing.
At present I have several blocks joined together as I had run out of network cable.
The photo is of the Arduino panel, was taken for the post I forgot to submit, it looks a lot worse now more cabling.
The final control will probably use a Beaglebone Black instead of the computer as the software will easily be ported over as my computer runs Linux and the Beaglebone runs Linux also.
-
- Posts: 372
- Joined: Wed Sep 18, 2013 6:39 am
- Location: Hazeldene Victoria Australia ( in the bush )
Re: MY NEW LAYOUT ARDUINO CONTROLLED
Hi folks
I have attached the track plan so you can see what I am up to, Only need 1 more cable to get the last block separated.
Tonight running an 060 Tank engine and 2 Pullman coaches, a bit of relaxation sit and watch the train go around while I drink my cup of TEA.
The track plan has none of the sidings or branches shown, they will be added later when I get draw a more to scale drawing this one is just a rough sketch so I could wire it up.
I have attached the track plan so you can see what I am up to, Only need 1 more cable to get the last block separated.
Tonight running an 060 Tank engine and 2 Pullman coaches, a bit of relaxation sit and watch the train go around while I drink my cup of TEA.
The track plan has none of the sidings or branches shown, they will be added later when I get draw a more to scale drawing this one is just a rough sketch so I could wire it up.
Re: MY NEW LAYOUT ARDUINO CONTROLLED
That maximises the run a bit.
Modelling On A Budget ---》 https://www.newrailwaymodellers.co.uk/F ... 22&t=52212
- TimberSurf
- Posts: 2536
- Joined: Wed Jan 08, 2014 5:47 pm
- Location: N.Wales
- Contact:
Re: MY NEW LAYOUT ARDUINO CONTROLLED
Wow that has so many similarities to my design! Looks like twin track with four track in places but in reality is just one loop with many trains not colliding with each other even though all on the same track! I may come around to using Arduino for track section control yet!
What are you using as the occupancy detector? IR, coil based current detector or diode volt dif type?
Now that I think of it, I had always planned that my storage yard (which is part of the loop) would auto cycle the release of the next train as the last one came back, but never quite hard lined what mechanism would drive the points, I assumed it would end up as some sort of home grown decade counter type circuit, but of course an Arduino would be a perfect candidate to control it!
What are you using as the occupancy detector? IR, coil based current detector or diode volt dif type?
Now that I think of it, I had always planned that my storage yard (which is part of the loop) would auto cycle the release of the next train as the last one came back, but never quite hard lined what mechanism would drive the points, I assumed it would end up as some sort of home grown decade counter type circuit, but of course an Arduino would be a perfect candidate to control it!
Last edited by TimberSurf on Tue Apr 24, 2018 12:24 pm, edited 1 time in total.
-
- Posts: 372
- Joined: Wed Sep 18, 2013 6:39 am
- Location: Hazeldene Victoria Australia ( in the bush )
Re: MY NEW LAYOUT ARDUINO CONTROLLED
I had a bit of a play around with what I had laying around, and found getting the voltage difference across a pair of diodes worked best for me.TimberSurf wrote:What are you using as the occupancy detector? IR, coil based current detector or diode volt dif type?
I used opto couplers to isolate the track voltage from the Arduino side. Here is the Schematic of what I used, I have about 36 of them, 29 on the main line the rest in the sidings. Had no problems with there operation YET
- TimberSurf
- Posts: 2536
- Joined: Wed Jan 08, 2014 5:47 pm
- Location: N.Wales
- Contact:
Re: MY NEW LAYOUT ARDUINO CONTROLLED
COOL! I too intend to us V dif as the cheapest option (I will need about 40 circuits)
I am wondering if it would be possible to use the Arduino as the the voltage comparator?
One concern with your circuit, is that the diodes are not schottky type, intimated that standard 1N400x do not have fast enough recovery and will cause issues to the waveform!
What do the two Jumpers do?
I am wondering if it would be possible to use the Arduino as the the voltage comparator?
One concern with your circuit, is that the diodes are not schottky type, intimated that standard 1N400x do not have fast enough recovery and will cause issues to the waveform!
What do the two Jumpers do?
-
- Posts: 372
- Joined: Wed Sep 18, 2013 6:39 am
- Location: Hazeldene Victoria Australia ( in the bush )
Re: MY NEW LAYOUT ARDUINO CONTROLLED
JP1 just disables the LED and JP2 disables the pull-up resister so you can join the outputs together and use them in open collector mode, where you would only need 1 pull-up in the circuit.TimberSurf wrote:What do the two Jumpers do?
I think I may have purchased the schottky diodes but started to make the detectors before the arrived and never changed them as the 1N4004's worked ok.
-
- Posts: 372
- Joined: Wed Sep 18, 2013 6:39 am
- Location: Hazeldene Victoria Australia ( in the bush )
Re: MY NEW LAYOUT ARDUINO CONTROLLED
The problem with doing that is that you would need a differential input on the Arduino because the positive and ground change sides on the rails for forward and reverse. The arduino inputs are referenced to ground so you may get negative voltages on the input to the Arduino which may mean the smoke gets out.TimberSurf wrote:I am wondering if it would be possible to use the Arduino as the the voltage comparator?
-
- Posts: 372
- Joined: Wed Sep 18, 2013 6:39 am
- Location: Hazeldene Victoria Australia ( in the bush )
Re: MY NEW LAYOUT ARDUINO CONTROLLED
The main reason for open collector output is that the devices are output independent of the devices operating voltage, which becomes a consideration with more of the microcontrollers now running of 3.3v so being able to us it with either 5v or 3.3v is a good idea. The Arduino has pull-ups on the inputs that can be enabled to use 5v. The Beaglebone Black you have to add the pull-ups externally, the Raspberry pi has internal pull-ups and pull-downs that can be enabled in software.
-
- Posts: 372
- Joined: Wed Sep 18, 2013 6:39 am
- Location: Hazeldene Victoria Australia ( in the bush )
Re: MY NEW LAYOUT ARDUINO CONTROLLED
Hi all
Thought i would talk a bit about my throttle set up seeing I am having a bit of a problem with the modules I purchased for the job they seem to be different in the way they operate.
So firstly my layout is not DCC, there are no modules in the motive power, but are connected to the track one for each block. This is the main reason to using the Arduino's as each Arduino controls 6 L289N's link to item on Ebay https://www.ebay.com.au/itm/DC-Module-B ... 3120680771. Plus each Arduino has 12 block detection modules as as shown in a previous post.
The main reason I have gone this way is that I probably have available to run on my layout over 200 motive power units of various type's and some of those it is not possible to fit a decoder inside them, plus the cost of fitting out this many engines is definitely outside my budget.
I have found that last night when running some of the bigger loco's they have trouble running on parts of the track, and what I have found there is a large difference in the voltage being applied to the track when the loco is present in the block. The voltage drops like it has a very heavy load across the rails, this voltage drop is also present before the block detection so it is something to do with some of the L298N modules. The signals controlling the voltage is the same on all modules. so need to make a device to test the load delivering characteristics of the modules. Which means have to remove them all from the layout, which is a real pain, all this crawling on hands and knees.
On my original testing setup I only used one side of these modules so did not notice a problem, it worked as though all was ok, but alas all is not well no 2 seem to be the same.
Will keep you all informed
Thought i would talk a bit about my throttle set up seeing I am having a bit of a problem with the modules I purchased for the job they seem to be different in the way they operate.
So firstly my layout is not DCC, there are no modules in the motive power, but are connected to the track one for each block. This is the main reason to using the Arduino's as each Arduino controls 6 L289N's link to item on Ebay https://www.ebay.com.au/itm/DC-Module-B ... 3120680771. Plus each Arduino has 12 block detection modules as as shown in a previous post.
The main reason I have gone this way is that I probably have available to run on my layout over 200 motive power units of various type's and some of those it is not possible to fit a decoder inside them, plus the cost of fitting out this many engines is definitely outside my budget.
I have found that last night when running some of the bigger loco's they have trouble running on parts of the track, and what I have found there is a large difference in the voltage being applied to the track when the loco is present in the block. The voltage drops like it has a very heavy load across the rails, this voltage drop is also present before the block detection so it is something to do with some of the L298N modules. The signals controlling the voltage is the same on all modules. so need to make a device to test the load delivering characteristics of the modules. Which means have to remove them all from the layout, which is a real pain, all this crawling on hands and knees.
On my original testing setup I only used one side of these modules so did not notice a problem, it worked as though all was ok, but alas all is not well no 2 seem to be the same.
Will keep you all informed
- TimberSurf
- Posts: 2536
- Joined: Wed Jan 08, 2014 5:47 pm
- Location: N.Wales
- Contact:
Re: MY NEW LAYOUT ARDUINO CONTROLLED
So going back to the detectors, they are not on DCC! Similar but not quite the same waveform!
The L289N is rate at 3A, not sure that is not across both outputs, but 1.5A should be enough anyway. Don't forget your detectors will have 1.5volt drop thus you may only see 10.5V at the track. The L289N says up to 45V, so no reason your PCB could not be fed 13.5V! 40Khz is high, different engine motors will act differently as the B.E.M.F. characteristics for the larger motors will be different. Difficult to diagnose without more info.
The L289N is rate at 3A, not sure that is not across both outputs, but 1.5A should be enough anyway. Don't forget your detectors will have 1.5volt drop thus you may only see 10.5V at the track. The L289N says up to 45V, so no reason your PCB could not be fed 13.5V! 40Khz is high, different engine motors will act differently as the B.E.M.F. characteristics for the larger motors will be different. Difficult to diagnose without more info.
-
- Posts: 372
- Joined: Wed Sep 18, 2013 6:39 am
- Location: Hazeldene Victoria Australia ( in the bush )
Re: MY NEW LAYOUT ARDUINO CONTROLLED
Just done a static test with 12v power supply and just using jumpers no PWM and shock horror
Power supply is 12v @22 A max
the input voltage to module is 11.87 volts unloaded drops to 11.6 volts when single side is loaded power supply is 12v @22 A max
no load on each half output 1 11.5 volts output 2 11volts
15 ohm resister output 1 9.6 volts output 2 8.3volts
15 ohm resister output 1 724mA output 2 673mA
not very good results
Power supply is 12v @22 A max
the input voltage to module is 11.87 volts unloaded drops to 11.6 volts when single side is loaded power supply is 12v @22 A max
no load on each half output 1 11.5 volts output 2 11volts
15 ohm resister output 1 9.6 volts output 2 8.3volts
15 ohm resister output 1 724mA output 2 673mA
not very good results