Introduction: Envolysis

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 )

microcontroller

breadboard

battery clip

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

resistors

cables

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,

akin

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.

Comments

author
tanjamaya made it!(author)2017-02-11

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:

AT

AT+CIPSTART="TCP","188.121.46.6",80

GET /advertacs/test/chart/add_data.php?&s1=23.00&s2=27.00&s3=0.00&s4=0.00&s5=0.00&s6=0.00&s7=0.00&s8=0.00&s9=0.00&s10=0.00&s11=47.45&s12=47.45

AT+CIPSEND=144

AT+CIPCLOSE

AT+CIPSTART="TCP","188.121.46.6",80

GET /advertacs/test/chart/add_data.php?&s1=23.00&s2=27.00&s3=0.00&s4=0.00&s5=0.00&s6=0.00&s7=0.00&s8=0.00&s9=0.00&s10=0.00&s11=69.12&s12=69.12

AT+CIPSEND=144

AT+CIPCLOSE

----------------

Arduino Code:

http://188.121.46.6/advertacs/test/chart/arduino_c...

PHP code:

http://188.121.46.6/advertacs/test/chart/add_data....

Conection Setup:

http://188.121.46.6/advertacs/test/chart/pic.jpg

author
Akin+Yildiz made it!(author)2017-02-22

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; https://www.instructables.com/id/Pot2/ purchase here; http://www.ebay.com/itm/201542946669

author
The+Expert+Noob made it!(author)2015-03-07

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 "wrong syntax" just after that with the line
mySerial.println("GET /update?key=[secret_write_key]&field1=" + T + "\r\n");

T is the value of A1 and converted to a string.

What am I missing?

author
Akin+Yildiz made it!(author)2015-03-07

try the multiple sensors code without changing your wiring..

https://drive.google.com/file/d/0B8bvYGugxvFFMjk4Q...

see if that helps first. i've ran into some problems with just single sensor code..

author
The+Expert+Noob made it!(author)2015-03-07

Ah I found out what it was. I wasn't sending AT+CIPSEND so I re-wrote it.

val = analogRead(ANTENNA); // read the ANTENNA
String T = String(val);
mySerial.println("AT+CIPSTART=\"TCP\",\"184.106.153.149\",80");
delay(2000);
String cmd = GET + "&field1=" + T +"\r\n";
mySerial.print("AT+CIPSEND=");
mySerial.println( cmd.length() );

It works great on the Uno as Serial returns

AT+CIPSTART=45

then follows up with successfully sending the GET command.

However, THE SAME EXACT CODE on the ATTINY85 returns:

AT+CIPSTART=2
8

and Errors out an I get a return 400 page in the Serial. So I believe its how ATTINY85 handles cmd.length()

author
MohammedS153 made it!(author)2016-10-24

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.
this is my code:
#include <SoftwareSerial.h>

int sensor_water = A0;

int value_water;

#define DEBUG FALSE //comment out to remove debug msgs

//*-- Hardware Serial

#define _baudrate 115200

//*-- Software Serial

//

#define _rxpin 2

#define _txpin 3

SoftwareSerial debug( _rxpin, _txpin ); // RX, TX

//*-- IoT Information

#define SSID "waterfirst"

#define PASS "waterfirst"

#define IP "184.106.153.149" // ThingSpeak IP Address: 184.106.153.149

// GET /update?key=[THINGSPEAK_KEY]&field1=[data 1]&field2=[data 2]...;

String GET = "GET /update?key=MYKEY";

void setup() {

Serial.begin( _baudrate );

debug.begin( _baudrate );

sendDebug("AT");

delay(5000);

if(Serial.find("OK"))

{

debug.println("RECEIVED: OK\nData ready to sent!");

connectWiFi();

}

}

void loop() {

value_water = analogRead(sensor_water);

String water =String(value_water);// turn integer to string

updateTS(water);

delay(3000); //

}

//----- update the Thingspeak string with 1 value

void updateTS( String W)

{

// ESP8266 Client

String cmd = "AT+CIPSTART=\"TCP\",\"";// Setup TCP connection

cmd += IP;

cmd += "\",80";

sendDebug(cmd);

delay(2000);

if( Serial.find( "Error" ) )

{

debug.print( "RECEIVED: Error\nExit1" );

return;

}

cmd = GET + "&field1=" + W +"\r\n";

Serial.print( "AT+CIPSEND=" );

Serial.println( cmd.length() );

if(Serial.find( ">" ) )

{

debug.print(">");

debug.print(cmd);

Serial.print(cmd);

}

else

{

sendDebug( "AT+CIPCLOSE" );//close TCP connection

}

if( Serial.find("OK") )

{

debug.println( "RECEIVED: OK" );

}

else

{

debug.println( "RECEIVED: Error\nExit2" );

}

}

