hi, i have a code used to control 4 pumps, and i use PWM to control their power (flow).
0V means 100% power.
5V means 0% power.
problem is that every time the ESP resets, the pumps starts to work for a brief moment, as if the output pin went low during that time.
i have seen Espressif's 'ESP32 pin list' document, but still not sure what to do, love to hear advices.
I'm using pins 12,13,14,26 pins as PWM outputs.
thanks.
PWM output pin on reset
Re: PWM output pin on reset
How long is the time? It is more than a few seconds?
-
- Posts: 826
- Joined: Mon Jul 22, 2019 3:20 pm
Re: PWM output pin on reset
Put a 10-50K pullup resistor on the pins you want to stay high. When the device resets, there is not going to be any signal delivered on those pins, so you need to provide a default one.
You should choose a pin other than 12, which is a strapping pin that needs to be pulled low for 3V3 flash.
You should choose a pin other than 12, which is a strapping pin that needs to be pulled low for 3V3 flash.
-
- Posts: 3
- Joined: Sun Apr 14, 2024 2:00 am
-
- Posts: 3
- Joined: Sun Apr 14, 2024 2:00 am
Re: PWM output pin on reset
hi and thanks for the reply,lbernstone wrote: ↑Sun Apr 14, 2024 4:13 pmPut a 10-50K pullup resistor on the pins you want to stay high. When the device resets, there is not going to be any signal delivered on those pins, so you need to provide a default one.
You should choose a pin other than 12, which is a strapping pin that needs to be pulled low for 3V3 flash.
i have already tried once to put a 100K pull up resistor and it didn't worked
the PWM output pin is connected to the pump VIA a buffer '74LS07DR'
also, in the attached figure from the pump data sheet we can see there is some kind of pull up resistor and yet its happening.
it might be something with my code?
- Attachments
-
- the io's of the pump scheme from the manufacturer data sheet
- PHOTO-2024-04-15-10-32-45.jpg (73.57 KiB) Viewed 1145 times
-
- Posts: 826
- Joined: Mon Jul 22, 2019 3:20 pm
Re: PWM output pin on reset
You need a stronger pullup than what is included in the pump control circuit there. Try a 10K.
From your description, this is happening when the device restarts, so it literally can't be a problem in your code (which isn't running during a restart). You say there's more involved in the circuit- I am not going to guess at your schematic. If you can see that the device starts and stops when you apply 0V/3V3, then what you need is a pullup resistor.
From your description, this is happening when the device restarts, so it literally can't be a problem in your code (which isn't running during a restart). You say there's more involved in the circuit- I am not going to guess at your schematic. If you can see that the device starts and stops when you apply 0V/3V3, then what you need is a pullup resistor.
Who is online
Users browsing this forum: No registered users and 61 guests