Intro: Linkit One-Water Level Controller With WIFI View and Settings
Water level controller already done using Arduino Uno and migrate it to Linikit one. But not satisfied because i cant use all the resources in Linikit one. So plan to use the Linikit one features fully. So wireless is the features technology in linkit one. So convert the water level indication in mobile and also change setpoint and calibration done through mobile. But control is carry out separately by Linikit one.
Its a nice experience in this program because it almost take 5 hours up to mid night 3pm to complete the program only.
Step 1: Materials Required
1) Linkit one with WIFI antenna
2) Multiple rotate potentiometer. (see potentiometer fixing in Myprevious project Water level controller Step6.
3) 5V relay control module
Step 2: Circuit Plan for New Project
1) Just join the wifi antenna in the linkit one.
2) Connect the potentiometer from water tank to A1 pin.
3) Connect the relay module to Digital pin 4.
Thus all done in hard ware side for new project. I am going to break the old one and construct the new one.
Step 3: Project Updation for Existing
1)Open the box.
2) Remove the linkit one, LCD display, IR receiver, Relaymodule.
3) Cut the LCD display and IR receiver wire from PCB.
4) So Display and setting using remote removed.
5) To replace that join the WIFI antenna in the Linkit one.
6) Use a android phone for display value, Calibration and Setpoint change.
Even mobile not connect the Water level is controlled by the Linkit one. If mobile connect the reading is shows in the screen. We can able to change set points and calibrate from there.
Step 4: Programming
Common for Water Level Controller
1) First with the basic for water level controller. Set points and calibration readings are loaded from EEPROM.
2) Read the sensor value and calculate the percentage from calibration readings zero value and Span value.
3) According to reading, with low and high set points control the output relay for motor
4) All the above are programmed as a sub program and call in every loop. If wifi client is connected when call the program inside the while statement.
For WIFI Viewing
1) Its fully a HTML Code.
2) The aim is to show the reading in the HTML page in the mobile with two buttons one for calibration and another one for Setpoint.
3) If calibration is pressed the display shows the Sensor value with two buttons one for save zero sensor value in EEPROM and another to escape.
4) If Zero calibration is pressed the sensor value is stored and display shows the Sensor value with two buttons one for save Span sensor value in EEPROM and another to escape.
5) If Full calibration is pressed the sensor value is stored and display shows calibration completed.
6) on press the botton with the current calibration reading shows.
7) If setup button is pressed. Two Combobox with current set point is listed.
8) Change the setpoints. Press save to save the setpoints.
9) Display shows setup completed. Press the button to return to the main screen.
Its very interesting when programming. See the program with lot of HTML tags.
Step 5: Fix It in Another Box
1) Now there is no need for the old box. Because no display is needed. No need Remote to access the settings.
2) So fix it in a closed box and place it in any hidden place. With 5V power supply.
3) Make the antenna outside make full signal.
Now all is done. We see and change settings from any where up to wifi reach.
Step 6: Calibration
1) See the calibration screen one by one.
2) First Screen display reading with Calibration and setup button.
3) Press the calibration Button.
4) U see the current sensor value. Empty the tank or bring the floating ball attached with potentiometer to the low level of the tank. The current sensor value shows.
5) Now press the Zero calibration button.
6) Now U see the current sensor value. Fill the tank or bring the floating ball to the top low level of the tank. The current sensor value shows.
7) Now press the Full calibration button.
8) Screen with calibration completed shows.
9) Press the button to go to the display screen.
Step 7: Change Set Point
1) Now press the setup button in the startup screen.
2) The display shows save button, Two combo box with current low set point value and High set point value.
3) Press the combo boxes and select the readings stored.
4) Press the save button.
5) Set points saved in EEPROM and shows setup completed.
6) Press the Button to go to the display screen.
Step 8: Running
Now With ur mobile u see the water percentage in tank. Every 5 secs the screen refresh and shows the latest reading. No problem if mobile is off or WIFI moderm is off. The controller do its function with the set point already set.
U also try Coding HTML in Linkit one. Its very interesting. Learn Learn Learn.......................................Lot to learn in Link it one. On the way...