1
\$\begingroup\$

I'm trying to switch (just on/off) a 3.7V motor (coil resistance 2.2 Ohm) and a 6V motor (coil resistance 8 Ohm) with an arduino mini. And I have trouble finding an universal way to do so. What I know so far:

  1. there has to be a fly-back diode (D1 on schema)
  2. There are 4 possibilities for the switch

    a) relay (simplest, Arduino Uno with 12V pump: transistor or optocoupler+12V relay?)

    b) NPN transtor https://electronicsclub.info/transistorcircuits.htm

    c)(low gate voltage) MOSFET How to drive low impedance load with arduino and transistor

    d) optocoupler (see the relay link)

  3. A Low side switch is better than high side switch. High side switch and Low side switch

  4. All grounds have to be connected together (unless using an optocoupler) Does signal ground have to be connected to actual ground?

I have built the following schema that does not work.

Transistor switch

Questions:

  1. From the above points my schema violates 3 and 4 but are those the main problems or are there some other that I'm missing?

  2. Is it vital to have the right resistance on R2? If I understand correctly too big R2 results in not enough current on the base to switch the transistor on. But why/how the board pin gets destroyed when there is not enough resistance on R2?

  3. Can a transistor and resistor be selected with such specs that if I want to change the motor to a different one I do not have to change those components? In other words which transistor specs I have to keep in mind if I want to select a motor with 1-100 ohm coil resistance and 3-12V?

More background info:

I measured that gate voltage is 4.6 V and current 40 mA (I used 70 Ohm at R2 instead of 330).

I think the transistor is working and connected right way (measured with a multimeter all pairs both ways).

I would like to keep the component count and price to a minimum. Relays are big and expensive so I hoped a transistor would do.

I understand I need R1 to prevent a floating pin What does pulldown resistor from Arduino's output pin to ground do? Is it necessary?

I'm trying different motors to see which one works best.

Edit:

So I switched my logic to low side switch and it started working. I tried both ways with and without the grounds of arduino and the motor power supply connected but it did not seem to make a difference. However the transistor Q5 (2SD965) got hot when the 3.7 V motor was connected suggesting that the gate was not fully opened or something else was wrong. What exactly I do not know (newbie as I am).

Edit of the edit:

So I tried again the low side switch and connected the arduino GND and power supply minus together. Like magic everything started working with the transistor Q5 (2SD965) and it didn't get hot and it stopped working the minute I disconnected the grounds. So the only logical guess is that I miss-connected something during the first edit. On top of everything it worked with both motors and with other transistors!

So the morale is points 3 and 4 are extremely important

\$\endgroup\$
0
\$\begingroup\$

A circuit is needed for current to flow into Q5 base and return. The return path is missing.

To fix this Connect Q5 emitter to arduino GND.

R1 is not needed, but does no harm.

\$\endgroup\$
  • \$\begingroup\$ thank you for the suggestion. I tried connecting Q5 emitter to arduino GND and indeed it opened the transistor but the current flowing to the motor was not enough to start it. My uneducated guess is that most of the current from the motor power supply was flowing to arduino GND and hence not through the motor. If this is right I should have connected the arduino GND to power supply - \$\endgroup\$ – Richard Mar 27 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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