IOREF
RESET
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
DIGITAL (PWM~)
ON
ISP
TX
RX
Circuit 2
Remember before when you played around with a servo
motor? Now we are going to tackle spinning a motor.
is 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. e
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 o, the
magnetic eld inside it collapses, generating a voltage
spike. is can damage the transistor. To prevent this, we
use a "yback 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
Resistor (330 ohm)
(Orange-Orange-Brown)
COLLECTOR
BASE
EMITTER
EMITTER
BASE
COLLECTOR
Page 65