Ryan Gill
Published © MIT

Electroplating with Copper

Electroplate conductive materials using an Arduino Uno and a relay.

BeginnerFull instructions provided2 hours16,620

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Relay (generic)
×1
Pushbutton switch 12mm
SparkFun Pushbutton switch 12mm
×1
LED (generic)
LED (generic)
×2
Resistor 100 ohm
Resistor 100 ohm
×2
Alligator Clips
Alligator Clips
×1
Bucket
×1
Aquarium air pump
×1
Buck converter
×1
Copper pipe
×1
Copper sulfate
×1
Distilled water
×1
Elegoo Starter kit
×1
Conductive Paint
×1

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)

Story

Read more

Custom parts and enclosures

Bucket Clips and Cathode Hanger

Clips for the bucket to hold the copper pipe and clip to hold cathode.

Schematics

ElectroToggle

Diagram of electroplating circuit

Code

ElectroToggle

C/C++
Upload this sketch to your Arduino Uno using the Arduino IDE.
/* Electroplating
 * 
 * Toggle relay with set on and off durations
 * Power switch interrupt to toggle cycling of relay
 * 
 */

const int powerSwitch = 2;
const int bathLed = 6;
const int relay = 7;
const int powerLed = 13;

long onTime = 10000;
long offTime = 1000;

volatile bool isActive = false;

void turnOn() {
  digitalWrite(relay, HIGH);
  digitalWrite(bathLed, HIGH);
}

void turnOff() {
  digitalWrite(relay, LOW);
  digitalWrite(bathLed, LOW);
}

void toggleState() {
  isActive = !isActive;
  digitalWrite(powerLed, isActive);
}

// Delay with escape logic
void await(long timeToWait) {
  for(int j=0; j<timeToWait; j++) {
    delay(1);

    if(isActive == LOW) return;
  }
}

void setup()
{
  // Set both relay and powerLed pins to OUTPUT
  pinMode(relay, OUTPUT);
  pinMode(powerLed, OUTPUT);

  // Set power switch pin to INPUT
  pinMode(powerSwitch, INPUT);

  // Default power switch to HIGH state
  // Pressing switch brings it LOW
  digitalWrite(powerSwitch, HIGH); 

  // Attach an interrupt to the power switch pin
  attachInterrupt(digitalPinToInterrupt(powerSwitch), toggleState, FALLING);
}

void loop()
{
  while(isActive) {
    // Turn on relay for on duration
    turnOn();
    await(onTime);
    
    // Turn off relay for off duration
    turnOff();
    await(offTime);
  } 
}

Credits

Ryan Gill

Ryan Gill

13 projects • 133 followers
I'm a web developer who loves tinkering with hardware.

Comments