Question about Espruino Pico Deep Sleep Mode / Workaround to Read reliable sensor output with a Transistor #1532
Replies: 11 comments
-
Posted at 2016-04-11 by @gfwilliams Hi - yes, it's expected that the 3.3v and VBAT rails will always be live - even when the Pico is asleep, it still needs a power source. Is this the moisture sensor?. If so, it mentions it takes 7mA, which would probably explain your power draw. Espruino's IO pins will actually supply 20mA, so you could just power your sensor directly from one of Espruino's IO pins, with no external components... However the spec on that page does say it expects 3.5v minimum, so it's possible that might not work. For driving a transistor from Espruino, you should have a resistor. It might work for you right now, but it will be putting strain on the transistor and your Pico. Transistors work on current, and can only be supplied with around 0.7v - so if the Pico is trying to force it to 3.3v, something's going to be given a hard time! You could however use a FET. They work on voltage, not current - so you don't need a resistor for them at all. One quick question: what voltage is your battery? If it's greater than 5v then if you did use a transistor/FET, you'd have to be careful about exactly how you wired it up so the Pico wasn't over-volted when it was turned off. Finally, it could be possible that the Pico isn't going into deep sleep. Writing To get a rough idea, maybe try setSleepIndicator - so Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-04-15 by sp33c Hi Gordan, thank you very mich for your great help, it clarifies many things! I really apprecaite. To your question: Yes, it is the moisture sensor mentioned. My battery is a LIPO 3.7V. However it isn´t directly connected to the Espruino. It is connected to a Ardafruit LIPO charger, that itself has a photovoltaic panel connected to it. It can state by signal charging or done. I will try to work with the setSleepIndicator, heard the first time of it. I will try to workaround with your tipps and try to put it into the concept as it may be a bigger one for outdoor (I am not sure about it now). I haven't had time yet to tweak with the above in mind around. I may come back to you again. kind regards, |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-04-17 by sp33c Gordan, I have a question. I am looking for a MOSFET capable of switching with 3.3V from a output PIN from Espruino to run my BLE-Device. Do you know which MOSFET I may use? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-04-17 by MrTimcakes What sort of current capacity do you need? Depending on that I believe you could just pick any of these, just select the "Continuous Drain Current Id" filter to above what you need . |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-04-18 by DrAzzy If you need through hole - The irf3708pbf is okay at 3.3v, for low current 5LN01SP is great. That's all n channel for low side though. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-04-22 by sp33c @ducky - thank you. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-04-22 by DrAzzy Yes, that is extremely low current :-P 5LN01SP is rated up to 150mA - though it's N-channel, not P-channel, so you're switching the low side. The creatively named 5LP01SP is the complementary P-channel one if you want to switch high side. (only 70mA and digikey doesn't stock them, though - mouser does, though). Note that you may be better off switching the low side, since the idle state of a UART pin is high. At that point, you could probably just power it off an Espruino IO pin? You can get 20mA out of them as Gordon noted above. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-04-24 by sp33c thank you so much to all of you. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-05-06 by sp33c I could successfully switch a HM-10 BLE Device with the 5LN01SP (using a IOPin for Gate). However only with VBAT to source (Espruino was hooked up with USB => 4,5V?). the 3.3V pin does not work, when switching with a IO-Pin at Gate. the current seems not high enough. Is there a way to use 3.3V, e.g. use two MOSFETS in parallel? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-05-06 by @allObjects @sp33c, I'm sure you have seen this conversation about GPS powered by Espruino pin(s). - I needed at least 2.7V and up to 67mA and had to 'sacrifice' 4 pins. You most likely get away with 1 - at worst 2 - pins... with the advantage that it is switched on the high-side... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-05-07 by sp33c good thread thank you |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-04-10 by sp33c
Hi there,
I encountered Espruino Pico let still draw from 3.3V or VBAT when in deep sleep mode.
I was running low of battery after even 10days with my sensor (vegatronix moisture sensor) connected to either 3.3V or VBAT. Even I prove with the USB serial the most time the pico has been in deep sleep mode. I was only able to connect to USB serial, when the power was back.
Is this really the behavior of pico not shut down 3.3V or VBAT while in deep sleep mode? ... letting anything that is connected to these pins, will draw power?
As I workaround:
I would like to put a transistor before that sensor, and put 1 to the base, and after that signal gives a current to that sensor I read from that sensors pin on another Pico pin. This already worked quite well with my bluetooth module, wich I drive only once or twice a day for some seconds to connect a base station.
My second question however is how to connect that sensor with. Would it be better to drive it with a second power source to have a stable non-volatile current to be able to read with the pico?
Do I need a resistor at the transistor's base? (with the BLE it works without)
Has anyone experience with such requirements to be able to read always reliable sensor data?
(it is all a little mixed - I thought I post it alltogether, insteas of having 5 separate threads)
kind regards,
Alex
Beta Was this translation helpful? Give feedback.
All reactions