Close
0%
0%

YAETM

Yet Another Esp8266 Temp Monitor... (see what I did there)

Similar projects worth following
My first foray in to playing with the ESP8266-01 module.
So yeah... IoT right??
Using node-mcu firmware on an ESP8266-01 to read temp and humidity from a DHT11/22 and send the data to thingSpeak. A HC-05 just thrown in because I like to do things like that.

Really I just wanted to play with these things. And what is easier than sensing and recording temperature? So that's what I did. I had a HC-05 BT module setting around so I decided to use that for communication as it will work with 3.3v just fine and I would not have to keep hooking up my USB / TTL converter up to modify the lua files.

Please if you have any comments / suggestions on the circut or code feel free to lemme know.

  • 1 × ESP8266
  • 1 × DHT11 Meh.... They work
  • 1 × HC-05 BT Module I got tired of having to unplug my usb devices to plug in a level converter.
  • 1 × 100uf Cap
  • 1 × 10k 1/4 watt resisor Pull Up for DHT11/22

View all 9 components

  • I think I'm good...

    xnakxx03/22/2015 at 20:04 0 comments

    It has been stable for a few days now. I think it's time to etch out a more permanent board for it and have it report to my Rpi instead of ThingSpeak. It was a simple but fun project and I learned quite about about these tiny little wonders. Next up I need to control my sprinkler pump / valve... I have a pretty good idea how I'm gonna crack that one!

  • Went with a DHT22

    xnakxx03/19/2015 at 04:38 0 comments

    Got a DHT22 connected. Same connections but different code. See the github link.

    Accuracy and reliability seems much better.

  • Initial setup and breadboard

    xnakxx03/18/2015 at 18:41 0 comments

    Initial wiring was pretty much the same thing you would see anywhere. I could not find my 3.3v ttl converter so I used a Red LED and a 10k resistor on the RX of the ESP8266 (TX from usb-ttl converter) to try and stay in the 3.3v ballpark. I was able to flash with node-mcu (boot the module with GPOI0 LOW) . All went well and now it's time to learn what this whole .lua script thing is.

    Any way here are some of the resources I used.

View all 3 project logs

  • 1
    Step 1

    Get the parts... Some in the parts list are for the different iterations of the project.

    Basically you need a good 3.3v regulator, the ESP8266 and a DHT11/22.

    I'm sure you have all the others just laying around.

  • 2
    Step 2

    I included a crude schematic in the gallery but here is the basic wiring.

    I'm assuming you already have the ESP flashed with the Node-Mcu firmware and your HC-05 already configured to 9600 8N1.

    1. Give 3.3v to both the Vcc and CH_PD pins.
    2. Ground the GND pin of course.
    3. Paying attention to polarity use the 1000uf cap on the 3.3v input and ground.
    4. GPOI0 to the DATA pin on the DTH11/22 with a 10k pullup to 3.3v.
    5. DTH11/22 power and ground as you would guess.
    6. Power the HC-05 as normal and connect up the TX and RX properly to the ESP
  • 3
    Step 3

    Software... err Code stuffs

    The GitHub link on the project page will get you the three scripts I am using. It really could all be in the init.lua. but I like the separation. The compile steps are really optional but you save a lot of heap by doing so. If you decide not to compile or your version of the node-mcu firmware does not include "compile" make sure you modify init.lua to reference 'server.lua' instead of 'server.lc'

    1. Upload either the dht11 or dht22 script.
    2. Modify server.lua for the series of sensor you are using. (I tried to comment it)
    3. While still in server.lua replace 'XXXXXXXXXXXXXXX' with your ThingSpeak API key.
    4. Upload the server.lua script.
    5. node.compile("dhtxx.lua")
    6. node.compile("server.lua")
    7. optionally file.remove("server.lua") and file.remove("dhtxx.lua")
    8. Upload the init.lua and node.restart()

    On your console you should see one or two periods then the IP Address the module was assigned. From there on start watching your ThingSpeak feed.

    ** again the code in the lua scripts was grabbed from all over the place. If I ended up using anyones super secret ideas I apologize. I can't recall where I collected all the snippets... 2am and coffee fueled as I was...

View all 3 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates