A place users can post their projects. If you have a small project and would like your own dedicated place to post and have others chat about it then this is your spot.

User avatar
By iboboc
#37464 Great work with your ESP8266 and a very good inspiration. Congratulation!

I've taken some good ideas from your project and use it in a smart button project: https://www.hackster.io/iboboc/smartbutton-pro-06ce5d since it is mainly the same thing (Simple push button instead of PIR)

I would probably build a PIR as well in the future (using mainly the same hw/sw).
Anyway, thanks and wish you all the best!
User avatar
By joyrider3774
#39182 Hi,

I'm interested in this project. I'm very very new to electronics but i did buy an adafruit huzza and managed to solder it and to get a few things going in the arduino ide. I also managed to "recreate" the button example from the main post here with adafruit huzza or at least i think i did since i can see it reporting to serial (if i add a delay statement before the power off) and then powering of and doing a power on when pressing the button. I can see it "starting" since the blue and red light flicker once and then go off

The question i have is what kind of current are you guys getting when the device went to off state ? The reason i'm asking is that when i measured it on the huzzah (which has some extra's like a regulator for example) by placing the multimeter between acutal battery + and battery + pin on the huzza i still got 0.34 mA (340 uA) of current drawn from the batteries while the device is supposedly sleeping / powered off. Also it seems the huzza has some kind of problem since when i put the device in deep sleep (not using this method) the red led on the huzza itselve is slightly dimmed. When trying out this method using the button it's also slightly dimmed and probably drawing current as is the voltage regulator and perhaps some other components on the breakout board adding up to the 0.34 mA current

Could it be this kind of setup (wake and sleep / power on & power off) is only optimal for plain esp8266 modules and not breakout boards like the adafruit huzzah ? if i know what kind of current "plain" modules are getting in the sleep / power off state i can take it as a reference and perhaps one day buy some plain modules and experiment with those as well.
I'm guessing it should be really really tiny since the esp is not powered on at all with this setup ?

is there a way to do something similar like this with an adafruit huzzah ?
User avatar
By joyrider3774
#39876 yesterday i tried the circuit again, I think i had set it up wrong the first time i tried to create it.
It *seems* to work now but the esp8266 (huzzah from adafruit) behaves eraticly. it works a few times and then i get all giberish on the serial connection and it keeps doing this, then sometimes it works again. on a few occasions i had it happen that the eps8266 seemed to be stuck not reacting to "pir movement resets" and constantly using around 70mA, not sure what its doing then but i also see gibberish on the serial line then.

I did change the pulluppin and pir sensor pin to pin 4 & 5 on the huzzah.

If someone also has an adafruit huzzah can they test it out to see if this actually can work on it ? I'm connecting my 3.7v lithium ion battery to bat+ & gnd and pir is connected directly to battery as well.
when i wrote my previous post i did not do this and used the 3.3v pin to power pir and that seemed to cause problems also.
My pir works at 3.3v by bypassing a regulator.

From what i can see by adding numerous serial println's is that the pir pin is being waited for to go low correctly. And i think the ch_pd up works as well. I'm not certain though but i think with the huzzah this is pulled up by default and you have to bring it momentary down and back up to reset.

It does seem to work sometimes but not consistent.

I'm guessing the giberish on the serial line is communication from the esp8266 modules itselve, but i've tried all the baud rates in the combobox in the serial monitor in arduino ide and it stil did not show probably.

So if someone knows if this is possible with huzzah at all or has some time to test it out with their own huzzy and let me know the results it might save me time trying to get it to work since i'm only a beginner and don't know if the huzzah may work with this setup
User avatar
By Barnabybear
#39877
gibberish on the serial line

Hi, this often a sign that GPIO 2 wasn't pulled high at the time of power on or reset. As such it boots into 'SD card mode', the gibberish is the ESP trying to get an SD card to communicate with it. The original circuit gets round this, as the output of the PIR pulls both GPIO 0 & 2 high at restart.
If you still have problems post a quick drawing of your circuit and I'll be happy to advise.