Disconnect power lines
-
Hi all
I have a Sipy and I put a deepsleep every 15 minutes. I have a ds18b temp sensor and I saw that may be the energy is on when the pycom is in deep sleep. There is any option to power the lines via pin? I saw an example but I don't know if this line has a mosfet or something that cuts the power in deep
Thanks'
Eduard
-
@ecabanas you can power the ds18b20 from a gpio pin, which you switch on and off as required.
-
Hi @robert-hh
Do you know if powering via gpio, will no have power leak? I designed a board for arduinos 2 years ago and the only way to avoid power leaks is using mosfets...
Thanks again
-
@ecabanas A good way avoiding that is to switch the GPIO pin to 0 or to input mode before starting deepsleep. That stops potential leakage. The current drawn by the ds18B20 is ~1 mA in active mode. So suppying it from a GPIO is not a problem.
Take care to connect the pull-up resistor for the data line to the same source. -
@robert-hh One thing I discovered Rob is not all DS18B20s are created equal. I found my collection of several dozen, acquired over as many years of tinkering, fell into 3 groups of standby power consumption. Group1, standby power <1uA, group2 0-1uA & group3 50uA.
-
@kjm Were these all genuine parts or also some fakes. You sure know this post: https://github.com/cpetrich/counterfeit_DS18B20
-
@robert-hh unreal!
-
Hi,
Thanks for your answer and sorry about the delay but I was closing year.
I connected to pin0 with the following code:
from machine import Pin import utime import time import socket import pycom import machine #Power the sensor pinPwr = Pin('P0', mode=Pin.OUT) pinPwr(True) pycom.heartbeat(False) pycom.rgbled(0x00ff00) time.sleep(2) pinPwr(False) machine.deepsleep(1000*10)But I only have 2.20volts, and the minimum for the sensors are 3.3V, you know why I only have 2,2vlt?
Thanks
Eduard
-
@ecabanas
now is working on pin8;-)
-
@ecabanas You cannot use P0, because that one is the RX pin of the UART0. Use another pin.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login