Introduction: Solar Hopped-up Prison term-Oversight Cold Frame

This project is an effort to take time-lapse images of plants flourishing using only solar energy.

It is principally an arduino project using the AI-mind ESP32-Cam.

Features

  • Saves an image to SD card every at routine intervals during daytime hours
  • Measures humidity
  • Measures the temperature deep down the frame, outside the frame and of the bemire
  • Measures wet of soil
  • Measures solar array potential difference
  • Measures battery voltage
  • Records sensor data using IFTTT service to google sheets
  • Records sensor data to an MQTT server running on a raspberry PI
  • Data displayed connected Node-Bloody Dashboard (pictured)

Shopping heel

  • Materials for the cold frame. I used flooring offcuts, since your flooring offcuts will be different I have omitted the expression of this. (Hopefully free)
  • ESP32-CAM - I used the Army Intelligence-mind module because IT has a improved in SD reader and has some spare IO (£7ish)
  • BME280 breakout room. This instructable asssumes you have an I2C version. There aren't decent vacant pins for the SPI version. (£5 ish)
  • 2 x Dallas DS18B20 one-electrify temperature sensors. Waterproof ones are a good idea.
  • Adafruit ADS1115 breakout board. This is an I2C addressable analog input chip required only because of the IO pin shortage (£14ish)
  • Solar array approx 2W. I bought mine with the charge restrainer to ensure they were matched
  • Star charge controller: I used a CN3065 break display panel because IT was cheap and available in England. It also includes USB charging Eastern Samoa an option. Adafruit have fitter options. (£5ish including board)
  • MCP1825S-3302E/AB low-toned cut down out regulator (£5 ish)
  • LiPo assault and battery. Make sure you select one with low voltage cut out. (£10ish)
  • Optional: Raspberry Principal investigator (£30ish)
  • Project box (£5ish)

Code

https://github.com/No-George/Cold_Frame

Video

Supplies

Abuse 1: Minimising Power Consumption

What to do

  1. Usage the ESP32's famed deep eternal rest mode
  2. Get rid of the linear regulator on the ESP32-Cam
  3. Turn off all other devices whilst not busy

How to do it

  1. This is enforced in the code. Stairs. The battery admonisher number will as wel schedule Sir Thomas More sleeping if the battery is low
  2. The picture shows a board with and without the AS1117 regulator. Just remove it, it doesnt affair how. I pulled information technology off with plyers as I dont have a hot melody gun.
  3. Follow the schematic so that the sensors are all battery-powered from one of the IO pins.

Why to do information technology [Please note: This part is wearisome. At that place is no pauperization to read IT unless rattling involved]

This projection is all almost minimising power consumption thus that IT can be motivated by a small assault and battery and star panel.

My rule of thumb for capturing solar power is that on a miserable solar day the panel wil collect around 1/20th of it's rating for 1/3 of the day.

The shoot up-discharge efficiency of a cheap lipo and charge controller followed aside a analogue regulator are unlikely to be better than 50%. That means that a 1 watt panel force out only when be relied upon for around 8mW. For a assault and battery voltage of 4ish, this works prohibited at 2mA average per watt. Using 2W this gives 4mA average.

The ESP32-Cam uses around 180mA when running normally, thither are also periferal components which use power too.

Deep sleep helps a good deal. Aside running cipher for only a few seconds each 60 minutes we crapper care ourselves simply with the deep-sleep power consumption.

The ESP32-Cam board can run at 6mA in abyssal sleep. To improve this the AS1117 governor buns be removed and substituted for a microchip MCP1825S-3302E/AB. This has been selected because IT has the lowest quiet current for a DIP package which I could find at only 120micro amps.

The current consumed by the sensors low pressure enough that it hind end follow powered directly by an IO peg but not so low that it is minor.

Step 2: Wiring

Just in case the wiring from the photo cant be deciphered, I have included a schematic.

There are a couple of things which aren't quite captured.

  • The moisture sensor and dallas sensors are on a connective allowing them to be removed from the box.
  • The little-sd card has an extension cable affianced sol that IT an be accessed without openning the box
  • The FTDI adapter is plugged into a USB chassis climb down
  • The battery is enwrapped in kevlar thusly that it doesnt warm in the sun or gift a fire risk
  • The potential divider uses 1MΩ resistors to minimise the discharge rank
  • The switch has 3 posisions.
    1. Power connected to governor
    2. Not connected
    3. Power connected to regulator AND GPIO_0 connected to ground

Noteworthy features

GPIO_0 will place the board into programming mode if pulled down. There may exist a pin on your FTDI adapter which does this for you but mine did not have this pin.

