Automatic tank filling in-home helps you automate your motor and fill the tank whenever it reaches the threshold level and turns off the motor after the tank is full. Sends you message in the process intimating you turning on and off your motor.
The Sonic sensor fixed on top of the tank measures the level of water and sends the information to the bolt. whenever the water level reaches threshold Bolt gives a signal to the relay to turn on the motor and sends message to you "water level reached threshold, switching on the motor". the sensor continously monitering the level of water send the water level continously to Bolt when the tank is full Bolt sends a signal to turn off the motor and sends you message "tank is full, switching off the motor".
Hardware setup:To find water level and control motor:
Usually, interfacing the Ultrasonic sensor is kind of non-trivial, in that one needs to use it in the manner of the functioning as explained in the blog by Dejan linked in above. However, Erick Simoes' Ultrasonic library (available from the Arduino Library Manager) greatly simplifies things by abstracting away the core implementation.
Check it out on GitHub to see the basic Hardware connections as well as an explanation of the basic structure and usage of the library.
https://github.com/ErickSimoes/Ultrasonic
The Arduino Code linked in below measures the distance using the Ultrasonic sensor and thereafter sends it to the Bolt Wi-Fi module over serial communication.
A Python script (running on a server or your PC, for instance) queries the Bolt Cloud for this distance value using the Bolt Python Library, which in turn is based on the Bolt open APIs for Serial Read.
The Python script then checks if the distance is greater than the threshold. If it is greater than then it switches on the motor, an SMS alert is sent out using the Twillio SMS service. when the tank is full it switches off the motor, and an SMS alert is sent.
- >Install the bolt library in python on your PC.
- >Install Arduino IDE on your PC.
- >Now copy/download the code for Arduino into the Arduino IDE.
- > Download the python code.
- >Do the connections as the schematics shown above.
- >check whether every module is working by seeing the LEDs.
- >Upload the code into the Ardunio from Arduino IDE.
- >Run the python code.
There will be a delay in sensor value read by Ardunio and sensor value got by Bolt by serial read, As the Ardunio saves each sensor value in aregister and output them serially and the programs are intiated at different times, would be requesting for values at different times.(It would be helpful if we would give some trigger from Bolt and then Ardunio senses value and then immedieatly send to Bolt )
You can see that the motor starts rotating when there is no obstacle and motor stops rotating when we place obstacle close to the sensor.
This is a prototype so in place of DC motor you can fix the motor pump and in place of battery give AC power supply. see the relay specifications before doing this. And fix the sensor on an overhead tank such that it points towards the water.




_ztBMuBhMHo.jpg?auto=compress%2Cformat&w=48&h=48&fit=fill&bg=ffffff)










_3u05Tpwasz.png?auto=compress%2Cformat&w=40&h=40&fit=fillmax&bg=fff&dpr=2)

Comments