June Wednesday 20

Bookmark and Share

Related Articles...

MILWAUKEE WI Arduino Meet Up Make Space


WANTED: Angle Investor Start-Up Funding

Large Industrial Zoned Arduino Make Space Acquired!

Email :

COASMailBox @ gmail.com

MILWAUKEE WI Raspberry Pi Meet Up Make Space


WANTED: Angle Investor Start-Up Funding

Large Industrial Zoned Raspberry Pi Make Space Acquired!

Email :

COASMailBox @ gmail.com

MILWAUKEE WI Internet of Things (IoT) Meet Up Make Space


WANTED: Angle Investor Start-Up Funding

Large Industrial Zoned Make Space Acquired!

Full Advanced Fabrication Facility, machine Shop, Welding, Electronics Lab Equipment Acquired!

Email :

COASMailBox @ gmail.com

MILWAUKEE WI Machine Repair, & Installation  - Tier 1 Business Support

Machine Technician Mechanic 20+ Years  Personal Experienced In Industrial Factory Machine Servicing, Rebuilding, Installation And Repair - Plus A 35+ Years Experienced Computer Engineer Service Technician Team Ready For Your Outsourced Market Advantage Needs!

Hartung Industrial - Member - CGI Science & Technology Group

Email :

COASMailBox @ gmail.com

2017 REVIEW | Calling Team Core Makers To Produce The New Proposed 'IoT & Embedded MAKER SPACE - MKE' Group !!!


Arduino Driving Big Loads

Science, Physics, Technology, Electrical, Work

2017 OCTOBER | by Gene Casanova

Senior Electronics Engineer, Senoir Computer Systems Engineer; Pyshics Researcher

Arduino PCB With Long IC1 MCU

CGI Computer Wares' Ant™ Computers

The Arduino UNO (ATmega328P microcontroller on a PCB) provides 14 digtially controlled circuirts attached to 14 individual pins (I/O).  Each digital circuirt has a current capacity before burning, of 40mA.

To control higher current (load) drawning circuits and devices, an external component can be attached to a I/O pin.

This article is written for the New CGI Computer Wares' Arduino Uno R3 systemboard.  In addition to all the features of the previous Arduino systemboard, the UNO now uses an 'ATmega16U2'.  This interface provides faster data-transfer rates and more memory.  No drivers needed for today's most effective and leading computing technology, MAC OS X, FreeBSd, and LINUX, and the ability to have the UNO show up as a keyboard, mouse, joystick, etc.. = Awesome!


MOSFET transistor  N-Channel MOSFET Transistor


MOSFET (Metal Oxide Semiconductor Field-Effect) transistor.

A MOSFET transistor, can be used as a switch by an Arduion I/O pin; to control high current devices and circuits.

A MOSFET enables controlling devices with power supply differs from the one used by Arduino Board.

With a MOSFET connected to Arduino Digital I/O pin 8, the Arduion "analogWrite()" function can control the speed of a DC motor through PWM (Pulse with Modulation).


The "dashed line" in a MOSFET symbol, between the drain and source, indicates the current flow is normally interrupted, and a gate voltage will "close the gaps".  This means the diagrams above are for "enhancement-mode" MOSFET.

The arrows in a transistor and diode drawning symbol, indicates the direction of "forward bias".  The point of the arrow, indicates the more negative-voltage side.

Lab Expermentation


For experimentation purposes, a N-Channel MOSFET transitior model RFP30N06LE will be used.

How It Works

Simple terms are used here to introdue and enlighten.

A "transistor" is a solid state device.  The term "solid state" refers to a device being made of solid sythentic material, with no moving parts.

A basic "transisitor" has 2 simple functions, to 'switch' or to amplify.

As a switch, a transistor has a "source" lead, an out lead refered to as a "Drain", and a control lead refered to as a "Gate".

When a 'HIGH' electrical state (the "signal") is at the "gate" (control pin), the gate opens in the transistor, enabling electrical current to flow from the source lead to the drain lead.  The effect of a transisitor provides the same electrical function of a mechanical electrical switch.

