Controlling Pumps with transistors

Hello.

I’m building an cocktail machine for a school project that is using 8x perilstaltic pumps, these consist of a regular brushless dc motor.
The motors operate at 18V and 0.2A.
I want to be able to control the motors in both directions so the transistors should be able to switch a positiv collector voltage and gnd connected to the collector.

I tried this using the 2n2222 bipolar junction transistor. When VCC is connected to the collecter, everything works fine.
But if i connect GND to the collector the transistor doesn’t work:

  • if the voltage is below 8V insted of the 18V the transistor heats up and draws tons of current without operating the motors
  • if the voltage is 18V the motors always move, even if there is nothing connected to the base

Can someone tell me what i did wrong, or should i use just a different transistor?

If you need to reverse the voltage across the motors a single transistor won't do it. You need an H-bridge motor driver.

BTW if your pumps work with plain DC then they are not "regular" brushless motors. They contain motors plus driver circuits to run them. And quite a few motor systems/pumps like that will only run in one direction.

Steve

the 2N2222 is an NPN transistor so the emitter goes to ground and the load goes between V+ and the collector. Google "using npn transistor to sink load current" or Google "using npn transistor to drive motor"

The result will be approximately the same either way.

Surrbradl08: I want to be able to control the motors in both directions so the transistors should be able to switch a positiv collector voltage and gnd connected to the collector.

You definitely need an H-bridge to control both directions. You will find no transistor that can do what you describe. H-bridges consist of 4 switching devices, each handling a single polarity.

You can use an L293

The TB6612FNG is a superior H-bridge. Similar power specs as the L293 minus all the losses and bulky heat sink to deal with the heat.

Anyway, a regular brushless motor won't easily run in two directions. If you have two wires coming out of that motor, it means it has control electronics on board (otherwise you have to do that part yourself). Reversing the current can very well destroy those electronics in an instant.

Impeller pumps (a very common design) won't pump if running in reverse direction anyway.

If you have brushless motor just get a brushless motor controller and use the Servo library to control it. If you need to reverse direction it can be don using a DPDT relay to swap two of the three motor leads but it must be interlocked in such way that an DPDT relay (or switch) is in series with the motor POWER leads to disconnect the motor BEFORE switching the DPDT relay to ensure that NO power is connected to the relay at the moment you swap the two motor leads, otherwise you can destroy the motor controller and possibly the motor as well. Make sure to read this tutorial on DEADTIME if you decide to use an H-BRIDGE. Failure to ensure deadtime can lead to , well, the death of your H-bridge. You can read more about it here:

Any halfway decent H-bridge IC will take care of dead time... same accounts for ready made motor controllers.