# Is the parasite mode of a DS18B20 less power consuming than the normal mode?

## Description

I'm trying to make a few small temperature sensors for in our house and want to go for "low powered battery operation".

My current plan is to use esp-now in the esp8266, deepsleep between measurement and use a ds18b20 to measure temperature.

Initially I though to use the parasite mode of the ds18b20, as you can turn of the sensor when not used. However, depending on the accuracy (lets say 12bit) you need to wait 750ms (while keeping the pin high) before you can get the results. Looking at the data sheets, it seems this might be the wrong tradeoff? (750ms of a running esp8266 at 15mA)

## Question

So, my question, would it be better to just connect the ds18b20 directly to power, as it's standby usage is max 1uA and deepsleep the esp8266 during the Tconv?

I plan to measure temperature once a minute.

## Scenarios

### Scenario 1 (parasite)

1. Wakeup esp8266 based on timer, send measure request to ds18b20
2. Modem sleep esp8266 for 750ms at 15mA (sadly it seems impossible to use a timer to wakeup from light sleep)
3. Get the measurement from the ds18b20
4. send it using ESP-now

### Scenario 2 (normal)

1. Wakeup esp8266 based on timer, send measure request to ds18b20
2. Deep sleep 750ms at 20uA
3. Wake from deepsleep
4. Get the measurement from the ds18b20
5. send it using ESP-now

### Differences

Except for the obvious difference of deepsleeping during the Tconv, I thought of the following differences:

1. in scenario 2 we add standby usage of 1uA for the ds18b20
2. in scenario 2 there might be some overhead in waking from deepsleep

### Similarities

As both scenario's will include sending the measure request, getting result, sending it using ESP-now, I think that those aspects can be excluded from the question? (if you have a useful tip, be sure to leave a comment ;-) )

## References

### ds18b20 energy usage

• "750ms of a running esp8266 at 20mA" perhaps the ESP8266 power management is too ungainly, but with a normal MCU you could sleep during that time. – Chris Stratton Oct 20 '19 at 19:29
• Based on my similar power consumption with Co2 sensors and annual battery replacement, go for it or hardwire thru unused telco pair Line 2 with Lithium AA. battery Voltage ought to be included for aging. the cheap Alk leak and die in a year or 2 when bought in 100:qty cheapo – Tony Stewart Sunnyskyguy EE75 Oct 20 '19 at 19:53
• How long does the esp8266 need to be on for per minute if the sensor is always powered? – Bruce Abbott Oct 20 '19 at 20:21
• I've updated the question with some more details, to hopefully answer the comments. – Davy Landman Oct 21 '19 at 8:14

What average power consumption do you get in parasite mode and what in active mode? Just do the math.

Be aware, that the DS18B20 is charging an internal capacitor for voltage buffering when beeing in parasitic mode, so I don't think you will reduce power consumption with it (also the datasheet suggests to drive the dataline with a FET to strong HIGH during aquisition to deliver enough current).

Some rough calculations:
With a standby current of the sensor of 1µA the consumption is neglectable in comparison to the ESP. During these 750ms of "unnecessary" on-time the ESP is drawing as much energy as the sensor is drawing during 15,000s (more than 4 hours).

Again, it depends on how often you are going to take measurements. If you measure only once a day, parasitic mode will safe you some power. If you measure once a minute, I guess not.

// Oh, I somehow did not see you specified $$\f_S \$$ with once per minute. In this case, I wouldn't bother using parastic mode.

But anyhow: Even in deep sleep your ESP is drawing 20µA. This means, if you get rid of the additional 1µA from the sensor your stand by consumption will go down by only 5%. Not worth it, I think.

• Thanks, I wanted to check if I was missing something, and couldn't find a good discussion on internet. I notice that my electrical engineering knowledge is rusty to say the least. I thought there might be some interactions that I was overseeing. – Davy Landman Oct 21 '19 at 11:01