Hello everyone I'm doing my project controlling three water mini pump by one board with transistors BC337. The pin will give power when touch sensor sensed something which is embedded in the esp32. The code is right, but the physical part made me confused.

The issue is when I use a breadboard, everything works well, but after I solder them, there is always one pump or two pumps on without any control signal,
you can see the circuit in the figure, the base resistor is 3k instead of 220, I also tried 5k resistor but same issue.

I desolder and solder several times, the same way or different way, with or without experiment board, but the issue is same. I checked the transistors, they are fine. I also tested all pumps one by one in the same circuit, it works well, but after soldering them together, issue happens again.

more details about Pins and components:

Pins: 26&27&16, can't show right on in the figure

Water pump works in: 3-6v, 100-200mA

NPN transistor: BC337 datasheet: https://www.onsemi.com/pdf/datasheet/bc337-d.pdf

[btw I also tried 2N2222 same issue.... my god]

ESP32 wemos D1 R32 : https://www.otronic.nl/a-60659537/esp32/wemos-d1-r32-esp32-4mb-development-board-wifi-bluetooth-dual-core-arduino-uno-r3-formaat/

I assume something wrong with the circuit, so when I solder/combine all pumps together, maybe the power value has been influenced then the current has increased even no signal from the base that open the NPN?

I will appreciate if you can help with this weird situation!

enter image description here

  • \$\begingroup\$ 3k is too high. Why change from the 220 ohm indicated? What troubleshooting have you done? Measure the voltages at various places when the incorrect behavior is occurring. \$\endgroup\$ Commented Nov 14, 2021 at 22:29
  • 1
    \$\begingroup\$ Schematic appears to show a short circuit across Q1 and Q3, which would leave the motors permanently connected. \$\endgroup\$
    – user16324
    Commented Nov 14, 2021 at 22:39
  • \$\begingroup\$ do not use the Arduino board as a power supply ... there is a great chance of catastrophic failure in the Arduino \$\endgroup\$
    – jsotola
    Commented Nov 15, 2021 at 2:41

1 Answer 1


You need to isolate or suppress the noise generated by the DC motors. Also check the current needed. If you are trying to power the motors from the 5V supply on the Uno board, that may not have enough. The noise or excessive current from the motor can cause the microcontroller to get in a weird state.

  • \$\begingroup\$ Thanks for this advice! I wonder how could I check if it's something related to the noise? \$\endgroup\$
    – Y223an
    Commented Nov 14, 2021 at 23:54
  • \$\begingroup\$ actually the noise from the pump is quite low, because this one is supposed to be under water for fishtank... \$\endgroup\$
    – Y223an
    Commented Nov 15, 2021 at 0:00
  • 1
    \$\begingroup\$ @Y223an The meaning of "noise" on an electronics site is electromagnetic interference (EMI). It has nothing to do with sound. \$\endgroup\$
    – Lundin
    Commented Nov 15, 2021 at 7:49
  • \$\begingroup\$ @Lundin is correct, I was speaking of the electrical noise on the same pin that provides power to the digital microcontroller. Too much noise from the motors can affect the operation of logic gates. Easiest way to test this theory is to separate the power and check if problem goes away. \$\endgroup\$ Commented Nov 15, 2021 at 14:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.