Flow sensor reboots ESP E12
Moderators: grovkillen, Stuntteam, TD-er
Re: Flow sensor reboots ESP E12
Hi Jacek,
What value pull up resistor is on the flow sensor? i take it the capacitor is 0.1uF ceramic? I use this type which gives nice square waves with 3K3 + 0.1uF, works fine on a PIC BUT not with the pulse counter device, iv also tried a signal generator and it still constantly reboots, a firmware problem i think.
https://www.google.com.ph/search?q=flow ... Hnqrm6gYUM:
Ray
What value pull up resistor is on the flow sensor? i take it the capacitor is 0.1uF ceramic? I use this type which gives nice square waves with 3K3 + 0.1uF, works fine on a PIC BUT not with the pulse counter device, iv also tried a signal generator and it still constantly reboots, a firmware problem i think.
https://www.google.com.ph/search?q=flow ... Hnqrm6gYUM:
Ray
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Flow sensor reboots ESP E12
What versions are you on? I tried a self compiled version (code base 2017-10-16) which did not work correctly with the pulse counter plugin. Downgraded to dev7 (which I use for another pulse counter unit) and it worked...rayE wrote: ↑02 Nov 2017, 11:43 Hi Jacek,
What value pull up resistor is on the flow sensor? i take it the capacitor is 0.1uF ceramic? I use this type which gives nice square waves with 3K3 + 0.1uF, works fine on a PIC BUT not with the pulse counter device, iv also tried a signal generator and it still constantly reboots, a firmware problem i think.
https://www.google.com.ph/search?q=flow ... Hnqrm6gYUM:
Ray
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
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Flow sensor reboots ESP E12
My setup:
v2.0.0-dev12
Device = Pulse Counter
I/O = CH5
Type = delta/total/time
Mode = Rising
Delay = 10s
v2.0.0-dev12
Device = Pulse Counter
I/O = CH5
Type = delta/total/time
Mode = Rising
Delay = 10s
Re: Flow sensor reboots ESP E12
Just a thought, if the pulse counter device digital input from the flow sensor is configured as a D/O (in the device driver) that would cause current sink problems and probably reboots. Look at the horrible scope graphs previously presented?
Re: Flow sensor reboots ESP E12
Hello,
I've been testing dev12 these days with four counters on a two channel signal generator without issues.
Anyways i have a suspicion.
Can you please test different settings with "Falling" - "Raising" - "Low" settings?
I tested here for some hardware things and that's something i did not try.
On another note i'm thinking about an active filter/schmitt-trigger gate but thats
somewhat complex and will not help if there is a firmware bug so it's senseless at this point.
Regards,
Shardan
I've been testing dev12 these days with four counters on a two channel signal generator without issues.
Anyways i have a suspicion.
Can you please test different settings with "Falling" - "Raising" - "Low" settings?
I tested here for some hardware things and that's something i did not try.
On another note i'm thinking about an active filter/schmitt-trigger gate but thats
somewhat complex and will not help if there is a firmware bug so it's senseless at this point.
Regards,
Shardan
Regards
Shardan
Shardan
Re: Flow sensor reboots ESP E12
So. I did some tinkering with signal generator, nodeMCU (dev12) and one single counter task.
No reporting to any homecontrol or such (Controller deactivated), no other tasks configured.
I've found some behaior to higher pulse frequencies that might bring troubles with a flow sensor.
I think the pulse counter was originally made for energy meters.
My energy meters give 2 pulses per wh. At maximum (16A) we get:
16 A * 230V * 2Pulses = 7360 pulses/h or 2.04 pulses/s.
So i tested frequencies up to 15 Hz first - that worked.
Today I increased frequency. Up to 50 Hz it works fine.
Higher frequencies slow down the web frontend, but main page says memory is OK.
From about 150...200 Hz and higher it gets really into trouble, blocking, crashing and so on.
So the question is: Which frequency does your flow sensor give?
Sadly i don't have a sample to test with so i can't say.
Regards
Shardan
No reporting to any homecontrol or such (Controller deactivated), no other tasks configured.
I've found some behaior to higher pulse frequencies that might bring troubles with a flow sensor.
I think the pulse counter was originally made for energy meters.
My energy meters give 2 pulses per wh. At maximum (16A) we get:
16 A * 230V * 2Pulses = 7360 pulses/h or 2.04 pulses/s.
So i tested frequencies up to 15 Hz first - that worked.
Today I increased frequency. Up to 50 Hz it works fine.
Higher frequencies slow down the web frontend, but main page says memory is OK.
From about 150...200 Hz and higher it gets really into trouble, blocking, crashing and so on.
So the question is: Which frequency does your flow sensor give?
Sadly i don't have a sample to test with so i can't say.
Regards
Shardan
Regards
Shardan
Shardan
Re: Flow sensor reboots ESP E12
@rayE and @grovkillengrovkillen wrote: ↑02 Nov 2017, 12:13What versions are you on? I tried a self compiled version (code base 2017-10-16) which did not work correctly with the pulse counter plugin. Downgraded to dev7 (which I use for another pulse counter unit) and it worked...rayE wrote: ↑02 Nov 2017, 11:43 Hi Jacek,
What value pull up resistor is on the flow sensor? i take it the capacitor is 0.1uF ceramic? I use this type which gives nice square waves with 3K3 + 0.1uF, works fine on a PIC BUT not with the pulse counter device, iv also tried a signal generator and it still constantly reboots, a firmware problem i think.
https://www.google.com.ph/search?q=flow ... Hnqrm6gYUM:
Ray
I understand you mean this scheme?
I do not use it. At the moment I'm using the exact schema proposed by Shardan in post # 3.
The flow sensor was tested on revisions from R147 to 2.0.0 dev12.
Regards
Re: Flow sensor reboots ESP E12
The above diagram is the way im using the flow sensor. Vcc is 3.3V, decoupling capacitor is 0.1uF ceramic and pull up resistor is 10K. Looking at the pulse O/P on a scope it is VERY clean and works on a PIC MCU with no problems.
Here is the sensor
https://www.google.com.ph/search?q=flow ... Hnqrm6gYUM:
the data sheet says Vcc = 5V BUT iv been running 2 of these on 2 seperate PIC's @ 3V3 for around 2 months and NO problems, accuracy is +/-3% which is adequate for my application. Also i do NOT think it has anything to do with the pulse input as iv seen the reboot problem on both the flow sensor as well as a signal generator. I understand that the ESP module has no hardware pulse counter so presumably it is driven by software polling meaning the system will probably slow with increasing frequency. So for a flow rate of 10 liters per minute that would equate to 7.5 * 10 = 75Hz.
Ray
Here is the sensor
https://www.google.com.ph/search?q=flow ... Hnqrm6gYUM:
the data sheet says Vcc = 5V BUT iv been running 2 of these on 2 seperate PIC's @ 3V3 for around 2 months and NO problems, accuracy is +/-3% which is adequate for my application. Also i do NOT think it has anything to do with the pulse input as iv seen the reboot problem on both the flow sensor as well as a signal generator. I understand that the ESP module has no hardware pulse counter so presumably it is driven by software polling meaning the system will probably slow with increasing frequency. So for a flow rate of 10 liters per minute that would equate to 7.5 * 10 = 75Hz.
Ray
Re: Flow sensor reboots ESP E12
@RAy
I will check your wiring after I come back home.
THX
I will check your wiring after I come back home.
THX
Re: Flow sensor reboots ESP E12
@ Shardan
Unfortunately I do not have an oscilloscope to check it out .... BUT !!! theoretically ........
I have checked the actual flow of water. I poured a certain amount of water eg 800ml through a flow sensor and verified with a properly functioning scatch on Arduino UNO. This gives me confidence that the flowmeter measures correctly.
At this moment, the flow meter is plugged into a closed water system with a small pump
which gives a 4.8L / m flow -> checked on Arduino UNO
The water hall-effect flow sensor output pulses are proportional to the water flow with: Pulse Frequency (Hz) = Flow (L/min) * Calibration Factor.
In my case calibration factor is 4.5 wich means that: My freq = 4,8 * 4.5 = 21,6 Hz
Greets
Jacek
-
- Normal user
- Posts: 48
- Joined: 23 May 2017, 21:38
- Location: Malente / Germany
Re: Flow sensor reboots ESP E12
Are you really sure it makes no problems until 50Hz?Today I increased frequency. Up to 50 Hz it works fine.
I have the same problems with 3 counters running around 10 to 30 Hz.
I have a very good strong short power supply with 3A.
If I reduce from 3 to 1 counter, or from 3 to 2 counters than I have less warm reboots.
I have 275 warm boots within 4 days.
These warm boots does not occur in the same period.
Sometimes it runs 1 hour withaut any problem.
And than within 10 minutes it has 3 warm boots.
And of course everything between these two extrems.
I'm using moules which give a very good frequency output signal.
So the problem I have is not causes by the power supply and not caused by the frequency signal.
I think it is a softwareproblem caused by the Interrupts of the three frequency counting channels and the ESP8266 core which needs time for the WLAN connectivity.
Any idea to solve it?
Thanks and best regards,
Chris
Re: Flow sensor reboots ESP E12
I've set my test nodeMCU to 22Hz pulse from my signal generator and will monitor uptime.
Regards
Shardan
Regards
Shardan
Regards
Shardan
Shardan
Re: Flow sensor reboots ESP E12
No i'm not - i tested it for a short time only as i don't use counters myself atm.themanfrommoon wrote: ↑04 Nov 2017, 12:12Are you really sure it makes no problems until 50Hz?Today I increased frequency. Up to 50 Hz it works fine.
As said i've just setup some testing and will monitor for longer terms.
If this is a firmware bug it makes the counter function somewhat useless.
Regards
Shardan
Regards
Shardan
Shardan
Re: Flow sensor reboots ESP E12
Im sure i would have set debounce time to a minimum setting as the pulse comes from a hall element therefore the waveform is clean. Debounce is only realy needed for things like relays and switches where you get mechanical bouncing of the contacts.And what about DEBOUNCING TIME ?
Re: Flow sensor reboots ESP E12
Definitely.rayE wrote: ↑05 Nov 2017, 11:28Im sure i would have set debounce time to a minimum setting as the pulse comes from a hall element therefore the waveform is clean. Debounce is only realy needed for things like relays and switches where you get mechanical bouncing of the contacts.And what about DEBOUNCING TIME ?
Debouncing is for mechanical contacts as they tend to generate noise on closing/opening.
With clean electronic signals it's just not necessary.
Anyways it should not crash ....
On another note:
I had to reset log - we obviously had some power outage over night so all my devices reset...
Regards
Shardan
Regards
Shardan
Shardan
Re: Flow sensor reboots ESP E12
Hello all,
after some time of testing i'm not sure if that is a firmware bug.
I've quickly nailed together a nodeMCU with a transistor on a GPIO and fed the transistor with 22Hz as this is what the sensor gives here at max.
At first i had a bunch of resets:
I changed to another power supply and then got these uptimes:
- 383 min
- 1195 min
- 80 min
- 31 min
- 83 min.
I changed to another power supply and then got these uptimes:
- 3127 min
- and now up and running for ~900 min and counting.
Regards,
Shardan
after some time of testing i'm not sure if that is a firmware bug.
I've quickly nailed together a nodeMCU with a transistor on a GPIO and fed the transistor with 22Hz as this is what the sensor gives here at max.
At first i had a bunch of resets:
I changed to another power supply and then got these uptimes:
- 383 min
- 1195 min
- 80 min
- 31 min
- 83 min.
I changed to another power supply and then got these uptimes:
- 3127 min
- and now up and running for ~900 min and counting.
Regards,
Shardan
Regards
Shardan
Shardan
Who is online
Users browsing this forum: No registered users and 58 guests