Building a Wireless Temperature Sensor with ESP8266 & Arduino

  Рет қаралды 90,431

Andrew Godwin

Andrew Godwin

Күн бұрын

For my first video, I walk through building a wireless temperature sensor based on the ESP8266 chip - the hardware, some theory, and the code.
The code used in this clip is freely available here: github.com/and...
This is my first try at getting something like this together into a video, so constructive comments are appreciated!

Пікірлер: 72
@vonrollveeg
@vonrollveeg 6 жыл бұрын
I'm 71. It does my soul good to see there are still bright creative people in the world. Good work. I'm going to play around with this.
@bitschips
@bitschips 4 жыл бұрын
Go for it and build it!!
@ilyushin78
@ilyushin78 3 жыл бұрын
Are you alive?
@peterharris7682
@peterharris7682 4 жыл бұрын
A very useful video Andrew. I used it as the basis for a remote temperature sensor but with a few changes Firstly I needed an external antenna and couldn't find a suitable 8266 with a uFL antenna socket so I used an ESP32 which worked fine Secondly I used a DS18B20 temperature sensor instead of your thermistor which was easier as it didn't need complex calibration and calculations Thirdly, I needed to extend the battery life. I found even deep sleep mode wasn't good enough as the board is still drawing 6.5mA when asleep. I therefore ended up using a TPL5110 Nano Power Timer (the Sparkfun version) which works a treat and only draws 35nA of power when sleeping. It was dead easy to implement and since the main board effectively does a cold boot each time it is woken up I don't get the occasional lock-ups I got using the ESP32 deep sleep mode. Once again thank you Peter
@TysonClugg
@TysonClugg 7 жыл бұрын
Great stuff Andrew! I have one suggestion. Instead of placing the voltage divider between Vcc and ground, place it between an available output pin and ground. In this way, you can switch that part of the circuit off to both save power, and prevent heating of the thermister which will skew your readings. Activate the output pin, wait a short moment for the circuit to quiesce, take the voltage reading, and deactivate the output pin again.
@AndrewGodwin
@AndrewGodwin 7 жыл бұрын
Yes, I did that in a previous revision, I'm not sure why I didn't here. Thanks for the tip!
@TeamRiceUSA
@TeamRiceUSA 7 жыл бұрын
Tyson Clugg nice commits on Mr. Godwin wifi temp
@adityatyagi1869
@adityatyagi1869 6 жыл бұрын
Excellent video, Andrew. My embedded systems project team used your video to learn how to wire our temperature sensor to our ESP8266. Keep up the good work! Strong presentation skills with intuitive explanations and top-notch video editing. Consider making more videos.
@DavidJJJ
@DavidJJJ 4 жыл бұрын
Great project, I’ve done the same thing except I’m using an esp32 and sending the data directly to MySQL (and then reading it with grafana from there). I have 5 sensors around the house and I use the MAC address to distinguish between the sensors in the database. Works quite well. I’m also doing the deep sleep thing and have a 5 minute timeout between temperature reads. I’m also using an stm based temp/humidity sensor.
@sadistfcfm
@sadistfcfm 6 жыл бұрын
Wow, i knew i know you before... what a coincidence being working on both ESP8266 and django channels! Great work man.
@RaiyanKamal
@RaiyanKamal 4 жыл бұрын
Hi Andrew thanks for this tutorial. I often see ESP32 but this is the first time I heard of ESP8266. If I may, I'd like to request a video review comparing these two components.
@Gerry2xs
@Gerry2xs 2 жыл бұрын
Thanks Andrew. Like your video, nicely explained.
@SaurabhRastogiRC
@SaurabhRastogiRC 7 жыл бұрын
Very good video ...... Andrew. Looking for more from you.
@bitschips
@bitschips 4 жыл бұрын
Nice video, very good very well explained and interesting! Thanks for time.
@0nedon
@0nedon Жыл бұрын
well done video and well explained, really helpful to help me decide on my next project, thank you Andrew. - Would i be able to use the ESP32 in place of the ESP8266?
@steve42lawson
@steve42lawson 6 жыл бұрын
0:17 "Only a _couple_ of the steps? What about the rest of the steps?!? Are you going to leave, a quivering mess, while you cackle maniacally over my smallness?!?" Sorry, just messing with you. Great video! It gave me all I needed to proceed with my own project. I've always wondered how you pass data using POST and GET. The documentation I found on this lacked examples, making the whole thing rather vague, for me. Your example cleared that all up, so thanks! One *Note* Though: At 13:13, why would you have the LED glow for the 10 second idle period, and extinguished for the short data acquisition period? Wouldn't you want that the other way around, so there's not such a load on the battery?
@jseneque
@jseneque 7 жыл бұрын
Awesome first video!!! Keep it going
@Taylor-zq3qr
@Taylor-zq3qr 5 жыл бұрын
Andrew. Love the video! Can you update your description to include a shopping list and make a waterproof/resistant sensor?
@mikeperry2561
@mikeperry2561 2 жыл бұрын
Very well explained!
@dbrgn
@dbrgn 7 жыл бұрын
Nice video. You can also get an even simpler circuit by using a DS18B20 one-wire temperature sensor.
@sausage5849
@sausage5849 7 жыл бұрын
Good job with this video. Great explanations too. Subbed!
@nothingtoseehere5760
@nothingtoseehere5760 2 жыл бұрын
Just brilliant! I wonder if you have tried putting it in a chest freezer and if it still connects? I am worried about the freezer insulation acting as a Faraday cage but don't have anything that I can control/test with...
@dlseverns
@dlseverns 6 жыл бұрын
Really well done and thorough. Thank you!
@ryandoyle9674
@ryandoyle9674 3 жыл бұрын
Super helpful, thanks Andrew! Your video was comprehensively informative and clear ... as a newbie in this space, I really appreciate the completeness of your explanations. I was wondering about expanding this project to also track humidity and light for a fuller picture of the atmosphere. Any thoughts on how I might accomplish this? How might I add a photoresistor to this circuit? Could I swap the thermistor for a DHT11 and track both temperature and humidity with the same component? Am I thinking along the right track?
@athief
@athief 6 жыл бұрын
battery life given a full charge would have been very useful. How long does it last with that setup? 3 hours? 3 days?? 3 weeks???
@1_HighDuke
@1_HighDuke 5 жыл бұрын
It's probably a very power-hungry setup. Measuring and transmitting every 10 seconds will eat up the battery in no-time. If you want longer battery life, first measure & transmit less often. And second, implement deep sleep so that you reduce consumption between polls.
6 жыл бұрын
Hi, can you put the parts list in the description. I’d like to try to build the same
@MatthewPotter-m4k
@MatthewPotter-m4k 5 ай бұрын
pls is there a list of parts to get im new and kinda lost
@MrHandsomejackuk
@MrHandsomejackuk 7 жыл бұрын
excellent project maybe worth lookig at a sonoff th10 as this has all the hardware built in it is mains powered but could be battery powered too
@phil4000n
@phil4000n 2 жыл бұрын
very interesting. Couple of questions: never heard before of influxdb and grafana, do you mean to heavy to run the ESP8266 as a server? Do you have or now a good tuto, but sounds steep learning curve. I'm not getting if you found an advantage on using Adafruit Huzzah Feather ESP8266 over nodeMCUv2 Amica, can you comment. Excellent that you show the physical soldering, too rare on YTUBE.
@ExopMan
@ExopMan 3 жыл бұрын
How would you update this build now using more modern/smaller components? Thank you!
@rolocox100
@rolocox100 7 жыл бұрын
fantastic clear talk and video. would it be possible link a microwave radar sensor such as the RCWL-0516 and then output this via the ESP8266 to make a low cost remote motion sensor.
@hackinblack7102
@hackinblack7102 6 жыл бұрын
very good video,very clear...but i cant help thinking it would be easier, and more accurate, if you used a 'smarter' sensor; either a linear output thermistor, or a temp to voltage converter IC; then you wouldn't need to measure anything (your temperature measurement AND you resistance measurement both introduce errors) most sensors give 10mV per degreeC and upto +/_1% accuracy. you could probably even use a normal IN4148 diode as a sensor; almost any PN junction shows a mV change with temperature.
@leglessinoz
@leglessinoz 6 жыл бұрын
Hack In Black or one could use an LMT01 digital sensor.
@kollaattori2494
@kollaattori2494 3 жыл бұрын
Am I missing something? To my knowledge there is NO analog pin (A0) in ESP8266.
@aquilax
@aquilax 7 жыл бұрын
Nice and informative. I wonder how easy it will be to hijack the connection with second WiFi with the same SSID?
@Brickkzz
@Brickkzz 4 жыл бұрын
great video! subscribed!
@gouravdabade
@gouravdabade 4 жыл бұрын
what is the range ?
@felixlaurencelle7016
@felixlaurencelle7016 6 жыл бұрын
I loved that video! I was going to start that project but i have 0 knowledge about the software part. Do I need to install InfluxDB and Grafana on one of my computer? And do i name the "host" that computer IP Adress? Do you suggess an video to learn that process better? Thanks a lot in advance!
@Dreathan
@Dreathan 6 жыл бұрын
I got same questions... Did you receive an answer?
@mohammedzaman1937
@mohammedzaman1937 7 жыл бұрын
awesome! is it possible to control a led/relay remotely based on a set temperature on this one.
@3vedinishit
@3vedinishit 4 жыл бұрын
Hi Andrew.. is it possible to make contactless temperature sensor(like temp. gun) using ESP8266 ?
@manojrjadhao
@manojrjadhao 7 жыл бұрын
Hi, Andrew, it is really nice introduction of wireless sensor. I am also working on same board. I have a question, is there a way where we can make the device use very less power from battery and let it lasts for more than 6 months? I am thinking making its size and cheaper.
@AndrewGodwin
@AndrewGodwin 7 жыл бұрын
The ESP8266 board has a deep sleep mode where you can save battery - you can make it sleep for intervals of up to 70 minutes, and then wake up and send a measurement. You could probably stretch it out to a few months of battery if you made the recording interval 5 minutes or so and used a couple of AAs.
@manojrjadhao
@manojrjadhao 7 жыл бұрын
Hi, thanks for quick reply. Can you tell me, how much power will be required for a day if I keep the interval of 5 minutes? I am thinking of using this battery: www.amazon.in/Robu-Samsung-2600mAh-18650-Lithium/dp/B0765SL77F?tag=googinhydr18418-21&tag=googinkenshoo-21&ascsubtag=f1cf1053-27c4-4cda-8c82-682d058ea547
@Ed19601
@Ed19601 6 жыл бұрын
Manoj Jadhav when you Google esp8266 deep sleep you will find the current use in deep sleep as well as the current use while making WiFi contact. Add to that the current flowing through the ntc. That gives you the amount of current over 5 minutes There are 12*24 periods of 5 min in a day
@Electromaniaworld
@Electromaniaworld 7 жыл бұрын
can you show to to setup plotting of that graps ?
@mhamzahkhan
@mhamzahkhan 6 жыл бұрын
Kind of off topic question... what stand are you using for your monitors? I am pretty sure I have the same desk as yours (ikea galant?) and I'm looking for a better monitor stand that I can use.
@KM6VV
@KM6VV 7 жыл бұрын
Thanks for publishing! Where can I find ESP_thermometer? I've downloaded and looked in arduino-examples-master per your link below, but haven't been able to find it.
@sodapop111
@sodapop111 7 жыл бұрын
can you specify the resistors and the type of thermistor you used? (basically the parts used in this video because it is vaguely said)
@AndrewGodwin
@AndrewGodwin 7 жыл бұрын
The thermistor is a 4K7 NTC type. The resistors are, I believe, 2kOhm on one side of the divider and 4.7kOhm on the other, standard carbon type.
@ytbTheogr
@ytbTheogr 7 жыл бұрын
That's a very good project idea! Can you please tell me which version of influxdb did you use? I'm trying to write data to influx via http with arduino and i get "Method Not Allowed". Thanks
@whatmust8146
@whatmust8146 Жыл бұрын
Thermistor is the way to go. You can get one for free from old battery pack particularly the Ryobi one. I have done a ton and never need to buy any thermistor. I build many thermistor base Arduino one with multiple reading of temp. I am doing IOT now with every thing if possible over wifi and web base. Reduce reuse recycle is way harder than to buy anything everything brand new. People choose the latter because the former is way harder and more work to do. I always choose the 3 R's because that is me. Reduce Reuse Recycle. Everyone needs to do their part by doing the R's!!!!!!
@mikepickell8792
@mikepickell8792 6 жыл бұрын
Is there a bluetooth type?
@servant74
@servant74 6 жыл бұрын
Question: Could I put say, 3 thermistors on one of these devices? I need each away at 1 then 2 and 3 meters from the ESP8266?
@deDutchRooster
@deDutchRooster 6 жыл бұрын
Parts list?
@jpthedelawarebeeman6239
@jpthedelawarebeeman6239 5 жыл бұрын
How do I get Fahrenheit and not Celsius ?
@FoX84tac022
@FoX84tac022 5 жыл бұрын
Google how to convert Kelvin to Fahrenheit?
@jpthedelawarebeeman6239
@jpthedelawarebeeman6239 5 жыл бұрын
Thanks I figured it out already !
@etiennemp7100
@etiennemp7100 5 жыл бұрын
Hi ! What's the name of the graph interface that you use ?
@paulwalker5294
@paulwalker5294 5 жыл бұрын
That was Grafana
@dand8282
@dand8282 7 жыл бұрын
does that send the password in the url in clear text? https is a pain w/8266...
@AndrewGodwin
@AndrewGodwin 7 жыл бұрын
It does - as you say, HTTPS is a pain. In my case it's only going over a local network, thankfully.
@yvindmathiassen7617
@yvindmathiassen7617 7 жыл бұрын
are there coming more videos like this? I liked it very much, I subbed you just in case :)
@AndrewGodwin
@AndrewGodwin 7 жыл бұрын
Hopefully! I have plans for the next one, need to find time to film it.
@VoeViking
@VoeViking 7 жыл бұрын
Bit vague in the important stuff. If you really want to make a good video start at the beginning, first the earth cooled than the dinosaurs came, after that I installed this server in this manner using this and that...
@Varunsharma014
@Varunsharma014 5 жыл бұрын
Andrew, I am designing a product on which I need someone with knowledge of electronics to help. Can you help me out? I can pay you fee for your services. Thank you.
@thehomeschooldev6126
@thehomeschooldev6126 4 жыл бұрын
#Thehomeschooldev #IoTEngineering
@MrBobWareham
@MrBobWareham 7 жыл бұрын
I was most interested in the project until you used the adafuit hazzah being a very expensive product like all adafruit products so will not be following your video thanks!!
@Ed19601
@Ed19601 6 жыл бұрын
Bob Wareham get a wemos D1 mini
@bhekintanzi6761
@bhekintanzi6761 5 жыл бұрын
Parts list?
Forget WiFi! This Wireless Method is WAY Better? (ESP-NOW)
12:14
GreatScott!
Рет қаралды 786 М.
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
Solar Weather Station [WiFi, MQTT, Smart Home, ESP8266]
11:06
Measuring Temperature with Arduino - 5 Sensors
29:55
DroneBot Workshop
Рет қаралды 147 М.
Ford RS gauges with Arduino UNO
45:38
upir
Рет қаралды 581 М.
DIY Wireless Temp & Humidity Monitor With Text & Email Alerts
12:12
Raspberry Pi GPIO - Getting Started with gpiozero
48:40
DroneBot Workshop
Рет қаралды 452 М.
Arduino Temperature Controlled Fan Speed
24:30
Jacob Dykstra
Рет қаралды 455 М.
Monitor Room Temperature Remotely with Arduino & MQTT
15:23
Gary Explains
Рет қаралды 23 М.
Raspberry Pi Pico W: Wireless Weather Station
17:13
ExplainingComputers
Рет қаралды 304 М.
ESP8266 + Arduino + database - Control Anything from Anywhere
13:51
Electronoobs
Рет қаралды 649 М.
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН