As an Amazon Associate we earn from qualifying purchases.
Etching a home-made circuit board by hand is slow and a bit messy. You have to keep the board moving in the etchant, check it every few minutes and pull it out at the right moment. An automatic PCB etcher does the repetitive part for you. This project uses a PIC12F508 microcontroller and an L293D motor driver to run the agitation automatically.
The video below shows the project working. The rest of this article explains the idea, the parts, how the circuit logic fits together and what to watch out for when you build it.
Why automate PCB etching?
Etching works by dissolving the unwanted copper from a board, leaving only the traces you protected with toner or resist. The reaction is much more even when fresh etchant keeps flowing across the copper. If the liquid sits still, the area next to the copper becomes saturated and etching slows down, which can leave uneven results.
Gently rocking or stirring the tank fixes most of this. Doing it by hand for a long time is tedious, so a small controller and motor can take over. The benefits are simple:
- More even etching across the whole board.
- No need to stand over the tank the entire time.
- The same repeatable motion every time you etch.
How the automatic etcher works
The idea is straightforward. The PIC12F508 generates the control signals, and the L293D turns those low-power signals into the current a small DC motor needs. The motor moves the etching tray or tank back and forth. Because the L293D is an H-bridge driver, the microcontroller can change the motor direction just by changing which input pins are high or low.
A typical program does the following in a loop:
- Drive the motor in one direction for a set time.
- Stop briefly.
- Drive the motor in the opposite direction for a set time.
- Repeat until you switch the circuit off or a timer expires.
Changing the delay values in the firmware changes how fast and how far the tray rocks. If your tank is small, shorter pulses are usually enough.
Main components
PIC12F508 microcontroller
The PIC12F508 is an 8-pin, flash-based 8-bit microcontroller from Microchip. It has an internal oscillator, so you do not need an external crystal, and it offers six pins for input and output (one of them input only). That is more than enough here, since you only need two or three outputs to control the driver and perhaps one input for a start switch.
L293D motor driver
The L293D is a dual H-bridge driver in a 16-pin package. It can drive small DC motors and has built-in clamp diodes to protect against voltage spikes from the motor coil. It handles roughly 600 mA per channel continuously, which suits a small geared motor but not a large one. If you want to see the same chip driving a different load, see our guide on bipolar stepper motor control with Arduino.
Other parts you will need
- A small geared DC motor with enough torque to rock your tray.
- A regulated 5 V supply for the logic, and a motor supply that matches your motor rating.
- A decoupling capacitor close to the PIC and the L293D supply pins.
- A push button or switch to start and stop the cycle.
- A programmer compatible with the PIC12F508, such as a PICkit.
- A plastic or glass tray and a simple rocking mechanism, such as a crank or cam on the motor shaft.
Wiring overview
Exact pin choices depend on your firmware, but the connections follow a standard pattern:
- Connect two PIC output pins to the L293D input pins for one channel (for example IN1 and IN2).
- Connect the L293D enable pin to logic high so the channel is active.
- Connect the motor between the matching output pins.
- Supply the L293D logic pin with 5 V and its motor supply pin with the motor voltage.
- Join all grounds, including the PIC, the driver and the power supply.
Remember that on the PIC12F508, the GP3 pin is input only and also serves as the reset pin, so use it for a switch rather than for an output.
Building and testing
Start on a breadboard. Program the PIC, connect the driver, and run the motor without any liquid around. Check that it reverses direction cleanly and that the timing feels right. Only then add the tray and mechanism.
Once it works, you can move the circuit to a board of your own. If you plan to make the board yourself, our notes on PCB design basics and printing your PCB at original size will help you get a clean layout. For a related build, look at another automatic PCB etcher build on this site.
Safety notes
The electronics are low voltage, but etching chemicals deserve respect.
- Wear gloves and eye protection when handling etchant such as ferric chloride.
- Work in a ventilated area and cover your work surface, because etchant stains.
- Use plastic or glass containers only. Metal containers react with the etchant.
- Keep the electronics away from splashes. Mount the controller board outside the tray area or in a sealed box.
- Dispose of used etchant according to your local rules. Do not pour it down the drain.
Tips for better results
- Keep the rocking motion gentle. Violent movement can splash liquid and does not improve the result much.
- Check the board periodically the first few times, then note how long your setup takes and use that as a guide.
- Add a small flyback or supply filter capacitor if the PIC resets when the motor starts.
- Use a separate motor supply if the motor makes the logic supply noisy.
FAQ
Can I use a different microcontroller instead of the PIC12F508?
Yes. The logic is simple, so any small microcontroller with a few output pins can do it. The PIC12F508 is a good fit because it is cheap, small and needs no external oscillator.
Why use an L293D instead of driving the motor directly from the PIC?
A microcontroller pin can only supply a few milliamps, which is not enough for a motor. The L293D supplies the higher current and lets you reverse the motor direction using logic signals.
Does the L293D work with any motor?
No. It suits small DC motors and has a current limit of about 600 mA per channel. For larger motors, choose a stronger driver.
Is automatic agitation really necessary?
It is not required, as hand rocking works. But automatic movement gives more consistent results and frees you from standing next to the tank.