Crested Gecko Tank Hardware Design Help

Hello all I am a little new to this so I am looking for opinions or idea help on my design. Little background, I have a crested geco and I am automatiing his tank with temp and humidity, water pump and I am adding a heat lamp control and red and green leds that light up when the humidity is too high or when it is a normal range. I would like to know if I am on the right track. So far, I have 2 sensors connected to a pico which sends data via usb to the pi and node red visualizes the data currently. There are many designs out there but I would like some guidence. Any help would be appreciated. Thank you in advance.

Proof or we don't believe you :wink:

Here is a pic of my 7y old boy "Patrick"

We used to have heat lamps and UV light etc but his Viv remains fairly consistent between 17~20°c. We just spray mist every day to keep it relatively humid (not so much as to give him sores on his feet, but enough for him to drink from the leaves etc)

Where are you based - somewhere super cold/hot/arid?

As for your design, I'd probably just go with an ESP8266 D1 MINI (super cheap) to collect temp/hum & drive relays. I'd program it to be self sufficient (in the event of WiFi outage it would continue to do it's job). Then I'd have it send data via MQTT to node-red and have it accept setpoint & control messages via MQTT from node-red.

If you are not up to speed with C programming (for the ESP) there is ESPeasy. It is very easy to setup with sensors and relays and has a rules engine that you could setup to operate standalone & accept setpoints/commands via MQTT

3 Likes

A few observations...
I would consider using the ESP32-S2-Mini (even cheaper than the Wemos D1 Mini, with loads more memory and pins). It can be programmed with Micro-Python, ESPeasy, ESPhome or Tasmota.
esp32-s2-mini
It is a lot cheaper than the Pico-W (and is available) and supports I2C, WiFi and MQTT.
I would consider replacing the DHT22 with a BME280 T/H/P sensor driven via I2C. At the same time you could think about adding an SSD1306 OLED panel (driven by I2C) to show 'readings' locally.
ssd1306
Not sure what the sensor is at the bottom of tank. You can get DS18B20 in a metal casing.
dsb18b20_metal
Finally, you show two relays in your diagram. You can purchase relays in blocks of two or four or more. These have opto-couplers on the inputs so will not load the GPIO output pins.

I think the serial link could be troublesome. Why not use MQTT to send your readings to a Pi locally and create a really nice dashboard? You could even send the readings to a remote MQTT broker and a virtual machine running Node-RED and just view things via a browser.

I'm sure you will get lots of "input" from members of the forum.

One additional comment I would make, consider whether if there were a failure of some sort (sensor failure for example, or bug) that could cause the temperature to be dangerously high for the gecko then possibly you should have, in addition, a completely independent thermostat that cuts off the power if it gets too hot.

4 Likes

And a way to send a message like email, text to phone or fashing light and sound so you (or someone else) will know there is a problem.

That can be problem with a disaster protection mechanism. That needs to be as simple as possible so that it does not suffer from similar problems. For something like this I would go for a simple thermostat in series with the heater, set to a value just above anything that would normally be expected.
The main control system should have as many built in checks as possible, such as making sure sensor values come in regularly and are within sensible limits, and sending alarm messages when anything seems not right.

I am soaking in all of the replies snd I appreciate all of them. I am in ny and I in the winter I cannot get the temp past 68f but I am redoing the enclosure with stuff to make it a bit warmer. Douglas is 8 years old now and very healthy.

The reason I am using pico and pis is because I have 100 picos just sitting here doing nothing so I want to put them to use. I am going through the rest of the comments ill share all my code next. Thank you again

here is my current flow. with the help of @E1cid, I was able to get my historical data working. No I am moving on to the rest. I am including this all in case someone is just learning like me.

[
    {
        "id": "ac60d957b124ef95",
        "type": "tab",
        "label": "Flow 3",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "1b8d20ef646f7cb1",
        "type": "debug",
        "z": "ac60d957b124ef95",
        "name": "debug 2480",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 450,
        "y": 240,
        "wires": []
    },
    {
        "id": "605ffd7b41ce670f",
        "type": "function",
        "z": "ac60d957b124ef95",
        "name": "function 1",
        "func": "// Set the payload for the dashboard\nmsg.payload = {\n   'DS18B20 Temperature':  msg.payload.temperature_ds18b20 ,\n   'DHT11 Temperature': msg.payload.temperature_dht11,\n   'DHT11 Humidity': msg.payload.humidity_dht11\n};\n\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 600,
        "y": 340,
        "wires": [
            [
                "1aa37e9c314c7eb9",
                "141cc79c43fb618a",
                "bc4d48857a5a183d",
                "95d0e3b97b3b42a0",
                "1b8d20ef646f7cb1"
            ]
        ]
    },
    {
        "id": "802cd4bd9660557c",
        "type": "inject",
        "z": "ac60d957b124ef95",
        "d": true,
        "name": "pico input js object",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "{\"temperature_ds18b20\": 66.9875, \"sensor_type\": \"sensor_data\", \"temperature_dht11\": 68.0, \"humidity_dht11\": 48, \"timestamp\": \"2021-01-04 02:06:26\"}",
        "payloadType": "json",
        "x": 230,
        "y": 300,
        "wires": [
            [
                "605ffd7b41ce670f"
            ]
        ]
    },
    {
        "id": "77825a88417f053a",
        "type": "json",
        "z": "ac60d957b124ef95",
        "name": "",
        "property": "payload",
        "action": "",
        "pretty": false,
        "x": 490,
        "y": 400,
        "wires": [
            [
                "605ffd7b41ce670f"
            ]
        ]
    },
    {
        "id": "1aa37e9c314c7eb9",
        "type": "ui_gauge",
        "z": "ac60d957b124ef95",
        "name": "",
        "group": "9bd98b13bb843a80",
        "order": 5,
        "width": 0,
        "height": 0,
        "gtype": "gage",
        "title": "DS18B20 Temperature Bottom of Tank",
        "label": "Fahrenheit",
        "format": "{{msg.payload[\"DS18B20 Temperature\"] | number : 2}} °F",
        "min": "50",
        "max": "100",
        "colors": [
            "#00b500",
            "#00ff00",
            "#ca3838"
        ],
        "seg1": "77",
        "seg2": "82",
        "diff": false,
        "className": "",
        "x": 890,
        "y": 240,
        "wires": []
    },
    {
        "id": "141cc79c43fb618a",
        "type": "ui_gauge",
        "z": "ac60d957b124ef95",
        "name": "",
        "group": "9bd98b13bb843a80",
        "order": 1,
        "width": 0,
        "height": 0,
        "gtype": "gage",
        "title": "DHT11 Temperature",
        "label": "Fahrenheit",
        "format": "{{msg.payload[\"DHT11 Temperature\"] | number : 0}} °F",
        "min": "50",
        "max": "100",
        "colors": [
            "#00ff00",
            "#00ff00",
            "#ca3838"
        ],
        "seg1": "77",
        "seg2": "82",
        "diff": false,
        "className": "",
        "x": 860,
        "y": 320,
        "wires": []
    },
    {
        "id": "bc4d48857a5a183d",
        "type": "ui_gauge",
        "z": "ac60d957b124ef95",
        "name": "",
        "group": "9bd98b13bb843a80",
        "order": 3,
        "width": 0,
        "height": 0,
        "gtype": "gage",
        "title": "DHT11 Humidity",
        "label": "Percent",
        "format": "{{msg.payload[\"DHT11 Humidity\"] | number   : 0}} %",
        "min": "30",
        "max": "100",
        "colors": [
            "#ffff00",
            "#00ff00",
            "#ca3838"
        ],
        "seg1": "40",
        "seg2": "81",
        "diff": false,
        "className": "",
        "x": 860,
        "y": 280,
        "wires": []
    },
    {
        "id": "95d0e3b97b3b42a0",
        "type": "split",
        "z": "ac60d957b124ef95",
        "name": "",
        "splt": "\\n",
        "spltType": "str",
        "arraySplt": 1,
        "arraySpltType": "len",
        "stream": false,
        "addname": "topic",
        "x": 710,
        "y": 440,
        "wires": [
            [
                "5a3f24530de6c96d"
            ]
        ]
    },
    {
        "id": "a1a0cbe8812e114a",
        "type": "inject",
        "z": "ac60d957b124ef95",
        "d": true,
        "name": "pico input json string",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "{\"temperature_ds18b20\": 66.9875, \"sensor_type\": \"sensor_data\", \"temperature_dht11\": 68.0, \"humidity_dht11\": 48, \"timestamp\": \"2021-01-04 02:06:26\"}",
        "payloadType": "str",
        "x": 210,
        "y": 360,
        "wires": [
            [
                "77825a88417f053a"
            ]
        ]
    },
    {
        "id": "5a3f24530de6c96d",
        "type": "ui_chart",
        "z": "ac60d957b124ef95",
        "name": "",
        "group": "0252eb57a3daabae",
        "order": 5,
        "width": 0,
        "height": 0,
        "label": "historical Data",
        "chartType": "line",
        "legend": "true",
        "xformat": "auto",
        "interpolate": "linear",
        "nodata": "",
        "dot": true,
        "ymin": "",
        "ymax": "",
        "removeOlder": "5",
        "removeOlderPoints": "",
        "removeOlderUnit": "60",
        "cutout": 0,
        "useOneColor": false,
        "useUTC": false,
        "colors": [
            "#1f77b4",
            "#aec7e8",
            "#ff7f0e",
            "#2ca02c",
            "#98df8a",
            "#d62728",
            "#ff9896",
            "#9467bd",
            "#c5b0d5"
        ],
        "outputs": 1,
        "useDifferentColor": false,
        "className": "",
        "x": 880,
        "y": 440,
        "wires": [
            [
                "d982a6320b91f6fc"
            ]
        ]
    },
    {
        "id": "d982a6320b91f6fc",
        "type": "debug",
        "z": "ac60d957b124ef95",
        "name": "chart data",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1180,
        "y": 600,
        "wires": []
    },
    {
        "id": "5fafe779dd4384b9",
        "type": "serial in",
        "z": "ac60d957b124ef95",
        "name": "PicoUSB",
        "serial": "d316f3575b5a384a",
        "x": 360,
        "y": 500,
        "wires": [
            [
                "77825a88417f053a"
            ]
        ]
    },
    {
        "id": "9bd98b13bb843a80",
        "type": "ui_group",
        "name": "Chart Data",
        "tab": "7536e3b891e127c3",
        "order": 2,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "0252eb57a3daabae",
        "type": "ui_group",
        "name": "Default",
        "tab": "7536e3b891e127c3",
        "order": 2,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "d316f3575b5a384a",
        "type": "serial-port",
        "name": "PicoUSBPi",
        "serialport": "/dev/ttyACM0",
        "serialbaud": "9600",
        "databits": "8",
        "parity": "none",
        "stopbits": "1",
        "waitfor": "",
        "dtr": "none",
        "rts": "none",
        "cts": "none",
        "dsr": "none",
        "newline": "\\n",
        "bin": "false",
        "out": "char",
        "addchar": "",
        "responsetimeout": "10000"
    },
    {
        "id": "7536e3b891e127c3",
        "type": "ui_tab",
        "name": "Dougie's Tank Metrics",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    }
]
1 Like

Thanks for sharing. Turns out the forum is full of gecko fans! :grinning:

+1 for the suggestion of replacing your DHT22 with a better temperature and humidity sensor.

1 Like

Wooooo - you must have cornered the market. Maybe the reason why nobody else can find any (ha, ha).

Surely there's never been a shortage of Picos?

Well there was a shortage of Pico-Ws here in the UK about a year ago. Like gold dust to get hold of ONE.

i have had them for a bit not pico W - just plain ole pico

Ha, ha - that explains it - thanks.

If you need some let me know I do not mind shipping them USPS in US. Just pay for the shipping. I appreciate the help.

Being serious for a moment. What you are (planning on) doing sounds like a fun project.
I think you will be surprised where the project takes you.
I bet Douglas is a great guy to hang-out with??

He is awesome. Got him for a breeder for my son about 8 years ago. i figured why not automate :smile:
But just getting started with node red so yeah I am hoping it takes me pretty far and if I can share what I learned so someone can learn...this is what it is all about.

1 Like

I have a friend in Boston, US - that I met on the Node-RED forum many years ago. We have shared many projects between us and exchanged 100s if not 1000s of emails.

Thats awesome . I have another project which I am incorporating node red into. I built a kitty treat dispensor for a few stray cats that I feed and hang out in the woods behind me. I am want to automate with facial reconginiton.I am going to share that one also when I am done with Douglas.

3 Likes

Facial Recognition for a cat - that will be awesome if you can make it work!!!.
If it works you could do a 'table-lookup' to get its name and then send a message via Alexa saying...
"Hello <cat's name> nice to see you again."

1 Like