Hi guys,
Trying to find a suitable transistor for 180w 12v motor, being controlled by PWM from the arduino
Hi guys,
Trying to find a suitable transistor for 180w 12v motor, being controlled by PWM from the arduino
Transistors are not very popular here. The are too inefficient. We prefer Mosfets:
Thats exactly what i was after, thanks!
So that's a 15A load to be switched?
Find a low Rds, N-channel MOSFET and a MOSFET driver to ensure the gate is rapidly switched.
This one looks like it could be good for example:
and there many others
Power dissipated will be IIRds, so with 15A and Rds = .0013ohm (1.3mOhm), that would be
1515.0013 = .2925W when full on. You want it to switch from full on to full off very quickly so it's not in a higher resistance/higher heat region of operation for very long.
@raschemmel:
MOSFET is a Transistor - metal–oxide–semiconductor field-effect Transistor
just a different family than bipolar junction Transistor (BJT), which are the NPN & PNP types.
Ill give you some more info as to what i will be using this for:
recently my electronics packed up in my electric golf trolley.
The company no longer has parts, and my local electronics company couldn't fix the problem.
Unwilling to chuck the trolley, as it is in perfect condition, i decided i will embark into the arduino world.
Ok so the basic functions of the trolley are as follows:
12v Motor to spin one way (forward smiley )
Potentiometer to control speed
LED bar to show the charge left in the battery.
Unfortunately the motor has no markings on it, but looking at similar trolleys on the market, i would say its between 160-180watts.
Rather than just state what i need and let everyone else sort it out for me. I have tried to do as much research as possible and come up with a drawing.
If anyone could let me know of any mistakes/improvements/advice, it would be much appreciated.
Furthermore the code supplied, is taken from sources on the web. Once i get the code corrected by someone and i know its correct, it will make it easier for me to study it, and apply it to my real life situation. Unfortunately i find it easier learning like this, rather than reading books and stuff.
EDIT: I forgot to mention that there is a simple switch that needs to be incorporated, im guessing this just goes inline with the 12v supplying the arduino.