Circuit - Arduino Switching On/Off A Motor, A Solenoid, Or A Lightbulb Using A Transistor

  1. Connect one lead of a motor, a solenoid, or a lightbulb, to V+ postive voltage source.
  2. Connect the ground lead of the device, the the drain of a N-Channel transisitor.
  3. Connect the transistor gate to one of the Arduino systemboard digital I/O pins.
  4. When an Arduino sends a 'HIGH' signal to the I/O pin connected to the gate of the transistor, the gate closes (enabling electrical flow between the 'drain' and 'source') the electrical circuit to the attached motor, solenoid, or lightbulb.
  5. Add a pull-down resistor. A pull-down resistor, is used to put and hold the gate in a 'LOW' state.  This resistor is a safety check; incase the Arduino systemboard looses electrical contact, or loss of wiring continuity occurs; providing a default device 'off' fucntionality state.  This I/O pin must never be in a floating state (enabling random switching!!).
  6. When a solinoid is used, a diode must be added in the circuit to block the negative electrical engery created by the collapsing magnetic field in the solinoid coil.


The experimental circuit above can only switch DC current.

A diode must be placed accross the power leads of the motor and the solinoid.

When applying electrical engery to a coil of wire, in a relay, solenoid, or motor, a diode must be used as a current-blocking device.

When electrical engery is removed from a coil-of-wire, an opposing voltage and current is created (a "voltage spike").  This opposing electrical engery will destroy the transistor.

A diode is used, in this circuit, to block the opposing current from flowing, and enable the intended electrical current to pass.

The diode must be fast enough to react to the voltage spike, and strong enough to withstand the normal circuit current load.

A "rectifier diode" like the model 1N4001 or SB560, would work in this experimental circuit.

Extra protection for the Arduino can be had by isolating the elextrical circuits between the Ardiuno I/O pins and the powered device.  This is done using a optoisolator between the Arduino I/O pin and the transistor gate.

An optoisolator optically isolates both sides (high and low power) of the circuit so the high-voltage can not possibly come back to the microcontroller.

Diodes are polar and this diode must be palced in the circuirt with the stripe end of the diode connected to the V+ of the electrical device being powered.


MOSFET transistors have a voltage and an amperage/current limitation.

The MOSFET RFP30N06LE can handle switching up to 60V and pass 30A or less.

BEWARE - Electrical components manufactures set device limitation ratings, based on their testing using a specific heatsinking.  Always consider the physics of heat geneation and disapation when desiging and building a circuit using IC components, like transistors - specially power transistors.  Not using the correct/effective heatsinking, lessons the functionality of the device to the point of destruction.

BEWARE - Using a thick layer of heatsink compound, creates a insulation layer and defeats the function of any attached heatsink!  Use of heatsink compound can be critical - check the official data sheet supplied by the specific component manufacturer/designer for heatsinking information.

Add Precision Control

The Arduino MPU pulses at a very high rate between 0 and 5v; providing an average voltage between 0 and 5.  This vasy fast electrical pulse enables PWM (Pulse Width Modulation) to be sent through the transistor; enabling fading a lightbulb, or controlling the speed of a DC motor.

All you need to do in order to take advantage of this is make sure the MOSFET's gate is connected to a PWM pin.

The Logic

The Ardiuno needs to send a 'HIGH' state signal to the transistor 'gate' lead to switch a load on or off.

Additonally, more precise control can be had, by controlling the device through PWM.

Example Process

As an experimental example, the following source code enables PWM control over an attached device using the MOSFET circuit presented above.

/* Arduino
* source code - PWM
* By Gene Casanova
* © 2017 | Open-Source
* This software must remain open-source and this copyright notice stay in place with all copies.
*/#define fadePin 3
void setup()
 pinMode(fadePin, OUTPUT);
void loop()
  for(int i = 0; i<360; i++)
   {	// Convert 0-360 angle to radian (needed for sin function)
    float rad = DEG_TO_RAD * i; // Calculate sin of angle as number between 0 and 255
    int sinOut = constrain((sin(rad) * 128) + 128, 0, 255);
    analogWrite(fadePin, sinOut);
} }

Use The Technology Wisely & Keep It Simple

- Cheers!

Gene Casanova

Need More?   Need Help? ........Software, Network, System & Data Center Builder & Developer | Development Services Available - Freelance Small Jobs; To Outsourced Long Term Service Provider Contract Labor Available.

CGI Computer Wares | EST 1979

Send E-MailCONTACT: [click]@CGIComputerWares.com