ESP8266 as Window Sensor with years of battery life

preview_player
Показать описание
Buy me a coffee:

Meanwhile the viewer "gadjet" has optimized and minimized the PCB.
Check out his great website and project on Github:

Project-Idea by Michael Dworkin:

Links:

Code, Battery-Spreadsheet, KiCAD- and CircuitJS-Files:

3D-Model of the Case on Thingiverse:

KiCAD:

CircuitJS:

Andreas Spiess: How to install the IOT-Stack on a Raspberry Pi:

Required Components:

1x ESP-12F
1x 1000 uF Electrolytic Capacitor
2x 100 nF Capacitor
4x 10k Resistor (SMD 0805)
1x 1M Resistor (SMD 0805)
2x Switch Buttons (SMD 0805)
1x HT7333 (SMD)
1x Pin Header
1x Reed Switch NO (normally open)
1x 74HC86 (THT)
1x TP4056
1x Li-Ion 18650
1x Magnet

0:00 Intro
1:07 Requirements

1:27 The idea
3:06 ESP8266 basics
3:57 Simulation in CircuitJS
6:32 Circuit design in KiCAD
9:04 SMD-Components
9:58 PCB-Design in KiCAD
11:34 Assembly and SMD-soldering
13:07 Programming and software
13:39 Test run and current consumption
14:59 Housing and installation
16:38 Improvement ideas

Songs:
"8-bit-Laserstrahl" by betatronik (CC BY-NC-SA)
"Auf Dem Wind (calm)" by betatronik (CC BY-NC-SA)
"Old River Boat" by Lobo Loco (CC BY-NC-SA)
"Long Story" by Sergey Cheremisinov (CC BY-NC)
"Make-New" by Ketsa (CC BY-NC-ND)
"Salt Lake Swerve - Chillout Remix" by Maarten Schellekens (CC BY-NC)
"Salt Lake Swerve - Chillout Remix" by Maarten Schellekens (CC BY-NC)
"Hachimantai Snow" by Maarten Schellekens (CC BY-NC)
"Just Wondering" by Maarten Schellekens (CC BY-NC)
"Poor Boy" by Pedro Santiago (CC BY-NC-SA)
"Tuesday Night - Radio Edit" by Maarten Schellekens (CC BY-NC)
"Deep" by Bio Unit (CC BY-NC-SA)
"D2" by Maarten Schellekens (CC BY-NC)

Photos/Videoclips:
Alexas_Fotos (Pixabay License)
Grieslightnin (Pixabay License)
FindingFootage (pixabay license)
Рекомендации по теме
Комментарии
Автор

Meanwhile the viewer "gadjet" has optimized and minimized the PCB. His impressive optimization has meanwhile gone through 5 phases of "evolution".

But more importantly, he has reworked the code to ESP-Now, reducing the wake time of the ESP to 0.25 seconds. This extends the battery life immensely. Check out his great website and project on Github:


@gadjetsvideo Thanks for sharing your ideas and additions. I do my videos for people like you: Knowledge doubles when you share it.

MakerMeik
Автор

I just ordered boards on the JLCPCB. Everything is OK. I liked it and immediately subscribed too ! Looking forward to see more of your videos.

mirino
Автор

So much learning value in a single video, pure gold! Thanks for making this, really high quality project, supporting links and video production. Subscribed!

stupossibleify
Автор

I have never tried to solder smds, until now... What a great project! I rent a space that has a window that cant be left opened for long periods of time, this project fits my needs !!!

enlacdmx
Автор

I've recently been working on a similar project with a wemos and tasmota, using tasmota deep sleep. Now I know why the battery wasn't lasting as long as expected. Your vid gives me good ideas. Thanks 😁

SmithyScotland
Автор

A true Renaissance man. Hats off to you my dear.

ilducedimas
Автор

that intro music was not expected. You just blew my mind. 10/10.

illygah
Автор

Great video! Just trying to learn all I can about the ESP8266 and ESP32, hardest part is figuring out what I actually want to build!

edwardsoares
Автор

Very well done video, subscribed instantly! Keep it up!

oliverhihn
Автор

A LoRa modual is pretty common in lowpower IoT devices, they can also transmit quite a lot of reliable data. But this is definitly a dope project.

ThePlazmaBeast
Автор

You could further improve your pcb: Below the antenna area of the esp you could spare out the carrier pcb. The pcb material slightly "detunes" the antenna because of its dielectric properties..

AntonioDellaRovere
Автор

IF you forget the Wifi connection and use the ESP-NOW protocol you are able to shorten wake up time by 10 times with the same circuit. If you use on a high side a PMOS FET - controlled by ESP GPIO you are able to use as a switch before a resistor divider and you are able to measure the battery

istvanzilizi
Автор

Realy cool project! Was looking to make something similar but from "modules" and it will take too much space. Your solution is really pretty! One stuff I will update there and it will be that every time it send information about "On/Off" switch, it could send capacity/voltage information about battery. That you will be able to see when you should prepare for battery change. But I understand that if I will put 4000mAh LiIon, that I will dont need to change it for few years :D

jirihala
Автор

Awesome things you make!! and im also started to make a IoT-stack on my Synology NAS 920+ and docker, i have now installed all the packets, and expermiment with node-red with your video's im learning how that works.. very good videos!! (also with the help from the guy with swiss accent hihi)

repje
Автор

AWESOME 👍
I was searching for it for awhile, hungry ESP ruined my real wireless battery powered projects, I will try it as soon as possible

smartifi_egypt
Автор

Great!

I've an ESP8266 and I use it for IoT WiFi

keshav
Автор

Thanks for this nice video. May I suggest -
The XOR ic can be replaced with only 2 10k resistors and a 1uf capacitor which can give you a nice negative pulse and save a lot of space. ( pull up both legs of capacitor to vcc with 10k, set the reed switch to GND and one leg of capacitor, get the negative pulse from other leg)

jagannathkulkarni
Автор

Ein wirklich angenehmes Video 👍😊
Mein Abo hast du 😉

alff
Автор

I was thinking about building me a couple of these, when I ran into the Aqara window sensors. At around €12 you get a tiny zigbee device that has a battery life of over a year (single small lithium coin cell)
Don’t get me wrong: your project is awesome and you did a great job. If one is looking for the experience and joy of building this, great. But if the goal is to reach the most practical solution in the shortest time, the Xiaomi Aqara is the fastest route to success.

ReneKnuversrk
Автор

It would be good to add a watchdog feature so the ESP can wake up once in a while, say every 10 minutes, or every hour, to report in with a battery check, and the receiving side alert you if a sensor has missed a check-in.

TornadoCrafter
visit shbcf.ru