AC train controller

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

Michael Schmid

control a model train

I am trying to turn lights off and on.

So it's lights not the train you want to control?

Are these lights on the train?

How much control do you need, on/off, brightness?


Rob

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

Michael X?

You would need to modulate control information over the AC, it's not really my field and I think not hugely reliable.

But there are a 100 systems around for controlling model train layouts, any reason to develop your own from scratch?

how do I use AC power with the arduino?

With relays or triacs.


Rob

Ac model train sounds like Märklin.
If so they have a digital control system.
Märklin Digital – Wikipedia (in german)
Märklin Digital - Wikipedia (in english)
Google Code Archive - Long-term storage for Google Code Project Hosting.

nilton61:
Ac model train sounds like Märklin.
If so they have a digital control system.
Märklin Digital – Wikipedia (in german)
Märklin Digital - Wikipedia (in english)
Google Code Archive - Long-term storage for Google Code Project Hosting.

How correct you are, just that all of the trains that I have are not compatible with the digital marklin.
D=

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

shooter:
we are curious what brand of train it is.

As stated above we own a Marklin (analog :astonished:)

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?

...R

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.

Tom... :slight_smile:
Marklin.. nice models, the older models priceless. (Hornby-Triang fan, GWR, Gods Wonderful Railway, Islambard Kingdom Brunnel Rocks)

Islambard Kingdom Brunnel

Bit disrepectful.

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.

Isambard Kingdom Brunel

sorry was getting ready for work, eating breakfast, not enough coffee..

Tom... :slight_smile:

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.