Hi, welcome back, it's me! My team consists of four people. This project is the last project that we'll be working on in this semester. The Arduino used in this project is Arduino Uno. This time, we will be testing ESP8266 again which had been done by 3rd March. This testing of ESP8266 for Final Project began on Mar 25 to Apr 27. Let's begin!
Jessica, Eveline, Alicia, and Asta (from left to right)
Team members
8th April 2016 : Soil Moisture Sensor!! (Testing 2)
Even though I've posted this soil moisture sensor before, but still, I want to post it again, so that you can see our progress from nothing to something big!! I can't wait to tell you!
Testing Video
25th March 2016 : Connecting and Sending Data (Testing 1)
ESP8266 is a component which enable the Arduino circuit to be connected to network (internet). The previous post discussed basic configuration of ESP8266 such as which mode it should activated as and which network it connected to. We are this post as our reference. That day, we only tested the ESP with simple component built up.
First step! we have to create an account on thinkspeak.com to be able to monitor variables that were sent from ESP. After we were logged in, we created a new channel (a channel is - we assumed this actually - a platform to show results of an experiment as it has its own unique API key and several available fields for measured variables). Fill the name, description, and field label, then check the box make public in channel settings section. Once we were done, a basic graph appear on private view and public view. We are using alicia account for this.
Second step! we set up the hardware and code that would be implemented.We substituted the temperature sensor with ultrasonic sensor. We modified the code available on the reference link and the code we used in our first experiment which involved ultrasonic sensor. First attempt, there were only zeroes on the serial monitor like this.
First step! we have to create an account on thinkspeak.com to be able to monitor variables that were sent from ESP. After we were logged in, we created a new channel (a channel is - we assumed this actually - a platform to show results of an experiment as it has its own unique API key and several available fields for measured variables). Fill the name, description, and field label, then check the box make public in channel settings section. Once we were done, a basic graph appear on private view and public view. We are using alicia account for this.
Second step! we set up the hardware and code that would be implemented.We substituted the temperature sensor with ultrasonic sensor. We modified the code available on the reference link and the code we used in our first experiment which involved ultrasonic sensor. First attempt, there were only zeroes on the serial monitor like this.
Picture 1. Testing Ultrasonic Sensor with ESP
We tried to modify and modify, but still, the result is nil. Realizing that the configured module was not activated that time, then re-configured it with the setup shown below.
Picture 2. Re-configured Setup
At that time, everything was just seemed right, we found no bug here, but still, the graph won't show a thing even if we refreshing it continuously.
The code for testing 1 can be seen here!
That's it for the day, we'll come back soon with another progress! Have a good day guys! :)
8th April 2016 : Soil Moisture Sensor!! (Testing 2)
Even though I've posted this soil moisture sensor before, but still, I want to post it again, so that you can see our progress from nothing to something big!! I can't wait to tell you!
We are using this post as our reference, then we built up the components like this. Our soil moisture sensor module is built using the LM393 comparator, gives the active-high (H) output,
Picture 5. Components were built
Then, we uploaded our code using Arduino IDE, and then, we put in the sensor to the soil, then the sensor tried to figure out the humidity level of the soil. Red LED indicates the standby state. While calculating the humidity level, the sensor activated the green LED.
Picture 6. Standby state
Picture 7. The sensor was calculating the humidity level
As we put the sensor into the soil, the value of humidity calculated was shown through the serial monitor. The higher the numbers, the drier the soil is.
Picture 8. The sensor was calculating the humidity
The testing video will be shown below.
The code link will be told in the description of the testing video.. That's it for the day. we'll come back soon with another progress! Have a good day guys! :)
15th April 2016 : Our ESP was Dying and then Dead!! :( (Testing 3)
That day, as usual, we built up the components, and tested the bareminimum code like below.
<br /><br />
void setup() {<br /><br />
// Ini dibiarkan kosong saja gan.. hehehehehe<br /><br />
}</p><br />
<p>void loop() {<br /><br />
// Ini juga dikosongkan saja gan.. hihihihihihi<br /><br />
}</p><br />
<p>
But, something weird happened, the ESP didn't work since no positive respond was received as the code was uploaded. We saw nothing when we were using the AT Command.
Then, we try everything to find the cause, then we conclude that there's something wrong with the baudrate, then we changed the baudrate again and again, but still, the AT command won't respond a thing. It's 100% that the ESP couldn't be used anymore, we are so frustrated, but then decided to move on. Then, we bought new ESP but turned out that it was the wrong one!! We were using ESP-01, but we bought ESP-12, what a waste of money :(( !!
We started to develop the irrigation respond system using motor servo as the actuator. This motor servo was design to move clockwise if the soil was considered dry (the water tank cover will be open and the irrigation system starts). On the other hand, it moved counter-clockwise if the soil considered in moist level. To enable this, we added a motor servo function as you can see in pictures below.
<br /><br />
void setup() {<br /><br />
// Ini dibiarkan kosong saja gan.. hehehehehe<br /><br />
}</p><br />
<p>void loop() {<br /><br />
// Ini juga dikosongkan saja gan.. hihihihihihi<br /><br />
}</p><br />
<p>
But, something weird happened, the ESP didn't work since no positive respond was received as the code was uploaded. We saw nothing when we were using the AT Command.
Picture 10. ESP was Dead!!
Then, we try everything to find the cause, then we conclude that there's something wrong with the baudrate, then we changed the baudrate again and again, but still, the AT command won't respond a thing. It's 100% that the ESP couldn't be used anymore, we are so frustrated, but then decided to move on. Then, we bought new ESP but turned out that it was the wrong one!! We were using ESP-01, but we bought ESP-12, what a waste of money :(( !!
Picture 11. We were using this one and We bought this one
The solution is... we bought the new one again!! And we experimented it the next few days. That's it for the day. we'll come back soon with another progress! Have a good day guys! :)
21st April 2016 : We had New ESP-01!! (Testing 4)
We tried the basic configuration on the new ESP on my lappie, and it showed nothing. We were so worried, then we tried it on alicia's lappie and it turned out to give positive result. We were so happy to see that it's working since we're so frustrated the other day!
Picture 12. It's working again!!
Picture 13. The AT Command's working again!!
Then, we uploaded the codes for sending data from ultrasonic sensor to thinkspeak.com. This code combine the configuration for connection with the functional codes. The internet connection was from a laptop which was connected to a mobile phone tether using connectify. On the serial monitor, it showed sensor readings just like the previous experiment. But, there was no AT+CIPCLOSE notice this time. It meant the code successfully fulfill the condition and enter the data sending part.
Picture 14. The Ultrasonic Senor Results was Shown!
Still, the thinkspeak.com showed nothing! The connectify showed there was some data uploaded every time we tried running the code, but there weren’t any additional data uploaded for every sensor reading until we realized that we must use code to send the data automatically rather than manually using AT Command to send it. We are still have so many to learn, stay with us, and you'll see something great eventually. That's it for the day, thank you for staying with me, have a good day guys :))
27th April 2016 : Finally... IT WORKED!! (Testing 5)
After one month, finally we made it! We finally managed to send data using ESP8266! We had turned nothing to something BIG!!
We modified the sensor data processing code. As we know that the data of sensor reading was sent to thingspeak in either 0 or 1. If the soil sensor give result under 100, it will be considered as moist soil, and assigned the value 1 to the database. On the contrary, if the soil sensor give result above 100, it will be considered as dry soil, and assigned the value 0 to the database. When Thingspeak received the sendor reading, it would display the data on the monitor as usual. We keep print the command to serial monitor to check whether the data sending was successful. Here are the database, serial monitor screenshot, and demo video.

Picture 14. The Results are satisfying!!
The thinkspeak and serial monitor simulator can be seen by the video below
Serial Monitor Simulator
Picture 15. The Motor Servo Program
Prevmoist was added to be checked before any motor servo function called. These are the possibilities regard this function:
1. If the soil previously was moist and next considered in moist level as well, the motor servo won't move / stay closed.
2. If the previously is moist soil but next considered as dry soil, the motor servo will move clockwise to open the water tank (start / activate the irrigation system).
3. If the soil previously was dry and still considered as dry, the motor servo will keep the cover tank open.
4. If the soil previously was dry soil but next considered as moist soil, the motor servo will move counter-clockwise to close the water tank (stop the irrigation system).
The video of the simulation can be seen below.
Simulation Video
Before, we don't use jack to connect the battery to arduino, so I was holding the cable to connect it to arduino manually. After that day, we bought a jack to help us on this project. That's it for the day, the prototype is DONE!!! Just wait for the interface guys!! I'll inform you sooner. Thank you for staying with me, have a good day guys :))















