I am running a model railway and I am using SG90 servos to change the points and this is all working fine. accept when I run a 12v train around the track the servos start jumping from open to closed. I know this is probably being caused by interference on the signalling channel and I have tried several methods including shielded cable but it is still happening.
The servos are independently powered using a 5v supply and controlled via a Arduino mega also on its own 5v power supply. the track is powered with 16v AC supply this is to allow for DCC control of the trains.
Does anyone have any advice that would stop the interference.
This sounds like an EMI (ElectroMagnetic Interference) problem, these are usually very difficult to solve. Post an annotated schematic, the language of electronics, showing how you have wired it, not pictures such as frizzy (wiring) drawings they are useless for troubleshooting. Do include links to "Technical information" on the hardware parts, links to sales outlets like azon are next to useless. Doing this will have a big positive effect on your answers and will improve the accuracy of the answer a lot. Be sure to show all hardware such as resistors, capacitors, etc. Also note any wires over 10"/25cm.
Hi Jim-p thank you for responding
The servos have 3 conductors one each for power and one for single. I have taken a ground from the supply of the servos and put it to ground on the Arduino mega and this did not fix the issue. I am hoping to upload a diagram later to show all connections. I think I have stumbled upon the issue last night. I have disposed of the power supply for the servos and I am using the same supply as the Arduino to feed the servos and it appears to have resolved the issue but my concern is that sharing the same supply will not be enough to switch the servos when required.
That would be exactly counter to what most would advise. Keeping the servo power separate from the Arduino, but sharing a common ground, is the accepted way to go. That it doesn't work for you for some reason again indicates we need a schematic and assembly photo, to hopefully be able to tell you what you were doing wrong.
I have tried connecting the grounds of both supplies together which are identical and taking that ground back to the Arduino this caused the servos to buzz which is not normal.
The shielded cable made no difference. I am sure it is definitely something to do with the power connections and the grounds. cannot post image from the device I am on so will move to another machine later.
Well that is the correct way to do it, so there must be something else wrong in your wiring.
A bad connection, wires too thin, wires too long ...
Maybe one of the identical supplies is bad.
Are all the power supplies connected to the same mains connection or are some connected to a different mains outlet. If different outlets, check the grounds with your DVM to be sure there is ZERO AC volts.
Without seeing your whole circuit, have you considered using a PC ATX power supply to power up your whole layout? It may be an easier way than whatever you're doing.
Here's a video to see if maybe this would be good for you. Remember the higher the wattage PSU the better, if the price difference isn't a big concern.
According to the comments in this video (I'm not a model railroader), this power solution can be easily used on a DCC system as well with use of a step up converter.
There should be a ground connection between the display and the Mega.
If it actually works without a ground connection, that would suggest that there is some unknown ground path somewhere that may be causing the problems