As an Amazon Associate we earn from qualifying purchases.
An AC chaser turns lamps on and off in a sequence so the light appears to run along a string. You see them on festival decorations, shop signs and chain bulbs. This article explains how a transformerless, multi-pattern, microcontroller-based chaser is put together, why the design is cheap, and what you must do to build it safely. The video above shows the project in action.
What a transformerless multi-pattern chaser means
The name packs in three ideas:
- Transformerless: the low-voltage supply for the microcontroller comes straight from the mains through a small capacitor-based circuit instead of a bulky step-down transformer.
- Multi-pattern: the firmware stores several lighting sequences, such as left to right, right to left, bounce, all blink and alternate channels.
- Microcontroller-based: a small chip generates the patterns, so changing a sequence means changing code, not rewiring hardware.
Dropping the transformer lowers the cost, weight and size. That is the main reason this approach is popular for low-cost decorative lighting.
Block diagram of the circuit
The design splits into four simple blocks:
- A capacitive dropper power supply that produces a few volts of DC from the mains.
- A microcontroller that runs the pattern program.
- Driver stages, usually a transistor or optocoupler for each output channel.
- Triacs that switch the AC lamp loads.
The transformerless power supply
A capacitor rated for mains use is placed in series with the live line. Its reactance limits the current, so it acts like a resistor that does not waste heat. After it come a rectifier, a zener diode to clamp the voltage, and a filter capacitor to smooth the DC for the microcontroller.
Typical protective parts include a fusible or surge-limiting resistor at the input and a bleeder resistor across the dropper capacitor, so the capacitor discharges when unplugged. The current available is small, which is fine for a microcontroller and a few driver stages but not for anything heavy.
The microcontroller
A chaser needs very little from its chip. It must have enough output pins for the channels, a clock, and enough memory for the patterns. Even an 8 pin microcontroller can run several patterns if you use shift registers or limit the number of channels. If you are choosing a chip for a battery or low-current build, our guide to a low power MCU covers what to look for.
Output drivers and triacs
Each channel switches a lamp load with a triac. The microcontroller pin does not connect to the triac directly. A common method is to use an optocoupler triac driver, which gives electrical separation between the control side and the mains side. In a transformerless design the whole circuit floats on the mains anyway, so the optocoupler is not an isolation barrier for the user, but it still reduces noise and protects the chip from switching spikes.
Add a snubber network (a small resistor and capacitor) across each triac when driving inductive or low-power loads, and fit a fuse sized for the total load.
How the patterns work
The firmware keeps each pattern as a table of output states. A timer loop reads the next entry, writes it to the output pins and waits a set delay. Changing the delay changes the speed. Typical patterns include:
- Forward and reverse running lights
- Bounce, where the light runs to one end and back
- Fill and clear, where lamps turn on one by one and then off one by one
- Alternate odd and even channels
- All channels flashing together
The pattern can be switched automatically after a number of cycles, so the display keeps changing without any user input. For a build that adds adjustable timing, see this chaser with speed control. For a design aimed at decorative stars and bulb strings, look at this multi-mode chaser.
Parts you will typically need
- A microcontroller and its programming tool
- A mains-rated dropper capacitor, a bleeder resistor and a fusible input resistor
- A bridge or single rectifier diode, a zener diode and a filter capacitor
- Triacs, with optocoupler drivers and gate resistors for each channel
- A fuse, and heatsinks if the lamp load is high
- A properly insulated enclosure and mains-rated terminals
Check the datasheet for every part and calculate the dropper capacitor value from the current your circuit actually draws. Do not copy values from a circuit without checking them against your supply voltage and frequency.
Safety: read before you build
A transformerless supply has no isolation from the mains. Every point of the circuit, including the microcontroller pins and programming header, can be at a dangerous voltage.
- Never connect a computer, programmer or oscilloscope to the circuit while it is powered from the mains.
- Program the chip on a separate low-voltage setup before placing it in the circuit.
- Put the finished circuit in a fully closed insulated enclosure with no exposed metal.
- Use a fuse, and use a capacitor with a mains safety rating.
- Wait for the bleeder resistor to discharge the capacitor before touching the board, and then check with a meter.
- If you are not experienced with mains wiring, get help from someone who is, or build the logic side with a low-voltage supply first.
Tips for a reliable build
- Keep mains tracks wide and well spaced on the board.
- Place the dropper capacitor and rectifier away from the microcontroller to cut down on noise.
- Test with a low-power lamp such as a small incandescent bulb before connecting a full load.
- Do not exceed the triac current rating, and remember that lamp inrush current is higher than the running current.
- Test each pattern for a long period to make sure the supply stays stable.
Frequently asked questions
Why use a capacitor instead of a transformer?
A capacitor is smaller, lighter and cheaper. It limits current without producing much heat. The trade-off is that the circuit is not isolated from the mains and can supply only a small current.
Is a transformerless chaser safe?
It can be, but only when built in a closed insulated enclosure with a fuse and proper parts. Because the circuit is live, it is not suitable for beginners to build or handle without precautions.
How many patterns can I store?
That depends on the program memory of the microcontroller and how you store the patterns. Patterns made from simple tables take little space, so even small chips can hold several.
Can I change the speed or the patterns later?
Yes. Both are set by the firmware, so you can edit the delay values or pattern tables and reprogram the chip, provided the chip is disconnected from the mains while you do it.