An additive governor is bypassing the one originally on the board. This reduces the power consumption away approximately 6x.

Table shows which pins are doing what connected the ESP32. The ones highlighted Red River are enclosed in bootstrapping so if adapting to your own visualise this is worth noting.

Many pins are shared with the SD notice which can also cause problems In this code I was unable to init the SD card at the same meter Eastern Samoa the I2C bus. Neither have a Delaware-init command so I reboot the chip shot.

Step 3: Moisture Sensor Wand

The moisture sensing element and one dallas temperature sensor are housed within a scepter which is 3d printed. This is non actually necessary but is cosmetically nice and helps protect the wiring.

Print the attached parts and assemble Eastern Samoa shown. There is an M8 wire secretory organ in the end to tidy it up but it could be glued.

Step 4: Cypher

*/ Download the arduino board definisions for the ESP32 Cam Fit board as esp32 wrover w/vast app https://github.com/Atomic number 102-George/Cold_Frame You only when need to edit the first few lines in the code shown here /*

// Replace with your unique IFTTT Universal resource locator resourcefulness const blacken* server = "maker.ifttt.com"; const char* resource = "site your IFTTT link"; // Replace with your wifi settings const char* ssid = "ssid"; const char* password = "word"; //Mosquitto settings const char* mqtt_server = "mosquitto IP"; //#define mqtt_user "username" //#define mqtt_password "password"

Step 5: IFTTT

IFTTT if this then that is a free service which can live used to do many many things. In that project it is used to record the sensor data to Google sheets.

If you dont want this functionality past comment out this bloodline

//makeIFTTTRequest();

If you make wishing this functionality then create and account @ IFTTT.com.

Create an applet and select the following

This:"Webhooks"

That:"Google Sheets"-->"Minimal brain damage row to spreadsheet"

Settings are in the attached pdf.

To set out your uniquie URL click your applet>webhook icon>support

Step 6: Mosquitto and Node-RED

Mosquitto is my chosen MQTT agent since it is well-off to run on a Raspberry Private investigator. The screengrab shows a dashboard produced in Node-RED. I have this application running on the very Raspberry Operative.

It can be configured to send notifications and do all sorts of other things based on the received data. I used it predominantly to develop the power consumption whilst the other data is there equally a wonder.

If you dont want to use node-red or mosquitto, merely change the code the like so:

Uncomment:

initNTP(); //use if not running mosquitto. This is slower and will result in the first few picutues probably not having a timestamp.

Comment impermissible
//publishMQTT();

//MQTTdateTime();

There are some terrific tutorials on here showing how to set up both mosquitto and knob-Bolshevik on a raspbery pi so I North Korean won't same these steps.

Once you are up and running you john import the flow in the next paginate or from https://github.com/No-George/Cold_Framehttps://github.com/No-George/Cold_Frame/spot/surmoun/flows.json

Tread 7: Node Red JSON Flow

