Close

Low Power Counters

A project log for ESP-NOW Weather Station

An ESP32 based weather station investigating ESP32's Deep Sleep and ESP-NOW

kevin-kesslerKevin Kessler 09/25/2020 at 17:331 Comment

Because the ESP32 can't wake quickly enough to keep up the the Anemometer, I decided to use a hardware counter to handle that task. The 2 chips I have that can do this are the PCF8593 from NXP and the S-35770 from Ablic. I set them both up to count anemometer rotations, so I could decide which on to use.

Both of these chips use  the I2C interface, and in single chip quantities the PCF8593 is $2.87 and the automotive spec'ed S-35770 is $5.83. So price is in favor of the NXP chip, unless you need the 125 C temperature range of the S-35700.

In operation, the S-35770 does a better job of counting. If the rise and falls times are not quick enough, the PCF8593 will have multiple counts during the slow edges, and, putting a low pass filter on the anemometer to debounce it can slow down the rise times enough to cause problems. The S-35770 has a Schmitt Trigger buffer in front of its counter, so it doesn't matter how close the transition times are, it will only generate one count.

The PCF8593 has pre-existing libraries that work, even though that library is for the PCF8583. You have to code up your own library for the S-35770, but it is very easy. The I2C interface to the S-35770 is weird and not really like most I2C implementations where you send a register address and then you read or write; they just kind of do their own thing. It's weird, but it is pretty straight-forward to code to.

The PCF8593 is in a bigger package, so it is easier to solder. In operation, the current use is nearly identical, with the PCF8593 drawing 11.3uA and the S-35770 drawing 9.9uA.

The biggest advantage to the PCF8593 is the fact that it is a real-time-clock with event counter functionality. In fact, that is the main reason I chose to use the S-35770 in this project. I now have some PCF8593s in my parts bin which I can use as a RTC or a counter, while the S-35770 is a one trick pony, so I better use them when all I need is a counter. If I were to use the PCF8593, I would probably put a Schmitt buffer in front of the input like a 74LVC1G17, to square up the rising edge, and fix the counting problem. 

Discussions

Abish Vijayan wrote 04/05/2022 at 09:44 point

Very Informative.

I'm also scouting for a low power IC which can be used to count pulses. In my case there'll be pulses of 200uS, but can expect 1000 pulses per seconds.

I'm confused whether PCF8593 is capable of detecting that many number of pulses per second. I know this is an old post, but did you check how much these ICs could handle?

  Are you sure? yes | no