What is the role of a transistor in controlling a DC motor with Arduino?
A transistor acts like a switch that allows the Arduino to control the higher current needed by the DC motor safely without damaging the Arduino board.
Click to reveal answer
beginner
Why do we need a diode when using a transistor to drive a DC motor?
The diode protects the transistor and Arduino from voltage spikes caused by the motor's coil when it turns off, preventing damage.
Click to reveal answer
beginner
In the Arduino code, what does the command 'digitalWrite(pin, HIGH)' do when controlling the motor?
It sends a voltage signal to the transistor's base, turning it on and allowing current to flow to the motor, making it run.
Click to reveal answer
intermediate
What type of transistor is commonly used to drive a DC motor with Arduino and why?
An NPN transistor is commonly used because it can easily switch the motor's ground connection on and off, which is simple to control with Arduino.
Click to reveal answer
intermediate
Explain the basic wiring connections needed to control a DC motor with a transistor driver and Arduino.
Connect one end of the motor to the power supply, the other end to the transistor's collector, the transistor's emitter to ground, and the transistor's base to an Arduino digital pin through a resistor. Also, add a diode across the motor terminals for protection.
Click to reveal answer
What component protects the transistor from voltage spikes when the motor stops?
AResistor
BDiode
CCapacitor
DLED
✗ Incorrect
A diode is placed across the motor terminals to safely redirect voltage spikes caused by the motor's coil.
Which Arduino command turns the transistor on to run the motor?
AdigitalWrite(pin, HIGH)
BdigitalWrite(pin, LOW)
CanalogRead(pin)
DpinMode(pin, OUTPUT)
✗ Incorrect
digitalWrite(pin, HIGH) sends voltage to the transistor base, turning it on and powering the motor.
What type of transistor is typically used to switch the motor's ground connection?
APNP transistor
BMOSFET
CJFET
DNPN transistor
✗ Incorrect
NPN transistors are commonly used to switch the ground side of the motor in Arduino projects.
Why do we use a resistor between Arduino and transistor base?
ATo limit current to protect the transistor and Arduino
BTo increase current to the motor
CTo power the motor
DTo measure voltage
✗ Incorrect
The resistor limits current flowing into the transistor base, protecting both the transistor and Arduino pin.
What happens if you connect the motor directly to Arduino without a transistor?
AMotor runs normally
BArduino will charge the motor
CArduino can be damaged due to high current
DMotor runs faster
✗ Incorrect
Arduino pins cannot supply enough current for a motor and may get damaged if connected directly.
Describe how to connect a DC motor to an Arduino using a transistor driver and explain why each component is needed.
Think about the flow of current and protection for the Arduino.
You got /5 concepts.
Explain the Arduino code steps to turn a DC motor on and off using a transistor driver.
Focus on the commands that control the transistor base.
You got /4 concepts.
Practice
(1/5)
1. What is the main role of a transistor when controlling a DC motor with an Arduino?
easy
A. To act as a switch that controls the motor safely
B. To increase the motor speed directly
C. To power the Arduino board
D. To measure the motor's temperature
Solution
Step 1: Understand transistor function
A transistor acts like a switch or amplifier in circuits.
Step 2: Apply to motor control
In Arduino motor control, the transistor switches the motor on/off safely without damaging the board.
Final Answer:
To act as a switch that controls the motor safely -> Option A
Quick Check:
Transistor = switch for motor control [OK]
Hint: Think of transistor as a safe on/off switch for the motor [OK]
Common Mistakes:
Confusing transistor with motor speed controller
Thinking transistor powers the Arduino
Assuming transistor measures anything
2. Which Arduino code snippet correctly sets a transistor pin to control a DC motor?
easy
A. pinMode(9, INPUT); digitalRead(9);
B. pinMode(9, INPUT); digitalWrite(9, HIGH);
C. pinMode(9, OUTPUT); digitalRead(9);
D. pinMode(9, OUTPUT); digitalWrite(9, HIGH);
Solution
Step 1: Set pin as output for controlling transistor
To control a transistor, the Arduino pin must be OUTPUT.
Step 2: Write HIGH to turn motor on
digitalWrite(9, HIGH) sends voltage to transistor base to switch motor on.
Final Answer:
pinMode(9, OUTPUT); digitalWrite(9, HIGH); -> Option D
Quick Check:
Output pin + HIGH = motor ON [OK]
Hint: Use OUTPUT mode and digitalWrite to control transistor [OK]
Common Mistakes:
Setting pin as INPUT when controlling transistor
Using digitalRead instead of digitalWrite
Not setting pinMode before writing
3. What will be the effect of this Arduino code controlling a transistor connected to a DC motor?
Pin controlling transistor must be OUTPUT, not INPUT.
Step 2: Identify conflict with digitalWrite
digitalWrite on an INPUT pin causes undefined behavior or no effect.
Final Answer:
Pin is set as INPUT but digitalWrite is used -> Option B
Quick Check:
OUTPUT needed for digitalWrite [OK]
Hint: Set pinMode to OUTPUT before digitalWrite [OK]
Common Mistakes:
Using INPUT mode with digitalWrite
Confusing digitalWrite with digitalRead
Ignoring pinMode setup
5. You want to control a DC motor speed using PWM on pin 9 with a transistor driver. Which additional component is essential to protect your circuit from voltage spikes caused by the motor?
hard
A. An LED connected in parallel with the transistor
B. A capacitor connected to the Arduino 5V pin
C. A diode connected across the motor terminals
D. A resistor in series with the motor
Solution
Step 1: Understand motor voltage spikes
When motor stops suddenly, it can create voltage spikes that damage components.
Step 2: Identify protection method
A diode placed across motor terminals (flyback diode) safely redirects spikes, protecting transistor and Arduino.
Final Answer:
A diode connected across the motor terminals -> Option C
Quick Check:
Flyback diode protects circuit from spikes [OK]
Hint: Always add diode across motor for spike protection [OK]
Common Mistakes:
Skipping diode and risking transistor damage
Using resistor instead of diode for spike protection
Confusing capacitor or LED as spike protection
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.