I am quite new to Arduino, but not to programming in general. I have a project in mind - basically model trains, in a rather large scale (1:22). There will be a "controller arduino" off-track. Each train will have its own arduino, receiving wireless commands from controller, and acting accordingly.
Now, my plan is to have the tracks provide 12v power, with ground on the other side of the track. The on-board arduino should get these 12v as input voltage - is this safe? I can perhaps imagine that there may be spikes in the supplied power, so what is the safest way to do this? The motors will be PWM-controlled by the on-board arduino, but from the same power supply. I imagine some hefty capacitors are needed.
When running, I could easily imagine the wheels sometimes slipping, or not completely touching the rails for short periouds of time. Could I use a large capacitor before the arduino, as a buffer, so it does not reset when/if this happens? If so, what specs should I be looking for?
Thank you in advance for any guidance :) I don't want to completely start with the wrong idea, if any of this is out of the question. Casper