⚡ Electronics #1

Transistors and some applications

Press s for speaker notes, backspace to delete random annotations

Contents: Transistors

  • Bipolar Junction Transistors
  • MOSFETs
  • Darlington Pair
  • IGBT

Contents: Applications

  • Low battery detection
  • Variable Resistor & Regulators
    • LDO
    • Buck Regulator
    • Boost Regulator
  • Motor Driver
  • Solenoid Switch

Transistors?

Moore's Law in The Economist
Moore’s Law in The Economist

From Wikipedia:

“A transistor is a semiconductor device used to amplify or switch electronic signals and electrical power.”

Normal way to switch a light bulb
Normal way to switch a light bulb
Arduino switching a light bulb?
Arduino switching a light bulb?

From Arduino’s Tutorial:

“pins can source (provide positive current) or sink (provide negative current) up to 40 mA (milliamps) of current to other devices/circuits. […] attempting to run high current devices from them, can damage or destroy the output transistors in the pin, or damage the entire Atmega chip.”

Phillips LED Bulb Wattage
Phillips LED Bulb Wattage

Assuming Arduino runs at 5v,

Watts=Voltage×AmpsWatts=Voltage\times Amps 2.5W=5V×Amps2.5W=5V\times Amps

Amps=0.5A>>>0.04AAmps=0.5A>>>0.04A 💥

What if the Arduino could control the switch?
What if the Arduino could control the switch?
disclaimer: this circuit doesn't actually work
Electromechanical switch: Relay
Electromechanical switch: Relay

Problems

  • slow
  • prone to hardware failure
  • big
  • arcing

∴ A “digital” solution is required

There are many different types of transistors, but the first important one made was the
bipolar junction transistor (BJT)

NPN BJT
NPN BJT

It is commonly used as an amplifier, eg. for microphones and speakers

For switching a lightbulb, a BJT isn’t the most suitable…

metal–oxide–semiconductor field-effect transistor (MOSFET) is another type of transistor, the gate is insulated from the rest of circuit thus there is low input current and high input impedance

N-ch MOSFET
N-ch MOSFET

For a very high power lightbulb, power losses may become severe…

to solve the input issues of the MOSFET while acheiving the (relatively lower) output impedance of a BJT, a darlington pair configuration can be used

darlington pair configuration
darlington pair configuration

But Vce is doubled, so more power losses

insulated gate bipolar transistor (IGBT) combines the low output impedance of a BJT, high input impedance and high switching speed of a MOSFET to make a very high powered transistor.

IGBT
IGBT

But this is usually a lot more expensive and large, for most cases it’s overkill

For powering a lightbulb, a MOSFET is probably the most suitable

  • A lightbulb isn’t THAT high power to require a IGBT or Darlington pair
  • We are digitally controlling the lightbulb using a microcontroller, so we don’t need analog amplification
  • Cost effective, small, easily available, commonly used

Going back to the original problem…

MOSFET LED Switch
MOSFET LED Switch

Schematic Diagram

MOSFET LED Switch Schematic
MOSFET LED Switch Schematic

Low Battery Indicator

NPN BJT Low Battery Indicator
NPN BJT Low Battery Indicator

Variable Resistor

MOSFET as Variable Resistor
MOSFET as Variable Resistor

Low Dropout Regulator (LDO)

LM1117 LDO Block Diagram
LM1117 LDO Block Diagram

Buck Converter

Buck converter simplified schematic
Buck converter simplified schematic

Boost Converter

Boost converter simplified schematic
Boost converter simplified schematic

Brushed Motor

Brushed DC Motor GIF
Brushed DC Motor GIF

Full Bridge Rectifier

Full bridge rectifier GIF
Full bridge rectifier GIF

H-Bridge

H-Bridge
H-Bridge

Motor Driver

Motor Driver Block Diagram
Motor Driver Block Diagram

Driving a linear solenoid

We usually run the solenoids at ~60V, ~2A. This results in huge spikes in current and voltage we have to contain.

We first used a relay, but we experienced arcing due to this large power draw and inductive nature of the solenoid.

Current spikes

Oscilloscope reading of voltage across 0.4Ω resistor
Oscilloscope reading of voltage across 0.4Ω resistor

Solenoid’s inductive nature

Linear solenoid cross section
Linear solenoid cross section

MOSFET switch

Using a MOSFET to switch a solenoid...?
Using a MOSFET to switch a solenoid…?

Flyback diode

Adding flyback diode to contain inductive 'kickback'
Adding flyback diode to contain inductive ‘kickback’

Zener diode

Adding zener diode to dissipate energy
Adding zener diode to dissipate energy

end

MOSFET Vgs Threshold Issues

'CONTROL' voltage of 3.3v to drive MOSFET?
CONTROL’ voltage of 3.3v to drive MOSFET?

Using 12v battery as gate drive

Using 12v for gate drive
Using 12v for gate drive

end for real