ESP MEGA - Pulse Counter

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
noxx
Normal user
Posts: 14
Joined: 23 Feb 2016, 14:26

ESP MEGA - Pulse Counter

#1 Post by noxx » 04 Jul 2017, 07:53

hello

i ve the problem, that the pulse counter dont work in the new versions (ESPeasy 2.0)
try Dev 08, 09, 10

with older versions the pulse counter works fine.

is this a bug?

79kiko
Normal user
Posts: 15
Joined: 23 Aug 2016, 05:18

Re: ESP MEGA - Pulse Counter

#2 Post by 79kiko » 18 Jul 2017, 09:37

I have problem with setup of pulse counter. I want power meter,but I don't know how setup esp easy. My power meter has 1600 pulses/ kWh and 80ms of blink time. What is counter type in setting? What is count and time. Pulse counter return some big number.
I have TCRT5000 sensor. Count should be the number of pulses,but I get big number. Time should be time between two pulses but I get big number again.
Have you anybody example of setup? Thanks

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: ESP MEGA - Pulse Counter

#3 Post by toffel969 » 18 Jul 2017, 10:39

79kiko wrote: 18 Jul 2017, 09:37 I have problem with setup of pulse counter. I want power meter,but I don't know how setup esp easy. My power meter has 1600 pulses/ kWh and 80ms of blink time. What is counter type in setting? What is count and time. Pulse counter return some big number.
I have TCRT5000 sensor. Count should be the number of pulses,but I get big number. Time should be time between two pulses but I get big number again.
Have you anybody example of setup? Thanks
Does your power meter also have an S0 port? It would be the better option.
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

79kiko
Normal user
Posts: 15
Joined: 23 Aug 2016, 05:18

Re: ESP MEGA - Pulse Counter

#4 Post by 79kiko » 18 Jul 2017, 11:18

I think no.
Image

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: ESP MEGA - Pulse Counter

#5 Post by toffel969 » 18 Jul 2017, 17:24

79kiko wrote: 18 Jul 2017, 11:18 I think no.
Image
Looks like it does (SO 250imp/kwh). There should be connectors for SO, I think the pulse witdh of 80ms actually refers t this rather than the LED. You then connect the SO between a GPIO and GND. No additional sensor like tcr required.
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

79kiko
Normal user
Posts: 15
Joined: 23 Aug 2016, 05:18

Re: ESP MEGA - Pulse Counter

#6 Post by 79kiko » 20 Jul 2017, 22:18

The connector is under the cover. I would have to ask for permission from Electricity seller. Slovak byrocration is too high.

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: ESP MEGA - Pulse Counter

#7 Post by toffel969 » 21 Jul 2017, 09:17

79kiko wrote: 20 Jul 2017, 22:18 The connector is under the cover. I would have to ask for permission from Electricity seller. Slovak byrocration is too high.
If SO is not an option... try to cover the emitting IR-LED of the TCR sensor (the clear one). The sensor has multiple uses, most of them rely on detecting the reflection of the IR emitted by the LED. In this usecase however it should suffice to just use the receiving (black) diode.

If that doesnt work, you can still switch to an LM393 based light sensor or a TSL250R-LF photodiode
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

79kiko
Normal user
Posts: 15
Joined: 23 Aug 2016, 05:18

Re: ESP MEGA - Pulse Counter

#8 Post by 79kiko » 21 Jul 2017, 21:21

Solved. The simplest solution. I used a photoresistor connected between GND and D3(GPIO-0). That works fine.
Photoresistor specification:
100 lx_5kOhm_
10 lx_33kOhm_
0 lx_180kOhm_
Image

My settings of pulse counter:
Image

amput
New user
Posts: 2
Joined: 12 Nov 2017, 20:14

Re: ESP MEGA - Pulse Counter

#9 Post by amput » 14 Jan 2018, 18:23

Hi, what does it mean *0.62 in your formula if u have 1600 pulses/ kWh ? I have 10000 pulses/ kWh, what is right formula for me :-) ?

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: ESP MEGA - Pulse Counter

#10 Post by grovkillen » 14 Jan 2018, 18:30

Taken from my blog :

The energy meter is noted with the information that each pulse (blink of the led diode) equals 1 Wh, or 1000 pulses equals 1kWh. I want to show the momentary energy consumption, to do this I count pulses for 10 seconds and then multiply that number of pulses with 3600 seconds (that’s the number of seconds per hour) and then divide that number with 10 (to get the Watts which are in use at the moment).

If you want to measure the kWh you’ll just publish the pulses divided by 1000, and you’ll have that each pulse is equal to 0.001kWh.


So do you want the momentary consumption (W) or the accumulated usage (Wh)?
Last edited by grovkillen on 14 Jan 2018, 19:25, edited 1 time in total.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: ESP MEGA - Pulse Counter

#11 Post by grovkillen » 14 Jan 2018, 18:34

And remember that pulse counter is now only allowed on task/device 1...4 due to timing difficulties if all 12 (and in the future possibly 24) tasks are polled.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

amput
New user
Posts: 2
Joined: 12 Nov 2017, 20:14

Re: ESP MEGA - Pulse Counter

#12 Post by amput » 14 Jan 2018, 19:35

For momentary consumption in Watts. Still i dont understand 0.62 in mr. 79kiko formula :-)

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: ESP MEGA - Pulse Counter

#13 Post by grovkillen » 14 Jan 2018, 19:55

Me neither... don't mind it ;)

Just divide your value according to my suggestion.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

kimot
Normal user
Posts: 190
Joined: 12 Oct 2017, 20:46

Re: ESP MEGA - Pulse Counter

#14 Post by kimot » 21 Jan 2018, 14:06

He has 1600 imp per kwh

1/1600 = 0,000625 It is 0,62 you can see - last number 5 is not visible in formula :o)

Lstt
New user
Posts: 8
Joined: 21 Jan 2018, 17:28

Re: ESP MEGA - Pulse Counter

#15 Post by Lstt » 25 Jan 2018, 18:53

Thear friends! I am newby in ESPEasy. Can you say - how i can write total counter in flash memory - like idea in this issue - https://github.com/letscontrolit/ESPEasy/pull/69 ? Or it's really hard?

Post Reply

Who is online

Users browsing this forum: No registered users and 33 guests