void sendDebug(String cmd)

{

debug.print("SEND: ");

debug.println(cmd);

Serial.println(cmd);

}

boolean connectWiFi()

{

Serial.println("AT+CWMODE=1");//WiFi STA mode - if '3' it is both client and AP

delay(2000);

//Connect to Router with AT+CWJAP="SSID","Password";

// Check if connected with AT+CWJAP?

String cmd="AT+CWJAP=\""; // Join accespoint

cmd+=SSID;

cmd+="\",\"";

cmd+=PASS;

cmd+="\"";

sendDebug(cmd);

delay(5000);

if(Serial.find("OK"))

{

debug.println("RECEIVED: OK");

return true;

}

else

{

debug.println("RECEIVED: Error");

return false;

}

cmd = "AT+CIPMUX=0";// Set Single connection

sendDebug( cmd );

if( Serial.find( "Error") )

{

debug.print( "RECEIVED: Error" );

return false;

}

}

author
MohammedS153 made it!(author)2016-10-24

but i just keep reciving this message:
AT

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

AT+CIPSTART="TCP","184.106.153.149",80

AT+CIPSEND=45

AT+CIPCLOSE

author
Akin+Yildiz made it!(author)2015-03-07

my string line is like this;

String GET = "GET /update?key=your_thinspeak_write_api_key";

i don't define "&field1" etc in this line. instead it is defined closer to the end of the code;

cmd = GET + "&field1=" + T +"&field2=" + H +"&field3=" + W +"\r\n";

...

also don't forget the very last bit as well;

cmd = "AT+CIPMUX=0";

author
Disembodied made it!(author)2016-03-18

Hi Akin,

I have a question.

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!

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.

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?

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?

Thanks in advance,

Michele.

author
Akin+Yildiz made it!(author)2016-03-18

hello Michele,

ESP by itself is very flaky that is why all my projects have been updated to the nodemcu board; http://www.ebay.com/itm/NodeMCU-V3-Newest-Lua-WIFI...

it's just $5 and can do all that you have mentioned. you just need relay modules to control the AC outlets (pump + water); http://www.ebay.com/itm/1pcs-5V-2-Channel-Relay-Mo...

and a good power source, minimum 5V 2A; http://www.ebay.com/itm/2A-Fast-Charging-Wall-Char...

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

author
Disembodied made it!(author)2016-03-18

Hi and thank you for your explanation! So, do you mean I just need a NodeMCU v3 instead of an Arduino+ESP8266?

author
Akin+Yildiz made it!(author)2016-03-18

exactly, here is all you need. this device can check for soil moisture, temp & 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.

.
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.

Screenshot_2016-02-17-12-29-39.pngnodemcu_plantdoctor.png
author
Disembodied made it!(author)2016-03-18

Wow! Thank you for the amazing answers, you cleared a lot of things I would've had to google for elsewise...

One last question: Do you program it with Arduino IDE or with NodeCMU firmware? Is it necessary to flash/update the firmware?

Sorry for making you crazy!

author
Akin+Yildiz made it!(author)2016-03-18

here you go, until I make a detailed instructable, this is the rough sketch.
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.

author
Disembodied made it!(author)2016-03-19

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 --> get arduino ide ready for esp8266 module?

author
Akin+Yildiz made it!(author)2016-03-19

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.
.
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.

.

which esp do you have, 01 or 12.?

author
Disembodied made it!(author)2016-03-19

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...

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?

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.

author
Akin+Yildiz made it!(author)2016-03-19

sounds like you have everything you need to make away with the 01s.

read this to get going; http://www.allaboutcircuits.com/projects/breadboar...

.

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.
.
2x http://www.ebay.com/itm/5V-500MA-2-5W-Mini-Solar-P...

1x http://www.ebay.com/itm/Auto-DC-DC-Boost-Buck-Conv...

1x esp01

1x relay

1x zener diode
.
this device will automatically come to life when there is enough light and can check for temp & 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

solar connection.png
author
Akin+Yildiz made it!(author)2016-03-18

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.
.
there are a few initial steps to follow however,
1. install cp2102 driver; https://www.silabs.com/products/mcu/Pages/USBtoUAR...

