Generic - Pulse counter Issue

Moderators: grovkillen, TD-er, Stuntteam

Post Reply
Message
Author
mr-varga
Normal user
Posts: 22
Joined: 29 Jan 2018, 18:41

Generic - Pulse counter Issue

#1 Post by mr-varga » 01 May 2018, 16:47

Dear All,

I have a ESP8266 with espeasy, and I heve connected to this a simple Rain Gauge counter.
This is made by a simple reed switch.
See here the connection exemple of the connection:
Image

I have setup a Generic Pulse counter like this:
sett.PNG
sett.PNG (26.94 KiB) Viewed 7040 times
The problem is the counter never stop to count it increase continuously, never stop.

Why can I have this issue?

mr-varga
Normal user
Posts: 22
Joined: 29 Jan 2018, 18:41

Re: Generic - Pulse counter Issue

#2 Post by mr-varga » 03 May 2018, 15:45

No one happed this issue? :shock:

User avatar
budman1758
Normal user
Posts: 243
Joined: 15 Apr 2017, 05:13
Location: Riverside CA USA

Re: Generic - Pulse counter Issue

#3 Post by budman1758 » 04 May 2018, 07:19

Well.... At the risk of sounding like a smart-ass it's doing what its intended to do. It will keep counting up until hell freezes over.
You need a formula to process the count. You need to figure out how much rain is in a bucket tip and process it with a time frame reference.
Perhaps a study of the wiki will help... ;)
https://www.letscontrolit.com/wiki/index.php/Main_Page
"The glass is twice as big as it needs to be".

User avatar
kluszczyn
Normal user
Posts: 8
Joined: 25 Feb 2018, 23:38
Location: Wroclaw, Poland

Re: Generic - Pulse counter Issue

#4 Post by kluszczyn » 04 May 2018, 08:27

If I'm not mistaken, your input from switch goes to GPIO2, not GPIO15 as declared on pulse device. Change to GPIO2 and check results.
Don't forget to turn off Serial as GPIO2 is a TX pin!

Best regards
Robert

mr-varga
Normal user
Posts: 22
Joined: 29 Jan 2018, 18:41

Re: Generic - Pulse counter Issue

#5 Post by mr-varga » 04 May 2018, 11:26

kluszczyn wrote:
04 May 2018, 08:27
If I'm not mistaken, your input from switch goes to GPIO2, not GPIO15 as declared on pulse device. Change to GPIO2 and check results.
Don't forget to turn off Serial as GPIO2 is a TX pin!

Best regards
Robert
The pitture is just an exemple, in real i use a GPIO15. :)

mr-varga
Normal user
Posts: 22
Joined: 29 Jan 2018, 18:41

Re: Generic - Pulse counter Issue

#6 Post by mr-varga » 04 May 2018, 11:27

budman1758 wrote:
04 May 2018, 07:19
Well.... At the risk of sounding like a smart-ass it's doing what its intended to do. It will keep counting up until hell freezes over.
You need a formula to process the count. You need to figure out how much rain is in a bucket tip and process it with a time frame reference.
Perhaps a study of the wiki will help... ;)
https://www.letscontrolit.com/wiki/index.php/Main_Page
But i mean the counter goes up, always also if i don't touch the rain gauge counter. It rise always...

User avatar
kluszczyn
Normal user
Posts: 8
Joined: 25 Feb 2018, 23:38
Location: Wroclaw, Poland

Re: Generic - Pulse counter Issue

#7 Post by kluszczyn » 05 May 2018, 21:43

mr-varga wrote:
04 May 2018, 11:26
kluszczyn wrote:
04 May 2018, 08:27
If I'm not mistaken, your input from switch goes to GPIO2, not GPIO15 as declared on pulse device. Change to GPIO2 and check results.
Don't forget to turn off Serial as GPIO2 is a TX pin!

Best regards
Robert
The pitture is just an exemple, in real i use a GPIO15. :)
Please disconnect rain gauge (reed switch) from esp and check, if counter still goes up.
How long are the wires between esp and reed switch?

mr-varga
Normal user
Posts: 22
Joined: 29 Jan 2018, 18:41

Re: Generic - Pulse counter Issue

#8 Post by mr-varga » 06 May 2018, 13:08

kluszczyn wrote:
05 May 2018, 21:43
mr-varga wrote:
04 May 2018, 11:26
kluszczyn wrote:
04 May 2018, 08:27
If I'm not mistaken, your input from switch goes to GPIO2, not GPIO15 as declared on pulse device. Change to GPIO2 and check results.
Don't forget to turn off Serial as GPIO2 is a TX pin!

