MakrToolbox
Published © CC BY-NC

Dewalt Spray Paint Shaker

I have a little paint booth in my shop, so I created a device to shake paint cans for me.

BeginnerFull instructions provided3 hours5,679
Dewalt Spray Paint Shaker

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
Big Arcade Button
×1
Single Relay Board
×1
Breadboard (generic)
Breadboard (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Protoboard
×1
12v to 5v DC Converter
×1
USB-A to Mini-USB Cable
USB-A to Mini-USB Cable
×1
SPST Toggle Switch
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Schematic

Code

Code snippet #1

Plain text
<p>/* this sketch is to show the operation of a push button and relay</p><p>Connect a normally open push switch to pin 2 and Gnd on the Arduino</p><p>The relay board has three pins, Gnd, Vcc and Control
Connect Gnd to Gnd on Arduino
Connect Vcc to 5 volts on Arduino
Connect Control on relay board to pin 6 on the Arduino
*/</p><p>int hold = 15000; // time stays on for after button released in ms 15000 is 15 seconds
boolean latch = false; // if true then the relay remains closed
# define relay 6 // this is the pin used to switch the relay
# define pushSwitch 2 // this is the push switch input</p><p>void setup() {
 pinMode(relay, OUTPUT);
 digitalWrite(relay,LOW);  // turn OFF the relay
 pinMode(pushSwitch, INPUT_PULLUP);  //  attaches a resistor from input to Vcc
 digitalWrite(relay, HIGH); // turn off relay</p><p>}</p><p>void loop() {</p><p> if (digitalRead(pushSwitch) == LOW ) {  // LOW if pressed
   digitalWrite(relay, LOW);  // relay ON
   delay(hold); // leave relay ON for a short while before turning OFF
 }
 if(latch == false){
   digitalWrite(relay, HIGH);  // relay OFF
 }</p><p>}</p>

Credits

MakrToolbox

MakrToolbox

9 projects • 14 followers

Comments