2. get arduino IDE ready for nodemcu; https://www.instructables.com/id/Quick-Start-to-Nod...

.

once you complete these first time steps, it will be plug & play forever. i will update the code and let you know here soon. you can then copy & paste, it will work right away
3. you can learn about blynk phone app here, which the updated code will include; https://www.instructables.com/id/ESP8266-12-blynk-w...

author
John+DominiqueB made it!(author)2016-02-23

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.

author
Akin+Yildiz made it!(author)2016-02-23

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; https://learn.adafruit.com/esp8266-temperature-sla...

author
John+DominiqueB made it!(author)2016-02-24

thank you for the fast response. :) :) :)

author
balbonPH made it!(author)2015-10-01

Hello Akin,

The single sensor code did not work on my Cactus Micro Rev. 2 board.

https://drive.google.com/file/d/0B8bvYGugxvFFR0JPU...

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.

Cactus Micro Rev. 2:

#define _rxpin 11

#define _txpin 12

author
RaoulosI made it!(author)2015-07-27

Hi,

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.

I created anothers channels, changed the Esp8266, changed the Arduino but the problem still here.

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 : )

Thx

author
RaoulosI made it!(author)2015-07-27

Hi,

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/

author
Akin+Yildiz made it!(author)2015-07-27

glad to hear that you were able to solve the problem. thank you for sharing the link.!

author
RaoulosI made it!(author)2015-07-29

Thx : )

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 "Get /update?key=....")

There is no problem for read the temp and humidity it show me everytime the result exept there is no "Get /update?key=..." but i noticed it worked 2 time on surly 100 try, and it was on ThingSpeak too ; ).

I use this library: https://github.com/RobTillaart/Arduino/tree/master...

Do you have an idea ? :/

author
structman made it!(author)2015-03-29

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?

author
Akin+Yildiz made it!(author)2015-03-29

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.

author
structman made it!(author)2015-03-30

thanks Akin, I love your paperclay models. It's an excellent idea.

i have tried the above link and as well in the nodemcu samples

https://github.com/nodemcu/nodemcu-firmware/blob/m...

I have also added some print message to see what's going on, but it terminates at

> dofile("dht11_22.lua").read(4)
using dht11
kick the device
wait for device presense
receive 5 octets of data, msb first
>

I have search in the esp8266 forums and found another sample

http://www.esp8266.com/viewtopic.php?f=19&t=1470

This works but with wrong values

> dofile("read_temp.lua")
Humidity: 0%
Temperature: 50 deg C
Temperature: 122 deg F
>

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.

You also mentioned about just reading raw values from ADC but how do i convert them to some human readable format?

thanks again

author
Akin+Yildiz made it!(author)2015-03-30

:) 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.

.

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.

.

envolysis is a side project that i came up with while working on;

https://www.instructables.com/id/the-Plant-Doctor-f...

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)..

this device can also control a relay module and turn on/off fridge (any electronic) as needed automatically/manually over the internet.

thank you for your interest. clay models are amazing, and so much fun to make; https://www.instructables.com/id/Custom-arduino-par...

love & peace

Untitled.jpg
author
Akin+Yildiz made it!(author)2015-03-29

yes i had success, check these out;
https://www.instructables.com/id/ESP8266-ADC-Analog-Sensors/?comments=all#C3QC6D3I7RG9QBW
.
https://www.instructables.com/id/ESP8266-ADC-Analog-Sensors/?comments=all#CG1P4LLI7MXYIEC

author
structman made it!(author)2015-03-29

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?

