Pir AS 312 with 2 rechargeable AAA battery. Boost needed?



  • Hi,

    according to this datasheet this PIR requires an input voltage of 2.7 - 3.3V, so if powered with 2xAAA (or AA) rechargeable NiMH batteries (2.4V) it will run out of spec.

    Someone has tested it with this voltage?

    If it does not working well, I have found this ME218833C boost converter that seems adequate to the job:

    • Low quiescent current (13ΞΌA)

    • Chip Enable Pin to enable and disable the circuit on demand



  • @franz-unix i don't know how you will handle the pir in your software but generally the pir needs to be powered all the time so no need for shutdown mode in your boost converter. The other thing is that pir doesn't linke noisy power supply, and dc converters are rather noisy especially in low current area. I would recommend to use higher voltage and ldo voltage regulator. You can find some ldos with very low quiescent current. You can use li ion rechargable battery and 3v ldo.



  • Yes, the booster will be always on to power the PIR when the board is powered by rechargeable batteries (2.4V), but the idea is that if you use two disposable batteries (3.0V) or external power (micro usb port, ICSP or FTDI), the MCU reads the VCC voltage and then shuts down the booster and the PIR is powered directly.

    In other words the booster will be activated by the firmware only if VCC is below 2.7V.

    About the noise question... yes this could be a problem, but the manufacturer declare the booster as "Low ripple and Low noise", and in my schematic (see below) I have inserted a dedicated capacitor for the PIR, so I hope this is enough.

    0_1562786363239_output-1.rotated.jpg

    I prefer to stay with AAA batteries because I want to keep the global dimension of the node as low as possible and with this type of batteries I can power the radio module and the MCU directly from battery, saving some mA.



  • @franz-unix if the ME2188 was really low noise and low ripple it would be good idea to use it. Unfortunetely there is nothing about it in the datasheet axcept for manufacturer declaration ... no data to support this declarations so it sounds rather not convincing. But if You have time to test it go for it πŸ™‚


  • Hardware Contributor

    @franz-unix said in Pir AS 312 with 2 rechargeable AAA battery. Boost needed?:

    About the noise question... yes this could be a problem, but the manufacturer declare the booster as "Low ripple and Low noise", and in my schematic (see below) I have inserted a dedicated capacitor for the PIR, so I hope this is enough.

    It's a PFM step up to be efficient with low loads, meaning the frequency of the noise will change a lot and it is much harder to filter. You might want to include on your PCB an option to go through a ldo (that you can of course bypass), so if the step up is too noisy you can use one with a bit higher output voltage and use the ldo to filter the output a bit more.

    But I agree with @rozpruwacz a li-ion battery with a ldo like XC6206 sounds like a way more simple option and it's also easy to make it more compact than with 2 AA/AAA.



  • @rozpruwacz The ME2188 is quite inexpensive (€0.0574 ) so I will test it for sure. It is available also with different Vout voltages, so if it does its job could be an interesting option to power other type of sensors. This article is about the ME2108, which seems to be the predecessor of the ME2188 and the author says that the output voltage is clean and stable (tested with oscilloscope).

    @Nca78 This XC6206 seems a good ldo vreg, thank you for the info. About the Li-ion battery, it seems to be a general agreement (see this topic for example) about the fact that the best option to power a node is with AA or AAA batteries. In fact one of the advantages is that you don't need to step up or down the voltage to power the radio and the MCU.

    Yesterday I have had another idea for the circuit: the substitution of the manual jumper JP3 with 3 mosfet (Q3-Q4-Q5).
    In this way you can completely exclude the booster circuit when not necessary (Vcc >= 2.7V) without manual adjustment of the jumper. Just put you batteries (disposable or rechargeable) in and... boom, the MCU will automatically do the job.

    0_1562874186490_output1-1.rotated.jpg



  • @franz-unix said in Pir AS 312 with 2 rechargeable AAA battery. Boost needed?:

    About the Li-ion battery, it seems to be a general agreement (see this topic for example) about the fact that the best option to power a node is with AA or AAA batteries. In fact one of the advantages is that you don't need to step up or down the voltage to power the radio and the MCU.

    There is no one "best option". The power supply heavily depends on the project requirements. The PIR sensor requires noiseless voltage between 2.7 and 3.3v. This makes use of 2xAA problematic. In my opinion for such a project higher voltage supply with low quiescent current ldo is the best option. And it happens that li-ion battery with its voltage range and 3v ldo makes them perfect match. At least this is how I did it in my home and it works nice ( https://www.openhardware.io/view/610/MySXMotion). I went even further in my project and there is two ldos, one for pir and one for mcu + rf module as those two components creates large spikes in current flow as they work making supply voltage noisy.

    PS. The other benefit of rechargable batteries is that they are rechargable πŸ™‚ so you don't need to remember to buy batteries when you go out of them.



  • If you have room for a AA, an LiFePo4 battery is right in the sweet spot.
    I have seen LiFePo4 AAA batteries, but they are really hard to find.



  • @nagelc The LiFePo4 batteries will be perfect (AA and AAA), but I arrived at your same conclusion: a little bit to exotic respect to standard alkaline or NiMH batteries.

    @rozpruwacz Nice board, is similar to what I want, but unfortunately not exactly the same. I prefer to have one single board to simplify the build and external case design (3d-printable).

    Thanks to your suggestion, I have modified a little bit the circuit:

    0_1563104742468_output-1.rotated.jpg

    Some consideration and board features:

    • Added footprint for CR2032 coin cell and dedicated 100 uF capacitor to prevent problem related to the low discharge rate of the battery.

    • Added a flyback diode across the inductor to discharge voltage spikes when the circuit is disconnected (mosfet Q3 - Pin D4). Not sure if it is strictly necessary... but just in case!

    • Multiple power options: 2xAAA batteries, 1xCR2032, micro USB (phone charger), J6 pin header. When powered from an external source through USB port or J6, the voltage can be between 4 and 12V. When you power the board through FTDI or ICSP make sure that the voltage is 3.3V, otherwise the radio module will be damaged!

    • Mosfet Q1 offers a reverse polarity protection to the board if the batteries are inserted in the wrong way. It cut off also the batteries compartment when an external power source is present, so you don't have to remove the batteries while powering the board via FTDI, ICSP, USB or J6

    • When VCC is below 2.7V (AAA rechargeable batteries) the boost circuit is activated by the MCU (Pin D4). When VCC is above 2.7V (disposable AAA batteries or CR2032) the circuit is disabled and the PIR is powered directly form VCC (see Q3-Q4-Q5)

    • To increase the battery life, the photoresistor is powered through PIN D5, only when the node is awake. During sleep D5 will be set to LOW, so no current waste.

    • Two momentary switch: 1 for MCU reset and 1 to force the node to wake up

    • Motion led (D3) and low battery / external powerl ed (D5) configurable in the firmware, plus radio activity LEDs

    • Header for Si7021 breakout

    • AS312 Pir with mounting holes for a standard fresnel lens like the one present in the HC-SR501

    • MYSX 2.6 connector to add other sensors.

    • ATSHA204A for security signing

    • Size: 57x57 mm (not so small but also not so big)

    This is how the board looks like

    0_1563106285959_front.jpg

    0_1563106300980_rear.jpg

    It is still under development, but if someone is interested, the Kicad project is available on github.

    ... Well the next step is to test the ME2188 boost converter... I hope that it can do its job without triggering false positive on the PIR sensors!


  • Contest Winner

    Hi. I use TPS61221DCKR for boards with such PIRs.



  • @koresh Great! Thank you for your suggestion! πŸ˜‰

    Do you have had any problem with false positive on the PIR sensors with this booster?

    Another thing that I'm worried about is that the booster can introduce some sort of noise into the board and this can affect the quality of the radio signal. Do you have observed this kind of problem?

    One Last (boring πŸ˜‚ ) question... Have you placed a flyback diode across the inductor? I'm not sure if this component is strictly necessary.

    I have made some progress with the board: added support for NRF24 radio modules (SMD and THT).

    0_1563555438795_output-1.rotated.jpg

    0_1563555453058_front.jpg 0_1563555461274_rear.jpg



  • Update: in this days I'm testing the board and... I have a problem when the booster is activated by the MCU (VCC < 2.8V -> Pin D4 High).

    In this situation the current goes very high (800 mA) and the boost coverter becomes very hot after few seconds, so it seems that somewhere a short circuit is present.

    I have made this tests, but nothing has solved the issue:

    • Removed Q4 and Q5 mosfet and R14, just to simplify the circuit and connected the inductor directly to VCC with a jumper wire

    • Substituted the boost converter with a new one

    • Tried different values of R14 (1M, 300K, 10K)

    • Resoldered the inductor and the tantalum capacitor

    I can not see any mistake in my schematics and to my eyes it is equivalent to the one reported in the datasheet (except for the CE pin that in my case is connected to Pin D4 of the atmega, instead of Vout), so another point of view may help.

    Thanks in advance for the support



  • Hi guys, problem solved πŸ˜‰

    The high current issue was caused by the damn flyback diode (D7).
    Now the boost converter works as expected and without triggering false positive issue on the PIR (AS312).
    No problem also with the radio module (RFM69@868 Mhz). Not yet tested the board with a NRF24L01 radio module (THT or SMD) but I have both modules, so it is just a matter of time.

    After some testing I have decided to remove Q3, Q4 and Q5 because the boost converter (ME2188C33) when not enabled through the CE PIN (driven by D4 of the ATMega) act as sort of "bypass" for VCC.

    With 2xAAA rechargeable batteries at 2.4V I have had some stability problem with the MCU (reset), but I have solved setting the frequency and the fuses to work at 1 Mhz (with MYSBootloader). Is it normal that an ATMega328 at 8 Mhz is unstable at 2.4V?

    The last thing that I have to change is the circuit of the blu led (D3)... The typical voltage drop of this led is 3.0V, so with 2xAAA batteries and 2.4V the brightness is to low, so the idea is to power it with the 3.3V out of the boost converter, controlling the brightness through an N-Mosfet, driven by PIN D5 of the AtMega.

    The firmware is under testing and is available here

    Below the updated schematics.

    0_1567974516195_output-1.rotated.jpg


  • Hardware Contributor

    @franz-unix said in Pir AS 312 with 2 rechargeable AAA battery. Boost needed?:

    Is it normal that an ATMega328 at 8 Mhz is unstable at 2.4V?

    Yes it is. Minimum voltage is 2.7V at 10MHz and 1.8V at 4MHz so at 8MHz the minimum voltage is 2.4V.


  • Hardware Contributor

    @franz-unix said in Pir AS 312 with 2 rechargeable AAA battery. Boost needed?:

    After some testing I have decided to remove Q3, Q4 and Q5 because the boost converter (ME2188C33) when not enabled through the CE PIN (driven by D4 of the ATMega) act as sort of "bypass" for VCC.

    I have the same "problem" with ME2188, although it seems to be more of an advantage for you. I have no mention of this in the datasheet I have, do you have a datasheet stating this ?



  • @nca78 No the datasheet that I have says nothing about what appens when CE pin is low.

    I have discovered this behaviour when testing the board, but it is coherent with the diagram block of the IC reported in this datasheet.

    In any case (booster on or off) the current will flow through the inductor, so it is not a real bypass, but the PIR works good in both situation and I have not observed any strange current or voltage spike.

    Do you need to completly disconnect the Vout when the boost converter is disabled? Maybe you can obtain this connecting a p-mosfet and a n-mosfet (like Q3 and Q4), but on the Vout rail and drive the n-mos gate with the same pin that you use to enable the boost converter


  • Hardware Contributor

    @franz-unix said in Pir AS 312 with 2 rechargeable AAA battery. Boost needed?:

    I have discovered this behaviour when testing the board, but it is coherent with the diagram block of the IC reported in this datasheet.

    Yes I should have a better look at those. Even the typical application circuit on first page was obvious with wiring of CE from VOUT πŸ™‚
    0_1568351291627_f6f63c89-f49c-4fd4-97f3-43d032d0d03f-image.png

    Do you need to completly disconnect the Vout when the boost converter is disabled? Maybe you can obtain this connecting a p-mosfet and a n-mosfet (like Q3 and Q4), but on the Vout rail and drive the n-mos gate with the same pin that you use to enable the boost converter

    Yes I need the output to be disconnected, I use a 5V sensor from a li-ion battery and I need that sensor to be off most of the time. I decided to take the lazy solution and use a power switch, triggered with the same pin than the EN pin of ME2188.



  • @nca78 All clear! What's your experience with this ME2188 booster? My feedback is positive: cheap, low power consumption, at least on the basis my measurement (not so accurate), and no noise that interfere with the radio module and the AS312 PIR.

    Below the board (v.1.0) with 2xAAA batteries and RFM69 radio module
    0_1568554061455_20190906_202346.jpg
    0_1568554074634_20190906_202357.jpg

    CR2032 battery and NRF24 radio module (THT)
    0_1568554172071_20190914_110010.jpg
    0_1568554185104_20190914_110056.jpg

    CR2032 battery and NRF24 radio module (SMD)
    0_1568554251281_20190914_111137.jpg

    The board v.2.0 is coming. If someone is interested, here all the project files (Kicad)


  • Hardware Contributor

    @franz-unix said in Pir AS 312 with 2 rechargeable AAA battery. Boost needed?:

    My feedback is positive: cheap, low power consumption, at least on the basis my measurement (not so accurate), and no noise that interfere with the radio module and the AS312 PIR.

    At least no visible interference with the radio module, but you might get some.
    And for RF radiation, interferences and range, no clearance/orientation of the antennas is not good too.



  • @scalz with the RFM69 radio module (868 Mhz) I can cover the whole house (about 100 m2), with 3 walls between the gateway and the node, so, for my use case is adequate.

    With the NRF24 radio module (THT version) I have the same (poor) range that I can obtain with an Arduino and the same radio module connected with jumper wires, so on the basis of my test the quality of the radio signal is not affected by the boost converter.

    I have not yet deeply tested the pcb with the smd version of the NRF24 radio module.

    In any case do you have any suggestion for a better orientation/clearance of the antenna? Please note that for the RFM69 radio module you can place the antenna in any direction or side of the PCB that you prefer.


  • Hardware Contributor

    @franz-unix
    yes, rfm69 modules are great. I prefer them too, and already made custom boards with boosters in the past with these (some with filters or not).

    But I didn't say your board won't work πŸ™‚
    Just meant:

    • you would need tools (scope, vna etc) to know about intereferences.
    • Same, that's a bad practice to not have any clearance around the antenna.
      Like you said, nrf24 has poor range, still you kept a bad orientation πŸ˜‰ You could rotate it 90Β° so antenna would be outside your board, same for rfm69.

    But don't change that for me. I prefer modern mcus, that's a while I've used a 328p mcu!
    Like you said if you're happy with results, I'm glad for you too! When it's for personal use, sure, we can take shortcuts, I understand. Craftsman always knows where the little flaws are πŸ™‚

    Keep the good work, your board looks nice πŸ‘



  • @scalz I know that you are a beast in the board design 😁
    Thank you for sharing your experience! πŸ˜‰

    Newer MCU, like NRF52 will be also my next step, but for the moment I feel more comfortable with the well known and easy to use ATMega328P.

    I agree with you, the range and the reliability of the RFM69 is by far better than NRF24.



  • And... the 3d printed case for the board V.1.0
    Some adjustment in the tolerances and print settings are required, but the final results may not change so much.
    0_1569154773123_20190922_140443.jpg
    0_1569154788879_20190922_140453.jpg
    0_1569154800318_20190922_140629.jpg
    0_1569154811197_20190922_140643.jpg

    The case for the board V.2.0 will be similar, only the position of the LED will change.



  • @nagelc

    @rozpruwacz said in Pir AS 312 with 2 rechargeable AAA battery. Boost needed?:

    @franz-unix said in Pir AS 312 with 2 rechargeable AAA battery. Boost needed?:

    About the Li-ion battery, it seems to be a general agreement (see this topic for example) about the fact that the best option to power a node is with AA or AAA batteries. In fact one of the advantages is that you don't need to step up or down the voltage to power the radio and the MCU.

    There is no one "best option". The power supply heavily depends on the project requirements. The PIR sensor requires noiseless voltage between 2.7 and 3.3v. This makes use of 2xAA problematic. In my opinion for such a project higher voltage supply with low quiescent current ldo is the best option. And it happens that li-ion battery with its voltage range and 3v ldo makes them perfect match. At least this is how I did it in my homE I went even further in my project and there is two ldos, one for pir and one for mcu + rf module as those two components creates large spikes in current flow as they work making supply voltage noisy.

    PS. The other benefit of rechargable batteries is that they are rechargable πŸ™‚ so you don't need to remember to buy batteries when you go out of them.

    you will handle the pir in your software but generally the pir needs to be powered all the time so no need for shutdown mode in your boost converter. The other thing is that pir doesn't linke noisy power supply, and dc converters are rather noisy especially in low current area. I would recommend t



  • @seniora the board supports multiple batteries and multiple radio modules.
    When Vcc goes below 2.7V (BoostThreshold in the sketch) the booster is turned on and stay always on, while when Vcc is > 2.7 the booster is turned off and stay off. This is the case of a fully charged CR2032 battery or 2xAAA disposable (Alkaline) batteries.
    With 2xAAA rechargeable batteries (NiMH) Vcc is max 2.4V so the booster is turned on by the MCU.

    The ME2188 works well with RFM69 and 2xAAA rechargeable batteries (Vcc < 2.7V): no false positive in the PIR and good range for the radio transmission. See below that in the night with no motion the pir stay off (clear) even if the booster is active.
    0_1571681248445_pir2.png

    0_1571681172360_pir.png

    With the NRF24 radio module and a CR2032 battery I have some (not so frequent) false positive in the PIR, but the booster here is always off (VCC > 2.7V), so this may be caused by something else. Searching around, found this.
    Probably is the 2.4 Ghz RF signal of the radio module that triggers some false positive in the PIR!
    In fact I observe this false positive when the node wakes up by a timer interrupt and start sending data.


  • Hero Member

    When you sleep the node with a PIR connected, a small 'nap' before the main sleep helps to settle the Vbat, and it usually avoid false triggering. Maybe this will help:

    sleep(500);
    sleep(INTERRUPT,RISING, SLEEP_TIME);
    


  • @rvendrame Thanks, I have tried your small "nap" trick and in fact something is happened... but in the opposite direction! The number of false positive is increased πŸ˜‚

    But probably this is the way to solve the issue. Please note that, in order to stabilize the battery voltage, in the sketch I already have a cr2032_wait() function that sleep the MCU after each radio transmission, if the battery type is set to CR2032.



  • Hi guys, project finished! Now the led are under the Fresnel lens, so the design of the case is more clean (WAF +10 😎 ).

    The final result:

    2_1573854920253_case2.jpg 1_1573854920253_case1.jpg 0_1573854920253_case0.jpg

    With 2 x AAA batteries and the RFM69 radio module the node works very well and the total cost of the parts is about 10€.

    If someone is interested, here a detailed build guide, with the links to all the parts of the project (3d model of the case, Kicad project, gerber files, BOM, firmware).



  • few month ago ,i use tlv61220 step-up boost only for as312 is only 4ua, atmega328p ,battery cr2477 , then get 21ua ,
    but now ,i give up boost , i test use ER14335 3.6v CR16340LIPO 【4.2V with diode 0.7V Step-down then 3.5V+- 】 ,same as312 get 18ua,☺ ,ER14335 cost much but 1600mah ! cr16340 750mah rechargeable best choose for me,,,,



  • @franz-unix
    This is wonderful work... thanks for inspiring me πŸ™‚
    I know that this is an old thread,
    but can you give me a link of the AAA battery holder please ?

    I just make a node sensor and I want to use it.
    Thanks a lot
    Denis



  • @DenisJ : Glad to know that this work has been useful for you in some way. πŸ‘

    Regarding the AAA battery holder, the footprints on the PCB are for a Keystone 5204 (negative) and Keystone 5226 (positive) contacts.

    I have purchased them on ebay; unfortunately the item that I have purchased is not more available, but this one appears to me like the same thing.



  • Thanks a lot Franz... I have buy this one... maybe is more little

    Thanks again
    Denis



  • @DenisJ the link is broken, so I have not seen the contacts that you have bought, but if they are just a little bit smaller and they can fit the hole on the pcb, they should be OK.



  • I don't know... the link it's work on my side.
    Anyway here is the pic:
    2a967941-5544-49c4-82d9-056c13e4d596-image.png

    Yes, I think will be ok... I hope πŸ™‚

    Thanks a lot
    Denis



  • @franz-unix Hi, this post is very old I hope I can get an answer πŸ™‚
    I have ME2188 here but the behaviour of CE pin in extrange.
    If I apply high to CE pin I get my correct 5v but if I change CE pin to low I get 4v on the output and I hope to get 0v.

    Anyone can share your experience?


  • Hardware Contributor

    @Diego-Serrano said in Pir AS 312 with 2 rechargeable AAA battery. Boost needed?:

    @franz-unix Hi, this post is very old I hope I can get an answer πŸ™‚
    I have ME2188 here but the behaviour of CE pin in extrange.
    If I apply high to CE pin I get my correct 5v but if I change CE pin to low I get 4v on the output and I hope to get 0v.

    Hello, this is the normal behavior for this chip. CE will enable the step up, but with CE low it acts as a bridge so you get input voltage at output.
    Pretty annoying πŸ™‚

    Anyone can share your experience?

    My experience was to add an MT9700 power switch before the voltage input of the ME2188. The EN pin of the power switch is connected to the same signal than the CE pin of the MT2188, driven by the microcontroller.
    It works fine like this driving a Plantower PM sensor not a PIR (don't pay too much attention at the caps at output I just wanted to have different footprints available).

    ME2188.png



  • @Nca78 said in Pir AS 312 with 2 rechargeable AAA battery. Boost needed?:

    Pretty annoying

    Thanks you very much.



  • One Last (boring πŸ˜‚ ) question... Have you placed a flyback diode across the inductor? I'm not sure if this component is strictly necessary.


Log in to reply
 

Suggested Topics

  • 87
  • 10
  • 9
  • 6
  • 1
  • 7

27
Online

11.2k
Users

11.1k
Topics

112.5k
Posts