Best regards
Robert
The pitture is just an exemple, in real i use a GPIO15. :)
Please disconnect rain gauge (reed switch) from esp and check, if counter still goes up.
How long are the wires between esp and reed switch?
If I disconect the wire, the counter doesn't rise.
The wire is long about 1 meter.

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

Re: Generic - Pulse counter Issue

#9 Post by grovkillen » 06 May 2018, 14:07

How much voltage do you feed the unit and what do you get on the other end?
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:

mr-varga
Normal user
Posts: 22
Joined: 29 Jan 2018, 18:41

Re: Generic - Pulse counter Issue

#10 Post by mr-varga » 27 May 2018, 11:08

I feed the unit with 8,5V in Vin input. And at the end of the reed I have 3.22V.

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

Re: Generic - Pulse counter Issue

#11 Post by TD-er » 27 May 2018, 14:10

mr-varga wrote:
27 May 2018, 11:08
I feed the unit with 8,5V in Vin input. And at the end of the reed I have 3.22V.
Do you have any sensor connected to this (relative high) voltage?
And what signal level is sent to the ESP device input pins?

mr-varga
Normal user
Posts: 22
Joined: 29 Jan 2018, 18:41

Re: Generic - Pulse counter Issue

#12 Post by mr-varga » 28 May 2018, 16:24

Yes this output is also a power supply for LDR and his output go in analog input in ESP.
All the 3.3V and Groung in my board is used.

mr-varga
Normal user
Posts: 22
Joined: 29 Jan 2018, 18:41

Re: Generic - Pulse counter Issue

#13 Post by mr-varga » 06 Jun 2018, 21:28

Could be a problem of the 3.3V supply? I have many devices connected to the internal regulator. SHT10 sensor, bmp180 sensor, ldr for light measurement.
This is all. You suggest to use external 3.3V power supply?

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

Re: Generic - Pulse counter Issue

#14 Post by TD-er » 06 Jun 2018, 23:16

You have to make sure the signals from the sensors to the ESP do not exceed 3v3.
The analog input often is from 0...1V, but on some boards there are already resistors present to allow for a higher range.

I don't know if the voltage regulator on your board can handle such a high voltage.

If you take those issues into account, I see no reason why you shouldn't use 8.5 V as power supply.

mr-varga
Normal user
Posts: 22
Joined: 29 Jan 2018, 18:41

Re: Generic - Pulse counter Issue

#15 Post by mr-varga » 09 Jun 2018, 12:29

The board is a ESP8266 NODEMCU. This one:
Image
And I have 12V power supply in place so for power the board I use a step down dc dc:
Image
(in this the output is set to 8,5V) to power the NodeMcu in the GND and Vin pins.
For the reed switch of the counter i pick a 3.3V and Gnd from two pins of NodeMcu board.

Is all this correct?

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

Re: Generic - Pulse counter Issue

#16 Post by TD-er » 09 Jun 2018, 13:43

The AMS1117 on the NodeMCU board is a so called "linear regulator", which means they're not switching.
Let's say you're running at 5V and the output of that regulator is 3V3.
Then you're having 1.7V over the regulator. (5 - 3.3)
At 100 mA, that's 170 mWatt of energy lost.
When feeding from 8.3V, then there is 5V over the regulator.
At 100 mA, that's 500 mWatt lost. (and quite some heat)

When you place a switching regulator in front of it, you're making it a bit more efficient, since that switching regulator has an efficiency of about 80 - 85%.


I don't understand what you mean with your last question.
For the reed switch of the counter i pick a 3.3V and Gnd from two pins of NodeMcu board.
A reed switch short circuits the contacts. So you also need some resistor in series with the reed switch.
And then connect the point where the reed switch and the resistor meet, to a GPIO pin of the ESP.

mr-varga
Normal user
Posts: 22
Joined: 29 Jan 2018, 18:41

Re: Generic - Pulse counter Issue

#17 Post by mr-varga » 10 Jun 2018, 01:07

Ok thanks I understand now, so I have to regulate the step down near to 3.3V to optimize the consumption and heat.

The reed switch is connect like the picture in the first post, but I don't know why he always count... It seems to be a interference...

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

Re: Generic - Pulse counter Issue

#18 Post by TD-er » 10 Jun 2018, 10:35

mr-varga wrote:
10 Jun 2018, 01:07
Ok thanks I understand now, so I have to regulate the step down near to 3.3V to optimize the consumption and heat.

The reed switch is connect like the picture in the first post, but I don't know why he always count... It seems to be a interference...
If the AMS1117 is still in the loop, you have to make sure you feed it with a high enough voltage.
Most regulators need some minimum voltage drop.
So just feed it with 5V, just to be sure.
And a lot of sensors need 5V too, so that's useful too.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 11 guests