# Whats the best way to control voltage AC from 0 - 18VAC with a Arduino

What would be a good method of controlling low AC voltage with an Arduino

I have an old motor (Lionel Postwar Train Motor from 1956 example) that runs on AC between 5vac and 18vac with a max of 8amp

I need to be able to manipulate the voltage with the Arduino so I can gradually increase or decrease it. Preferably as a percentage (0% = 0vac > 100% = 18vac) or decimals

So just to clarify. The power coming to the Arduino is already transformed at a constant 18vac.

I just need to safely control the voltage

Thanks

• I was born around then and my Lionel train set used a variac to control the voltage. An expensive but obvious solution would be to use a servo attached to a variac. But there is some discussion of a semiconductor approach here. So you might read that over and see. (Do note that you really don't have lots of "practical speed steps" that are important, so you do not need smooth control. You can do this in steps, I think.)
– jonk
Commented Aug 5, 2020 at 5:40
• Apart from @jonk sulution with morotized variac, a 2 ohm load capable amplifier which can supply 150 W into one channel fed via a 50/60 Hz souce you can control would do the job. How fast is the D/A output on your Arduino? Commented Aug 5, 2020 at 6:39
• PWM variable duty cycle signal from Arduino controlling a bidirectional switch (FET in a bridge or other). As long as PWM frequency is >> AC frequency you get variable voltage AC. Train motor will act as part of a filter. Flyback control on turn off may need a little thinking. || TRIAC phase control may work - Ardiono controlled light dimmer - motor MAY not like part cycle AC. || BUT is it rectified to DC of one or other polarity before the train sees it - photos appear to show a DC train. That's MUCH easier to manage. Full V DC at PWM frequency can be better than smooth lower voltage DC. Commented Aug 5, 2020 at 7:56
• @IgorMatkovic Is the actual train fed with AC or rectified (possibly unfiltered) DC.? || There are numerous DC speed controllers avaiable via Ali Express or ebay that would meet a DC controller need. Commented Aug 5, 2020 at 23:06
• @IgorMatkovic A DC controller "inside" a bridge rectifier may work. Feed AC1 to load then load to bridge ACin and bridge ACout to AC2. If you short Bridge + - outputs load runs on full AC. Now place a DC speed controller between bridge DC+ and DC-. Controller sees rectified full cycle DC but load sees AC. PWMing the DC load control (or using a variable resistor or electronically variable equivalent) will alter the AC. Commented Aug 6, 2020 at 7:28

A DC controller "inside" a bridge rectifier may work.
Feed AC via load bridge ACin and bridge AC out to AC2.

If you short Bridge + & - outputs the load runs on full AC.

Now place a DC speed controller between bridge DC+ and DC-.
The controller (pot or PWM short or ...) sees rectified full cycle DC but load sees AC.

PWMing the DC load control (or using a variable resistor or electronically variable equivalent) will alter the AC

simulate this circuit – Schematic created using CircuitLab

It's likely that converting the whole system to DC would work - unless there is some clever tricks hidden in there. eg points switching 'engines' rated for AC (higher inductance, with resistance too low for undropped DC). Unlikely, but ... . .