Past week the LiPo batteries plus a charger came in from Aliexpress. They were meant to be built in the coaches to power the led interior led light of 2 trains with each 3 coaches. Via a small connector the batteries can be charged from the outside.
Past weekend a lot of wiring work has been taken place, under the table.
A 5V 0.6A supply is used to power the Arduino's. Wires are spread to both the West and the East side of the table. A separate 5V 2A supply is used for the servo's. They are all over the place, the wiring to power them is a 3 node star 'network'. Both power supplies are old adapters I had in a drawer (with still another 12 or so, gathered over years of gadget collecting).
Originally I planned to have only one optocoupler circuit to feed DCC to the Arduino's (see the software page for details), but I could not get that to work. After a lot of testing and measuring (the new €16,- Digital Multi Meter is put to good use!
and trial and error, it seemed the long GND wires, coming from the central node where the GND of both power supply's are connected, was too sensitive for interference.
The solution was to place the optocoupler circuit close to the Arduino. Which means I'll need 2 of those circuits. Luckily I initially bought 2 of the fast 7m136 OC's, no need for shopping. But also now, although it seems to work fine, it still is all quite sensitive. When I so much as touch a GND wire with my finger, the servo moves. I think I need to connect my 0V GND to a mains ground terminal ... but that is not available in the sleeping room where the lay out is built.
The video on the blog shows a bit of the current situation under the table, the optocoupler circuit and the Arduino, movement of the first actual layout-mounted servo, and the control of the servo via the ECoS and via PC (using the Dutch program Koploper).
Past weekend I continued working on connecting 23 servo's to the 3 Arduino's that act as DCC servo decoders. Alas I ran into big trouble. I had connected and tested 3 servo's and up to that point all went well. But as soon as I connected the 4th servo, the first 3 started to aggressively jitter. So much even that the spring wires through the turnout holes came lose!
Not good! What was the causing this? Power supply too small? Electrical interference? Something weird with the Arduino? After a lot of puzzling, measuring and exchanging servo's it became clear that there were combinations of servo's that did not show this problem, and there were combinations of servo's that acted weird already as soon as only 2 were connected.
Although logically and rationally I could not understand it, slowly it became more and more apparent ... there are servo's that 'like each other', they work well together, but there are also ones that 'hate each other', they give aggressive jitter when attached to one and the same Arduino.
Closer investigation of the servo's showed that although they are the same brand and type ... they are different! See the image. When these 2 are attached to one Arduino, the one on the left starts to jitter and distort. I do not understand why. I also do not have a solution. Tried adding a capacitors to suppress distortion, added a resistor to the output to give it a less disturbance prone load ... nothing helped.
The only thing that seems to help is to use only one type of servo's on one Arduino. Alas that means I have to remove and then remount and retune 7 servos. Work I was not particularly waiting for. All and all a few days of problem seeking and a fair amount of frustration all this makes for a lost week.
Hi Ruud. I was concerned about one aspect of Your Connections and I will try to explain.
When connectig servos this should only be done via a bord made for servos like the "ESU switch pilot servo" or the Board from DigiRails that Robert V O use in his video on the railcrosing-servos.
(I do not know if the Arduino is made for servos)
Inside the servo you have a circuitboard and a positionsensor that is dependent on Control by a special unit and will not function like a clean DC motor unless you remove the sensor and Board.
This Board is allso supersensetive to interferance and this makes the servo jitter unless it is controlled the way intended.
If the controlling-Device is exposed of interferance this will allso make the servo jitter.
I am simply writing this because I can not see how it is wired. You can try to move the Arduino further away from most cables to see if this helps.
As a general rule if the servos have the same itemnumber and are not the same, this Points in the direction of a very cheap manufacturer With bad quality.
For servos that will last a long time, buy Futaba, Graupner, or Hitec. The cheapest servo I have is PowerHD 1711MG but although good Power one of the 15 I have, rusted stuck after two years of no use.
The problem is simply that a 3 Euro servo will last one year, a 30Euro Futaba servo will last forever while dealing With 10 times the abuse. (The 1711MG is around 10Euro)
But if you have Connected servos to one common and the two other wires to the Arduino this is a big NO simply because the controlfunction is lost and the chances of interferance increase.
It is possible to operate the servo as a DC motor but I would not do this unless it was 1 servo for one special task..., (instructions on Youtube) Very timeconsuming.
Btw I think the fact you have kept the spring in the turnouts is the best option yo avoid constant preassure on the servo
So if all servowires are Connected to the Arduino it is most likely the way you have placed the wires that needs a "cleanup" - keep servowires away from the bus and powervires.
Thx for your extensive reply trying to help out JC. These servo's indeed are an 'el cheapo' brand at less then €2,-. The whole idea of the lay out is to try and see if it can function at the lowest possible cost. Hence also the use of an €3,- Arduino as DCC servo decoder.
Yes, the servo's are sensitive and wiring should not be (too) long. From the tests I did though, the cause for the trouble seems to be that 2 types of servo's don't mingle well.
Coming days I'll exchange servo's to get the same type on every of the 3 Arduino's. Then I'll know if it can work OK, or if there are still other sources of trouble. Better servo's and more Arduino's, mounted closer to the servo's, will be the potential solutions then.
I understand Your goal Ruud. But in my RC airplanes I use 1,5m cables Close tougether With up to 8 servos ( 3 or 4 different types each for it`s task without problem). The thing that is essential is to keep the antenna in one spot the powervires in a second spot and the servovires in a Third spot. (No problem to make a bundle of servowires or powerwires)
So try to make the servowires stay away from anything else than the Arduino. I kid you not; 2 cm difference can change useless to fantastic. If you have made the Arduino work while one servowire is Connected to a seperate Power Source then you should probably know you have prooved it possible but not With the odds in Your favour
PS: A non MG Servo (Metal Gear) 4-5 Euro PowerHD would probably do the job but at that price I would maby recomend open the servo and add some grease. As I said I had a more expensive one that rusted stuck because it had not been used. Cheap cables can be bought at hobbyking.com.
The PowerHD and Graupner use futaba Connectors and Hitec allso fit in theese if you use a carpetknife on the Hitec Servo Connectors.
All is still manually controlled. The ECoS screen is on the iPad, via a VNC client (Mocha VNC Lite), enabling 'remote control'. To safely drive multiple trains, automation is really needed. Manual control really asks for great concentration to take switch turnouts in time (or an unyielding short will be the result) and to halt trains in time at terminal tracks. Man ... it is hard work ... I was already sweating after three rounds.
With the servo's there have been 2 hurdles on the way.
First it seemed there were 2 types of servo's and when connected to one Arduino they act weird. In order to take care I had only one type of servo connected to one Arduino, 7 servo's needed to be exchanged. That meant 14 times disassemble and assemble and tune again. See this post for the details.
Then it turned out that the servo's make a little jump at power-up. All 23 of them jump together, which made that my 2A power supply would not start up. Although 2A would have been enough for normal operations, a heavier supply was needed. Luckily I could use the ATX power supply out of an old PC. See this post for the details.
Now all is well. All 23 turnouts work without any issues. It is fun to see that a fully functional DCC servo control can be made for less than €2,50 per turnout. Let's hope they continue to function for quite some time. Let's hope it turns out to be reliable over time.
It is interesting to read about your experience with those low cost servos. I am using servos with the same outward appearance as yours but am sticking with ECoS SwitchPilot servos for control. My only problem so far has been the big inrush current at start up so I use a separate AC transformer to provide power to the SwitchPilot and hence the servos themselves.
Yes David, that rush in current indeed is quite a bit, and it adds up when all the servo's start up at the same instance. It made me have to change the power supply to a hefty ATX ex PC one. And the supply for the control electronics indeed is still separate, just to be sure.
Switching routes in on the ECoS to manually operate a layout in essence works fine. There is a drawback however. Having just one ECoS screen available requires constant changes between the turnout / route switch panel and the train throttle panel.
It would help a lot if there would be a second screen. That is possible, using a PC with a Train Control software program. I plan on truing iTrain, JMRI, Rocrail and Koploper. iTrain seemed to have the most user friendly and intuitive layout editor, so that is the first one to give a try.
After iTrain, now also JMRI has been put to the test for manual control of a layout using route switching.
Personally I like the iTrain user interface to create layouts better, it is much simpler an intuitive. On the other hand, JMRI has some nice possibilities for 'pimping' your panel (you can use different icons / images, you can even use your own) and it has some more switching configuration possibilities. Drawback is that there is a bit more of a learning curve, but in the end it is doable.
I thought that the iTrain feature to lock all turnouts that are used in an active route would be nice to prevent errors. But in the end it proved cumbersome. When you need to be quick and switch different routes because a train is getting near, first having to deselect the old route(s) take away valuable time. With JMRI every route or junction can immediately be switched.
Past weekend I downloaded the Traincontroller demo and started playing with it. Immediately I got quite caught by it. ECoS, Koploper, iTrain and JMRI ... I tried them all for switch panel and routes ... well ... I can safely say: nothing beats TC! (OK ... that is a personal opinion
The 'switchboard editor' has a friendly user interface, the whole layout was entered in 'no time'. It was actually fun to work with. Yes ... to do more advanced things there is a learning curve and there is a 300 pages manual plus extensive Help files. But really ... anyone who has worked with similar software before can start up just like that.
But then the fun really starts. There are so many possible ways to control trains, from fully manual to fully automated and many variants in between ... and everything can be combined seamlessly. This makes playing with your layout so much fun! Really ... I am enthusiastic!
There is this one thing though that I am less enthusiastic about ... that is the price tag. TC Gold is out of my league for my tiny layout. Even TC Silver is. Bronze ... maybe, but then, once you've played with Gold it may be hard to deal with the Bronze constraints.
A forum community dedicated to Model train and railway owners and enthusiasts. Come join the discussion about collections, displays, models, styles, scales, motors, reviews, accessories, classifieds, and more!