hello everybody,

please suppport & share our mission;igg.me/at/smartplants

envloysis is an online updating environment analysis "bug". this tiny mobile device connects to the WiFi network and uploads sensor data to the cloud and graphs your data, also tweets you when something is wrong. it is also solder free to build. no prior electrical/programming experience is required. cost is ~17$


it can be built with raw analog sensors such as, LDR photocell (light sensor), NTC thermisor (temperature), soil probes (plant water level), humidity sensor, flame module etc. basically anything that you can connect to a microcontroller. you can create almost anything wifi using these simple components; a door alarm, a sun tracker, thermometer, possibilities are endless.


I work at a restaurant. We have 6 fridges and 1 large freezer. the owner of the business asked me if it was possible to record/upload sensor data. this is where the idea came about. it is still in progress and open for upgrades (especially battery), but we can now collect data that we've never seen before.


envolysis can be used as a simple cost-analysis device for restaurants and other business alike, or for anyone who wishes to monitor their home wirelessly. - i am also developing this system for plant monitoring.

Step 1: Parts

wifi module ( also need a UART to set up the wifi module for first time use )



battery clip

sensors (water, light, temperature, humidity, fire... )



Step 2: Thingspeak Setup

1. go to https://thingspeak.com/users/sign_up & fill out the form to create an account

2. once the account is created, the page will change to your channels, click "new channel"

3. change the channel name and type in the fields that you want to record (temperature, light, humidity etc.) - save channel

4. click to "API Keys" tab and copy your write API key, this will be inserted into the code.


we are now ready to upload and capture data to our online channel where it will be graphed automatically and can be downloaded later on in excel format.


after you have created your channel you can also set e-mail alerts where the web page will automatically tweet "alarms"


5. go to https://twitter.com/ and create an account

6. go to https://thingspeak.com/apps/reacts and create a "new react"

7. name your react and change the alarm values, choose thing tweet as your action and add a twitter account (link your accounts). condition type: numeric, test frequency: on data insertion etc.. for more help: https://thingspeak.com/docs/thingtweet

8. once your react is saved and your twitter account is linked everything should be working, and you should be getting the alarms on your twitter channel/phone.

Step 3: Set Up Wifi + Upload Code

the wifi module is very simple to set up, even for a true beginner like me. there are many great articles on this module and how to set it up. I will let other great authors do the explaining on how to do this step. please ask me any specific question you may run into.

1. https://www.instructables.com/id/ESP8266-mini-Tutor...

2. https://www.instructables.com/howto/ESP8266/

3. wikipedia


wifi module schematics;

GND on wifi to > GND on arduino

RX on wifi to > TX on arduino

TX on wifi to > RX on arduino

CH_PD on wifi to > 3V3 on arduino

VCC on wifi to > 3V3 on arduino


upload code;

download the code first;

-single sensor code: https://drive.google.com/file/d/0B8bvYGugxvFFR0JPU...

-multiple sensors code: https://drive.google.com/file/d/0B8bvYGugxvFFMjk4Q...

now connect your microcontroller to the computer and launch the arduino software.

before uploading;

make sure to change your wifi name (SSID) and password (PASS) in the code, as well as thingspeak write API key.

also make sure that the wifi module is not connected to 3V3 while uploading the code to arduino. otherwise it will not upload.

Step 4: Add the Sensors + Battery

choose your sensor(s) first

I will be using light & temperature sensors for demonstration. light sensor gets a 10k ohm resistor and the temperature sensor gets a 10ohm resistor. match the resistor color codes.


single sensor connection;

connect either leg of the sensor to 3V3

connect the other leg of the sensor to A0

connect either leg of the corresponding resistor to A0

connect the other leg of the resistor to GND


multiple sensors connection;

same as the single setup, just add the next sensor to 3V3 and A1/A2/A3... etc

resistors will connect the same way again, one leg to A1/A2/A3 and the other to GND


battery 9V;

positive (+) of battery to > Vin on arduino

negative (-) of battery to > GND on arduino

Step 5: Conclusion

you can seal your device in many different things. I chose to use tupperware. a more durable and air-seal kind would also be more protected.


this device runs on a 9V battery. you can use other options such as rechargable li-ion. you can also run it on AC with an adapter, look at custom arduino parts for more information. i am currently working on a lithium-ion rechargeable battery pack. which should provide a much better mobile lifetime, i will update this post once complete.


make sure to check out my plant care instruments. I will be installing a similar system inside of plant pots and other devices.


i have to thank author diy_bloke for his help with the code (please visit his profile and check out his posts!). it was him who adjusted the code to accept regular sensors instead of modules. with his help now we can make such a device for a very low cost. also with his help i was finally able to get my smart pot system online as well.!


thank you so much for your time, please ask any questions in the comments below.

remember to subscribe for updates

love & peace,


Step 6: Updates

finally got the ESP chip to work by itself, no arduino. programming the chip directly. you can connect upto 3 sensors this way :)

check these out

1. https://www.instructables.com/id/Low-cost-WIFI-temp...

2. http://homes-smart.ru/index.php/oborudovanie/bez-p...


i am currently testing battery life and working on a 3D printed magnetic case.

