-->
Page 1 of 2

Simplest way to do a battery powered esp8266 sensor?

PostPosted: Fri Jan 30, 2015 1:14 pm
by Finnduino
I would like to create a sensor which will run at least 12 months with AA-batteries. It should be normally completely OFF, activated by PIR, or magnetic door sensor, and when activated it should run 30 seconds, open connection to wifi, and post to pushingbox.com that something triggered it.

I'm not electronics specialist so I need to do it simple. I have tried to use 8 LED PIR following instructions here:
http://www.instructables.com/id/Plane-i ... o-Do-Your/

I removed all led's and connected gnd --> gnd, then one positive pin of led to CH_PD and from another anode foot of LED pin to VCC. After that esp8266-01 red led has light or glowing, but not really bright. Blue led in esp8266 flashes just once, not like normally when connecting to network. So I was wondering is this voltage or power problem? Should I add something like optoisolator or try to find 3V relay? I have tested module by connecting directly to 2 AA-batteries, it works fine

Or would it be better to use this one and some way add it to work with for example magnetic door sensor?
http://www.dx.com/p/v89-2s-1000h-settab ... pcs-221756
or this?
http://www.dx.com/p/3-3v-18v-10s-24h-ti ... een-296557

Re: Simplest way to do a battery powered esp8266 sensor?

PostPosted: Sat Jan 31, 2015 1:06 am
by Buggz
Some quick thoughts ..

The circuit will ALWAYS draw some current, and I doubt that 2 by AA will last 12 months.

The Instructables example seems to use a 9V battery... so I assume the original in the PIR was 9V. Either way 9v is TOO much for an ESP, it is strictly 3V. This example also seems to power a motor (unknown voltage) in place of an LED. LED's are generally about 1.5V and fed by a dropping resistor to limit current to 10mA or so, so this is not a practical way to power the ESP.

I'd look at this scenario: use a solar cell and PIR to turn the ESP on, so they don't use your main power. Power the ESP from another source, say a rechargable battery and a solar cell. The PIR will have to keep power on for 20 seconds or so to allow the ESP to stabilise, connect to the Wireless network, do it's business and whatever. Assuming it's not activated too often, the cell should last plenty of time.

Another way may be to use solar garden lights, the one I recently looked at seemed to be 1.5v and I didn't go into the circuit, but you might put two in series to get 3V. They seem to power an LED for several hours each night, so would have the sort of capacity you'd need, but the ESP still draws much more current than an LED when the wireless is working.

Dave

Re: Simplest way to do a battery powered esp8266 sensor?

PostPosted: Sat Jan 31, 2015 1:58 pm
by MeNoGeek
I don't know this particular PIR-activated device, but it looks like it's designed to provide light when someone moves in front of it at night (there's a photoresistor, probably to turn it off during daylight.)
And, if my understanding is correct, you've replaced some of the LEDs by your esp8266-01.
When LEDs are used for illumination, they're generally driven by a circuit supplying a constant current, in order to improve efficiency and avoid burnout.
On the other hand, your wifi module needs a constant voltage source (ideally, and as close to 3V3 as possible), one that can provide up to 250mA of current when transmitting. But the device you're using as a power supply is designed to NOT supply that much current.
For a better understanding of the underlying principles, you might want to check the following page. Although the LEDs in your device look like being wired in parallel, the song remains the same:
http://w9xt.com/page_electronic_project ... hting.html

Re: Simplest way to do a battery powered esp8266 sensor?

PostPosted: Sun Feb 01, 2015 3:49 pm
by alonewolfx2
maybe you can use PIR with npn diode for waking module from deepsleep. you can use 4aa battery and ldo for this operation. PIR needs 5v and output pin 3.3v so esp can handle this request. screnario, esp always in deepsleep mode and PIR always standby for motion sensing. esp consuming ~45microA in deepsleep, PIR consuming ~55microA in standby mode. ldo consuming ~50microA in idle. 150microA total consuming in idle. propably 4aa enaugh for 240 days if PIR sense 2 motion per hour.here is my senarios part list.
-lf33abv(3.3v ldo)
-esp-01
-PIR on this link http://www.ebay.com/itm/161165330791
-bc547(for converting PIR's high signal to GND)
fccccc.PNG