Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Living with the Lab! Gerald Recktenwald! Portland State University! gerry@pdx.edu!
LWTL: DC Motor!
2!
Switch open!
Switch closed!
+5V
+5V I
LWTL: DC Motor!
4!
Inductive behavior of the motor causes current to continue to flow when the switch is opened suddenly. Charge builds up on what was the negative terminal of the motor.
LWTL: DC Motor!
5!
Reverse current!
Charge build-up can cause damage!
+5V I
Reverse current surge through the voltage supply + Arc across the switch and discharge to ground
LWTL: DC Motor!
6!
Motor Model!
Simple model of a DC motor:!
!! !! !!
Windings have inductance and resistance! Inductor stores electrical energy in the windings! We need to provide a way to safely dissipate electrical energy when the switch is opened!
+5V I +5V
LWTL: DC Motor!
7!
LWTL: DC Motor!
8!
!!
!!
Arduino lacks a true analog output! Use Pulse-width modulation (PWM) to simulate a variable DC supply voltage! PWM is a common technique for supplying variable power levels to slow electrical devices such as resistive loads, LEDs, and DC motors! Arduino Uno has 6 PWM pins: Digital I/O pins 3, 5, 6, 9,10, and 11!
!
LWTL: DC Motor! 10!
LWTL: DC Motor!
11!
...
LWTL: DC Motor!
12!
13!
LWTL: DC Motor!
15!
2N4401 / MMBT4401
2N4401
MMBT4401
C
TO-92
SOT-23
Mark: 2X
Parameter
Collector-Emitter Voltage Collector-Base Voltage Emitter-Base Voltage Collector Current - Continuous Operating and Storage Junction Temperature Range
Value
40 60 6.0 600 -55 to +150
Units
V V V mA C
This device is designed for use as a medium power amplier and switch requiring collector currents up to 500 mA!
*These ratings are limiting values above which the serviceability of any semiconductor device may be impaired.
NOTES: 1) These ratings are based on a maximum junction temperature of 150 degrees C. 2) These are steady state limits. The factory should be consulted on applications involving pulsed or low duty cycle operations.
Thermal Characteristics
Symbol
PD R!JC R!JA
Characteristic
Total Device Dissipation Derate above 25C Thermal Resistance, Junction to Case Thermal Resistance, Junction to Ambient 2N4401 625 5.0 83.3 200
Max
*MMBT4401 350 2.8 357
Units
mW mW/C C/W C/W
2N4401/MMBT4401, Rev A
LWTL: DC Motor!
16!
Pin 9 330
P2N2222
NPN transistor
LWTL: DC Motor!
18!
PWM signal
LWTL: DC Motor!
19!
LWTL: DC Motor!
20!
LWTL: DC Motor!
21!
LWTL: DC Motor!
22!
+5V connections!
LWTL: DC Motor!
23!
LWTL: DC Motor!
24!
LWTL: DC Motor!
25!
LWTL: DC Motor!
27!
LWTL: DC Motor!
28!
!!
Scale the 10-bit value (max 1023) to an 8-bit value (max 255)!
"! PWMoutput = map( potReading, 0, 1023, 0, 255 );!
range for! potReading! range for! PWMoutput!
!!