pull+filter
Moderators: grovkillen, Stuntteam, TD-er
pull+filter
Hi,
I use an esp8266 (wemos R1D2) to make a water meter.
I made a circuit with a pull resistor and a filter as explained in Pulse Counter P003 enhancement. How to give back? It seemed to work with GPIO 5, 4 and 13. But not with GPIO 0.
For GPIO 0, I removed the filter resistor and it seemed to work But is it a correct circuit? Was the first one a correct circuit?
Any other way to do it?
I use an esp8266 (wemos R1D2) to make a water meter.
I made a circuit with a pull resistor and a filter as explained in Pulse Counter P003 enhancement. How to give back? It seemed to work with GPIO 5, 4 and 13. But not with GPIO 0.
For GPIO 0, I removed the filter resistor and it seemed to work But is it a correct circuit? Was the first one a correct circuit?
Any other way to do it?
Re: pull+filter
First, see this page of the documentation: https://espeasy.readthedocs.io/en/lates ... on-esp8266
Better not to use GPIO 0 for a switch that may be in the 'closed' state (thus pull to GND) when the ESP boots.
Other special pins are GPIO-2 and -15.
Better not to use GPIO 0 for a switch that may be in the 'closed' state (thus pull to GND) when the ESP boots.
Other special pins are GPIO-2 and -15.
Re: pull+filter
What is the "out" in your schematic?
Re: pull+filter
Thanks for your reply
The "out" is a Flow Sensor Water (USN-HS21TA Ultisolar Hall Effect), but it is the same when testing with a simple switch.
I've read the doc several times but it seems that I didn't understood it enough
As I need several GPIO, I ended using GPIO 0...
At the present time, I have:
GPIO 5, 4, 13, 0 => Flow Sensor Water
GPIO 12 => switch (low level indicator 0 / 1)
GPIO 16 => DS18b20 The "whole" presentation in another post Watering and tank level control
The "out" is a Flow Sensor Water (USN-HS21TA Ultisolar Hall Effect), but it is the same when testing with a simple switch.
I've read the doc several times but it seems that I didn't understood it enough

As I need several GPIO, I ended using GPIO 0...
At the present time, I have:
GPIO 5, 4, 13, 0 => Flow Sensor Water
GPIO 12 => switch (low level indicator 0 / 1)
GPIO 16 => DS18b20 The "whole" presentation in another post Watering and tank level control
Re: pull+filter
You're using the 5V pin for pull-up.
The ESP may be 5V tolerant, but better to use the 3v3.
In your drawing you are still using GPIO-0, which may be pulled somewhere by "3".
But I don't know what this signal is coming from 1...4
That circuit is connected to both 5V and GND.
Do inputs 1...4 switch between 5V and GND like a relay?
If so, then I don't know if the resistors are (still) needed.
Do you have a schematic or something that's connected at the top of the drawing?
Also the "low level" indicator. I assume it is a switch that is normally closed ? (if normally open, the state will be logically inverted)
Another tip, as you seem to be using a non-standard board for ESP's based on the original Arduino board dimensions.
PLease measure the voltage between each GND and 5V and each GND and 3v3, just to make sure you do have the voltages where you expect them.
Wouldn't be the first time the silk screen text on a PCB is wrong for non-standard boards.
The ESP may be 5V tolerant, but better to use the 3v3.
In your drawing you are still using GPIO-0, which may be pulled somewhere by "3".
But I don't know what this signal is coming from 1...4
That circuit is connected to both 5V and GND.
Do inputs 1...4 switch between 5V and GND like a relay?
If so, then I don't know if the resistors are (still) needed.
Do you have a schematic or something that's connected at the top of the drawing?
Also the "low level" indicator. I assume it is a switch that is normally closed ? (if normally open, the state will be logically inverted)
Another tip, as you seem to be using a non-standard board for ESP's based on the original Arduino board dimensions.
PLease measure the voltage between each GND and 5V and each GND and 3v3, just to make sure you do have the voltages where you expect them.
Wouldn't be the first time the silk screen text on a PCB is wrong for non-standard boards.
Re: pull+filter
that's a mistake, because I needed to give power to the flow sensors, I mixed the power and the pull-up!You're using the 5V pin for pull-up.
Another drawing with both separate
What this signal is coming from 1...4
These are the flow sensors https://fr.aliexpress.com/item/32696287 ... 6c37eqxc4Ysomething that's connected at the top of the drawing?
The yellow wire is the signal. I've planned to put all the "plus" together and connected to the Wemos 5V and idem for the "minus" to the GND. Perhaps it could have been better to wire the 5V to another power, but I think I need to have the minus to the Wemos GND.
I'm not sure to understand the point"low level" indicator. I assume it is a switch that is normally closed

It's a float switch like this https://fr.aliexpress.com/item/40010374 ... 1c104af3-0. I don't have this exact model on hands but I think it is "ok" when opened and "low" when closed (at the present time it is inside my tank, I need to look at it...)
yes. Can I use another GPIO (need to be available ; when testing there was no other solution). Do you have any advise on this?you are still using GPIO-0, which may be pulled somewhere by "3"
Done, they are OKmeasure the voltage between each GND and 5V and each GND and 3v3
Re: pull+filter
Some testing
I've modified the circuit like the drawing and tested with a simple wire (to connect B to Y).
It is the same: OK for 4, 1, 2 KO for 3
I've shunted the filter resistor and it worked.
I've remove the pull-up resistor and set pull-up in the hardware and it is the same: KO with the filter resistor and OK without
Yesterday I had tested the "line '3' was OK for '3' to the GPIO pin connecting the pin to another GPIO
I've modified the circuit like the drawing and tested with a simple wire (to connect B to Y).
It is the same: OK for 4, 1, 2 KO for 3
I've shunted the filter resistor and it worked.
I've remove the pull-up resistor and set pull-up in the hardware and it is the same: KO with the filter resistor and OK without
Yesterday I had tested the "line '3' was OK for '3' to the GPIO pin connecting the pin to another GPIO
Re: pull+filter
Please be aware that GPIO-0 does already have a pull-up resistor on the ESP board (or else the ESP would not boot if GPIO-0 is pulled to GND)
So that being said, it is a bad idea to use GPIO-0 for signaling a state that can remain in that state for a while.
So that being said, it is a bad idea to use GPIO-0 for signaling a state that can remain in that state for a while.
Re: pull+filter
Understood!
According to the documentation: https://espeasy.readthedocs.io/en/lates ... on-esp8266, I could have used GPIO 14, if I understand well this documentation.
I think I already have tested all the GPIO, and keep the only ones that worked, but I going to test this one once again
According to the documentation: https://espeasy.readthedocs.io/en/lates ... on-esp8266, I could have used GPIO 14, if I understand well this documentation.
I think I already have tested all the GPIO, and keep the only ones that worked, but I going to test this one once again
Re: pull+filter
tested and it works!GPIO 14
my mistake!
I'm going to modify the circuit and make more testing...
Who is online
Users browsing this forum: Google [Bot] and 13 guests