optimyze deep sleep with PCF8591

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
rudloffl
Normal user
Posts: 43
Joined: 04 Jul 2019, 07:17

optimyze deep sleep with PCF8591

#1 Post by rudloffl » 09 Feb 2020, 06:50

Hello all,

I'm working on a project I called "growinator" (esp + PCF8591 with 4 soil moisture sensors) :D

I will use the deep-sleep model, but I noticed that when in sleep mode, the LED on the PDF8591 is still on (therefore draining the battery).
I'm looking for a solution, but I need your input to take the right decision/solution:
- Maybe it's fine and I don't need to over-think that ! Tests are in progress
- I could use a ESP GPIO to power the PCF8591 (can the GPIO support that ? Will the I2C be detected properly ? Do I need moffset ? Is a level shifter OK ?)
- Is there a solution I'm missing ?

Any idea what would be best ?

Thanks

User avatar
Ath
Normal user
Posts: 3418
Joined: 10 Jun 2018, 12:06
Location: NL

Re: optimyze deep sleep with PCF8591

#2 Post by Ath » 09 Feb 2020, 13:56

Ask yourself if the LED is needed for anything (monitoring activity and such), and if it's redundant, remove it by either soldering it off, or cutting it from the circuitboard with a boxcutter... (I usually do that for the ESP01 boards I have)
/Ton (PayPal.me)

rudloffl
Normal user
Posts: 43
Joined: 04 Jul 2019, 07:17

Re: optimyze deep sleep with PCF8591

#3 Post by rudloffl » 09 Feb 2020, 17:50

I agree with your idea, but I was looking for something more elegant.

The led is only draining mildly the battery, I would like to make sure there is not something more consuming running in the background (and is most likely consuming much more than the led).

My project was up and running all night in deep sleep mode (250 sec on and 10 sec sleep to work the battery) and i lost less than 10% battery ( will run with a solar panel in the future).

I will try something with a level shifter to have the i2c running on 5 volts, and pilot the i2c vin with a gpio (that I will put high on boot). I will keep you informed.

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: optimyze deep sleep with PCF8591

#4 Post by Shardan » 09 Feb 2020, 18:14

Ooops.. double post, sorry.
Last edited by Shardan on 09 Feb 2020, 18:38, edited 1 time in total.
Regards
Shardan

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: optimyze deep sleep with PCF8591

#5 Post by Shardan » 09 Feb 2020, 18:38

Using a GPIO to switch on/of the PCF might not work.

The PCF8591 uses the I²C-interface.
I²C runs an initialization process when the ESP boots up.
This init process might run before you can start up the PCF via GPIO.
So initializing I²C will not find the PCF in this case.

Just an Idea I had when reading this:
A solution might be using an external watchdog timer like a TPL5010
together with a controllable (enable/disable) voltage regulator.
The TPL5010 sends a "WAKE" pulse every n seconds, usually to a CPU.
This could set a simple FlipFlop to switch the voltage regulator on.
When measuring is done, a GPIO pulse resets the FlipFlop, voltage
regulator goes back to standby.
FlipFlop might be bulit with a CD4001 cmos logig gate circuit,
the quiescent current is below 1µa @5V. The TPL5010 takes 0,05µA.
Regards
Shardan

rudloffl
Normal user
Posts: 43
Joined: 04 Jul 2019, 07:17

Re: optimyze deep sleep with PCF8591

#6 Post by rudloffl » 11 Feb 2020, 06:29

I like the idea, but it's way beyond my skills ! Thanks for your input.

Would use a GPIO "high on boot" such as SD2 or SD3 help me in your mind? I will test and let you know
https://espeasy.readthedocs.io/en/lates ... /GPIO.html

Thanks again

Post Reply

Who is online

Users browsing this forum: No registered users and 23 guests