Anything wrong with using a transistor this way?

Basically, the idea is to control a motor in a toy assembled by a friend.

The design of the toy is such that the power/+ve wire is very hard to reach (coming from battery terminal marked +). The ground wire is much more exposed. So, i'm trying to switch it on or off using only connections to the ground wire.

I'm an absolute beginner and i've found it far easier to learn by trying things (i have tried and tried to read but it just doesn't settle in with no practical visual/tactile learning), so, i don't discount the possibility i'm doing something horribly wrong.

Here is the datasheet for the transistor SS8050 NPN, diode 1N4007 and motor RE-260RA-2295

Basically i just want to turn it off and on (it may need to go off and on 2-10 times a minute, this is why i'm avoiding a relay). Based on research, i added a flyback diode (?) to protect the arduino.

I do have a feeling i am doing this wrong and there is no shortcut to connecting it up to the power/+ve wire instead but i thought i would check.

Diagram #1 (above), not sure if i drew it correctly

Diagram #2 (above), Fritzing circuit output

Diagram #3 (above, ignore voltage markings on batteries)

Swap collector and emitter of the first two diagrams.

Replace the base diode for a 220ohm base current limiting resistor.

Drawing 3 seems to have the transistor correctly orientated.

The motor needs a freewheel diode across.
The transistor could have a short life without it.
Leo..

Maybe this could work too .... just for more ideas.

Wawa:
Swap collector and emitter of the first two diagrams.

The problem is the second diagram was automatically generated from the third. Unless it converted it wrong?

Wawa:
The motor needs a freewheel diode across.

Would that be across both terminals of the battery? The wires exiting one of them is very hard to access. Is there any other alternatives?

Someone on another forum suggested if i absolutely couldn't put a diode across the motor, i could put a zener diode "across the transistor", is this a good solution? Problem is i'm not exactly sure what across the transistor would look like and i do expect a voltage drop (which isn't great when running off 2.4V).



Southpark:
Maybe this could work too .... just for more ideas.

That looks like a good idea. However, i googled around and some people seem to take issue with using that MOSFET (IRL540) as it is a power MOSFET instead of a logic level MOSFET (not exactly sure what that means) - i.e. here Is this circuit okay? Arduino using MOSFET IRF540N as a switch for a motor - General Electronics - Arduino Forum . People also identify heat concerns as well (granted for the IRF520) - Reddit - Dive into anything

I looked at the graph in the data sheet (i honestly don't know what i'm doing though) and it seems like even at the 5V the arduino puts out, it can supply something like 10A (my motor only needs 0.64A, so, its not a problem?

This is from a similar MOSFET IRF540N (datasheet) as i cannot buy the IRL540 easily.


Image above

Is a flyback diode still needed for a circuit using a MOSFET?

SlothScience:
The problem is the second diagram was automatically generated from the third. Unless it converted it wrong?

We tend to not look at Fritzing messes. They are just wayyyyy to hard to read. So if it's automagically converted then the third is also wrong.

SlothScience:
Would that be across both terminals of the battery?

No, that would be over the motor terminals... Just have a quick Google for "Arduino motor"

Yeah, I'm still not convinced about the whole logic mosfet crap. Only thing is that a logic mosfet can do it's max rating at logic voltages where a non-logic can not. But if you don't need the max current I still don't see a problem. But yeah, you could still use a logic mosfet.

SlothScience:
Is a flyback diode still needed for a circuit using a MOSFET?

Always

SlothScience:
However, i googled around and some people seem to take issue with using that MOSFET (IRL540) as it is a power MOSFET instead of a logic level MOSFET (not exactly sure what that means) - i.e. here Is this circuit okay? Arduino using MOSFET IRF540N as a switch for a motor - General Electronics - Arduino Forum . People also identify heat concerns as well (granted for the IRF520) - Reddit - Dive into anything

It's ok. The irl540 is the opposite of what you wrote. The irl540 is logic level.... it's their terminology for works well with 5 Volt DC logic levels.... or... it turns on fully if you apply 5V DC across gate and source.... with the gate voltage being the higher voltage than source voltage. It has an inherent feature inside it.... a diode within.... that can act as a current path for dealing with the high voltage across the motor coil during switch off. The resulting current flows for a relatively short time during switch off..... so usually not enough energy to damage the embedded diode component.

septillion:
Yeah, I'm still not convinced about the whole logic mosfet crap. Only thing is that a logic mosfet can do it's max rating at logic voltages where a non-logic can not. But if you don't need the max current I still don't see a problem. But yeah, you could still use a logic mosfet.
Always

This just shows you are not the person to give advice about MOSFETs and don't understand
threshold, plateau and channel formation in power MOSFET devices.

If you use 5V gate drive, use a logic level MOSFET and it will work. Otherwise all bets are off.

SlothScience:
Would that be across both terminals of the battery? The wires exiting one of them is very hard to access. Is there any other alternatives?

The freewheel diode goes across the motor like you were told. Otherwise you'll fry your transistor/MOSFET since
a motor is an inductive load. Google "inductive kick-back".

Then please be the one who can explain it :slight_smile: Even after all my subjects on Semi conductors (although it's been a while since) nobody was ever able to explain why besides "they are mode for logic levels". If the current is low the MOSFET can still be in it's linear region even with a logic level on it's gate.

The plateau voltage of a typical non-logic level MOSFET can be anywhere from about 4.5 to 7V, and the
plateau is caused by the channel forming - charge on the gate directly balances the inversion
layer charge of the channel.

In you only want to switch a few 100mA use a 2N2222, they are cheaper, but for 20A, you won't
get away with the vestigial channel from most non-logic level devices, its a fraction of the full
channel conductivity.

Yeah, isn't that what I said? With a logic voltage you don't have a channel wide enough for a large current / rated current but you can still have a modest current while the MOSFET is still in it's linear region.

Would a 5.1V zener like this protect the transistor?
out7.png

edgemoron:
Would a 5.1V zener like this protect the transistor?

Yes, a zener (or TVS diode) across the transistor is an alternative.
Zener voltage has to be a bit higher than supply voltage.
Leo..

5.1V is too low, it will already be conducting significantly at 5.0V.
A 10V zener there would be fine. You have to provide a route for current to continue to flow when
the transistor turns off to prevent the inductive voltage spike.

BTW that's a schottky diode symbol, not a zener symbol.

[ Whoops, no I'm wrong, that is a zener symbol, just not the common one I'm used to Different Zener Diode Symbols - Electrical Engineering Stack Exchange ]

I was ass-ooming 2 AAs, 3V, should have said so. :confused:

Hi,
For a basic MOSFET circuit;

Tom.. :slight_smile:

TomGeorge:
Hi,
For a basic MOSFET circuit;

Tom.. :slight_smile:

This is the Best circuit you can use..!

As you mentioned that the IRF540 is not easily available near you, buy a TIP140 NPN Power Transistor.

Connect the EBC of the TIP140 in the place of SGD of the IRF540 in the above circuit.

Instead of bugging your head with the Zener Voltages, go buy 1N4007 Diodes. They are cheaper.

You can use the same circuit even if you switch between different motor voltages without worrying much about anything else.

Use a basic/generic heatsink for lower power. You need to upgrade it for higher power ratings.

Regards

SDA

SagarDev:
As you mentioned that the IRF540 is not easily available near you, buy a TIP140 NPN Power Transistor.

Yeah...... but a TIP140 has a Vce saturation voltage of around 1 or 2 Volt, right?

Southpark:
Yeah...... but a TIP140 has a Vce saturation voltage of around 1 or 2 Volt, right?

The datasheet suggests a maximum VCE(sat)= 2.0V at IC = 5.0A.

This is a greater saturation voltage compared to the one of the 2N2222 which is 0.4V at IC = 150mA.

So, there is no problem... :slight_smile:

Regards

SDA

SagarDev:
So, there is no problem... :slight_smile:

One possible issue.... maybe. The O.P. wanted to supply the motor with 2.4 Volt DC.

The nice thing about mosfets etc is that you don't have to deal with things like Vce voltage drops.