Introduction: Automatic Sprayer
I got inspired from the instructable of robi_h to build this automatic spraying system. This is my first contribution so I hope I can get it done right. The hardware is based on recycled parts like the DVD drive and the PC power source. Furthermore my approach solves the low DVD tray force issue by coupling a long steel bar to the sprayer handle to preserve the original voltages of the DVD unit and take advantage of its circuitry without further modification. So luckily no other electronic components but resistors (and the arduino UNO) are needed. Please do have fun and let me know if you have more suggestions!.
Step 1: Bill of Materials
- PC Power Source
- DVD Drive Unit
- Arduino UNO
- 20x15 cm TRIPLAY wood piece
- Sprayer
- Wooden sticks
- Piece of wood
- Sprayer support structure
- Prototyping cables
- Three 10 KOhms resistors
- Wire with alligator clips
- Hot glue gun
- Glue
- Studs
- Pulley
- Screws
- Nuts
- Tie wraps
- Drill
- Two 90 degree brackets
- bit
- Rivet gun
- rivets
- USB Cable
Step 2: Mechanical Structure
The triplay piece is used as the base of the entire structure, as seen in the picture. Drill some holes so you can fit the wood sticks in a way they are tightly attached to the triplay piece and put some hot glue over the junctions. For the power source area, mark the places to drill so the power source housing is retained firmly by their woodsticks. Do the same for the arduino area too.
Use the screws and wood piece to stabilize and fix the sprayer to its supporter. Put the spryer handle and its bottle together and align the pulley with an imaginary moving plane of the handle and fix it with help of the bracket, screws, nuts, washer, tie wraps and stud.
At the backside of the triplay piece drill two holes for the 90 degrees bracket that will fix the DVD tray to the main structure.
And optionally drill a last hole to wrap the power source cables with a tie wrap to the base.
Step 3: Install the Handle Extension
Use the rivet gun, drill and a steel bar to install the extension of the handle so the motor torque of the DVD tray can compress the spring installed in the sprayer system.
Step 4: Hacking the DVD Tray and Its Electronic Board
In order to gain acces to the control of the tray I soldered 3 wires to the push-button and limit switch trough three 10 kohm pull-up resistors which I route to the arduino pins 8, 9 and 10. You can see the wiring diagram in the pictures.
Furthermore a pair of holes is needed to fix the dvd tray to the 90 degrees bracket using the stud, nuts and a modified (reshaped) washer. Once this is done you can check that no interference between the washer and tray rails exist and if this would be the case use some rotatory tool to make the changes to the tray hardware. See the pictures.
Step 5: Linking the Sprayer to the DVD Tray
To put all the structural mechanics together I attached the alligator clips to one end of the steel bar and the other to the DVD tray as the pictures show. Make a notch at the end of the tray so the wire is free to run over it.
Step 6: Coding
Well the code is very simple and only uses the digital port to control the signals that open the DVD drive:
void inhibeabrir( void );
void inhibecerrar( void );
void desinhibe( void );
void edoabierto( void );
void edocerrado( void );
void abre( void );
void cierra( void );
void setup() {
// put your setup code here, to run once:
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
pinMode(10,OUTPUT);
edocerrado(); }
void loop() {
// put your main code here, to run repeatedly:
abre();
delay(2000);
inhibeabrir();
cierra();
delay(3000);
edocerrado();
delay(4000);
}
void inhibeabrir( void ){
digitalWrite(10,LOW);
digitalWrite(9,HIGH);
digitalWrite(8,HIGH);
}
void inhibecerrar( void ){
digitalWrite(10,LOW);
digitalWrite(9,HIGH);
digitalWrite(8,HIGH);
}
void desinhibe( void ){
digitalWrite(10,HIGH);
digitalWrite(9,HIGH);
digitalWrite(8,HIGH);
}
void edoabierto( void ){
digitalWrite(10,HIGH);
digitalWrite(9,LOW);
digitalWrite(8,HIGH);
}
void edocerrado( void ){
digitalWrite(10,LOW);
digitalWrite(9,HIGH);
digitalWrite(8,HIGH);
}
void abre( void ){
digitalWrite(10,HIGH);
digitalWrite(8, HIGH);
delay(30);
digitalWrite(8,LOW);
}
void cierra( void ){
digitalWrite(9,LOW);
digitalWrite(8,HIGH);
delay(20);
digitalWrite(8,LOW);
}