Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
KC868-AI and pulse_counter
#1
I am really new to working with ESP32.
My goal is to use the device to count Pulse from electricity meters.

I understand ESP has a pulse counter sensor 
https://esphome.io/components/sensor/pulse_counter.html
Code:
# Example configuration entry
sensor:
  - platform: pulse_counter
    pin: GPIOXX
    unit_of_measurement: 'kW'
    name: 'Power Meter House'
    filters:
      - multiply: 0.06  # (60s/1000 pulses per kWh)

Also, I read only 8 channels can be used.

Quote:On the ESP32, this sensor is even highly accurate because it’s using the hardware pulse counter peripheral on the ESP32. However, due to the use of the pulse counter peripheral, a maximum of 8 channels can be used!

So this limits me a bit in my initial plan, as I try to read out pulse (s0) from 24 different power meters.

Question1: when I try this function block, almost all ports are already "in use" for some other function, or I get the message "WARNING GPIO5 is a strapping PIN and should only be used for I/O with care.". How can I deduct which PINS can actually be used? I assumed all the GPIOs could be used, but I am just starting out so still need to learn some things.

Question2: Considering the maximum number of channels is 8, does KC868-AI has 8 free GPIO available? If not, are there other kincony boards available? I could then use 3 of those to cover all meters.

does this makes sense?
Reply
#2
KC868-AI not have so much free gpio. if you want many free GPIO, you can chose kincony S3 controller.
https://www.kincony.com/kincony-esp32-s3...board.html
you can chose by this platform: https://mq.kincony.com/qq/product/product-selector this is easy to chose kincony board.
Reply
#3
(05-04-2025, 12:48 AM)admin Wrote: KC868-AI not have so much free gpio. if you want many free GPIO, you can chose kincony S3 controller.
https://www.kincony.com/kincony-esp32-s3...board.html
you can chose by this platform: https://mq.kincony.com/qq/product/product-selector  this is easy to chose kincony board.

Thank you for the feedback, this is what I need!

Code:
# Example configuration entry
sensor:
  - platform: pulse_counter
    pin: GPIOXX
    unit_of_measurement: 'kW'
    name: 'Power Meter House'
    filters:
      - multiply: 0.06  # (60s/1000 pulses per kWh)

    total:
      unit_of_measurement: 'kWh'
      name: 'Energy Meter House'
      filters:
        - multiply: 0.001  # (1/1000 pulses per kWh)


2 more question please: 

1. I see there is also a total variable. How should I interpret this? Is it stored on the device itself or would the variable not survive a reboot
2. Do you have any idea or suggestion how I could sending the live consumption ? For total I could use UDP with a set interval, but for live consumption I need to send all the data, and via UDP this would probably flood the network.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)