Introduction: MY FAVORITE 2.5 Amp SWITCH
This is my best switch configuration used in over 20 projects.
TWO components, 2.1 amp constant current, built in diode, 170 mohm on resistance, about 20 cents.
ALL electronics need to be turned off/on at some point. This post will show you the basic use of a N and P channel mosfet. Some history of the transistor. And include data sheets.
The reason for this post is because the mega 328 micro and most other micros only sink ports at about 100 ma. Most leds draw 20 ma. So 10 turned on leds on one port will overload the micro and trip the brown-out-detector and go into reset. The 328 has 20 ports at 100ma is a whopping 2amp draw at 5v. Most wall warts top out at about 1-2 amp at 5v. So a 2amp switch mosfet is well above most phone chargers or batteries used in my projects.
Switching things OFF when using batteries is handy too. This will do that by removing the Vcc instead of setting the sensor to sleep mode. Many sensors do not even have a sleep or it is complicated to use.
Step 1: JUST Add RESISTOR
As per the drawing and layout circuit the only other component is a resistor. This will drive a small motor or switch a HR-12 module or anything less than 2 amps. By using a wire leg resistor the legs act as a heatsink as well as an easy way to connect to the circuit.
I use this switch for a gps module, HC-12, VPF camera, motion motor, and more. The typical circuit is the N type but to really stop all current draw I use the P type. This stops ALL Vcc that may have a stray leakage in the load. Mainly used in something with a battery.
Moser and Digitkey have these but both double the price with shipping. They also have 2,000 others to chose from. I got my N's and P's from China orders. I get the 50-100 lot price and pay about 3 cents each.
Be aware that these mosfets have a built in diode. This is needed in any circuit that creates a reverse EMF. Such as a magnetic coil. That would be a choke, motor, magnet...etc. A mosfet without this diode will be destroyed by the REMF.
Some notes on capacitors. The gate works well with a 1k resistor to a micro or direct connection. Sometimes a 10nf cap to ground is used. Any cap here only delays the rise time and turn on time of the mosfet. In a noisy environment this may be ok to use. The other placement of a cap is on the drain of the mosfet to ground. Again, in a noisy environment this may be useful. A value below 100mdf is best. All caps act like a dead short as they charge up. They will pull the Vcc down low enough to trip the brown-out detector in the micro and cause a reset. The start up to the 'load' also adds to this instant current draw problem. Unless there is a way of knowing of the reset, the circuit may preform in a way that is unpredictable. I had this ghost problem for a week before I found it. Many sensors have a 10-100mdf cap on board and a regulated Vcc supply. This makes the added cap useless.
Step 2: BRIEF HISTORY
The BEST documentary is PBS AMERICAN EXPERIENCE, SILICON VALLEY. I bought the dvd but you may be able to stream it. They cover a most diverse field in just one hour. If you have ANY connections to electronics you MUST view this. You will be amazed at how we got where we are.
The three individuals credited with the invention of the transistor were William Shockley, John Bardeen and Walter Brattain.
They made the transistor via the math of quantum mechanics which just began. Two fields of science starting a new world.
The transistor had several upgrades but the basic problem is the 0.7 volt loss in the make up of silicon. ALL silicon base transistors loose 0.7 volts when turned on. So the 'FET' was the next step. This changed the 'field' in which the flow of electrons could pass. But at first the FET was too static sensitive and had limited use in rf amps. Over time the FET had many improvements and got to the typical MOSFET of today. The 'on' or full bias of a mosfet is measured in mohm's and dosen't have the 0.7 volt drop.
The mohm is a standard measure of a mosfet RDS(on) resistance. This is 0.001 ohm. So a 170 mohm is 0.170 ohm on resistance. At a typical 5v supply that is better than most toggle switches. How many times have you tapped a flashlight to make it brighter...the resistance there is about 2 ohms.
Step 3: DATASHEETS
Here are the popular mosfets but you can see from the datasheets they are about 8 years old. Other mosfets are the FDN....xxx. The FDN537n is rated at 8 amps with just the foil runs as a heatsink!
I did not create this circuit. Anyone who had electronics 101 would know this by heart. But we sometimes forget the simple things and want a FANCY complicated circuit to do the work.
as Tom Bodett would say ' we'll leave the light OFF'
Thanks for reading oldmaninSC