<p>Hi there I'm trying to connect to my send the data to my database from Arduino+esp8266+DHT22 with PHP code.. but for some reason I cant make it to the database... I only get this code to my Serial monitor:</p><p>AT</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>GET /advertacs/test/chart/add_data.php?&amp;s1=23.00&amp;s2=27.00&amp;s3=0.00&amp;s4=0.00&amp;s5=0.00&amp;s6=0.00&amp;s7=0.00&amp;s8=0.00&amp;s9=0.00&amp;s10=0.00&amp;s11=47.45&amp;s12=47.45</p><p>AT+CIPSEND=144</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>GET /advertacs/test/chart/add_data.php?&amp;s1=23.00&amp;s2=27.00&amp;s3=0.00&amp;s4=0.00&amp;s5=0.00&amp;s6=0.00&amp;s7=0.00&amp;s8=0.00&amp;s9=0.00&amp;s10=0.00&amp;s11=69.12&amp;s12=69.12</p><p>AT+CIPSEND=144</p><p>AT+CIPCLOSE</p><p>----------------</p><p>Arduino Code:</p><p><a href="" rel="nofollow"></a></p><p>PHP code:</p><p><a href="" rel="nofollow"></a></p><p>Conection Setup:</p><p></p>
<p>sorry for late response :( i'm not familiar with this error.. i highly suggest updating the software to nodemcu wifi arduino, so much easier to use. read more here; <a href="https://www.instructables.com/id/Pot2/" rel="nofollow">https://www.instructables.com/id/Pot2/</a> purchase here; <a href="http://www.ebay.com/itm/201542946669?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT" rel="nofollow">http://www.ebay.com/itm/201542946669</a><br></p>
<p>Alright I have the majority of the code written for the ATTiny85 and can get all the way to where the TCP connection happens and its successful. However I am getting &quot;wrong syntax&quot; just after that with the line<br>mySerial.println(&quot;GET /update?key=[secret_write_key]&amp;field1=&quot; + T + &quot;\r\n&quot;);</p><p>T is the value of A1 and converted to a string.</p><p>What am I missing?</p>
<p>try the multiple sensors code without changing your wiring..</p><p><a href="https://drive.google.com/file/d/0B8bvYGugxvFFMjk4QVdlMzc1Z1k/view" rel="nofollow">https://drive.google.com/file/d/0B8bvYGugxvFFMjk4Q...</a></p><p>see if that helps first. i've ran into some problems with just single sensor code..</p>
<p>Ah I found out what it was. I wasn't sending AT+CIPSEND so I re-wrote it.</p><blockquote>val = analogRead(ANTENNA); // read the ANTENNA<br>String T = String(val);<br>mySerial.println(&quot;AT+CIPSTART=\&quot;TCP\&quot;,\&quot;\&quot;,80&quot;);<br>delay(2000);<br>String cmd = GET + &quot;&amp;field1=&quot; + T +&quot;\r\n&quot;;<br>mySerial.print(&quot;AT+CIPSEND=&quot;);<br>mySerial.println( cmd.length() );</blockquote><p>It works great on the Uno as Serial returns</p><blockquote>AT+CIPSTART=45</blockquote><p>then follows up with successfully sending the GET command.</p><p>However, THE SAME EXACT CODE on the ATTINY85 returns:</p><blockquote>AT+CIPSTART=2<br>8<br></blockquote><p>and Errors out an I get a return 400 page in the Serial. So I believe its how ATTINY85 handles cmd.length()</p>
<p>hello, i am wokring on a smiliar project i am trying to send my water sensor data to thingspeak and then resend it as an SMS to my phone, however i am stuck at the coding, i don't know what is going on actually, some advised to put an external power to my esp8266,but i didn't buy it as my esp8266 respond to commands normally when linked to the arduino. <br>this is my code:<br>#include &lt;SoftwareSerial.h&gt;</p><p>int sensor_water = A0;</p><p>int value_water;</p><p>#define DEBUG FALSE //comment out to remove debug msgs</p><p>//*-- Hardware Serial</p><p>#define _baudrate 115200</p><p>//*-- Software Serial</p><p>//</p><p>#define _rxpin 2</p><p>#define _txpin 3</p><p>SoftwareSerial debug( _rxpin, _txpin ); // RX, TX</p><p>//*-- IoT Information</p><p>#define SSID &quot;waterfirst&quot;</p><p>#define PASS &quot;waterfirst&quot;</p><p>#define IP &quot;; // ThingSpeak IP Address:</p><p>// GET /update?key=[THINGSPEAK_KEY]&amp;field1=[data 1]&amp;field2=[data 2]...;</p><p>String GET = &quot;GET /update?key=MYKEY&quot;;</p><p>void setup() {</p><p> Serial.begin( _baudrate );</p><p> debug.begin( _baudrate );</p><p> sendDebug(&quot;AT&quot;);</p><p> delay(5000);</p><p> if(Serial.find(&quot;OK&quot;))</p><p> {</p><p> debug.println(&quot;RECEIVED: OK\nData ready to sent!&quot;);</p><p> connectWiFi();</p><p> }</p><p>}</p><p>void loop() {</p><p> value_water = analogRead(sensor_water);</p><p> String water =String(value_water);// turn integer to string</p><p> updateTS(water);</p><p> delay(3000); //</p><p>}</p><p>//----- update the Thingspeak string with 1 value</p><p>void updateTS( String W)</p><p>{</p><p> // ESP8266 Client</p><p> String cmd = &quot;AT+CIPSTART=\&quot;TCP\&quot;,\&quot;&quot;;// Setup TCP connection</p><p> cmd += IP;</p><p> cmd += &quot;\&quot;,80&quot;;</p><p> sendDebug(cmd);</p><p> delay(2000);</p><p> if( Serial.find( &quot;Error&quot; ) )</p><p> {</p><p> debug.print( &quot;RECEIVED: Error\nExit1&quot; );</p><p> return;</p><p> }</p><p> cmd = GET + &quot;&amp;field1=&quot; + W +&quot;\r\n&quot;;</p><p> Serial.print( &quot;AT+CIPSEND=&quot; );</p><p> Serial.println( cmd.length() );</p><p> if(Serial.find( &quot;&gt;&quot; ) )</p><p> {</p><p> debug.print(&quot;&gt;&quot;);</p><p> debug.print(cmd);</p><p> Serial.print(cmd);</p><p> }</p><p> else</p><p> {</p><p> sendDebug( &quot;AT+CIPCLOSE&quot; );//close TCP connection</p><p> }</p><p> if( Serial.find(&quot;OK&quot;) )</p><p> {</p><p> debug.println( &quot;RECEIVED: OK&quot; );</p><p> }</p><p> else</p><p> {</p><p> debug.println( &quot;RECEIVED: Error\nExit2&quot; );</p><p> }</p><p>}</p><p>void sendDebug(String cmd)</p><p>{</p><p> debug.print(&quot;SEND: &quot;);</p><p> debug.println(cmd);</p><p> Serial.println(cmd);</p><p>}</p><p>boolean connectWiFi()</p><p>{</p><p> Serial.println(&quot;AT+CWMODE=1&quot;);//WiFi STA mode - if '3' it is both client and AP</p><p> delay(2000);</p><p> //Connect to Router with AT+CWJAP=&quot;SSID&quot;,&quot;Password&quot;;</p><p> // Check if connected with AT+CWJAP?</p><p> String cmd=&quot;AT+CWJAP=\&quot;&quot;; // Join accespoint</p><p> cmd+=SSID;</p><p> cmd+=&quot;\&quot;,\&quot;&quot;;</p><p> cmd+=PASS;</p><p> cmd+=&quot;\&quot;&quot;;</p><p> sendDebug(cmd);</p><p> delay(5000);</p><p> if(Serial.find(&quot;OK&quot;))</p><p> {</p><p> debug.println(&quot;RECEIVED: OK&quot;);</p><p> return true;</p><p> }</p><p> else</p><p> {</p><p> debug.println(&quot;RECEIVED: Error&quot;);</p><p> return false;</p><p> }</p><p> cmd = &quot;AT+CIPMUX=0&quot;;// Set Single connection</p><p> sendDebug( cmd );</p><p> if( Serial.find( &quot;Error&quot;) )</p><p> {</p><p> debug.print( &quot;RECEIVED: Error&quot; );</p><p> return false;</p><p> }</p><p>}</p>
<p>but i just keep reciving this message:<br>AT</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p><p>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80</p><p>AT+CIPSEND=45</p><p>AT+CIPCLOSE</p>
<p>my string line is like this;</p><p><strong>String GET = &quot;GET /update?key=your_thinspeak_write_api_key&quot;;</strong></p><p>i don't define &quot;&amp;field1&quot; etc in this line. instead it is defined closer to the end of the code;</p><p><strong>cmd = GET + &quot;&amp;field1=&quot; + T +&quot;&amp;field2=&quot; + H +&quot;&amp;field3=&quot; + W +&quot;\r\n&quot;;</strong></p><p>...</p><p>also don't forget the very last bit as well;</p><p><strong>cmd = &quot;AT+CIPMUX=0&quot;;</strong></p>
<p>Hi Akin,</p><p>I have a question.</p><p>First off I wanted to thank you for these brilliant tutorials. I've been tinkering with arduino for a while and I've built a few things... I love the fact that you used this for plant monitoring, and I'm pretty much trying to do the same thing. But since I travel I'd like to automate it a bit more! </p><p>I'd like to measure temperature, air humidity and soil moisture, and a few other things, but I'd also like to connect a water pump and a full spectrum led that I can turn on and off by my needs.</p><p>Now I know that this isn't possible with just the ESP8266 because it doesn't have any pwm port, but is this possible with say, an Arduino Nano or Uno? Can I read all this data and command the lights and watering as well?</p><p>I haven't found any real answer on the internet because all the ESP8266 projects are fairly simple and monitor just one thing. Could you give me the answer?</p><p>Thanks in advance,</p><p>Michele.</p>
<p>hello Michele,</p><p>ESP by itself is very flaky that is why all my projects have been updated to the nodemcu board; <a href="http://www.ebay.com/itm/NodeMCU-V3-Newest-Lua-WIFI-Internet-of-Things-development-board-ESP8266-/252291413543?hash=item3abdbd7627:g:6vkAAOSwUuFWxX74">http://www.ebay.com/itm/NodeMCU-V3-Newest-Lua-WIFI...</a></p><p>it's just $5 and can do all that you have mentioned. you just need relay modules to control the AC outlets (pump + water); <a href="http://www.ebay.com/itm/1pcs-5V-2-Channel-Relay-Module-for-Arduino-PIC-ARM-DSP-AVR-Electronic-/400985229770?hash=item5d5c9509ca:g:cJgAAOxy86RSY-Jq">http://www.ebay.com/itm/1pcs-5V-2-Channel-Relay-Mo...</a></p><p>and a good power source, minimum 5V 2A; <a href="http://www.ebay.com/itm/2A-Fast-Charging-Wall-Charger-3FT-Micro-USB-Data-Cable-for-Phones-Tablets-/191744289819?var=&hash=item2ca4d9ac1b:m:mqqiI6CHquP_YGzXADi8G5Q">http://www.ebay.com/itm/2A-Fast-Charging-Wall-Char...</a></p><p>it is very simple to put together and cost is around $20. the suggested nodemcu board has pwm outputs but in your case you actually don't need to use this function. just need relays</p>
<p>Hi and thank you for your explanation! So, do you mean I just need a NodeMCU v3 instead of an Arduino+ESP8266?</p>
<p>exactly, here is all you need. this device can check for soil moisture, temp &amp; humidity, and light levels. based on this data it can then control 2 AC outlets automatically. or manually over wifi anywhere in the world from blynk app, all free open source.</p><p>.<br>it can also alert you with the onboard RGB LED using color, in case you don't have your phone around. below is the wiring, the code will be available soon as well, but it's all very simple.</p>
<p>Wow! Thank you for the amazing answers, you cleared a lot of things I would've had to google for elsewise... </p><p>One last question: Do you program it with Arduino IDE or with NodeCMU firmware? Is it necessary to flash/update the firmware?</p><p>Sorry for making you crazy!</p>
<p>here you go, until I make a detailed instructable, this is the rough sketch.<br>it goes with the wiring above. it can email you when sensor values are below/above user set range (line 49 for example). it can also turn on/off 2 AC outlets based on the data.</p><p><iframe frameborder="0" src="https://codebender.cc/embed/sketch:166998" style="height: 510.0px;width: 100.0%;margin-top: 10.0px;margin-bottom: 10.0px;"></iframe></p>
<p>You are truly a lifesaver! One final, last question: I still have 2 ESP8266 modules laying around, if I want to use them for more simple uses, how do I program it using arduino IDE? Same as before? I mean, install a driver --&gt; get arduino ide ready for esp8266 module?</p>
<p>it's a little more complicated than that. first of all you need a usb UART programming module, if you don't already have one. and then you also need to learn about how to put esp into bootloader mode (changes based on which model esp you have). and also you have to make sure that it is connected to exactly 3.3V and minimum 500mA dc power source. <br>.<br>you do still have to follow the below initial steps. if you succeed with esp-12 you can actually do the exact same connection above without the need of a nodemcu board. but speaking from personal experience, if you are relying on this device to automate your greenhouse, you should definitely use nodemcu because it has a lot of internal protection and voltage adjustments. its also plug and play without the usb UART programming module. it comes breadboard ready and has all the pins easily laid out.. for only $2 more than a regular esp. it's the best board out there right now hands down.</p><p>.</p><p>which esp do you have, 01 or 12.?</p>
<p>Oh yeah well I agree with you on everthing you said, in fact for the plant monitor I am planning to make by your great suggestion I already ordered a NodeMCU v3 and also ordered the relays. The sensors and RGB I already had. I want something reliable and not very flaky like you said... The cost is just a few $ difference, so I don't see any reason not to get it for all the bonus features you already said... </p><p>Btw I have ESP-01 and I already have a voltage converter because I'm aware of the 3v3 it needs and the high mAh it draws, I also have a USB RS232 to TTL adapter to load the programs onto the ESP. I just wanted to tinker around with the software code and see how it works before I move on to the NodeMCU with the plant monitor. Does the NodeMCU still draw so much current or has it been improved?</p><p>Thanks again, you've helped me clear up a lot of doubts as I'm a Software Engineer and some parts of all these tutorials are very obvious to me, while the Electronics parts are a bit less clear since my knowledge base is a bit lacking.</p>
<p>sounds like you have everything you need to make away with the 01s.</p><p>read this to get going; <a href="http://www.allaboutcircuits.com/projects/breadboard-and-program-an-esp-01-circuit-with-the-arduino-ide/">http://www.allaboutcircuits.com/projects/breadboar...</a></p><p>.</p><p>below is a solar powered digital sensor using esp01. it can only do digital sensors. no analog read function on esp01 unfortunately. which is another plus that nodemcu has onboard. i do need help in software. hope you can update the sketch in the future.<br>.<br>2x <a href="http://www.ebay.com/itm/5V-500MA-2-5W-Mini-Solar-Panel-Module-DIY-for-Cell-Charger-Home-/161686527550?hash=item25a5449e3e:g:664AAOSwEeFVPhLS">http://www.ebay.com/itm/5V-500MA-2-5W-Mini-Solar-P...</a></p><p>1x <a href="http://www.ebay.com/itm/Auto-DC-DC-Boost-Buck-Converter-Solar-Voltage-Regulator-25W-3-15V-to-0-5-30V-/221783174186?hash=item33a34eac2a:g:s1sAAMXQLs5Ru~~9">http://www.ebay.com/itm/Auto-DC-DC-Boost-Buck-Conv...</a></p><p>1x esp01</p><p>1x relay</p><p>1x zener diode<br>.<br>this device will automatically come to life when there is enough light and can check for temp &amp; humid and also control a single AC outlet as esp01 has only 2 pins to play with. you can add a powerbank and keep it alive forever too</p>
<p>my pleasure. you program it just like an arduino, using arduino IDE. no flashes or updates, all that is in the past now with the nodemcu board.<br>.<br>there are a few initial steps to follow however, <br>1. install cp2102 driver; <a href="https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx">https://www.silabs.com/products/mcu/Pages/USBtoUAR...</a></p><p>2. get arduino IDE ready for nodemcu; <a href="https://www.instructables.com/id/Quick-Start-to-Nodemcu-ESP8266-on-Arduino-IDE/">https://www.instructables.com/id/Quick-Start-to-Nod...</a></p><p>.</p><p>once you complete these first time steps, it will be plug &amp; play forever. i will update the code and let you know here soon. you can then copy &amp; paste, it will work right away<br>3. you can learn about blynk phone app here, which the updated code will include; <a href="https://www.instructables.com/id/ESP8266-12-blynk-wireless-temperature-e-humidity-D/">https://www.instructables.com/id/ESP8266-12-blynk-w...</a></p>
<p>Hello Akin, is there a way of accessing these sent data on a Local Area Network web server? Cause I'm planning to install a project like this on my small farm but the Internet is not accessible there.</p>
<p>yes, its actually easier to do it on the local network. i'm assuming you will have a wireless router but just no internet.?! there are many network based esp instructables, check this out; <a href="https://learn.adafruit.com/esp8266-temperature-slash-humidity-webserver/overview">https://learn.adafruit.com/esp8266-temperature-sla...</a><br></p>
<p>thank you for the fast response. :) :) :)</p>
<p>Hello Akin,</p><p>The single sensor code did not work on my Cactus Micro Rev. 2 board.</p><p><a href="https://drive.google.com/file/d/0B8bvYGugxvFFR0JPUG9EdlE5QlE/view" rel="nofollow">https://drive.google.com/file/d/0B8bvYGugxvFFR0JPU...</a></p><p>I have replaced the network name, network password, and Thingspeak API key to no avail, with even changing the rx/tx pin definitions as you have mentioned.</p><p>Cactus Micro Rev. 2:</p><p>#define _rxpin 11</p><p>#define _txpin 12</p>
<p>Hi,</p><p>Thx for your tutorial it will help me but for me all works great, i added the network+pass and the key, it seems to upload(it's exacly like on your screenshot) but when i go on ThingSpeak there is no data.</p><p>I created anothers channels, changed the Esp8266, changed the Arduino but the problem still here.</p><p>It still works for you ? It's maybe a problem from TingSpeak so if you can say if it works for you it could realy help me : ) </p><p>Thx</p>
<p>Hi,</p><p>It was finaly simple, on all Esp8266 there was the NodeMcu Firmware, we just need to upload an At-command firmware like here: http://www.xess.com/blog/esp8266-reflash/</p>
glad to hear that you were able to solve the problem. thank you for sharing the link.!
<p>Thx : )</p><p>But now i've a weird problem: i try to use a dht11 with it, i can send 1 information like temperature or humidity but when i try to send the 2 information in the same time it doesn't works. When i do with the default envolyis_multiple_sensors.ino it works but i see it take sometimes more time than the single version to start work(there is many try before have a &quot;Get /update?key=....&quot;)</p><p>There is no problem for read the temp and humidity it show me everytime the result exept there is no &quot;Get /update?key=...&quot; but i noticed it worked 2 time on surly 100 try, and it was on ThingSpeak too ; ).</p><p>I use this library: <a href="https://github.com/RobTillaart/Arduino/tree/master/libraries/DHTlib" rel="nofollow">https://github.com/RobTillaart/Arduino/tree/master...</a></p><p>Do you have an idea ? :/</p>
<p>Have you been successful with your setup? I have managed to flash the esp-12 with nodemcu firmware. But still can't manage to read data from temp sensor dht11. Do we have the lua sensor library?</p>
ther is a very easy to use dht11 librry under nodemcu github. im at work now, will send you the link tonight if you cant find it. its under lua_examples i believe.
<p>thanks Akin, I love your paperclay models. It's an excellent idea.</p><p>i have tried the above link and as well in the nodemcu samples </p><p><a href="https://github.com/nodemcu/nodemcu-firmware/blob/master/lua_examples/yet-another-dht22.lua" rel="nofollow">https://github.com/nodemcu/nodemcu-firmware/blob/m...</a></p><p>I have also added some print message to see what's going on, but it terminates at</p><p>&gt; dofile(&quot;dht11_22.lua&quot;).read(4)<br>using dht11<br>kick the device<br>wait for device presense<br> receive 5 octets of data, msb first<br>&gt; </p><p>I have search in the esp8266 forums and found another sample </p><p><a href="http://www.esp8266.com/viewtopic.php?f=19&t=1470" rel="nofollow">http://www.esp8266.com/viewtopic.php?f=19&amp;t=1470</a></p><p>This works but with wrong values</p><p>&gt; dofile(&quot;read_temp.lua&quot;)<br>Humidity: 0%<br>Temperature: 50 deg C<br>Temperature: 122 deg F<br>&gt; </p><p>I have retested the dht11 sensor i am using with arduino board and as well with PI and it works pretty good with some great results. </p><p>You also mentioned about just reading raw values from ADC but how do i convert them to some human readable format? </p><p>thanks again</p>
<p>:) the easiest way to acknowledge the numbers is to use another thermometer side by side, a digital or a manual one. and get an idea like 638=22C.. then you can use the freezer/fridge to get another value and just use excel to do the rest.. still too much work and confusion.</p><p>.</p><p>so instead i just push the data to thingspeak and have it tweet alert me at previously calculated numbers. i also use the rgb led to see status. green=ok, red=freezing etc. orange=watch out.</p><p>.</p><p>envolysis is a side project that i came up with while working on;</p><p><a href="https://www.instructables.com/id/the-Plant-Doctor-family/" rel="nofollow">https://www.instructables.com/id/the-Plant-Doctor-f...</a></p><p>my goal always has been to simplify everything, including the code, wiring etc. as much as possible so a total beginner can make sense and learn faster (as i still am)..</p><p>this device can also control a relay module and turn on/off fridge (any electronic) as needed automatically/manually over the internet.</p><p>thank you for your interest. clay models are amazing, and so much fun to make; <a href="https://www.instructables.com/id/Custom-arduino-parts/" rel="nofollow">https://www.instructables.com/id/Custom-arduino-par...</a></p><p>love &amp; peace</p>
yes i had success, check these out;<br> https://www.instructables.com/id/ESP8266-ADC-Analog-Sensors/?comments=all#C3QC6D3I7RG9QBW<br>.<br> https://www.instructables.com/id/ESP8266-ADC-Analog-Sensors/?comments=all#CG1P4LLI7MXYIEC
<p>thanks akin, that's impressive. I have a light sensor (http://www.dx.com/p/mf-diy-lm358-light-sensor-modu... which I have used with arduino. I will try with esp-12. In your diagram you are using the keys rgb led module any success with this? </p><p>I am trying to read the values from dht11 connected as shown in your diagram and found some help in the forum (<a href="http://www.esp8266.com/viewtopic.php?f=19&t=1009&sid=a30ad196a0666e7441474f32c973ba26&start=10" rel="nofollow">http://www.esp8266.com/viewtopic.php?f=19&amp;t=1009&amp;s...</a>), but i get some strange values. I am new to this lua, so couldn't find out what's going wrong. Were you successful in reading the dht11 values from esp-12?</p>
<p>yes rgb led module works, just like it would on arduino. i made my own module however, not the link/image keyes one, although i'm sure that will work exactly the same..</p>
<p>i connect the dht11 module like i would connect an analog sensor to the arduino, and use it without libraries, just raw numbers (0-1024). that's all i need.. or use an 8D-9 NTC thermistor as an analog temperature sensor.</p><p><a href="https://www.instructables.com/id/Sensory-Device-for-The-Plant-Doctor-Plant-Care-Ins/" rel="nofollow">https://www.instructables.com/id/Sensory-Device-for...</a></p>
<p><a href="https://github.com/nodemcu/nodemcu-firmware/tree/master/lua_modules/dht22" rel="nofollow">https://github.com/nodemcu/nodemcu-firmware/tree/m...</a><br>.<br>i've read that people use this with a dht11 and works fine.. i don't know if you have to change the code at all tho.?!</p>
<p>Thanks Akin, </p><p>Looking forward to the updates! </p><p>I'd be keen to help support you in this project with ideas etc (Im a tech, but not a programmer),. </p><p>Suggest we build a parts list of links on ebay etc, add light sensor (fridge door open), enable email notifications on alarms (email to SMS Gateway) , min / max alarms etc. </p><p>Cheers</p>
<p>check this out;</p><p><a href="https://www.instructables.com/id/Envolysis/step6" rel="nofollow">https://www.instructables.com/id/Envolysis/step6</a></p><p>i was finally able to get the esp chip work/program directly by itself, no arduino.!!</p>
<p>Hi, </p><p>Looking to make one of these for use as a freezer / fridge open alarm. </p><p>Couple of questions:</p><p>1. How well does the wifi signal work through the metal of the fridge / freezer?</p><p>2. Would I be better to put the temp sensor as an &quot;external module&quot; , so only the sensor itself would be inside the freezer? Should help wifi and the battery, which I doubt likes being frozen?</p><p>3. Any good suppliers of the components here in the UK?</p><p>4. How about running this off the mains, externally, as in point 2?</p><p>(By external, I mean the sensor being on a wire (rather than direct on the board) - in some sort of protective case, inside the freezer - connected by a wire to the board etc outside of the freezer?)</p><p>THX</p>
<p>1. signal works perfectly fine thru the metal.</p><p>2. i believe that you are right. the mcu and the battery should be outside, unless you can make a temp proof case.</p><p>3. i buy everything from ebay.com (or dx.com) - get shipped to US. you should check out this board however - it has an onboard wifi chip and it's just $11. can work with a single 3.7V battery; <a href="http://www.ebay.com/itm/Cactus-Micro-tiny-size-arduino-compatible-board-plus-WIFI-chip-esp8266-/261813800365?pt=LH_DefaultDomain_0&hash=item3cf5518dad" rel="nofollow">http://www.ebay.com/itm/Cactus-Micro-tiny-size-ard...</a> i will be updating all my projects with this mcu. it's just amazing</p><p>4. yes ac power is perfect, you can get power from an existing light bulb within the fridge already. this would eliminate many problems. however with the sleep mode and a built in rechargable battery we can make this thing run for 4-6 months on single charge. charge it like a cell phone again. </p><p>.</p><p>including a magnet in the back of the case would be great since all these fridges are usually magnetic outside. it is very light and can be moved easily. using the new computer mentioned above solves many problems. first of all it is much smaller in size and can run on lower voltage. it uploads very effectively. i will be doing an in depth review of it soon, stay tuned. <br>do you have access to a 3D printer to make a case for it.? i can help with the design</p>
<p>Hmm I'm having issues. Im working from the single sensor code<br>The SSID,PASS and API key are all correct and I can ping the ESP8266 but ThingSpeak isn't receiving any data.</p><p>This is my serial output:</p><p>[code]<br>light sensor value is 375<br>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80<br>AT+CIPSEND=45<br>AT+CIPCLOSE<br>light sensor value is 375<br>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80<br>AT+CIPSEND=45<br>AT+CIPCLOSE<br>light sensor value is 372<br>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80<br>AT+CIPSEND=45<br>AT+CIPCLOSE<br>light sensor value is 368<br>AT+CIPSTART=&quot;TCP&quot;,&quot;;,80<br>AT+CIPSEND=45<br>AT+CIPCLOSE<br>[\code]</p>
<p>hello,</p><p>how is your wiring.? how are you powering the ESPchip? ur sensor is working, my guess is that it is smtg to do with the powering of esp, not enough current/voltage..</p><p>.</p><p>i ran into this problem many times, same serial monitor printings for me.. waiting for your answer.</p>
<p>OK. I know what I was doing wrong this time.<br>When I am using the Arduino as a programmer I have a blank sketch uploaded to the Arduino so that i can talk to ESP8266 manually through Serial (and to update firmware works as an FTDI programmer) and the wiring is as such: <br>TX&lt;----&gt;TX<br>RX&lt;----&gt;RX<br><br>However If the Arduino sketch needs to talk to the ESP8266 through the above sensor sketch it needs to be wired:<br>TX&lt;----&gt;RX<br>RX&lt;----&gt;TX<br><br>Such a silly mistake but should be mentioned.</p>
<p> :) oh wow - that happens too often for everyone..!</p><p>so does it work now, can you upload.? you should check out this board, its only $11 with a wifi chip on board; <a href="http://www.ebay.com/itm/Cactus-Micro-tiny-size-arduino-compatible-board-plus-WIFI-chip-esp8266/261786067796?_trksid=p2050601.c100272.m3467&_trkparms=aid%3D111001%26algo%3DREC.SEED%26ao%3D1%26asc%3D20140813112422%26meid%3Da84f4f31d67a4fb2a4e6046e4865d5c2%26pid%3D100272%26rk%3D1%26rkt%3D4%26sd%3D261786067796%26clkid%3D4559295958433373203&_qi=RTM2062264" rel="nofollow">http://www.ebay.com/itm/Cactus-Micro-tiny-size-ard...</a> i have ordered it and will do a review once it arrives, however author yanc has a good post on it already; <a href="https://www.instructables.com/id/Arduino-Wifi-Temperature-Logger/" rel="nofollow">https://www.instructables.com/id/Arduino-Wifi-Tempe...</a></p><p>good luck !</p>
<p>yup! It works now. Next Im going to use SoftwareSerial and write some code to run from an ATtiny85 to control ESP8266 to send out an SMS alert when a sensor reaches a certain threshold. In theory, the attiny85 has 5 pins that can be used if you disable RST. Allowing 3pins for sensors and two pins for SoftwareSerial.</p><p>Now Im just waiting on sensors and Voltage regulators to ship in from Digi-key.</p><p>I can piggyback Arduino Uno's Rx/Tx to the attiny85's and view it in SerialMonitor for debugging While it communicates with the ESP8266. Cool eh?</p>
<p>I akso ment to add the ATTiny85 can be ran at 3.3v so no level shifters will need to be used and Ill have a 3.3v regulator between the 9v battery and the rest of the final circuit.</p>
<p>Hi, great piece of work!, I&acute;m a beginner in Arduino and looking for some help. </p><p>I have two doubts: </p><p>- is it possible to connect a sensor directly to the ESP8266? How can be made?</p><p>- is it possible to connect the ESP8266 in some way to an Arduino as a remote information spot?</p><p>Let&acute;s say: I have an Arduino &quot;center&quot; reading 3 or 4 ESP8266 remote sensors in the house.</p><p>Thanks for your answer and for sharing such a great info.</p>
<p>please see<br><a href="https://www.instructables.com/id/Low-cost-WIFI-temperature-data-logger-based-on-ESP/" rel="nofollow">https://www.instructables.com/id/Low-cost-WIFI-temp...</a></p><p><a href="https://www.instructables.com/id/Make-ESP8266-REV-12-prototype-friendly/" rel="nofollow">https://www.instructables.com/id/Make-ESP8266-REV-1...</a></p><p>. </p><p>i'm sure that your second questions is possible as well, just need to search for it a little bit. i haven't seen such an application yet however.<br>.<br>hope the links are helpful. thank you for your your interest. you should check out this board. https://store.spark.io/ much easier to use, same size as arduino nano with wifi chip on top. however, the new ESP module can handle 9+ connections without an arduino, for just $4. there is a big difference. but yes, all this should be possible</p>
<p>Thanks for adding this - I plan to build it but had some questions:</p><p>1) battery choice: I noted that Battery Junction (which carries the LiPo</p><p>batteries that you use does not carry a holder to create two 3.7Vs in series as you have done (are the batteries the same size as AA?). I am assuming you are using two in series to get above the 5V required for the Arduino nano in your build?</p><p>2) battery power and protection: do you have a feel for how many Amp hours the setup will last? I am curious as to the optimal battery configuration (it seems to be a tradeoff between size (the grater Ah rating) and time to discharge. Speaking of discharging, I wonder whether you included charge/discharge protection in your setup? I am considering buying the ultrafire 18650 (3000mah) since it comes with circuit protection built-in).</p><p>3) did you end up using Diaoul's Arduino library? That would seem a logical choice. Thanks Diaoul for making this!!</p><p>4) On your schematic, you list the 4.7K resistor which looks like it goes in between the sensor and the MCU. But you also list a 10 ohm below it. What was this for?</p><p>I plan to get started with getting these components, and am equally impressed by the possibilities of a sub $5 Wifi device!!</p>
<p>nice, detailed questions.</p><p>1) battery choice. you are correct, 2x 18650 in series to go above 5V, and I also would like to attach another one of these in parallel so I can get 7.4V but also double mAh. I am working on making a custom rechargeable battery kit. when arduino is powered via 5V the wifi module doesn't upload. you have to go at least 7.4V i assume. works great with a 9V battery, this also makes the size very small, but the capacity is horrible. I was able to get 4hours constant upload every 20 seconds with just DHT11 module connected. solar charge might be necessary, or interchangeable battery system keep one charging at all times and switch every 2 days (hopefully)</p><p>this wifi module requires a stable power source. preferably it's own, but when supplied with enough voltage the arduino is able to handle the sensors and the wifi module through 3v3 and still upload..</p><p>2) when I had connected 2 analog sensors at the same time (NTC and LDR) the battery time went down to only 45minutes with a 9V battery. an incredible drop compared to the DHT11 setup above. it may be due to smd modules vs regular resistor+sensor, i dont know ?!</p><p>3) i didn't use any libraries. that was the focus of my project. as simple of a code as possible. uploading just raw numbers (0-1023).</p><p>4) i don't think I ever mention 4.7K ohm, that's from another post that uses DS18B20 temperature sensor instead of the NTC thermistor that i use. LDR works with 10K ohm and the NTC works with 10ohm. this was my original setup from the <a href="https://www.instructables.com/id/plant-health-monitor/" rel="nofollow">plant health monitor</a>.</p><p>.</p><p>but honestly I am planning on updating all my systems with the upcoming spark photon. for just $19 you get everything. <a href="https://store.spark.io/" rel="nofollow">https://store.spark.io/</a></p><p>you can easily power this thing with a single 3.7V boost up 5V rechargable power bank. <a href="http://www.dx.com/p/universal-1-x-18650-battery-box-power-bank-black-usb-5v-251480#.VKNxYtLF-1c" rel="nofollow">http://www.dx.com/p/universal-1-x-18650-battery-bo...</a></p><p>much more stable overall probably, easier too. but apparently the ESP wifi module has an on board sdk. which can be programmed, eliminating the need for an arduino. i haven't seen an example yet however.</p><p>. </p><p>thank you for your interest. please share your work !!</p>

About This Instructable




Bio: Please support & share our mission; http://igg.me/at/smartplants . the Plant Doctor is a non-profit, open source online research laboratory specializing in electronics+plants. Our vision is ... More »
More by Akin Yildiz:Grow Cannabis the Smart Way ROTLD Inspired Sign With App Magnetic Pumpkin Pendant 
Add instructable to: