IOREF
RES
ET
RESET
7-15V
SCL
SDA
AREF
GND
13
12
~11
~10
~9
8
7
~6
~5
4
~3
2
1
0
TX
RX
13
3.3V
5V
GND
GND
VIN
A0
A1
A2
A3
A4
A5
POWER
ANALOG IN
DIGIT
AL (PWM~)
ON
ISP
TX
RX
LEARN. SHARE. HACK.
Circuit 2
Remember before when you played around with a servo
motor? Now we are going to tackle spinning a motor.
This requires the use of a transistor, which can switch a
larger amount of current than the RedBoard can. When
using a transistor, you just need to make sure its
maximum specs are high enough for your use. The
transistor we are using for this circuit is rated at 40V max
and 200 milliamps max – perfect for our toy motor!
When the motor is spinning and suddenly turned off, the
magnetic field inside it collapses, generating a voltage
spike. This can damage the transistor. To prevent this, we
use a "flyback diode", which diverts the voltage spike
around the transistor.
Spinning a Motor
PARTS:
Wire
6
X
CIRCUIT #12
12
1
X
DC Motor
1
X
Diode
1N4148
Transistor
P2N2222AG
1
X
When you’re building the circuit be careful not
to mix up the transistor and the temperature
sensor, they’re almost identical. Look for
“P2N2222A” on the body of the transistor.
330Ω
Resistor
1
X
P2N2 222A
FRONT
BACK
RedBoard
Resistor (330 ohm)
(Orange-Orange-Brown)
Transistor
(P2N2222AG)
DC Motor
Diode
(1N4148)
GND
(Ground)
5 volt
PIN 9
COLLECTOR
BASE
EMITTER
EMITTER
BASE
COLLECTOR
Page 65
Summary of Contents for RedBoard
Page 13: ...Page 11...