[{"id":"e87153c6.da928","type":"check","label":"Cold Frame","disabled":false,"information":""},{"id":"6fd77b21.48c5e4","typecast":"ui_gauge","z":"e87153c6.da928","name":"","radical":"aa29c57.bdb2038","order":1,"width":"4","height":"4","gtype":"gage","entitle":"Grime ","label":"Degrees","formatting":"{{value}}","Fukien":"-10","max":"35","colours":["#804000","#804000","#804000"],"seg1":"","seg2":"","x":350,"y":500,"wires":[]},{"id":"829ac61a.d15ea8","typecast":"mqtt in","z":"e87153c6.da928","name":"Ground Temp","theme":"Cold_Frame/Soil_Temp","qos":"2","datatype":"auto","broker":"aeb1a0ee.74751","x":100,"y":500,"wires":[["6fd77b21.48c5e4","324b9ea8.35f272"]]},{"id":"632f3168.6778c","type":"ui_gauge","z":"e87153c6.da928","name":"","group":"aa29c57.bdb2038","order":2,"width":"4","height":"4","gtype":"gage","title":"At heart Skeletal frame ","recording label":"degrees","initialise":"{{value}}","min":"-10","max":"40","colors":["#008000","#008000","#008000"],"seg1":"","seg2":"","x":370,"y":560,"wires":[]},{"id":"ca5e95b8.0382e8","type":"mqtt in","z":"e87153c6.da928","make":"Inside Frame Temp","topic":"Cold_Frame/Frame_Temp","qos":"2","datatype":"auto","broker":"aeb1a0ee.74751","x":130,"y":560,"wires":[["632f3168.6778c","324b9ea8.35f272"]]},{"id":"d191749.c4b5088","type":"ui_gauge","z":"e87153c6.da928","name":"","grouping":"aa29c57.bdb2038","order":3,"width":"4","height":"4","gtype":"grass","title":"Outside","label":"Degrees","format":"{{value}}","min":"-10","max":"40","colours":["#0000a0","#0000a0","#0000a0"],"seg1":"","seg2":"","x":360,"y":620,"wires":[]},{"id":"14a838d.197b1c7","eccentric":"mqtt in","z":"e87153c6.da928","name":"Extraneous Temporary","topic":"Cold_Frame/Outside_Temp","qos":"2","datatype":"auto","broker":"aeb1a0ee.74751","x":110,"y":620,"wires":[["d191749.c4b5088","324b9ea8.35f272"]]},{"id":"c319d2.192f963","typewrite":"ui_gauge","z":"e87153c6.da928","name":"","group":"b555b5ad.ed4a88","society":1,"width":"4","height":"4","gtype":"gage","title":"Humidity","judge":"%","format":"{{value}}","min":"0","liquid ecstasy":"100","colors":["#b50000","#2fce17","#2414ed"],"seg1":"","seg2":"","x":300,"y":300,"wires":[]},{"id":"bafc54b4.8b7088","type":"mqtt in","z":"e87153c6.da928","name":"Humidness","topic":"Cold_Frame/Humidity","qos":"2","datatype":"automobile","broker":"aeb1a0ee.74751","x":100,"y":300,"wires":[["c319d2.192f963"]]},{"id":"329ca2f.0d0235e","type":"ui_gauge","z":"e87153c6.da928","name":"","group":"b555b5ad.ed4a88","order":2,"width":"4","height":"4","gtype":"gage","title":"Pressure","judge":"kPa","initialize":"{{value}}","minute":"92.5","max":"105","colours":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":300,"y":360,"wires":[]},{"ID":"3badb66c.b80a1a","type":"mqtt in","z":"e87153c6.da928","mention":"Coerce","topic":"Cold_Frame/Pressure","qos":"2","datatype":"auto","factor":"aeb1a0ee.74751","x":100,"y":360,"wires":[["329ca2f.0d0235e"]]},{"id":"be3904c2.445438","eccentric":"ui_gauge","z":"e87153c6.da928","identify":"","group":"9f29d63c.52cb28","order":1,"width":"4","tallness":"4","gtype":"gage","title":"Battery","label":"V","data format":"{{note value}}","min":"0","max":"4.5","colours":["#f00000","#e6e600","#00b500"],"seg1":"3.5","seg2":"3.8","x":360,"y":680,"wires":[]},{"ID":"d83ce998.558848","case":"mqtt in","z":"e87153c6.da928","name":"Battery Voltage","topic":"Cold_Frame/Battery_Voltage","qos":"2","datatype":"machine","broker":"aeb1a0ee.74751","x":120,"y":680,"wires":[["be3904c2.445438","58a1c1f3.f68f1"]]},{"id":"a139ce7f.c9775","type":"ui_gauge","z":"e87153c6.da928","name":"","grouping":"b555b5ad.ed4a88","order":3,"width":"4","height":"3","gtype":"undulate","title":"Wet Reading","label":"%","format":"{{value}}","min":"0","soap":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":610,"y":200,"wires":[]},{"id":"184a678d.670738","eccentric":"mqtt in","z":"e87153c6.da928","name":"Wet Indication","topic":"Cold_Frame/Moisture_Reading","qos":"2","datatype":"auto","broker":"aeb1a0ee.74751","x":120,"y":200,"wires":[["bdb6dc1c.47c71","6eb49340.466e8c"]]},{"id":"479d291.4c052d8","typecast":"mqtt in","z":"e87153c6.da928","name":"Star Electromotive force","issue":"Cold_Frame/Solar_Voltage","qos":"2","datatype":"auto","broker":"aeb1a0ee.74751","x":110,"y":740,"wires":[["788454c1.78d3dc","58a1c1f3.f68f1"]]},{"ID":"a0fce587.cc2bb8","typewrite":"mqtt out","z":"e87153c6.da928","name":"dateTime","theme":"dateTime","qos":"2","retain":"correct","broker":"aeb1a0ee.74751","x":840,"y":720,"wires":[]},{"Idaho":"16a4ecdb.c0ddd3","type":"ui_text","z":"e87153c6.da928","radical":"8de08eff.7402e","order":5,"width":0,"height":0,"name":"","label":"Current time","initialise":"{{MSG.consignmen}}","layout":"row-spread","x":860,"y":820,"wires":[]},{"Idaho":"733f83c1.553e5c","type":"inject","z":"e87153c6.da928","name":"","issue":"","payload":"","payloadType":"see","ingeminate":"1","crontab":"","formerly":true,"onceDelay":0.1,"x":570,"y":760,"wires":[["16a4ecdb.c0ddd3","a0fce587.cc2bb8"]]},{"id":"324b9ea8.35f272","type":"ui_chart","z":"e87153c6.da928","name":"","chemical group":"aa29c57.bdb2038","order":4,"width":0,"superlative":0,"label":"","chartType":"line","legend":"false","xformat":"DD HH:mm","interpolate":"collinear","nodata":"","dot":true,"ymin":"0","ymax":"","removeOlder":"7","removeOlderPoints":"","removeOlderUnit":"86400","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#804000","#008000","#0000a0","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":fictitious,"outputs":1,"x":350,"y":440,"wires":[[]]},{"id":"bdb6dc1c.47c71","type":"ui_chart","z":"e87153c6.da928","mention":"","grouping":"b555b5ad.ed4a88","order":4,"width":0,"superlative":0,"label":"Thirst","chartType":"line","legend":"false","xformat":"HH:millimetre:SS","interpolate":"linear","nodata":"","dot":true,"ymin":"","ymax":"","removeOlder":"7","removeOlderPoints":"","removeOlderUnit":"86400","cutout":0,"useOneColor":false,"useUTC":trumped-up,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":430,"y":80,"wires":[[]]},{"Idaho":"788454c1.78d3dc","type":"ui_gauge","z":"e87153c6.da928","name":"","group":"9f29d63c.52cb28","arrange":2,"breadth":"4","height":"4","gtype":"weed","title":"Solar","label":"V","format":"{{value}}","min":"0","goop":"6","colors":["#f00000","#e6e600","#00b500"],"seg1":"3.5","seg2":"3.8","x":350,"y":740,"wires":[]},{"id":"6eb49340.466e8c","type":"range","z":"e87153c6.da928","minin":"5500","maxin":"16000","minout":"0","maxout":"100","action":"clamp","round":genuine,"property":"payload","name":"","x":270,"y":200,"wires":[["8c381f31.8ce41"]]},{"id":"c12a1e54.0cf46","type":"mqtt out","z":"e87153c6.da928","key":"","topic":"Cold_Frame/Mapped_Moisture","qos":"2","keep back":"true","broker":"aeb1a0ee.74751","x":650,"y":260,"wires":[]},{"id":"8c381f31.8ce41","eccentric":"function","z":"e87153c6.da928","name":"invert","func":"msg.payload = 100 - msg.consignmen;\nreturn MSG;","outputs":1,"noerr":0,"x":430,"y":200,"wires":[["a139ce7f.c9775","c12a1e54.0cf46"]]},{"id":"58a1c1f3.f68f1","type":"ui_chart","z":"e87153c6.da928","name":"","group":"9f29d63c.52cb28","order":3,"width":0,"height":0,"mark down":"","chartType":"line","legend":"false","xformat":"dd HH:mm","interpolate":"linear","nodata":"","dot":faithful,"ymin":"3","ymax":"","removeOlder":"7","removeOlderPoints":"","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#804000","#ffff00","#0000a0","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":350,"y":800,"wires":[[]]},{"id":"aa29c57.bdb2038","typecast":"ui_group","z":"","name":"Temperature","tab":"9fe8ce8c.cb014","order":1,"disp":true,"breadth":"12","collapse":false},{"Idaho":"aeb1a0ee.74751","typecast":"mqtt-broker","z":"","name":"Mosquitto","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":straight,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"b555b5ad.ed4a88","type":"ui_group","z":"","mention":"Environment","tab":"9fe8ce8c.cb014","order":2,"disp":accurate,"breadth":"12","collapse":false},{"id":"9f29d63c.52cb28","type":"ui_group","z":"","name":"Power","tab":"9fe8ce8c.cb014","ordination":3,"disp":true,"width":"12","collapse":mistaken},{"id":"8de08eff.7402e","type":"ui_group","z":"","name":"Stats","tab":"9dba662d.491c18","edict":2,"disp":true,"width":"12","collapse":false},{"Idaho":"9fe8ce8c.cb014","type":"ui_tab","z":"","name":"Algid Frame","icon":"local_florist","order":1,"disabled":sour,"hidden":false},{"id":"9dba662d.491c18","type":"ui_tab","z":"","name":"PI","icon":"fa-power-off","set up":3,"handicapped":false,"out of sight":false}]

Step 8: You're Through

Here is a time-lapse of some borage growing finished a couple of weeks.

Be the First to Share

Recommendations

  • Anything Goes Contest 2022

    Anything Goes Contest 2022