Etching custom circuit boards (PCBs) at home is a rewarding way to bring electronic projects to life, but achieving a clean, even etch requires consistent agitation of the etching solution. This article will guide you through creating a DIY PCB-etching agitator using a Ferric Chloride solution, a used DVD-ROM stepper motor, and an ATmega8 microcontroller. This setup ensures your PCB is etched evenly, improving the quality and precision of your circuits.
Project Overview
The PCB-Etching Agitator uses a stepper motor to create controlled, automated movement in the etching solution, helping dissolve copper evenly from the PCB. This prevents uneven etching and helps avoid issues like over-etching or patchy circuits.
How the Agitator Works
The agitator relies on a DVD-ROM stepper motor to create back-and-forth motion within the etching tank. The ATmega8 microcontroller, programmed to manage the motor's timing and direction, controls the motor via an H-Bridge circuit. The agitator gently moves the Ferric Chloride solution, ensuring it continuously flows over the PCB surface to produce a consistent etch.
Project Components and Requirements
- ATmega8 Microcontroller: Low-cost and efficient microcontroller for controlling motor functions. Acts as the brain of the agitator, controlling the speed and direction of the motor.
- Stepper Motor (from an old DVD-ROM): Can be salvaged from an unused DVD-ROM drive, ideal for small, precise movements. Provides precise movement for stirring the etching solution.
- H-Bridge Motor Driver (e.g., L293D): To control the power supplied to the stepper motor, allowing for directional control. Manages the power and direction of the motor based on commands from the ATmega8.
- Ferric Chloride Solution: A common etching solution for removing copper from PCBs.
- Power Supply: 5V-12V power supply (depending on the motor's specifications).
- Breadboard and Jumper Wires: For prototyping connections.
- Frame for Agitator Arm: Holds the PCB in place and agitates the solution. Can be crafted from wood, plastic, or acrylic to secure the setup.
Advantages of an Automated Agitator
- Improved Etching Precision: Even stirring prevents uneven etching, producing cleaner circuits.
- Time-Saving: Automation allows the etching process to run without manual stirring.
- Cost-Effective Solution: Using recycled parts and a basic microcontroller makes it affordable and accessible for hobbyists.
Circuit Connection
Source Code
You can check Github repository for the source code including the schematic diagram. View on GitHub#include <Stepper.h> const int stepsPerRevolution = 200; const int PIN_START = 2; // Start/Stop button const int PIN_LOCK = 3; // Lock/Unlock button pin const int LED_START = 4; // Start/Stop button const int LED_LOCK = 5; // Lock/Unlock button pin const int PIN_SPEED = 0; // Analog pin for Speed const int PIN_AMPLI = 1; // Analog pin for Amplitude const int STOP_SPEED = 6; // To stop faster, then set to 3 below int speedVal = 0; // Stepper motor speed, controlled by pot on A0 int ampliVal = 0; // Stepper motor amplitude, controlled by pot on A1 int shakerState = LOW; int lockState = LOW; // Current reading from the input PIN_LOCK int startState = LOW; // Current reading from the input PIN_START int lastLockState = LOW; // previous state of the LOCK button Stepper agitateStepper(stepsPerRevolution, 8, 9, 10, 11); // Set PINS from L293D IC to Arduino (8,9,10,11) PINS void setup() { pinMode(PIN_AMPLI, INPUT); pinMode(PIN_SPEED, INPUT); pinMode(PIN_START, INPUT); pinMode(PIN_LOCK, INPUT); pinMode(LED_START, OUTPUT); pinMode(LED_LOCK, OUTPUT); Serial.begin(9600); } void loop() { startCheck(); // Check 2 Buttons state (LOCK and START buttons) if (shakerState == HIGH) { for (int i = 0; i < 2; i++) { if (i == 0) { if (lockState == LOW) { // If not LOCK then setttingsCheck(); // get Speed & Amplitude from Analog PINs } agitateStepper.step(ampliVal);// Set amplitude value } else { if (lockState == LOW) { // If not LOCK then setttingsCheck(); // get Speed & Amplitude from Analog PINs } agitateStepper.step(-ampliVal); } } } else { lockState = LOW; // Reset lock state if STOP digitalWrite(LED_LOCK, lockState); // indicates the state by ON/OFF the LED for LOCK agitateStepper.setSpeed(0); agitateStepper.step(0); } printValues(); } void startCheck() { lockState = digitalRead(PIN_LOCK); // Get state of LOCK button startState = digitalRead(PIN_START); // Get state of START button if (startState == LOW && shakerState == 1) { // If STOP for (int i = 1; i <= STOP_SPEED; i++) { // To avoid an abrupt stop, the speed is slowly decreased agitateStepper.setSpeed(speedVal / i); agitateStepper.step(ampliVal); agitateStepper.step(-ampliVal); } shakerState = LOW; // Shaker Off lockState = LOW; } else if (startState == HIGH && shakerState == 0) { // Startup Routine agitateStepper.setSpeed(40); // Initial default speed agitateStepper.step(-205); // Move backwards by more than 1 revolution in order to find the start position agitateStepper.step(100); // Move to middle position of the full range of motion shakerState = HIGH; // Shaker On } else { // Do nothing. } digitalWrite(LED_START, shakerState); // indicates the state by ON/OFF the LED for START digitalWrite(LED_LOCK, lockState); // indicates the state by ON/OFF the LED for LOCK } void setttingsCheck() { speedVal = map(analogRead(PIN_SPEED), 1023, 0, 140, 30); // Read analog value as SPEED ampliVal = map(analogRead(PIN_AMPLI), 1023, 0, 100, 25); // Read analog value as AMPLITUDE agitateStepper.setSpeed(speedVal); } void printValues() { Serial.print("SPEED:"); Serial.println(speedVal); Serial.print("Amplitude:"); Serial.println(ampliVal); Serial.print("state:"); Serial.println(shakerState); }
Conclusion
This DIY PCB-Etching Agitator provides a practical, low-cost solution for anyone looking to improve their circuit board etching at home. By repurposing an old DVD-ROM motor and combining it with the power of the ATmega8 microcontroller, you can create a custom tool that ensures clean, accurate PCB etches. This project is a great example of how basic electronics can enhance the DIY electronics process.