Shop OBEX P1 Docs P2 Docs Learn Events
BS2 power consumption — Parallax Forums

BS2 power consumption

BritannicusBritannicus Posts: 98
edited 2011-03-04 13:55 in BASIC Stamp
Hi there.

I'm contemplating a project for my BOE to water my plants on holiday. I'm intending running the BOE on a standard 9v battery - leaving the stamp to tick away time over the days. Then on a daily basis to switch a small pump to water the plants daily.

The pump has it's own power supply 12v battery, so I'm only using power to switch it for 2 mins a day (5V 10Ma draw). My question is, how long will a BS2 stamp run on a duracell 9 volt battery before flattening it? - I've no measure, as in the past I've always run servos etc off the battery and so it's not lasted very long.

If I simply use it as a timer - how long before the battery dies from just the power drawn by the stamp and the LED in the BOE ? is there any way to prolongue battery life? I'd run it from a wall socket, but there isn't one available .

Cheers Chaps

Comments

  • Mike GMike G Posts: 2,702
    edited 2011-03-03 04:42
    According to the published BS2 specs

    @5V 3 mA Run; 50uA Sleep

    An alkaline battery is 400 to 600 mAh. So 600/3 is 200 hours.
    is there any way to prolongue battery life
    Solar power, sleep at night or the day, get a battery with more capacity, use a real time clock, run off the pump power.
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2011-03-03 09:37
    I second Mike's suggestions.
    The SLEEP command is pretty accurate at long time intervals, certainly adequate for a holiday, and what does the plant care about that accuracy anyway?

    For two minutes a day it would be,
    DO
         HIGH watering
       PAUSE 120   ' 2 minutes,  could even use SLEEP 120 here if the pump can tolerate 2 second glitches
         LOW watering
         SLEEP 43200   ' 12 hours
         SLEEP 43080   ' 12 hours minus 2 minutes
    LOOP
    

    At 50 µA for 86280 seconds and 10 mA for 120 seconds, the average power drain is approx.:
    (0.05 * 86280 + 10 * 120)/86400
    = 64 µA

    And that 500mAh batttery should last for 500 / 0.64 = 7812 hours = 325 days. Better come home from holiday now!

    Be sure to put unused Stamp pins in definite states so that they don't float--bad for power drain.
  • BritannicusBritannicus Posts: 98
    edited 2011-03-04 11:37
    This is great - given a bit of thought - I'm not now going to use a pump - just have a reservoir with gravity feed. then use the stamp to control the flow once a day for a few seconds - easy peasy !

    Thanks for pointing me at the Sleep instruction - must've missed that one !
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-03-04 13:55
    I'd base that decision on how big your reservoir is. Gravity, water and in your house is a disaster waiting. Don't ask me how I know this :(
Sign In or Register to comment.