int pot = 0;
int relay = 3;
int motorPin = 11;
int val = 0;
void setup() // run once, when the sketch starts
{
//Serial.begin(9600); // set up Serial library at 9600 bps
// pinMode(pot, INPUT); //don't need this
pinMode(relay, OUTPUT);
pinMode(motorPin, OUTPUT);
}
void getPot()
{
val = analogRead(pot);
val = constrain(val,90,255); //this restricts the analog value to between 90 and 255;
if(val=<90){
val = 0;
}
}
void run()
{
analogWrite(motorPin, val); //this will run the motor at the speed set by the pot value
}
void loop() // run over and over again
{
getpot(); //THIS CALLS THE FUNCTION NAMED getpot ABOVE WHICH SETS val BASED ON THE ANALOG INPUT
run(); //THIS CALLS THE FUNCTION NAMED run ABOVE
}
The one I linked was 0.035 ohms. The one you are talking about is [EDIT] 1.35 ohms mohms
What's wrong with the one I linked ? (26:1 difference) . Much better.
When you posted originally, I didn't see the link.
1515.035 = 7.875W power dissipation - will run very hot.
1515.0013 = 0.2925W power dissipation. Much cooler. Cooler = longer life generally.
Thanks allot for the reply guys,
I will be purchasing the PSMN1R1-30PL as advised.
Is the schematic i drew correct for PWM.
Also is it possible to measure the voltage of a battery from the arduino and output to a led bar display?
A 180W 12V motor might have a winding resistance of <0.1ohm and stall current of >120A, there's no way any of these devices are suitable without a rapid over-current detection circuit, 120A
into 35 milliohms is 0.5kW.
Think something more like 2 milliohm device in a TO247 package on a chunky heatsink.
Perhaps http://uk.farnell.com/international-rectifier/irlp3034pbf/mosfet-n-ch-40v-327a-to-247ac/dp/1758306 driven by a MOSFET driver like a MIC4420
At high powers you are best driving a MOSFET gate hard with a proper gate driver
chip so that the switching losses aren't dominant. At high voltages a gate driver is
essential to prevent damage via gate-drain capacitive feedback.
You'll also need some massive schottky diode(s) for free-wheeling, 2 x 30A on TO220
might be about right. http://uk.farnell.com/multicomp/mbr6035pt/diode-schottky-60a-35v/dp/1625152
Just a bit more of an aside about large motors.
Large motors are designed to be efficient, often upto 95% efficient, otherwise
they just overheat and the winding insulation melts (or the permanent magnets
lose their magnetism) after half and hour or so of continuous use.
This means that only a small fraction of the applied voltage is wasted in the
winding (and brush) resistance (perhaps 5 to 10%) at full rated load.
Lets assume 10% waste, then the windings/brushes get 1.2V at 15A, meaning they
have a resistance of 80 milliohms. The other 10.8V goes to countering back-EMF
and producing mechanical power.
But when power is first applied to a DC motor there is no back-EMF as the
armature isn't turning, so the full supply voltage is brought to bear on the
winding resistance and a large current will flow (here 12 / 0.08 = 150A, or
ten times the rated current - this is "stall current").
If you have an H-bridge and switch a motor from full forwards to full reverse
suddenly you get twice the stall current (300A here).
Thus you have to deal with this issue by one of 4 basic strategies:
a) limit the current the supply can generate (typical for a mains powered supply,
but not for SLA or LiPo batteries which have vast current sourcing power).
b) Detect over-current and switch off the transistors/MOSFETs before they
vaporize (yes, they can vaporize and explode). This has to be done in a matter
of microseconds, so hardware comparator circuit is best. Such a method
protects against short-circuits too.
c) Have software control that smoothly varies PWM drive and monitors current
keeping it within bounds (this relies on the mechanical momentum to avoid surprises -
the motor back-EMF changes relatively slowly.
-- b) and c) are frequently combined
d) Use switching components that can withstand stall-currents without failing.
Note that for very large motors the motor itself cannot necessarily withstand
stall current without damage(*). This is not a very economic solution, but it is
robust (and can save the day when there's a software glitch).
(*) mechanical failure of shaft or laminations in overload, windings coming loose,
brushes burning out or catching fire, commutator segments overheating and coming
loose.
So a part like this then MarkT:
Has ridiculously high current capability. I think the 15A power supply would give out before this part will.
Wow that got very in depth, but i can understand the theory behind it.
Thanks for the detailed replies.
So option d with the component posted by crossroads
Just as a side questions.
Would it be best practise to user components capable of the loads, and control it in the software too for extra protection?
Yes. Can use software to monitor current flow, motor speed, etc.
decided to take some pictures of how the motor is connected.
BTW the red yellow and green wires are to the motor.
Back to reality, the MOSFET needs to be logic level if it is to be controlled simply from the arduino. Note that MOSFETs can usually be paralleled if more current capability is needed (also allows for more heat sink area).
CrossRoads:
So a part like this then MarkT:
Electronic Components and Parts Search | DigiKey Electronics
Has ridiculously high current capability. I think the 15A power supply would give out before this part will.
(*) current limits are usually thermal assuming infinite heat sink to the wafer itself.
(+) International Rectifier have a whole slew of 240A rated TO220 MOSFETs - the
leads on a TO220 physically fuse at 60A or thereabouts, and the bonding wires to
the wafer probably melt before that. This is why TO247 is a better bet than TO220
for single device. Even ISOTOP package has a package limit of 100A continuous and
they have screw terminals to copper strip!
It's not clear to me why you have both 5v and 12v connected to the arduino ?
If the 12 V is to monitor the battery voltage using the analog input, you will need to reduce that to an acceptable range for the analog input ( < 5 V )
5v is just for the pot.
The 12v is actually powering the arduino from the bike battery in which is on the trolley.
This is the relay used in the original electronics
With a contact resistance of 100mOhm its a poor choice of relay, to say the least.