Hi - I've built a plant watering system using that uses a 12C OLED (SSD1306 - 128x32), a moisture sensor, and a relay to turn the water pump on and off.
As soon as the pump comes on, the OLED shuts off and does not come back on. I have no idea why and am hoping someone may can help. Perhaps a voltage drop? Power surge? I don't know. If I power the motor completely separately
I am using a HiLetgo 3.3V/5V Power Supply Module (MB102) to power everything. It has two 5V outputs that I "thought" were electrically separated. However, if I power the pump with a separate power supply, the OLED will stay on.
How can I electrically isolate the OLED and the pump using the same power supply?
Just to be clear, I am clearly not an electronics person and know just enough to be dangerous.
I decided to try to isolate the OLED display a bit by placing a LED in the circuit before the OLED display. When the pump came on, sure enough, the LED protected the display from turning off. I don't know what was causing the OLED display to turn off, but clearly the LED in the circuit has helped.
If anyone knows why the motor turning on would cause the OLED display on the same current to go off I would really appreciate it. Also, knowing why a LED in the OLED circuit helps is a mystery to me. My only thought putting it in there was maybe it would prevent a reverse current flow.
Does anyone think a schottky diode would work and/or be a better way of controlling the current flow?
Probably voltage drop, try to connect 1000uF capacitor to the OLED supply rail. It would be more clear with the schematic drawn..
Btw, does ESP32 resets when the pump turns on? (look at the serial monitor, if there is an "brownout" at that moment, that could also be the case)
Thanks for responding. I was thinking brown out, power spike, or something too. I did add a capacitor for the OLED but it did not help. When pump turned on the OLED still shut off.
With the LED in the circuit with the OLED (diagram of current configuration below), the OLED will stay on when the motor turns on. Not sure why it works, but it does. I have ordered some schottky diodes to see if they will work instead of a LED.
Sorry I cant understand what you are doing without the schematic... If you dont know how to draw it in some software, use pen and paper and send us the photo of the schematic.