Only 3 of 4 possible Counters are functional

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Ramme
New user
Posts: 6
Joined: 25 May 2020, 13:41

Only 3 of 4 possible Counters are functional

#1 Post by Ramme » 25 May 2020, 14:14

Hello, i have 4 digital electricity meter with S0 interface connectet to a node mcu ESP-8266. Ground is connectet from Ground-Pin in row to each electricity meter.
The Devices on Pins D2, D3 and D4 are functional but the 4th device will not count. I had Connected it to Pins D1, D5, D6, D7) changed The Ground Connection, Changed Boot status of the Pins, changed the electricity meter, checked the Voltage at the Pins (every Pin 3,3 V)
changed the node MCU, but noting changed the result, that only 3 Devices are Counting.
According to Description all PIns on the NodeMCU have a internal Pull-Up and are activated when counter is chosen in ESPeasy.
The 4 Counters are the only Devices wo are Configured in ESPeasy.
Have anyone an idea why the 4th device will not count?

Jürgen

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

Re: Only 3 of 4 possible Counters are functional

#2 Post by grovkillen » 25 May 2020, 14:39

On what task numbers do you have the non-working counter vs. working counters?
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:

Ramme
New user
Posts: 6
Joined: 25 May 2020, 13:41

Re: Only 3 of 4 possible Counters are functional

#3 Post by Ramme » 25 May 2020, 14:55

The Counters are on Number 1 to 4. I had changed the numbers without effect. Only D2, D3 and D4 are working.

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

Re: Only 3 of 4 possible Counters are functional

#4 Post by grovkillen » 25 May 2020, 15:22

Tired to make your own pull down?
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:

Ramme
New user
Posts: 6
Joined: 25 May 2020, 13:41

Re: Only 3 of 4 possible Counters are functional

#5 Post by Ramme » 25 May 2020, 19:16

When internal Pullup ist activated by default Counter configuration is it a good idea, to pull down it external? That works against each other? Or Not?
And why should i pull the Pin down, when the Pin is pulled up as all other functional Pins?
Sorry if the questions are stupid. I´m new with esp.

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

Re: Only 3 of 4 possible Counters are functional

#6 Post by grovkillen » 25 May 2020, 20:04

I suspect the pulse is "high", thus you want it to be pulled down. Or is the pulse low in your application?
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
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Only 3 of 4 possible Counters are functional

#7 Post by Ath » 25 May 2020, 21:37

Have you tried to configure the counter in a Device slot other than 4? There has been a report here that the 4th device wasn't counting, for as of yet unknown reasons (AFAIR), maybe this is also the case here.
/Ton (PayPal.me)

Ramme
New user
Posts: 6
Joined: 25 May 2020, 13:41

Re: Only 3 of 4 possible Counters are functional

#8 Post by Ramme » 25 May 2020, 22:55

Ath wrote: 25 May 2020, 21:37 Have you tried to configure the counter in a Device slot other than 4? There has been a report here that the 4th device wasn't counting, for as of yet unknown reasons (AFAIR), maybe this is also the case here.
It doesn´t matteer which slot i take. only d2, d3 and d4 are counting,no matter what order i wear them.

Ramme
New user
Posts: 6
Joined: 25 May 2020, 13:41

Re: Only 3 of 4 possible Counters are functional

#9 Post by Ramme » 26 May 2020, 00:12

grovkillen wrote: 25 May 2020, 20:04 I suspect the pulse is "high", thus you want it to be pulled down. Or is the pulse low in your application?
At the Pins are 3.3volts (measured with a voltmeter) and there are wired with the + connection of the electricity meter. The GND is wired to the - connection of the electricity meter.
When it has measured 1 watt, it short-circuits pin and ground. At D2 D3 and D4 works counting without problems. All other Pins do not.
As far as I understood, the esp8266 has internal pullups on pins D1 - D8, which are activated by easyESP when the counter type is selected. So it should work the same on all pins but it doesn´t.
I put an external 10k resistor on Pin D1 and pulled it up. It works. Also on Pins D5 D6 and D7.
What I do not understand now, why does it work with an external transistor and not with the internal if 3 others do? Any Idea?

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

Re: Only 3 of 4 possible Counters are functional

#10 Post by grovkillen » 26 May 2020, 05:44

So is it working now?
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:

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Only 3 of 4 possible Counters are functional

#11 Post by TD-er » 26 May 2020, 11:31

Ramme wrote: 26 May 2020, 00:12 At the Pins are 3.3volts (measured with a voltmeter) and there are wired with the + connection of the electricity meter. The GND is wired to the - connection of the electricity meter.
When it has measured 1 watt, it short-circuits pin and ground. At D2 D3 and D4 works counting without problems. All other Pins do not.
As far as I understood, the esp8266 has internal pullups on pins D1 - D8, which are activated by easyESP when the counter type is selected. So it should work the same on all pins but it doesn´t.
I put an external 10k resistor on Pin D1 and pulled it up. It works. Also on Pins D5 D6 and D7.
What I do not understand now, why does it work with an external transistor and not with the internal if 3 others do? Any Idea?
See also this page in the documentation: https://espeasy.readthedocs.io/en/lates ... on-esp8266

D3 (GPIO-0) and D4 (GPIO-2) do have their own pull-up resistor. (typically 10k - 12k, depending on the board)
D2 (GPIO-4) does not have an external pull-up resistor, so why that one works with your setup and others don't I cannot say.

Please note that the ESP will fail to boot if D3 or D4 is pulled down during boot.
So if it sees a pulse during boot, it may not succeed to boot at all.

GPIO-15 (D8) is a special pin, that needs an external pull-down resistor, so it cannot be used with your setup and the ESP may not boot at all if pulled up at boot.
GPIO-16 (D0) is also special, as it cannot be used via interrupt, so don't use it for counting pulses and also it has a non-standard pull resistor.

With an external pull-up resistor, you may use the 5 green labelled pins in the table I linked.

Ramme
New user
Posts: 6
Joined: 25 May 2020, 13:41

Re: Only 3 of 4 possible Counters are functional

#12 Post by Ramme » 26 May 2020, 12:51

grovkillen wrote: 26 May 2020, 05:44 So is it working now?
Yes, with external Pullup it works. Thank You!
Short other Question:
it is possible to operate several boards on a breadboard with the same power supply?
Are problems to be expected if gnd is connected to all boards?
Or is it better to serve the piower over the USB-Port.
My Plan is to put 3 NodeMCU on the Breadbord and serve them with a DIN rail power supply.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Only 3 of 4 possible Counters are functional

#13 Post by TD-er » 26 May 2020, 13:21

If you power the boards via the same (Powered) USB hub, or via several USB ports on the same computer, then all GNDs are also connected.
So powering with an external power supply and having the GNDs connected of all boards should work just fine.

There is one thing you should always take into account when connecting separate electronic circuits.
You must make sure their grounds are at the same level, or floating.
Floating means, there is no electrical connection between them before you connect them.

For example, if you have them battery powered or via another power supply that uses a transformer, you can be sure there is no electrical connection.
A typical device that's NOT floating, is a mains powered oscilloscope.
The GND of the probes is typically connected to the earth pin of the wall socket.

If you take those very basic rules into account, it will be safe to connect nodes to each other or to your PC for example.

As general advice, try to connect ground (or any other signal) only via a single route.
It will then be a star-shaped connection and not a ring.
A ring may pick up magnetic fields and thus cause currents to flow where you don't expect them.
Such currents may cause all kinds of strange issues.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 40 guests