How to Make Automatic Water Dispenser Machine using Arduino || IoT Project

preview_player
Показать описание
This is an Arduino project. In this video, you can learn how to make an Automatic Water Dispenser Machine using Arduino.

Components required to make this project are :
1) Arduino UNO
2) Arduino UNO Cable
3) Ultrasonic Sensor
4) Breadboard
5) Relay 5v
6) Jumper Wires ( M To F )
7) Plastic pipe
8) Water pump
9) Cardboard box

Рекомендации по теме
Комментарии
Автор

//WATER DISPENSER
#define trigger 5
#define echo 4
#define Relay 6

float time=0, distance=0;

void setup()
{
Serial.begin(9600);

pinMode(trigger, OUTPUT);
pinMode(echo, INPUT);
pinMode(Relay, OUTPUT);

delay(2000);
}

void loop()
{
measure_distance();

if(distance<5)
{
digitalWrite(Relay, LOW);
}
else
{
digitalWrite(Relay, HIGH);
}

delay(500);
}

void measure_distance()
{
digitalWrite(trigger, LOW);
delayMicroseconds(2);
digitalWrite(trigger, HIGH);
delayMicroseconds(10);
digitalWrite(trigger, LOW);
delayMicroseconds(2);
time=pulseIn(echo, HIGH);

distance=time*200/20000;
}

mouraddahmani
Автор

hello, could you explain your wiring connections on the pump to the COM and NO terminals of the relay?

denmarkt
Автор

As per the video, the below code appears-
//Water dispenser
#define trigger 5
#define echo 4
#define Relay 6
float time=0, distance=0;
void setup()
{
Serial.begin(9600);
pinMode(trigger, OUTPUT);
pinMode(echo, INPUT);
pinMode(Relay, OUTPUT);

delay(2000);
}
void loop()
{
measure_distance();

if(distance<5)
{
digitalWrite(Relay, LOW);
}
else
{
digitalWrite(Relay, HIGH);
}

delay(500);
}
void measure_distance()
{
digitalWrite(trigger, LOW);
delayMicroseconds(2);
digitalWrite(trigger, HIGH);
delayMicroseconds(10);
digitalWrite(trigger, LOW);
delayMicroseconds(2);
time=pulsein(echo, HIGH);

distance=time*200/20000;

}
Any other lines to be added?? Please confirm. Thanks for your help!!

DilipKumar-uwly
Автор

what is the little thing on the left side of the circuit diagram? Pls i need rn

JohnRomelAbar
Автор

Hello could you help me build a eco-friendly water dispenser triggered by recyclable plastic bottle...please this is for our research

CyrilSican
Автор

THANK YOU BRO, HELP SCHOOL PROJECT THANK YOU SIR
#yantojadiyaoming

NONAME-nxzf
Автор

Can you upgrade pls add coinslot for vending machine use

alex_
Автор

can you give me a diagram electric ! pleas halp me

anastaciocardosoaraujo
welcome to shbcf.ru