Shop OBEX P1 Docs P2 Docs Learn Events
Prop Reset Using PIR Input as Power Save? — Parallax Forums

Prop Reset Using PIR Input as Power Save?

StephenMooreStephenMoore Posts: 188
edited 2014-06-15 22:00 in Propeller 1
I do not know if I am using this sensor correctly. The goal is to set up a battery powered door alarm.

The circuit consist of a prop project board, a PIR sensor RevB (Product ID 555-28027), LED and AA power pack(4 cell).

The output of the PIR is wired to the Prop RESn.

No Motion = Prop in RESET condition and therefore no power drain on AA power pack.
Motion = Prop BOOT into LED blink program.

Is this a valid power save mode for the Propeller?

I get sporadic results when the PIR is driven at 3.3V. If I wire it to the 5V regulator it seems to function OK.

Is this the lowest power drain possible for a constantly monitored alarm?

Comments

  • Clive WakehamClive Wakeham Posts: 152
    edited 2014-06-14 22:28
    How are the AA batteries wired?

    What type of AA batteries are they? Ni-cads?

    What is powering the sensor since you say there is no power drain on the AA batteries OR are you saying that there is no power drain by the prop?

    And what is the output of the sensor like? Is it a sporadic output?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-06-14 23:40
    The Prop takes awhile to come out of reset and to load the EEPROM program into RAM for execution. You may want to consider interposing a CMOS one-shot multivibrator (TLC555 circuit, perhaps) between the PIR and nRST to make sure the Prop has time to activate the LEDs.

    The other thing you could do is to connect a Prop output to nRST to make sure it stays high until the program runs long enough. Then tri-state it to let the PIR take over again. You'll need a resistor between the PIR and nRST in that case.

    -Phil
  • StephenMooreStephenMoore Posts: 188
    edited 2014-06-15 16:49
    There are 4 x 1.5VDC AA batteries (alkaline) in the cell wired directly to the PIR and the Propeller Board Vin. So the sensor is always powered but at a very low current drain when off.

    The sensor output is on/off at a voltage I measured to be about .5Vin.

    When taken out of reset by the PIR, I can get the Prop to boot and usually give me a dozen or so blinks before the sensor turns off and the Prop goes back into reset.

    I like the idea of latching the Prop RESn with its own IO. I actually need two PIRs wired independently (maybe a pair of NPN transistors could be employed?)

    I also have placed the Prop in RCSLOW mode to save power. How much power am I really saving by using the reset circuit instead of just leaving the Prop up and running at 20kHZ, I do not know. If I can go 1 year without replacing the battery that would be good. It also depends on how many times the door alarm gets tripped.

    This set up is for a high use door that has a cypher lock on one side. When people go to punch in the cypher code somebody comes barrelling through the door from the other side and jambs their fingers into the keypad. We have actually had broken hands with this arrangement. So a PIR on each side with warning LEDS to alert users is a big safety solution.

    Has anyone else configured the Prop for ultra long battery life?
  • edited 2014-06-15 19:19
    I also have placed the Prop in RCSLOW mode to save power.

    Using waitpeq or waitpne will reduce power consumption by 7/8th while waiting for the condition. Waitpeq or waitpne combined with RCSLOW should give some good power savings.

    Sandy
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2014-06-15 19:22
    Using RESn like that is not a micro power state. The last time I measured, it drew ~0.8mA with RESn pulled low. That is largely due to the ~5k internal pullup resistor. It may be different if you disable the brownout circuit and use an external reset generator IC.

    You can do a lot better with RCslow. With that you can get down to 5µA plus 3µA per COG. If you leave it spinning on a waitpxx, and then jump direct to RCfast when the PIR fires, the response latency can be quite good. Just to drive an LED you don't need to fire up the crystal oscillator or the PLL. All good for low current.

    The prop while waiting will be drawing much less current than the PIR sensor. The 28027 data sheet says it draws 130µA while idle. Add 10µA for the Propeller, and you have easily a year of battery life. Provided it spends a relatively small fraction of its time in the active state flashing the lights.

    However, and this is a big if, the other thing you have to be concerned about are the voltage regulators that supply power to the circuit and whatever else is drawing power on the prop project board. My guess that those power drains overwhelm the prop and PIR drains. That is where you will need to work on it in order to get the 1 year battery life. You might be better off probably with a DIY circuit board with a micropower linear regulator. To get one year from 4*AA , you will have to keep the average current drain below 300µA.
  • StephenMooreStephenMoore Posts: 188
    edited 2014-06-15 22:00
    Thanks for the insights.

    I'll jettison the RESn power save approach, 0.8mA is pretty high.

    Maybe a modification to shutoff power and use a LDO regulator...
    1024 x 643 - 62K
Sign In or Register to comment.