Touchless Water Gallon Pump
by Burung Hantu Electronics Project in Circuits > Microcontrollers
2363 Views, 6 Favorites, 0 Comments
Touchless Water Gallon Pump
This is an electric gallon water pump. Basically, we get this pump from the online market. How it works by pressing the button. This made us think about how the pump could be used automatically without having to press a button.
We modified the electronic circuit of the pump, we added a microcontroller that was programmed to read the value sent by the ultrasonic sensor. This value is processed by the microcontroller to act on the mosfet to activate the pump.
So, the device now has 2 modes, namely button mode and touchless mode.
---------------------------------------------
(Translation to Bahasa Indonesia)
Ini adalah alat pompa air galon elektrik. Pada dasarnya, pompa ini kami dapatkan dari pasar online. Cara kerja nya dengan menekan tombol yang ada pada alat tersebut. Hal tersebut membuat kami berfikir bagaimana pompa tersebut bisa dipakai secara otomatis tanpa harus menekan tombol.
Kami memodifikasi rangkaian elektronik dari pompa tersebut, kami tambahkan mikrokontroler yang sudah diprogram untuk membaca nilai yang dikirim oleh sensor ultrasonik. Nilai tersebut diproses oleh mikrokontroler untuk memberikan aksi pada mosfet untuk mengaktifkan pompa.
Jadi alat ini sekarang mempunyai 2 mode, yakni mode tombol dan mode tanpa tombol.
Required Components
1. Electric Water Gallon Pump
2. Attiny85 Digispark
3. HCSR04 Ultrasonic Sensor
Wiring Diagram
From the wiring diagram, it can be seen that the mosfet and resistor are components that already exist in the electronic device circuit before.
---------------------------------------------
(Translation to Bahasa Indonesia)
Dari wiring diagram tersebut, dapat dilihat bahwa mosfet dan resistor merupakan komponen yang sudah ada pada rangkaian elektronik alat sebelumnya.
Setting Board Manager for Attiny85 Digispark
Before uploading the program to the Attiny85 Digispark, first change the Additional Board Manager URL to the Arduino IDE and install the Digispark Board.
1. In menu bar Arduino IDE, go to File → Preference
2. Fill in Additional Board Manager URL with http://digistump.com/package_digistump_index.json → OK
3. In menu bar Arduino IDE, go to Tools → Board → Board Manager → Search "digispark" → Install → Close
4. Go to Tools → Board → Digispark (Default - 16.5mhz)
Upload Code
Before upload this code, add the NewPing Library First.
NewPing Library :
https://bitbucket.org/teckel12/arduino-new-ping/do...
Here is the code :
/* Burung Hantu Electronics Project * Touchless Water Gallon Pump * www.instructables.com/id/Touchless-Water-Gallon-Pump/ */ #include <NewPing.h> //Library Ping Ultrasonic Sensor #define trigger 3 // HCR04 Trigger to pin P3 #define echo 2 // HCR04 Echo to Pin P2 #define digital_pin 1 // digital pin for gate mosfet from pin P1 #define distance_max 10 // Distance value NewPing sonar(trigger, echo, distance_max); void setup() { pinMode(digital_pin, OUTPUT); } void loop() { uint8_t distance = sonar.ping_cm(); if (distance) { digitalWrite(digital_pin, HIGH); //pump active delay(200); } else { digitalWrite(digital_pin, LOW); //pump deactive } delay(500); }
Click Upload and wait for a few seconds. At the time of upload, don't connect Attiny85 Digispark to USB Computer. Wait for command to connect Attiny85 Digispark to USB Computer. Finished.