Please, please, please keep these kinds of videos up. Stepping through the schematic and hearing your thought process is super helpful for my own circuit design. Great job!
Thank you for this great walkthruough and for providing this design. I made layout for my own Trigboard clone PCB based on this, with a few modifications, as I run it on a LiFePO4 cell. I especially like in your design the extreme low power approach. I also learned several new tricks from your code, especially how the Wifi manager library works. Thank you, and I look forward to your future videos!
Amazing explanation. Thanks; looking forward to project videos using this board. The logic analyzer was very helpful. ESP32 instead of ESP8266 feasible?
alphakittycat - the technique of this device would not be any different for an ESP32, but I'd like to know: why would you rather use the ESP32? Do you have a specific purpose in mind? (do you need more pins, more cpu's, more ...?) For simple nodes that need only a few pins to process a single triggered event the ESP8266 seems sufficient.
Maybe to add Bluetooth possibilities with the ESP32? I've stopped buying esp8266's now that esp32 price has come down. Thanks for your useful projects you share.
Hello Kevin, first of alll compliments for this project it is very intresting and I love the approach on that. Just a couple of questions that's because I'm tring to implement the same concept in my house. Is this an hardware opne source? Is it available the schematic diagram using an esp32-C3 and MQTT as a message broker? Thank you
I just couldn't put my phone down while watching this video. This was great. My knowledge on how electronics work is very minimal, but people like you make me wanna go back to college and start over to learn. Thank you.
Very impressive! Have you ever thought about doing a timelapse of you designing a board? That board looks very compact and i'm sure many would like to see how you go about routing one!
Very interesting. I was surprised to find the FETs not even having a super low RDSon, kinda run of the mill SOT23 signal FETs but i guess when they do the job they do the job. Anyways, found your battery voltage measuring interesting. Using something similar to read battery voltage and some resistive sensors, still driven bij a GPIO pin as i am using deepsleep, but may switch to a trigboard
Hi! Great video! Nice trick for the EXTERNAL_WAKE_DETECTION. As far as I understand : at the beginning the C4 capacitor has got both plates holding positive charges? ... so you need an non-polarized capacitor? am I right? Thank you again Fred
Kevin, I was taking a look at the TPS3839 and I think the MR pin can be used instead of the fet contraption for the normally open kind of contact, this will help you reduce the component count and save some pennies, most importantly it will save some "electrons". I know you are using the SOT23-3 package which doesn't support MR pin, but you can surely try out the DQN (X2SON) package along with a jumper to keep the chip powered when used in this configuration. Let me know your thoughts about it. IMO you have done a great job and its a great way to have a hardware wired power down mode for ESP. Kudos!
Hi Kevin, im planning to use 2N7002 and TP0610K Mosfets. I saw that you used the TH versions of them in your previous boards... did you have any problems using them? thanks!
Kevin great video - just the right length btw. I remember you did something like this with a nrf24l01 chip - is it safe to assume you've replaced that with the ESP based trig board? I wanted to do something like this but figured the ESP would be kinda slow on the boot up to connect to the AP vs the nrf24l01. I'm thinking range wise the nrf24l01 would be better if you wanted to put sensors outside. Just curious what the motivation was to switch to the ESP? Thanks for producing these informative videos - I am computer engineer (but have been in the software end of things for 20+ years), good to get back on the HW side of things again!
You can inverse the working of a reed switch by applying a magnet at the opposite side of the reed switch. Your solution is far better, but it can be handy to know.
Only if it is a DPST reed switch, and then you'd have to swap leads. If you just turn the switch around, the magnet pulls it toward the open side when it is already open, and nothing pulls it closed. Magnetic reed switches are called that because they are activated by magnets, or a magnetic field, not because they're magnetic themselves.
Nice! Now that you have sub-microampere deep sleep, have you considered adding some energy harvesting like a solar cell and a 5V step-up? I made a board for similar purpose, mine currently uses attiny85+nRF24L01. It runs happily on a CR2032, should last for like 2 years but I'd like to add an optional solar panel and 2xNiMH to rev3. Lower voltage makes it easier for me, I think (good down to 1.8V).
This ext. wakeup trick seems to be a balance on a knife's edge. It may work - or not. TI´s datasheet for TPS3839 page 12 on 8.4.3 don´t recommend to do so. "When the voltage on VDD is lower than the power-on reset voltage (V(POR)) , the RESET output is undefined. Do not rely on the RESET output for proper device function under this condition." Anyway - nice design and thanks for sharing.
Hi I'm also using the tpl5111 in a project of mine. The only problem I'm having with it is that it doesn't wake by timer, only by external wake. I'm using a 120k resistor to get about 1 hour between the wake ups but it doesn't wake. Did you also have this problem with your project or do you maybe know what the problem could be? Maybe the resistance is not accurate enough? Thanks in advance!
Hi. Saw your design on Easyeda and made a similar one (just got my PCBs and still not working fully though). I think I know the answer to your question though (it you are referning to the easyeda design). The TPL5111 needs a specific range for the DONE signal compared to the Vin (0.3-0.7xVin) and you don't have a voltage divider in the DONE pin in your design. It needs a 10k resistor as in Kevin's design as well. If the battery is between 4.2 and 3.5V then the range is 1.26-2.45V and a 10k/10k voltage divider will give 1.65V so should be ok.
I'm stuck with a different project where I want to use TLP5111, I bougth 10 piece from China seller but I've the feeling they are fake, does not matter what signal I apply to pin 3 (MDRIVE) I've always the output to pin 5 (DRVn) same voltage as VIN (pin 1); I tried same connection as Kevin's schematic but no luck... anythign I can check or it's faulty ICs and I shoudl I order them again? can you eventually provide a good source of working ones?
great curcuit, but isn't there a problem if you hold the manual wake button, shouldn't there be a cpacitor too, else it would trig as an real input trig
I am qiute aware of the functionallity, my point is: you have an input where you have defined a delay by the RC, so you can identify that it is an input from eg. a door. but if you hold the manual wakeup buttom for the same time, insted of a quick tap, it will be detected as "the door". to solve this you could put a capacitor in line with the manual wakeup buttom, to secure a shooter pulse. :-) OHH, i just saw i the other comment that yu WAT to do both short and long trig for testing, sorry.
Have you played with ESP-NOW yet? Normally, ESPs have a 2-4 seconds delay connecting to WiFi. ESP-NOW lets you fire off a message to another ESP within 200ms from a cold boot; perfect for "dash buttons", reed switches and other zero-standby-current applications.
Sadly, this wouldn't work directly. ESP-NOW can only connect directly to another ESP chip. So you'd basically have to have all your sensor nodes connect to another ESP acting as a hub, which would relay the alert signal to something like an Arduino or RasPi, which would handle the internet stuff through a different port (ESP's can only connect to one or the other). Adafruit has the Feather Huzzah, an Arduino compatible board with an ESP8266 attached. It would make a great hub for this setup, though you'd have to add the Ethernet Feather Wing and customize the code for the Internet side (Make a video if you do this!!). ESP-NOW has some other limitations, though. It is limited to 20 'clients', so you'd only be able to use 20 trigBoards (a different ESP board could serve as the client for multiple sensors). And you'd be limited to simple sensors. Message size is limited to 250 _bytes_, which means video is out and audio would hog a lot of bandwidth.
@@chrisw1462 The ESP-32 can act as a gateway and slave at the same time. The only thing is that the ESP-32 and the controllers must all be set to the same channel that the router is using.
You can shorten the wifi connect time *a lot* by providing the BSSID and the Wifi channel when connecting and by using a static IP instead of DHCP. If you don't provide the wifi channel, the esp has to do a scan on all of the channels to find out which channel the station is listening on.
Cool project, what about the battery life let’s say on a 2000mAh battery. How many seconds is the esp awake per hour (without sensorinput) and it’s amp draw (80mA?) and what is the amp draw in ”sleep” (1uA?)? The energy budget...
Yea, you could use 80mA for ON-current, and 1uA for OFF current. Without sensor input, it will wake one an hour on timer wake, but that ON time (I haven't measured it) is probably ~1 second. When it gets triggered, it's awake for ~5seconds.
Kevin Darrah ok, I get only about 300h on a 2000mAh battery if I do the math with 5s on time and 3595s sleep. Is this correct according to your experience?
Are you sure your calculations are correct? battery-life.of-things.de/battery-life-calculator.php gives me more than a year and a half with a decent margin on discharge.
I realize this is a year ago, but... The "contact set on power up" requirement bothers me. As a 'portable' sensor, this would be ideally packaged all together - Battery, reed switch (sensor) and trigBoard. To change the battery, you have to move the unit, then put it back. And with either NO or NC, it would not be in the correct state when the battery was plugged in. A simple solution would be a power switch you can turn on when it is back in place. But it still bothers me.. According to the datasheet, if the DELAY/M_DRV pin is held high for more than 20 ms at power on, or while reading the resistor, it will abort the read and wait until DELAY/M_DRV goes low again, and re-start the read. Any shorter than that, and it is ignored, which would cause the issue you're talking about. However, your scope capture shows that DELAY/M_DRV stays high for around a full second - which should NOT cause the problem at all!! Very strange....
yea, that might work. Only thing is that those batteries are not as popular as LithiumPoly/Ion. Plus in this design, I needed to kill power, so having an LDO in there with an enable pin let's me kill power to the board. Good thinking though - I'll have to pick up one of these batteries and see how well it works with this concept
why not add an extra diode between the ext trig and the push button towards the enable line? that could solve the short ext trig on push button triggering
yea, that would work. Thing is that I actually like that being able to trigger timer (short press) or external (long press) wake. It's really handy for testing and also mode selection - check out my newest video on the code walkthrough. I use this button so I can enter OTA mode and Reset the WiFi Settings
How easier would it be having AVR + nrf24l01? AVR can sleep with current 0.5uA and monitor external interrupt. It can switch on nrf24l01 with a mosfet to start communication
would not be 'easier', but that is another approach. I actually implemented something like that years ago with an NRF at each node, then they all communicated back to a central NRF to WiFi gateway. It was a pretty big project that I never finished. Having WiFi on each board makes it super easy and provisioning is a piece of cake. But yea, power consumption during the ON time is much higher and it has to be on for a longer time...
Why not exercise by code the low power capabilities of the 8266? Seems like your boot time from scratch will cost more overall power than deep sleep with an external trigger. The RTC on the esp could replace the timer clock you have reducing power more. But I mean I haven’t looked into it super hard, but will soon.
I actually tried that originally - made a video on it a while back. The sleep current built into the ESP is not that great - think it was around ~17uA if I remember correctly
Is there anyone who can explain why it's better to have the dual mosfets to power the voltage divider instead of just using one mosfet that's powered by a GPIO on the ESP?
If you want to stop the current through Q6 flowing from source to drain the voltage between source and gate has to be lower than the minimum gate threshold voltage Vgs of Q6 (see datasheet of Q6). A) When powering with a LiPo VBAT can be up to 4V2. B) The maximum voltage on the GPIO is 3V3 at high level. So Vgs is -4V2-(-3V3)= -0V9. That is too much difference in voltage to stop the current from flowing. If Q5 is in open state the gate of Q6 is at VBATT through pullup R17 so that Vgs=VBAT-VBAT =0V0 which is less than Vgs min in the datasheet and no current can flow through Q6.
Nice job .. this is a versatile design. I built something similar a long time ago but I used a normally open reed switch to avoid the issue with bleed current. I used it to monitor a door open/close event. It used an ESP01 and a small 400ma lipo battery. The design used only a few micro amps , it lasts about a year on a single charge ( 100's of open/close events per month ) .. My approach is similar but I don't use the TI TPL chip, I instead control the regulator enable using an Atiny85. ( bit.ly/2R6nYbV )
Or one can just grab a low power mcu with a couple of deep-sleep interrupt pins and several timers, which would allow to implement a timer-based debounce of the switches.
If you are interested, I have done something similar using an ATTINY85, and ES8266, and LP2985-3.3 regulator, 4x1,2V NiMH batteries. Made a long comment here describing it in "Andreas Spiess" video : ruclips.net/video/WV_VumvI-0A/видео.html
Please, please, please keep these kinds of videos up. Stepping through the schematic and hearing your thought process is super helpful for my own circuit design. Great job!
thanks! will do!
Thank you for this great walkthruough and for providing this design. I made layout for my own Trigboard clone PCB based on this, with a few modifications, as I run it on a LiFePO4 cell. I especially like in your design the extreme low power approach. I also learned several new tricks from your code, especially how the Wifi manager library works. Thank you, and I look forward to your future videos!
Amazing explanation. Thanks; looking forward to project videos using this board. The logic analyzer was very helpful. ESP32 instead of ESP8266 feasible?
alphakittycat - the technique of this device would not be any different for an ESP32, but I'd like to know: why would you rather use the ESP32? Do you have a specific purpose in mind? (do you need more pins, more cpu's, more ...?)
For simple nodes that need only a few pins to process a single triggered event the ESP8266 seems sufficient.
Maybe to add Bluetooth possibilities with the ESP32? I've stopped buying esp8266's now that esp32 price has come down. Thanks for your useful projects you share.
Also ESP32 has built in low voltage cooprocessor for monitoring io, while main CPU in deep sleep.
@@kristofgilicze But it sleeps at 10 microamps, not 1 microamps.
Hello Kevin, first of alll compliments for this project it is very intresting and I love the approach on that. Just a couple of questions that's because I'm tring to implement the same concept in my house. Is this an hardware opne source? Is it available the schematic diagram using an esp32-C3 and MQTT as a message broker? Thank you
You have really inspired me as a hobbyist. Thank you for such a wonderful explanation and your work. Inspiring 🏴😀
I just couldn't put my phone down while watching this video. This was great. My knowledge on how electronics work is very minimal, but people like you make me wanna go back to college and start over to learn. Thank you.
thanks! glad you enjoyed this... I never know if anyone finds this stuff useful when I'm rambling on forever :)
Nice job indeed. Thank you for the clear explanations which gave good insight on how you achieved such low power consumption.
Very impressive! Have you ever thought about doing a timelapse of you designing a board? That board looks very compact and i'm sure many would like to see how you go about routing one!
maybe... might have to try that out
Very interesting. I was surprised to find the FETs not even having a super low RDSon, kinda run of the mill SOT23 signal FETs but i guess when they do the job they do the job.
Anyways, found your battery voltage measuring interesting. Using something similar to read battery voltage and some resistive sensors, still driven bij a GPIO pin as i am using deepsleep, but may switch to a trigboard
Hi! Great video! Nice trick for the EXTERNAL_WAKE_DETECTION. As far as I understand : at the beginning the C4 capacitor has got both plates holding positive charges? ... so you need an non-polarized capacitor? am I right? Thank you again Fred
Great project and faboulous walkthrough. Much appreciated!
Kevin, I was taking a look at the TPS3839 and I think the MR pin can be used instead of the fet contraption for the normally open kind of contact, this will help you reduce the component count and save some pennies, most importantly it will save some "electrons". I know you are using the SOT23-3 package which doesn't support MR pin, but you can surely try out the DQN (X2SON) package along with a jumper to keep the chip powered when used in this configuration. Let me know your thoughts about it.
IMO you have done a great job and its a great way to have a hardware wired power down mode for ESP. Kudos!
Hi Kevin, im planning to use 2N7002 and TP0610K Mosfets. I saw that you used the TH versions of them in your previous boards... did you have any problems using them? thanks!
Well done, some clever analog design there!
Kevin great video - just the right length btw. I remember you did something like this with a nrf24l01 chip - is it safe to assume you've replaced that with the ESP based trig board? I wanted to do something like this but figured the ESP would be kinda slow on the boot up to connect to the AP vs the nrf24l01. I'm thinking range wise the nrf24l01 would be better if you wanted to put sensors outside. Just curious what the motivation was to switch to the ESP? Thanks for producing these informative videos - I am computer engineer (but have been in the software end of things for 20+ years), good to get back on the HW side of things again!
Wow. Nice work!! Low power is the way to go on battery driven devices
Any chance to get an update on the V8 hardware? Thank you for your time, learned so much from this video.
You can inverse the working of a reed switch by applying a magnet at the opposite side of the reed switch. Your solution is far better, but it can be handy to know.
Only if it is a DPST reed switch, and then you'd have to swap leads. If you just turn the switch around, the magnet pulls it toward the open side when it is already open, and nothing pulls it closed. Magnetic reed switches are called that because they are activated by magnets, or a magnetic field, not because they're magnetic themselves.
Do you have a bare power controller / reset board without the 8266?
Hi Kevin, great video and concept.
Do you also plan to publish the schematic of this? I don’t see that on the wiki.
What so the Chinese can copy it as they copy everything
Nice! Now that you have sub-microampere deep sleep, have you considered adding some energy harvesting like a solar cell and a 5V step-up? I made a board for similar purpose, mine currently uses attiny85+nRF24L01. It runs happily on a CR2032, should last for like 2 years but I'd like to add an optional solar panel and 2xNiMH to rev3. Lower voltage makes it easier for me, I think (good down to 1.8V).
Been working on this for months on and off. Thanks for the solution
Very, very nice. Great Job!Thank you for all your hard work, you make a fine teacher.Ronnie
Is there a circuit for the TPL5111 which allows for longer sleep times (like 24 hours) ? Maybe combining them using logic gates..?
This ext. wakeup trick seems to be a balance on a knife's edge. It may work - or not. TI´s datasheet for TPS3839 page 12 on 8.4.3 don´t recommend to do so. "When the voltage on VDD is lower than the power-on reset voltage (V(POR)) , the RESET output is undefined. Do not rely on the RESET output for proper device function under this condition." Anyway - nice design and thanks for sharing.
Are your boards for sale fully populated w/ components? Thx.
yep, everything except the battery and sensor - see the description for the kink to the product page
Hi Kevin, can you explain what's the use of the D2 diode ?
how did you made this trigboard ..... please reply.
Hi I'm also using the tpl5111 in a project of mine. The only problem I'm having with it is that it doesn't wake by timer, only by external wake. I'm using a 120k resistor to get about 1 hour between the wake ups but it doesn't wake.
Did you also have this problem with your project or do you maybe know what the problem could be? Maybe the resistance is not accurate enough?
Thanks in advance!
Hi. Saw your design on Easyeda and made a similar one (just got my PCBs and still not working fully though). I think I know the answer to your question though (it you are referning to the easyeda design).
The TPL5111 needs a specific range for the DONE signal compared to the Vin (0.3-0.7xVin) and you don't have a voltage divider in the DONE pin in your design. It needs a 10k resistor as in Kevin's design as well. If the battery is between 4.2 and 3.5V then the range is 1.26-2.45V and a 10k/10k voltage divider will give 1.65V so should be ok.
I'm stuck with a different project where I want to use TLP5111, I bougth 10 piece from China seller but I've the feeling they are fake, does not matter what signal I apply to pin 3 (MDRIVE) I've always the output to pin 5 (DRVn) same voltage as VIN (pin 1); I tried same connection as Kevin's schematic but no luck... anythign I can check or it's faulty ICs and I shoudl I order them again? can you eventually provide a good source of working ones?
+Kevin Darrah *BOI* man we need to see that camera project you mentioned
I have a few z-wave sensors in my house. Is this a replacement at a much better price?
Very nice project, but why don't add a USB UART chip directly on the board since there is already a micro USB for charging ?
I guess its a bit late but i want more of this.
Is there an alternative for the tps3839 chip in dil package?
Thanks.
great curcuit, but isn't there a problem if you hold the manual wake button, shouldn't there be a cpacitor too, else it would trig as an real input trig
yea, that's actually intentional, so you can force a wakeup...
I am qiute aware of the functionallity, my point is: you have an input where you have defined a delay by the RC, so you can identify that it is an input from eg. a door. but if you hold the manual wakeup buttom for the same time, insted of a quick tap, it will be detected as "the door". to solve this you could put a capacitor in line with the manual wakeup buttom, to secure a shooter pulse. :-)
OHH, i just saw i the other comment that yu WAT to do both short and long trig for testing, sorry.
Have you played with ESP-NOW yet? Normally, ESPs have a 2-4 seconds delay connecting to WiFi. ESP-NOW lets you fire off a message to another ESP within 200ms from a cold boot; perfect for "dash buttons", reed switches and other zero-standby-current applications.
I gotta check this out
I was about to say the same. Andreas Spiess did a great Video on it.
Sadly, this wouldn't work directly. ESP-NOW can only connect directly to another ESP chip. So you'd basically have to have all your sensor nodes connect to another ESP acting as a hub, which would relay the alert signal to something like an Arduino or RasPi, which would handle the internet stuff through a different port (ESP's can only connect to one or the other).
Adafruit has the Feather Huzzah, an Arduino compatible board with an ESP8266 attached. It would make a great hub for this setup, though you'd have to add the Ethernet Feather Wing and customize the code for the Internet side (Make a video if you do this!!). ESP-NOW has some other limitations, though. It is limited to 20 'clients', so you'd only be able to use 20 trigBoards (a different ESP board could serve as the client for multiple sensors). And you'd be limited to simple sensors. Message size is limited to 250 _bytes_, which means video is out and audio would hog a lot of bandwidth.
@@chrisw1462 The ESP-32 can act as a gateway and slave at the same time. The only thing is that the ESP-32 and the controllers must all be set to the same channel that the router is using.
You can shorten the wifi connect time *a lot* by providing the BSSID and the Wifi channel when connecting and by using a static IP instead of DHCP. If you don't provide the wifi channel, the esp has to do a scan on all of the channels to find out which channel the station is listening on.
Why you use specific TPS3839G33? Is there any reason for that? Or can you use other TPS383x devices?
You could probably use others... maybe dip down as low as 3V or even lower maybe.
Good stuff Kevin! Thanks!
Cool project, what about the battery life let’s say on a 2000mAh battery. How many seconds is the esp awake per hour (without sensorinput) and it’s amp draw (80mA?) and what is the amp draw in ”sleep” (1uA?)? The energy budget...
Yea, you could use 80mA for ON-current, and 1uA for OFF current. Without sensor input, it will wake one an hour on timer wake, but that ON time (I haven't measured it) is probably ~1 second. When it gets triggered, it's awake for ~5seconds.
Kevin Darrah ok, I get only about 300h on a 2000mAh battery if I do the math with 5s on time and 3595s sleep. Is this correct according to your experience?
Are you sure your calculations are correct? battery-life.of-things.de/battery-life-calculator.php gives me more than a year and a half with a decent margin on discharge.
I realize this is a year ago, but... The "contact set on power up" requirement bothers me. As a 'portable' sensor, this would be ideally packaged all together - Battery, reed switch (sensor) and trigBoard. To change the battery, you have to move the unit, then put it back. And with either NO or NC, it would not be in the correct state when the battery was plugged in. A simple solution would be a power switch you can turn on when it is back in place. But it still bothers me..
According to the datasheet, if the DELAY/M_DRV pin is held high for more than 20 ms at power on, or while reading the resistor, it will abort the read and wait until DELAY/M_DRV goes low again, and re-start the read. Any shorter than that, and it is ignored, which would cause the issue you're talking about. However, your scope capture shows that DELAY/M_DRV stays high for around a full second - which should NOT cause the problem at all!! Very strange....
Thx you, you made me a better electronic engineer
Kevin, anyway you can share the schematic? Thanks!
Very nice! Id love to see more ... the esp code for example :)
coming up next :)
Can you estimate the battery life for some standard batteries and average usage. This would really help a lot! Thanks for amazing explanation also :)
That was awesome, have a beer!
cheers!
Would not using a LifePo4 battery make this board even smaller and do away with the regulator and charging circuit? Maybe even save more power?
yea, that might work. Only thing is that those batteries are not as popular as LithiumPoly/Ion. Plus in this design, I needed to kill power, so having an LDO in there with an enable pin let's me kill power to the board. Good thinking though - I'll have to pick up one of these batteries and see how well it works with this concept
I would be curious to know how that goes. I found the genuine Soshine ones good.
why not add an extra diode between the ext trig and the push button towards the enable line? that could solve the short ext trig on push button triggering
yea, that would work. Thing is that I actually like that being able to trigger timer (short press) or external (long press) wake. It's really handy for testing and also mode selection - check out my newest video on the code walkthrough. I use this button so I can enter OTA mode and Reset the WiFi Settings
How easier would it be having AVR + nrf24l01? AVR can sleep with current 0.5uA and monitor external interrupt. It can switch on nrf24l01 with a mosfet to start communication
would not be 'easier', but that is another approach. I actually implemented something like that years ago with an NRF at each node, then they all communicated back to a central NRF to WiFi gateway. It was a pretty big project that I never finished. Having WiFi on each board makes it super easy and provisioning is a piece of cake. But yea, power consumption during the ON time is much higher and it has to be on for a longer time...
Thanks for the reply! Really love your videos with detailed explanation of the circutry!
how can we call these boards like : trigBoard, Arduino, raspberry , do they have classification ?
Microcontrollers?
Why doesn't saleae make the logic 4 anymore? I'd get the logic 8 but 350 is a lot of money and I could get a rigol oscilloscope for that.
yea I know... it was very expensive for what it is, but honestly I feel like I use the Saleae more than my Rigol these days... lol
Why not exercise by code the low power capabilities of the 8266? Seems like your boot time from scratch will cost more overall power than deep sleep with an external trigger. The RTC on the esp could replace the timer clock you have reducing power more. But I mean I haven’t looked into it super hard, but will soon.
I actually tried that originally - made a video on it a while back. The sleep current built into the ESP is not that great - think it was around ~17uA if I remember correctly
great work!
I thought you had stopped making videos, you haven't been showing up in my subs feed.
lol, still here!
Good job.
I bet you could further reduce the component count, given the time, 6 mosfets seems like a lot.
oh yea, but also wanted to reduce unique components - thought about trying P/N Channel pairs...
Is there anyone who can explain why it's better to have the dual mosfets to power the voltage divider instead of just using one mosfet that's powered by a GPIO on the ESP?
If you want to stop the current through Q6 flowing from source to drain the voltage between source and gate has to be lower than the minimum gate threshold voltage Vgs of Q6 (see datasheet of Q6).
A) When powering with a LiPo VBAT can be up to 4V2.
B) The maximum voltage on the GPIO is 3V3 at high level.
So Vgs is -4V2-(-3V3)= -0V9. That is too much difference in voltage to stop the current from flowing.
If Q5 is in open state the gate of Q6 is at VBATT through pullup R17 so that Vgs=VBAT-VBAT =0V0 which is less than Vgs min in the datasheet and no current can flow through Q6.
Amazing i want more!!
Nice job .. this is a versatile design. I built something similar a long time ago but I used a normally open reed switch to avoid the issue with bleed current. I used it to monitor a door open/close event. It used an ESP01 and a small 400ma lipo battery. The design used only a few micro amps , it lasts about a year on a single charge ( 100's of open/close events per month ) .. My approach is similar but I don't use the TI TPL chip, I instead control the regulator enable using an Atiny85.
( bit.ly/2R6nYbV )
Or one can just grab a low power mcu with a couple of deep-sleep interrupt pins and several timers, which would allow to implement a timer-based debounce of the switches.
If you are interested, I have done something similar using an ATTINY85, and ES8266, and LP2985-3.3 regulator, 4x1,2V NiMH batteries.
Made a long comment here describing it in "Andreas Spiess" video :
ruclips.net/video/WV_VumvI-0A/видео.html
👍