Flow sensor - ESP not starting-up if connected?
Moderators: grovkillen, Stuntteam, TD-er
Flow sensor - ESP not starting-up if connected?
Hi all, I have a nice project with ESP-01, which measures a) rainfall via a tipping bucket gauge, and b) water flow into my geyser with a YF-S201 flow meter. I am so excited, got it working over the weekend, lots of effort to install the flow meter in-line to the geyser.
See attached the schematic for the project. The PROBLEM I have, is that the project only works if I startup the project without sensor 2 attached. Once started, I can plug the 3 wires of the flow meter into the board, (VCC 5v, Gnd, D), for which D goes into the logic level shifter. I can only assume it has something to do with GPIO0 in Low-mode - which puts the ESP01 in Flash mode, thus preventing proper startup. However, the Blue-light on the ESP-01 stays ON when the 3 wires from the flow meter is plugged into the board when it starts up, does not seam to be Flash mode then?
<<Picture removed to correct after suggestions, see post further down with corrected circuit>>
Question: what causes the ESP01 not to boot properly, and what to do about it (without needing manual intervention to remove the 3 wires for boot up, and then to put them back after boot)?
See attached the schematic for the project. The PROBLEM I have, is that the project only works if I startup the project without sensor 2 attached. Once started, I can plug the 3 wires of the flow meter into the board, (VCC 5v, Gnd, D), for which D goes into the logic level shifter. I can only assume it has something to do with GPIO0 in Low-mode - which puts the ESP01 in Flash mode, thus preventing proper startup. However, the Blue-light on the ESP-01 stays ON when the 3 wires from the flow meter is plugged into the board when it starts up, does not seam to be Flash mode then?
<<Picture removed to correct after suggestions, see post further down with corrected circuit>>
Question: what causes the ESP01 not to boot properly, and what to do about it (without needing manual intervention to remove the 3 wires for boot up, and then to put them back after boot)?
Last edited by JR01 on 31 Mar 2016, 21:23, edited 1 time in total.
-----------
IOTPLAY. Tinkerer, my projects are @ http://GitHub.com/IoTPlay, and blog https://iotplay.org. Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.
IOTPLAY. Tinkerer, my projects are @ http://GitHub.com/IoTPlay, and blog https://iotplay.org. Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.
Re: Flow sensor - ESP not starting-up if connected?
GPIO0 has to be high during boot sequence, so you need at least a pull-up resistor
I don´t know if this is possible with the YF-S201, if not you´ll need a transistor, optocoupler,...
I don´t know if this is possible with the YF-S201, if not you´ll need a transistor, optocoupler,...
Re: Flow sensor - ESP not starting-up if connected?
Thank you, will try with pull-up. I am new to all this, not sure how to use transistor, already have it working through optocoupler, not working on that.
-----------
IOTPLAY. Tinkerer, my projects are @ http://GitHub.com/IoTPlay, and blog https://iotplay.org. Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.
IOTPLAY. Tinkerer, my projects are @ http://GitHub.com/IoTPlay, and blog https://iotplay.org. Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.
Re: Flow sensor - ESP not starting-up if connected?
I would try to take the level shifter out, use 2 resistors, so you have about 3 V when the flow meter is logical high, hopefully it will pull it down to almost zero when water is puring
But i don´t understand why so many people use the ESP-01, for like one € more you get an ESP-12 which has much more IO Pins
But i don´t understand why so many people use the ESP-01, for like one € more you get an ESP-12 which has much more IO Pins
Re: Flow sensor - ESP not starting-up if connected?
Why would you use a ESP12 when it is much more convenient to use a NodeMCU.kr0815 wrote: . . . . . i don´t understand why so many people use the ESP-01, for like one € more you get an ESP-12 which has much more IO Pins
No USB/Serial adapter needed for programming and no problem with powersupply, it gets power via a USB connector.
Besides it usually is more stable than any bare ESP module.
Re: Flow sensor - ESP not starting-up if connected?
Thank you all, pull-up register got it working on the ESP-01. And, I replaced the ESP01 with ESP12E, now probably have more stable solution. Still running on breadboard in my roof, have ordered D1 WeMos dev boards. But, nice = I got the ESP01 working !!!!
Thanks for comments / support / suggestions. Implemented all. Will post updated diagram for others to re-use.
(PS - did you know a shower consumes 29L of hot water only ???)
Thanks for comments / support / suggestions. Implemented all. Will post updated diagram for others to re-use.
(PS - did you know a shower consumes 29L of hot water only ???)
-----------
IOTPLAY. Tinkerer, my projects are @ http://GitHub.com/IoTPlay, and blog https://iotplay.org. Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.
IOTPLAY. Tinkerer, my projects are @ http://GitHub.com/IoTPlay, and blog https://iotplay.org. Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.
Re: Flow sensor - ESP not starting-up if connected?
I bet my granddaughter uses more than that!!!JR01 wrote:...snip...(PS - did you know a shower consumes 29L of hot water only ???)
Re: Flow sensor - ESP not starting-up if connected?
A NodeMCU is also a ESP12, just already delivered with a PCBWhy would you use a ESP12 when it is much more convenient to use a NodeMCU.
Only Problem with NodeMCU is, it´s not that fast / cheap available in germany
-
- Normal user
- Posts: 44
- Joined: 31 Jan 2016, 21:05
Re: Flow sensor - ESP not starting-up if connected?
Looking at your diagram, I see a cap between +5 and +3v3 at the top-left corner.
Personally I would place the cap between either
a) +5 and gnd
b) +3v3 and gnd
c) 2 caps for a) and b)
-ben
Personally I would place the cap between either
a) +5 and gnd
b) +3v3 and gnd
c) 2 caps for a) and b)
-ben
Re: Flow sensor - ESP not starting-up if connected?
Thank you all for suggestions, here is the corrected circuit, this one works as well. tested with ESP01, but as per suggestions, I changed it to an ESP12E - in my roof now counting hot water litres, rain, and I added a DS18b20 to measure outside temp.
-----------
IOTPLAY. Tinkerer, my projects are @ http://GitHub.com/IoTPlay, and blog https://iotplay.org. Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.
IOTPLAY. Tinkerer, my projects are @ http://GitHub.com/IoTPlay, and blog https://iotplay.org. Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.
Re: Flow sensor - ESP not starting-up if connected?
Hi there,
Yeah, same here, with that blue led, the ESP-01 wont start up if the YF-S201 Water flow Sensor is attached.
I made it exactly how is it described on the posted image bellow, now the blue led is not ON at the power-up. but the ESP-01 wont start again...
I'm using only the circuit part marked in red shape.
Using firmware R140.
Used logic level converter from the image bellow:
Any help please?!
Kind regards
Yeah, same here, with that blue led, the ESP-01 wont start up if the YF-S201 Water flow Sensor is attached.
I made it exactly how is it described on the posted image bellow, now the blue led is not ON at the power-up. but the ESP-01 wont start again...
I'm using only the circuit part marked in red shape.
Using firmware R140.
Used logic level converter from the image bellow:
Any help please?!
Kind regards
Re: Flow sensor - ESP not starting-up if connected?
The datasheet says this sensor produces short pulses, so apparently most of the time the data_pin is low. This means GPIO-0 is most of the time at a low level when the flow sensor is attached as in your schematic. This will force the ESP into the flash-mode when powering up.beic wrote: Yeah, same here, with that blue led, the ESP-01 wont start up if the YF-S201 Water flow Sensor is attached.
Using a level converter does not change anything to this.
I think the solution is to use a inverting transistor.
The data-pin of the flow-sensor may need a pull-up resistor of 10k connected to the powersupply of the sensor (5V-18V)
The sensor-datapin is connected to the input of the circuit. The output is connected to GPIO-0.
+V = 3.3 Volt, Rl is 10k, Rb is 10k (Rb may be lowered if the pulses are fast, meaning a lot of flow)
Re: Flow sensor - ESP not starting-up if connected?
Thank you for your help! It worked like a charm! You are awesome!costo wrote: I think the solution is to use a inverting transistor.
The data-pin of the flow-sensor may need a pull-up resistor of 10k connected to the powersupply of the sensor (5V-18V)
The sensor-datapin is connected to the input of the circuit. The output is connected to GPIO-0.
+V = 3.3 Volt, Rl is 10k, Rb is 10k (Rb may be lowered if the pulses are fast, meaning a lot of flow)
Who is online
Users browsing this forum: No registered users and 29 guests