0% found this document useful (0 votes)
436 views3 pages

Cooding

This document provides instructions for connecting an Arduino, ultrasonic sensor, I2C module, and relay to a breadboard to automatically control a pump and buzzer based on the distance detected by the ultrasonic sensor. Key steps include connecting the power and grounds of each component to the positive and negative rails of the breadboard, and connecting the signal pins of each sensor and module to specific pins on the Arduino. The ultrasonic sensor's trigger and echo pins are connected to pins 9 and 10, and the relay's input pins are connected to pins 6 and 7 to allow Arduino control. Code is then uploaded to set the ultrasonic detection distance to turn the pump off.

Uploaded by

nabil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
436 views3 pages

Cooding

This document provides instructions for connecting an Arduino, ultrasonic sensor, I2C module, and relay to a breadboard to automatically control a pump and buzzer based on the distance detected by the ultrasonic sensor. Key steps include connecting the power and grounds of each component to the positive and negative rails of the breadboard, and connecting the signal pins of each sensor and module to specific pins on the Arduino. The ultrasonic sensor's trigger and echo pins are connected to pins 9 and 10, and the relay's input pins are connected to pins 6 and 7 to allow Arduino control. Code is then uploaded to set the ultrasonic detection distance to turn the pump off.

Uploaded by

nabil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Procedure

I. Connect the 5v from Arduino to the positive sign breadboard.


II. Connect the ground from Arduino to the negative sign breadboard
III. Connect Vcc from the i2C to the positive breadboard
IV. Connect the Gnd from i2C to the negative breadboard.
V. Connect the SDA to the A4 Arduino meanwhile for the SCL , it connect to the A5 Arduino
VI. For the ultrasonic sensor, the Vcc is connected to the positive breadboard , while GND is
connected to the negative breadboard.
VII. Meanwhile, for the trig pin and Echo, it connected to the pin 9 and 10 respectively.
VIII. For the relay 5v, it have 2 channel, for the first channel is connected to the pump while for the
second channel is connected to the buzzer
IX. Vcc and GND from the relays is connected to the positive and negative breadboard while for in1
and in2 are connected to the pin 6 and pin 7 to the Arduino respectively.
X. Insert the coding to the Arduino and set the distance that ultrasonic can be detected in order to
off the pump automatically which is in 6 cm

You might also like