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

Participated in the
MAKE ENERGY: A US-Mexico Innovation Challenge
51 Comments
6 years ago
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
Reply 6 years ago
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
7 years ago
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.
Reply 7 years ago
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
Reply 7 years ago
Hi and thank you for your explanation! So, do you mean I just need a NodeMCU v3 instead of an Arduino+ESP8266?
Reply 7 years ago
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.
Reply 7 years ago
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!
Reply 7 years ago
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.
Reply 7 years ago
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?
Reply 7 years ago
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.?
Reply 7 years ago
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.
Reply 7 years ago
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
Reply 7 years ago
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...
7 years ago
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.
Reply 7 years ago
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...
Reply 7 years ago
thank you for the fast response. :) :) :)
7 years ago
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
7 years ago on Introduction
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
Reply 7 years ago on Introduction
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/
Reply 7 years ago on Introduction
glad to hear that you were able to solve the problem. thank you for sharing the link.!