Timeline for How to stop ESP32 resetting when motor starts?
Current License: CC BY-SA 4.0
25 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 23, 2021 at 15:48 | vote | accept | maurera | ||
Mar 20, 2021 at 2:59 | history | edited | maurera | CC BY-SA 4.0 |
Added PWM accelleration notes
|
Mar 20, 2021 at 2:56 | comment | added | maurera | Just got an initial try of PWM acceleration working! It sounds terrible (listen to audio, I've uploaded a video here - streamable.com/3xgxy0). Is that noise okay? And until I get a diode, how much danger is there? Since the DRV8833 is closest to the motor, is that what's at risk of the reverse flowing current? | |
Mar 19, 2021 at 22:55 | comment | added | maurera | It'll take some time to figure out how to use ESPHome to apply pwm signal and to interlock DRV8833's IN1 and IN2 so only one is high at a time. Will report back when I figure it out. (LDO is technically accessible, but on the side of the MCU facing the breadboard, so tricky to access while breadboarding. I'd also need to solder directly to it. Since it's also the exact same LDO as I have [AMS1117], I figured it's equivalent to use my own LDO and feed in 3.3v. I could then keep using the breadboard) | |
Mar 19, 2021 at 22:32 | comment | added | winny | I don’t see how it’s inaccessible, but it was just a band aid, your motor may still drag down 5 V rail to almost zero. Can you soft start it, ramp up the PWM? | |
Mar 19, 2021 at 21:48 | comment | added | maurera | @winny - the onboard LDO is inaccessible, so I tested using my own AMS1117 module (same as onboard LDO) and powering the ESP32 from AMS1117's 3.3v. I attached the capacitor + to AMS1117 3.3v out and - to GND. I still get the reset | |
Mar 19, 2021 at 21:27 | comment | added | TonyM | @winny, ah, see what you mean :-) | |
Mar 19, 2021 at 21:21 | comment | added | winny | @TonyM Not clamp, series to block reverse current. But your point is non the less valid, a LED is a really bad choice. | |
Mar 19, 2021 at 21:18 | comment | added | TonyM | @winny, LEDs typically have a very low max. reverse voltage, like 2 V or so. So it wouldn't survive long as a clamp diode. | |
Mar 19, 2021 at 21:02 | comment | added | winny | Place it after the onboard LDO, directly on the MCU Vcc line. | |
Mar 19, 2021 at 20:58 | comment | added | maurera | I'm not using an LDO. I think there's one onboard the ESP32. I placed the capacitor positive leg to +5v and negative leg to ground | |
Mar 19, 2021 at 20:50 | comment | added | winny | Where did you place the 470 uF capacitor, before or after the LDO? | |
Mar 19, 2021 at 20:39 | comment | added | maurera | @thebusybee - here's the exact motor I'm using (5rpm model). The specs aren't on the Amazon page, but it looks similar to the one I linked to in my post. amazon.ca/gp/product/B08GCM7FY7. Ah, 1.8A is a lot. I was hoping to actually use a 1A phone charger rather than my 2.4A supply | |
Mar 19, 2021 at 20:36 | comment | added | maurera | @winny - I tried the biggest capacitor I have (470uF electrolytic), but still get the resets. I think the ESP32 can be powered off 5v or 3.3v. I'm powering it off 5v. I have an AMS1117 module, so could use 5v applied to that and power the MCU off 3.3v | |
Mar 19, 2021 at 20:27 | comment | added | the busybee | Oh, the motor you linked has a stalled current of 1.8A, compare this to the current of 60mA with no load… This is the current it takes at startup, and even more at instant reversal. | |
Mar 19, 2021 at 20:25 | comment | added | winny | Depends, is your MCU running via some 3.3 V LDO? If you have super low dropout on your LDO you may get away with using a red LED (lowest Vf), but Schottky would be ideal. If you have 3.3 V LDO you may also get away just just a very large capacitor directly on Vcc. If you can PWM the motor and ramp up the duty cycle very slowly and at reasonably high frequency, that could mitigate the problem. | |
Mar 19, 2021 at 19:54 | comment | added | maurera | I don't have any ceramic capacitors or diodes, but will order an assortment for future projects. Silly question - I have LEDs "light emitting diode". Can I use an LED in place of a diode? The Vcc pin is just connected directly to usb's +5v | |
Mar 19, 2021 at 19:50 | comment | added | winny | Perhaps, but with the “inrush” current to the motor, your 5 V is probably sagging too low and you would need a diode in series to prevent the motor from robbing all charge from the MCU. 470 uF = bulk capacitance. What do you have straight connected to the MCU Vcc pin? Any 100 nF ceramic? | |
Mar 19, 2021 at 19:38 | answer | added | vir | timeline score: 0 | |
Mar 19, 2021 at 19:36 | answer | added | bobflux | timeline score: 0 | |
Mar 19, 2021 at 18:59 | history | edited | maurera | CC BY-SA 4.0 |
added circuit picture
|
Mar 19, 2021 at 18:53 | comment | added | maurera | @winny - thanks for the response. I roughly drew my schematic and attached it. Can you see the image? I have a 470uF electrolytic capacitor. Do I just add that after the PSU with capacitor positive leg to +5v and negative leg to ground? | |
Mar 19, 2021 at 18:44 | comment | added | winny | Proper decoupling, a suitable freewheeling diode across the motor, bulk capacitor and good layout? Please show your schematic and layout. 2. Almost any diode will do. 3. No electrolytics, only ceramic or plastic film will do. | |
Mar 19, 2021 at 18:42 | review | First posts | |||
Mar 19, 2021 at 20:31 | |||||
Mar 19, 2021 at 18:40 | history | asked | maurera | CC BY-SA 4.0 |