hello, i have started the programming for a project in which i heat up a coil with precision watts. The coil is rated anywhere from .1 - .5 ohms and i am using a single lithium cell. Using PWM i can get different voltages therefore watts, but how can i control volts from the arduino while also drawing around 20A to heat up the coil? perhaps a mosfet, if so how do i go about choosing one? sorry for the lack of explanation and/or grammar, if any questions please ask. thanks!
With PWM you can control the Watts, not the voltages. Is that Li-ion cell good for 20A ?
A mosfet can be used. Use a "logic level" mosfet, that is a mosfet that can be turned on with only 5V. Sparkfun selected this one as common mosfet : https://www.sparkfun.com/products/10213 I would use 4 of those parallel, and you have to calculate how much heat they will produce. The Rds(on) is the resistance they have when turned on.
This is the best tutorial I have found on using a MOSFET as a switch: http://www.electronics-tutorials.ws/transistor/tran_7.html
However it doesn't tell you how to read the datasheet and pick a good MOSFET and it really doesn't tell you how to drive them properly. More than 50% of what I know about MOSFETS has come from this forum, so there's lots of advice buried in here. This is my summary of how I would select a MOSFET:
- First decide what type of MOSFET - there's 4 types but 85% of the time you will be using an N-channel enhancement MOSFET.
- Voltage rating - must be significantly larger than your supply voltage
- Current rating - must also be significantly higher but there's a lot of things to check on the current later...
- Switch-on voltage. The datasheet will have a headline "threshold voltage" but that's really the turn-off voltage when current is just barely starting to flow. Standard for power MOSFETs is 10V and that's the voltage they use to make the max-current claim. Since your Arduino is 5V or maybe 3.3V, this voltage is really important. Scroll down the datasheet to find the curves of drain current as a function of drain-source voltage. This will show a number of different curves for different gate voltages. If the lowest curve is 4.5v then you DON'T have a logic-level MOSFET.
- Power dissipation - calculate the Rds for your gate voltage and then multiply by the current squared to find the power. Check the datasheet for power limitations, usually given with reference to different heatsinking options. Surface-mount components can use large copper areas on the board as heatsinks. For proper heatsinks, you will need the temperature rise per watt from the heatsink's datasheet to estimate the maximum temperature of your MOSFET. This is the real current limit for your application.
- If you are using PWM then you have to consider charging and discharging the gate capacitance. This takes an amount of time, during which your MOSFET is dissipating WATTS of heat so you want to minimise this. The Arduino pins are limited in the amount of current they can provide. A power MOSFET can usefully use several AMPS of current for a few nanoseconds. If this is a concern, there are specialised MOSFET driver chips than can deliver these currents on demand. These driver chips are also a useful way of isolating your Arduino from the high voltages going through the MOSFET.
- Select a gate resistor to limit the current demand from the Arduino. Also add a pull-down resistor so that the MOSFET is in a defined state when the Arduino reboots and its pins are all high-impedance inputs.
- Select a package. (This is honestly more like step 1.5) TO220 is the basic big transistor with a heatsink tab. Little ones might be in TO92 packages, but that is rare because commercial electronics is all surface-mount. SOT23, SOT323, DPAK are all good options. If you are designing your own PCB and you have a frypan or toaster oven then surface-mount is great.