Monday, 28 March 2022

The many versions of the Wireles Door Sensor an Version 5

 

The Journey so far

I have to admit that it's become a bit of an obsession to try and get this sensor smaller and to use less power at each revision. well I've just finished version 5 which has definitely got the consumption down to a really low level, 3.9uA at its lowest.

Versions 1 to 4 in a row

....... and Version 5
Version 5 assembled PCB




Version 5 has two functions, the normal reed switch trigger so it can be used as a Window/Door sensor and a single button input so it can be used as a Doorbell switch or general WiFi button.

The trigger circuitry combines an edge triggered Monostable circuit from two XOR gates and a single OR gate latch circuit, this latch is triggered either by a pulse from the Monostable or the press of a button which sets the latch.
Once the latch has been set it can then be reset by a LOW signal from the ESP12 when the code has finished running on the ESP12, I used GPIO16 as it is held high during boot.

Schematic

Circuit diagram V5

Using the circuit above the quiescent current of the whole device when there is no magnet next to the reed switch, i.e. door open is 3.90uA and if you were using it as a WiFi connected button then that would be the Quiescent drain, if used as a door/Window sensor then when the magnet is next to the reed switch the quiescent is slightly higher at 5.4uA due to R1 drawing current when the reed switch is closed.

Battery Life

Actual Current consumption

Using a  Nordic Power Profiler Kit II I made some current measurements of the device in the different states: -
Current Consumption Graph


Using an online battery lifetime calculator I found here I calculated these battery times based on a usage of 10 activations per day: -
As you can see the worst consumption will give a battery life of more than 7 years! although this will only be an esitmate and in "real life" I assume there will be other factors that may impact on the bttery life but only time will tell but I think you would have a good chance of getting a few years out of a relatively small cell.

The files are available on my Github page



6 comments:

MakerMeik said...

You are so amazing. Thanks for the great work and especially for sharing it.

michael said...

Hi,
really a great project. Thanks for sharing your knowledge!

I have got a question regarding ordering populated PCBs from jlcpcb:

Your "Window sensor V5updated BOM.csv" on your github project "Window-Door-sensor-Version-5" do not show the LED_small D1. But the LED is listed in the file "Window sensor V5-top.pos". I could not find any further details regarding the LED (voltage etc.). Can you please let me know, what LED to use and do you know the LCSC part number?

thanks for your help!

with kind regards

michael

Gadjet said...

Sorry Michael I decided to leave out the LED at the last moment from the assembly as I was aiming to use as little current as possible, I just bought some 0805 LEDs to add myself when testing out the boards so I would know when the LDO was powered up before I added an ESP.

The series resistor is 1K and I just added an 0805 Green LED to test it I bought from Ebay.

Also when I was looking at the JLCPCB parts list there wasn't many LEDs to choose from and they seemed expensive or had a large min order quantitys at the time.

Thanks,
Phil

Anonymous said...

Hi Gadjet,

JLCPCB asks for a CPL file containing the parts positions for the pick n place process. I understand that it can be generated out of KiCad but I was wondering if you already have one prepared. It's the first time I am ordering assembled PCBs so I am not familiar with the process.

Thanks

Andreas

Gadjet said...

Andreas, As I remember the zip file on github contains the .pos files, one of those is the cpl file that JLCpcb needs, after uploading you will be able to check the component layout visually.

Anonymous said...

Thanks Gadjet, found it!

Andreas

The many versions of the Wireles Door Sensor an Version 5

  The Journey so far I have to admit that it's become a bit of an obsession to try and get this sensor smaller and to use less power at ...

Popular Posts