Touchless Water Gallon Pump

by Burung Hantu Electronics Project in Circuits > Microcontrollers

2363 Views, 6 Favorites, 0 Comments

Touchless Water Gallon Pump

frame project1.png

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

30-11.png
b202b377-6691-474e-b1a5-4614ca496afb.jpg
HCSR04.jpg

1. Electric Water Gallon Pump

2. Attiny85 Digispark

3. HCSR04 Ultrasonic Sensor

Wiring Diagram

Watermark BHEP.png

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

preference attiny85.png
preference attiny85_2.png
preference attiny85_3.png
preference attiny85_4.png

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

preference attiny85_5.png
preference attiny85_6.png
WhatsApp Image 2020-05-04 at 00.47.30.jpeg

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.

Documentation

Touchless Water Gallon Pump - Burung Hantu Electronics Project