I am trying to read the values from dht11 connected as shown in your diagram and found some help in the forum (http://www.esp8266.com/viewtopic.php?f=19&t=1009&s...), 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?

author
Akin+Yildiz made it!(author)2015-03-30

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..

author
Akin+Yildiz made it!(author)2015-03-29

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.

https://www.instructables.com/id/Sensory-Device-for...

author
Akin+Yildiz made it!(author)2015-03-29

https://github.com/nodemcu/nodemcu-firmware/tree/m...
.
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.?!

author
CharlesM10 made it!(author)2015-03-23

Thanks Akin,

Looking forward to the updates!

I'd be keen to help support you in this project with ideas etc (Im a tech, but not a programmer),.

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.

Cheers

author
Akin+Yildiz made it!(author)2015-03-24

check this out;

https://www.instructables.com/id/Envolysis/step6

i was finally able to get the esp chip work/program directly by itself, no arduino.!!

author
CharlesM10 made it!(author)2015-03-20

Hi,

Looking to make one of these for use as a freezer / fridge open alarm.

Couple of questions:

1. How well does the wifi signal work through the metal of the fridge / freezer?

2. Would I be better to put the temp sensor as an "external module" , so only the sensor itself would be inside the freezer? Should help wifi and the battery, which I doubt likes being frozen?

3. Any good suppliers of the components here in the UK?

4. How about running this off the mains, externally, as in point 2?

(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?)

THX

author
Akin+Yildiz made it!(author)2015-03-20

1. signal works perfectly fine thru the metal.

2. i believe that you are right. the mcu and the battery should be outside, unless you can make a temp proof case.

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; http://www.ebay.com/itm/Cactus-Micro-tiny-size-ard... i will be updating all my projects with this mcu. it's just amazing

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.

.

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.
do you have access to a 3D printer to make a case for it.? i can help with the design

collage01.jpg
author
The+Expert+Noob made it!(author)2015-03-07

Hmm I'm having issues. Im working from the single sensor code
The SSID,PASS and API key are all correct and I can ping the ESP8266 but ThingSpeak isn't receiving any data.

This is my serial output:

[code]
light sensor value is 375
AT+CIPSTART="TCP","184.106.153.149",80
AT+CIPSEND=45
AT+CIPCLOSE
light sensor value is 375
AT+CIPSTART="TCP","184.106.153.149",80
AT+CIPSEND=45
AT+CIPCLOSE
light sensor value is 372
AT+CIPSTART="TCP","184.106.153.149",80
AT+CIPSEND=45
AT+CIPCLOSE
light sensor value is 368
AT+CIPSTART="TCP","184.106.153.149",80
AT+CIPSEND=45
AT+CIPCLOSE
[\code]

author
Akin+Yildiz made it!(author)2015-03-07

hello,

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..

.

i ran into this problem many times, same serial monitor printings for me.. waiting for your answer.

author
The+Expert+Noob made it!(author)2015-03-07

OK. I know what I was doing wrong this time.
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:
TX<---->TX
RX<---->RX

However If the Arduino sketch needs to talk to the ESP8266 through the above sensor sketch it needs to be wired:
TX<---->RX
RX<---->TX

Such a silly mistake but should be mentioned.

author
Akin+Yildiz made it!(author)2015-03-07

:) oh wow - that happens too often for everyone..!

so does it work now, can you upload.? you should check out this board, its only $11 with a wifi chip on board; http://www.ebay.com/itm/Cactus-Micro-tiny-size-ard... i have ordered it and will do a review once it arrives, however author yanc has a good post on it already; https://www.instructables.com/id/Arduino-Wifi-Tempe...

good luck !

author
The+Expert+Noob made it!(author)2015-03-07

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.

Now Im just waiting on sensors and Voltage regulators to ship in from Digi-key.

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?

author
The+Expert+Noob made it!(author)2015-03-07

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.

author
dibonet made it!(author)2015-01-21

Hi, great piece of work!, I´m a beginner in Arduino and looking for some help.

I have two doubts:

- is it possible to connect a sensor directly to the ESP8266? How can be made?

- is it possible to connect the ESP8266 in some way to an Arduino as a remote information spot?

Let´s say: I have an Arduino "center" reading 3 or 4 ESP8266 remote sensors in the house.

Thanks for your answer and for sharing such a great info.

author
Akin+Yildiz made it!(author)2015-01-21

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

https://www.instructables.com/id/Make-ESP8266-REV-1...

.

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.
.
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

author
pfishwick made it!(author)2014-12-30

Thanks for adding this - I plan to build it but had some questions:

1) battery choice: I noted that Battery Junction (which carries the LiPo

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?

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).

3) did you end up using Diaoul's Arduino library? That would seem a logical choice. Thanks Diaoul for making this!!

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?

I plan to get started with getting these components, and am equally impressed by the possibilities of a sub $5 Wifi device!!

author
Akin+Yildiz made it!(author)2014-12-30

nice, detailed questions.

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)

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..

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 ?!

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).

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 plant health monitor.

.

but honestly I am planning on updating all my systems with the upcoming spark photon. for just $19 you get everything. https://store.spark.io/

you can easily power this thing with a single 3.7V boost up 5V rechargable power bank. http://www.dx.com/p/universal-1-x-18650-battery-bo...

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.

.

thank you for your interest. please share your work !!

About This Instructable

24,531views

117favorites

License:

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 WayROTLD Inspired Sign With AppMagnetic Pumpkin Pendant
Add instructable to: