Hello,
I am currently trying to control a model train which runs on an ac current (50hz and 16v) How could i control this with an arduino (Micro is which one I currently have) and will I have to buy a shield or build a converter. I am trying to turn lights off and on.
If more information is needed I will be available
only on off, I also want to control the switching points (junctions). The main question is how do I use AC power with the arduino?No they're not in trains.
I also want to control the trains but lets just go one step at a time
Thanks
lights dont care if they get AC or DC so you can use a bridgerectifier and a pwm outtput with a transistor for control.
most ac motors run good on dc so same as above
and you can use a H bridge controller for a simple ac maker
we are curious what brand of train it is.
marklin uses DC but the signal on the rails is a squarewave
It seems like the title of this thread and the content of you first post have pointed everyone in the wrong direction.
If all you need to do is control stationary lights on your layout why not just say so - and then get some useful advice. What sort of lights? What do you want to do with them? How many? What current do they need?
Hi, if all you want to do is control lights/LEDs independent of the track control then the arduino will do the trick, rectify the AC and filter it to produce DC then choose what lights you want to control.
You can switch them with relays, transistors, FETs, depending on the load even dim or fade and flash.
If you want to go AC powering the lights, okay if they are lamps, but you would have to rectify and filter the AC for each LED or LED array you use.
You will have to provide DC for the arduino too.
michael-schmid:
Hello,
I am currently trying to control a model train which runs on an ac current (50hz and 16v) How could i control this with an arduino (Micro is which one I currently have) and will I have to buy a shield or build a converter. I am trying to turn lights off and on.
If more information is needed I will be available
I think the general answer is - use relays. Various opto-isolated relay boards available with two, four or eight small relays.
I've been working on my own train control system, for LGB trains.
I'm using the transformer to control the speed, and I have a box that does yard control. It uses relays to allow power to pass through certain track sections (the 3-track yard and the spur), and sends rectified AC to the turnouts to control the direction of the trains.
I think it's just about working, even though there's probably a ton I can do to make the project better designed. But it was a lot of fun working on it.