Skip to content
MakerBuddy

DC Motors Explained: How a DC Motor Works and How to Control Its Speed

A DC motor spins when current flows through its coil. Learn how it works, why a microcontroller pin cannot power one, and how PWM and driver chips set its speed and direction.

By the MakerBuddy teamPublished 20 min read

An ESP32 board with a knob sends PWM pulses to a motor driver powered by a battery pack, and the driver spins a DC motor, drawn cut away to show its north and south magnets and three copper rotor coils, with an amber arrow for the rotation
An ESP32 board with a knob sends PWM pulses to a motor driver powered by a battery pack, and the driver spins a DC motor, drawn cut away to show its north and south magnets and three copper rotor coils, with an amber arrow for the rotation

A DC motor is a motor that runs on direct current, the steady one-way current from a battery or a USB supply. Current flows through a coil of wire on the shaft. The coil becomes a magnet, magnets around it push and pull, and the shaft spins. To control a DC motor, you change two things. Speed follows the voltage, so you raise or lower the average voltage, usually with fast on-off pulses called PWM. Direction follows the current, so you reverse the current with a circuit called an H-bridge.

One rule comes before everything else. A microcontroller pin decides what the motor does, but it cannot power the motor. A pin gives a tiny current, and a motor needs far more, especially when it starts. So a transistor, a motor driver or a relay always sits between the pin and the motor.

Below you get how a DC motor works, the main types, the ways to control speed and direction, a speed calculation and a complete ESP32 sketch. Then you will see why the MakerBuddy kit switches its fan through a relay instead of a pin.

How a DC motor works: magnets, a coil, a commutator and brushes

Microchip's application note on brushed DC motor fundamentals (opens in a new tab) says every brushed DC motor has the same four basic parts.

  1. 1

    The stator

    stays still. It makes a fixed magnetic field around the middle of the motor, using permanent magnets or coils.

  2. 2

    The rotor, or armature,

    turns. It carries coils of wire that become electromagnets when current flows.

  3. 3

    The commutator

    is a copper sleeve on the shaft, cut into segments. Each segment connects to a different coil.

  4. 4

    The brushes

    are small carbon blocks that press on the commutator and carry current into it.

Now put them together. Current flows in through the brushes and into a coil. The coil becomes a magnet, and its north pole is pulled towards the stator's south pole, so the rotor turns. Just before the poles line up, the brushes slide onto the next commutator segment. Current now flows through a different coil, so the pull moves on ahead and the rotor keeps chasing it. Microchip calls this switching "commutation". In a brushed motor it happens mechanically, with no controller.

Inside a brushed DC motor: current from the battery enters through one carbon brush, flows round the copper rotor coil between the N and S stator magnets and leaves through the other brush, and the inset shows the commutator turning half a turn so the + brush slides from segment 1 onto the next segment
Inside a brushed DC motor: current from the battery enters through one carbon brush, flows round the copper rotor coil between the N and S stator magnets and leaves through the other brush, and the inset shows the commutator turning half a turn so the + brush slides from segment 1 onto the next segment

Two facts follow from this design, and the whole of motor control rests on them.

  • Speed follows voltage. Microchip's note says a brushed motor's speed is proportional to the voltage applied to it.
  • Turning force follows current. For the permanent-magnet type, the note says current draw varies linearly with torque. Make the motor work harder, and it pulls more current.

Arduino's transistor motor control guide (opens in a new tab) adds the warning that matters most for small circuits. Motors pull the most current when they start or carry a load, and the stall current is what a motor pulls when something holds it still.

Brushed vs brushless and the other types of DC motor

A brushed motor switches its own coils with the commutator, so you only need to connect power. Microchip's note says this makes brushed motors cheap and easy to drive, and lists uses from toys to car seats you adjust with a button. The catch is wear: the brushes and commutator slide past each other all the time, so they wear out first.

A brushless motor has no brushes. Electronics switch the coils instead, so Microchip's note points out that it needs a controller to run. It is harder to drive, but nothing rubs.

Brushed motors come in four kinds, named after how the stator makes its field.

Type
Permanent magnet (PMDC)
How the stator makes its field
Permanent magnets
What it is good at
The most common brushed type; cost-effective at small sizes; speed tracks voltage in a straight line
Type
Shunt-wound
How the stator makes its field
A coil in parallel with the armature
What it is good at
Excellent speed control; used at five horsepower and above
Type
Series-wound
How the stator makes its field
A coil in series with the armature
What it is good at
High torque, less precise speed control
Type
Compound-wound
How the stator makes its field
Both a series and a shunt coil
What it is good at
A mix: more torque than shunt-wound, better speed control than series-wound

Table source: Microchip AN905 (opens in a new tab).

The small motors in toys and student kits are permanent-magnet brushed motors, and that is the type this guide uses. A hobby servo is a small DC motor with a gearbox, a position sensor and a control circuit in one case, so it can turn to an angle and hold it. Our guide to how a servo motor works and what its three wires do covers it, and Lesson 14 on the SG90 servo teaches it in class.

Why a microcontroller pin cannot power a DC motor

Here is why, with real numbers.

What a pin can give. Espressif's ESP32 datasheet (opens in a new tab) lists a typical source current of 40 mA per pin at 3.3 V, with the drive strength at maximum, falling towards about 29 mA as more pins source current at once. Arduino's motor control guide (opens in a new tab) says an Arduino can only provide 40 mA at 5 V on its digital pins.

What a small motor needs. Take Adafruit's 130-size hobby motor (opens in a new tab) as an example; it is not the motor in the MakerBuddy kit. It is rated for 6 V. Its listing gives a no-load current of up to 70 mA, a loaded current of up to 250 mA and a stall current of up to 500 mA.

Situation
Spinning freely
Current the motor may need
Up to 70 mA
ESP32 pin, typical
40 mA
Shortfall
About 1.8 times too much
Situation
Doing work
Current the motor may need
Up to 250 mA
ESP32 pin, typical
40 mA
Shortfall
About 6 times too much
Situation
Starting or stalled
Current the motor may need
Up to 500 mA
ESP32 pin, typical
40 mA
Shortfall
About 12 times too much

Table sources: the motor figures are from Adafruit's listing (opens in a new tab) and the pin figure from the ESP32 datasheet (opens in a new tab). The last column is simple division.

The voltage is wrong too: 3.3 V from the pin for a 6 V motor. And there is a second danger. A spinning motor acts as a generator. Microchip's note explains that when the switch to the motor turns off, the winding drives current backwards. That spike, called back EMF, can damage whatever switched it.

So the job is split in two. The pin gives the order. A separate part, on a supply that can handle the current, does the work. Our coming guide on motor drivers and why a pin cannot power a motor goes deeper.

DC motor control: four ways to change speed

Method
On-off switch
How it works
A relay or transistor gives full power or none
Speed control
No, full speed or stop
Direction control
No
Wasted energy
Low
Method
Lower supply voltage
How it works
An adjustable supply gives fewer volts
Speed control
Yes, if you have one
Direction control
No
Wasted energy
Depends on the supply
Method
Series resistor
How it works
A resistor or rheostat eats some of the voltage
Speed control
Roughly
Direction control
No
Wasted energy
High, as heat
Method
PWM through a transistor or driver
How it works
Full voltage in fast pulses; the on-time sets the average
Speed control
Yes, smooth
Direction control
Only with an H-bridge
Wasted energy
Low

Microchip's brushed motor note (opens in a new tab) explains why PWM wins. It calls PWM a far more efficient way to vary speed than the traditional method, a variable resistance in series with the motor, which it calls inefficient.

PWM, or pulse width modulation, is the trick that dims an LED. Arduino's basics of PWM (opens in a new tab) calls it "a technique for getting analog results with digital means." The pin switches fully on and fully off many times a second, and the share of on-time is the duty cycle. On an Arduino, analogWrite(127) is a 50% duty cycle and analogWrite(255) is 100%. Our coming guide to PWM explained with an LED shows the pulses step by step.

A motor smooths the pulses for you. Microchip's note says the winding acts as a low-pass filter, so a PWM wave of high enough frequency makes a steady current in it.

Three PWM waves on a 6 V supply: 25%, 50% and 75% duty cycle (PWM 64, 128 and 191) give average voltages of 1.5 V, 3 V and 4.5 V and ideal speeds of about 2,275, 4,550 and 6,825 RPM for a 9,100 RPM hobby motor, though at 25% a real motor may only hum
Three PWM waves on a 6 V supply: 25%, 50% and 75% duty cycle (PWM 64, 128 and 191) give average voltages of 1.5 V, 3 V and 4.5 V and ideal speeds of about 2,275, 4,550 and 6,825 RPM for a 9,100 RPM hobby motor, though at 25% a real motor may only hum

Worked example: what PWM does to a motor's speed

Microchip's note gives the rule: average voltage equals duty cycle times supply voltage, and speed is proportional to duty cycle. Its own example is a motor rated for 15,000 RPM at 12 V, which should ideally turn at 7,500 RPM at a 50% duty cycle.

Now try it on the hobby motor. Adafruit's listing (opens in a new tab) gives a no-load speed of 9,100 RPM, give or take 1,800, at its rated 6 V. Run it from 6 V through a driver with 8-bit PWM, so duty values go from 0 to 255.

PWM value
64
Duty cycle
25%
Average voltage
1.5 V
Ideal no-load speed
About 2,275 RPM
What you will probably see
A hum and no movement
PWM value
128
Duty cycle
50%
Average voltage
3.0 V
Ideal no-load speed
About 4,550 RPM
What you will probably see
Starts and spins slowly
PWM value
191
Duty cycle
75%
Average voltage
4.5 V
Ideal no-load speed
About 6,825 RPM
What you will probably see
Spins well
PWM value
255
Duty cycle
100%
Average voltage
6.0 V
Ideal no-load speed
About 9,100 RPM
What you will probably see
Full speed

How each column was worked out:

  1. 1

    Duty cycle

    is the PWM value divided by 255. For example, 128 ÷ 255 is about 0.50.

  2. 2

    Average voltage

    is the duty cycle times the supply: 0.50 × 6 V = 3.0 V.

  3. 3

    Ideal speed

    is the duty cycle times the rated no-load speed: 0.50 × 9,100 RPM = 4,550 RPM.

Table sources: speed and voltage from Adafruit's listing (opens in a new tab); the duty-cycle rule from Microchip AN905 (opens in a new tab).

Why does the last column disagree at the bottom? Arduino's motor control guide (opens in a new tab) says a motor typically needs about half its rated voltage to run, and with less than that at start-up it probably will not move. Half of 6 V is the 50% row.

Load changes things too. Adafruit lists the loaded speed at 4,500 RPM, give or take 1,500, about half the no-load figure, and Microchip's note adds that heat, commutator wear and load all change real speed. So the ideal column is a guide, not a promise. For an exact speed you add a speed sensor and keep adjusting the duty cycle, which is called closed-loop control. For your code, the lesson is simple: below a minimum duty, send 0, so the motor never sits humming without turning.

Changing direction with an H-bridge

Swap a motor's two wires and it spins the other way. An H-bridge does that swap with electronics. Microchip's note (opens in a new tab) describes four switches arranged like the letter H, with the motor across the middle bar. Close the top-left and bottom-right switches and current flows one way. Close the other pair and it flows the other way.

  • Forward: one side of the motor goes to the supply, the other to ground.
  • Reverse: the sides swap.
  • Coast: all four switches open, and the motor coasts to a stop.
  • Brake: both motor leads go to ground. The spinning motor acts as a generator into a short circuit, which stops it quickly.

The note gives one hard warning: never turn on both switches on the same side at once. That shorts the supply to ground and destroys the switches. Driver chips guard against it: Toshiba's TB6612FNG datasheet (opens in a new tab) says the chip adds a short dead time when it switches modes, to prevent that current.

An H-bridge drawn three times: with Q1 and Q4 closed, current flows left to right through the motor (forward); with Q2 and Q3 closed, it flows right to left (reverse); and Q1 and Q2 closed together short the supply straight to ground, which must never happen
An H-bridge drawn three times: with Q1 and Q4 closed, current flows left to right through the motor (forward); with Q2 and Q3 closed, it flows right to left (reverse); and Q1 and Q2 closed together short the supply straight to ground, which must never happen

Small driver chips often hold two H-bridges, so one board runs two motors. Two carrier boards from Pololu show the limits to check.

Driver board
TB6612FNG carrier
Motor supply
4.5 to 13.5 V recommended
Current per channel
1 A continuous, 3 A peak
Logic level
2.7 to 5.5 V
Driver board
DRV8833 carrier
Motor supply
2.7 to 10.8 V
Current per channel
1.2 A continuous, 2 A peak
Logic level
3 V and 5 V compatible

Table sources: Pololu's TB6612FNG carrier page (opens in a new tab) and DRV8833 carrier page (opens in a new tab).

Both cover the hobby motor's 500 mA stall current, and both accept 3.3 V signals from an ESP32. The TB6612FNG page also lists a maximum PWM frequency of 100 kHz.

DC motor with Arduino: the official transistor circuit

If the motor only needs to spin one way, one transistor will do. Arduino's transistor motor control guide (opens in a new tab) is Arduino's own DC motor starter circuit.

  • A TIP120 transistor, which the guide says can switch up to 60 V at 5 A. Pin 9 goes to its base, the motor to its collector, and its emitter to ground.
  • A 9 V motor on a 9 V battery, not the Arduino's 5 V. The battery's ground joins the Arduino's ground.
  • A 1N4001 diode across the motor's leads, striped side towards the 9 V, to catch the back EMF spike.
  • A push button on pin 2 with a 10 kΩ pull-down resistor.

When the button is pressed, the code raises analogWrite(9, x) from 0 to 255 and back down, pausing 50 ms per step. The higher the value, the faster the motor.

Two things to know before you copy it. Arduino's PWM basics page (opens in a new tab) puts the Arduino's PWM frequency at about 500 Hz, which you may hear as a whine. Microchip's note suggests 4 to 20 kHz for motors, high enough to quieten the noise without big switching losses. And this circuit only goes one way; reversing needs an H-bridge. Our coming guide to the transistor as a switch you control with electricity explains base, collector and emitter.

Worked example: speed and direction with an ESP32 and a driver

This sketch runs one DC motor from a knob. Left of the middle, it runs one way. Right of the middle, the other way. Near the middle, it stops. It is for a plain ESP32 DevKit on a breadboard with a TB6612FNG carrier and a 10 kΩ potentiometer, not for the MakerBuddy board, whose pins are already wired to its sockets.

Wiring:

  1. 1

    ESP32 GPIO 16 to PWMA, GPIO 17 to AIN1, GPIO 18 to AIN2 and GPIO 19 to STBY.

  2. 2

    ESP32 3V3 to the driver's VCC, and ESP32 GND to the driver's GND.

  3. 3

    The motor's two wires to AO1 and AO2.

  4. 4

    A separate battery pack that suits your motor to VMOT and GND, inside the driver's 4.5 to 13.5 V range.

  5. 5

    The knob's outer legs to 3V3 and GND, and its middle leg to GPIO 34.

cpp
// DC motor speed and direction: ESP32 + TB6612FNG driver + knob
// For a plain ESP32 DevKit on a breadboard, not the MakerBuddy board.

const int PIN_PWMA = 16;   // speed: PWM into the driver's PWMA
const int PIN_AIN1 = 17;   // direction input 1
const int PIN_AIN2 = 18;   // direction input 2
const int PIN_STBY = 19;   // driver awake when HIGH
const int PIN_KNOB = 34;   // potentiometer wiper (input-only, ADC1)

const uint32_t PWM_HZ   = 20000; // 20 kHz switching
const uint8_t  PWM_BITS = 8;     // duty from 0 to 255
const int DEADBAND = 300;        // knob counts around the middle = stop
const int MIN_DUTY = 90;         // lowest duty that still starts the motor

void setup() {
  Serial.begin(115200);
  pinMode(PIN_AIN1, OUTPUT);
  pinMode(PIN_AIN2, OUTPUT);
  pinMode(PIN_STBY, OUTPUT);
  digitalWrite(PIN_AIN1, LOW);   // LOW + LOW = stop
  digitalWrite(PIN_AIN2, LOW);

  if (!ledcAttach(PIN_PWMA, PWM_HZ, PWM_BITS)) {
    Serial.println("PWM did not start");
  }
  ledcWrite(PIN_PWMA, 0);
  digitalWrite(PIN_STBY, HIGH);  // wake the driver last
}

void loop() {
  int offset = analogRead(PIN_KNOB) - 2048;  // about -2048 to +2047
  int duty = 0;

  if (offset > DEADBAND) {
    digitalWrite(PIN_AIN1, HIGH);   // HIGH, LOW = one way
    digitalWrite(PIN_AIN2, LOW);
    duty = map(offset, DEADBAND, 2047, MIN_DUTY, 255);
  } else if (offset < -DEADBAND) {
    digitalWrite(PIN_AIN1, LOW);    // LOW, HIGH = the other way
    digitalWrite(PIN_AIN2, HIGH);
    duty = map(-offset, DEADBAND, 2048, MIN_DUTY, 255);
  } else {
    digitalWrite(PIN_AIN1, LOW);    // middle of the knob: stop
    digitalWrite(PIN_AIN2, LOW);
  }

  ledcWrite(PIN_PWMA, constrain(duty, 0, 255));
  delay(20);
}

Why it is written this way:

  1. 1

    The direction pins follow the chip's truth table.

    Toshiba's TB6612FNG datasheet (opens in a new tab) lists IN1 high with IN2 low as one direction, the reverse as the other, both low as stop, and a low PWM input as a short brake. So between pulses the motor is braked, not left to coast.

  2. 2

    STBY goes high last.

    Pololu's carrier page (opens in a new tab) says STBY is pulled low inside the chip, keeping the driver asleep until it is driven high. Waking it after the other pins are set means the motor cannot start before its direction is chosen.

  3. 3

    ledcAttach(PIN_PWMA, 20000, 8)

    starts the ESP32's hardware PWM. Espressif's LEDC reference (opens in a new tab) says it returns true on success, so the sketch reports a failure. 20 kHz is the top of Microchip's suggested band and well under the driver's 100 kHz limit. In Arduino-ESP32 3.x, ledcWrite takes the pin, not a channel.

  4. 4

    The knob is on GPIO 34.

    Espressif's GPIO reference (opens in a new tab) lists GPIO 34 to 39 as input-only, which suits a knob, and the ESP32 datasheet (opens in a new tab) lists GPIO 34 as ADC1 channel 6. ADC1, unlike ADC2, keeps working with Wi-Fi on. analogRead returns 0 to 4095.

  5. 5

    MIN_DUTY is 90, about 35%.

    Tune it: set the knob just past the stop zone and raise the value until the motor starts every time.

Why the MakerBuddy kit switches its fan through a relay

The MakerBuddy kit photos show a small motor with a fan blade and a small bulb, and ask you to check which of these ship with your order. The kit never powers a motor from a pin. Its fan builds wire the fan through the relay module in the socket marked 23, for the reasons above.

The relay module does the lifting. Lesson 15 on relay control and electrical isolation explains the chain. When the ESP32 sets pin 23 high, a small transistor on the relay module switches on and sends current from the board's 5 V supply through the relay's coil. The coil pulls a metal arm, and the contacts close. The fan's current flows through those contacts from the board's 5 V, never through the ESP32's pin. Our guide to what a relay is and how a small signal switches a big load walks through it in full.

The two circuits stay apart. Only magnetism links the coil to the contacts, so Lesson 15 makes the point that nothing can leak back from the switched side into the ESP32. That matters with a motor and its back EMF spike.

The trade-off is speed control. A relay is on or off. The MakerBuddy firmware switches it at once, and Lesson 15 says the relay takes about a hundredth of a second to switch, far too slow to follow PWM pulses that come thousands of times a second. On the kit, the fan runs at full speed or stops. To try the speed control in this guide, use a separate ESP32 or Arduino with a driver. Uploading your own sketch to the MakerBuddy board replaces its firmware until you upload the MakerBuddy firmware again, as the documentation on updating explains.

What the relay gives you instead is automatic control with no code. This is the smart fan from Lesson 26 on condition loops:

  1. 1

    With the USB cable unplugged and a teacher's help, plug the DHT11 into the socket marked 25 and the relay into the socket marked 23. Wire the fan as Lesson 15 shows: the board's two-pin 5V plug to COM, NO to the fan, and the fan's other lead to GND.

  2. 2

    Power up and check that the temperature card shows a real reading. A 0.0 means the sensor is not being read.

  3. 3

    Create a Condition rule on Temperature (DHT11), Greater than, 30, with one step: Relay On.

  4. 4

    Create a second Condition rule on Temperature (DHT11), Less than, 26, with one step: Relay Off.

The fan now runs above 30 °C and stops below 26 °C, and the gap stops the relay clicking on and off around one value. According to how rules run, the rules are saved and run on the board, which reads its sensors once a second, and a condition must stay true for 0.3 seconds before a rule starts. The board has no clock, so a rule cannot say "fan on at 3 pm".

Every part a class gets, with the lesson that teaches it, is on the MakerBuddy kit's ordering page. Our coming guide to DC fans in electronics projects builds on this section.

Common DC motor mistakes, with causes and fixes

The motor hums but does not turn at low speed

Cause: The average voltage is below what the motor needs to start, about half its rated voltage according to Arduino's motor guide (opens in a new tab).

Fix: Send 0 below a minimum duty, as the sketch does with MIN_DUTY.

The ESP32 resets when the motor starts

Cause: The motor shares the board's supply, and its start-up current pulls the voltage down. Espressif's guide to fatal errors (opens in a new tab) says the ESP32's brownout detector resets the chip when the supply falls below a safe level.

Fix: Give the motor its own supply, as Arduino's circuit does with its 9 V battery, and join the two grounds.

The driver board does nothing at all

Cause: On a TB6612FNG, STBY is still low, so the driver is asleep. A missing shared ground gives the same symptom.

Fix: Drive STBY high from a pin or tie it to the logic supply, and connect the grounds.

The motor whines loudly

Cause: The PWM frequency is in the range you can hear, such as the Arduino's 500 Hz or so.

Fix: Use 4 to 20 kHz, as Microchip's note suggests. On an ESP32, pass a frequency such as 20000 to ledcAttach.

The transistor got hot, then stopped working

Cause: No diode across the motor, or one fitted backwards, so the back EMF spike hits the transistor each time the motor turns off.

Fix: Fit a diode such as the 1N4001 across the motor, stripe towards the positive supply. Our coming guide to diode types and uses explains why direction matters. Driver chips often build these in; the TB6612FNG datasheet (opens in a new tab) lists its own regenerative diodes.

On the MakerBuddy kit, the relay clicks but the fan stays off

Cause: The fan is wired to NC instead of NO, or it has no power. A relay is only a switch; it supplies no power itself.

Fix: With the USB cable unplugged, wire 5V to COM, NO to the fan, and the fan's other lead to GND, as in Lesson 15.

FAQ

What is a DC motor?

A DC motor is an electric motor that runs on direct current, such as from a battery or USB supply. Current through a coil on the shaft makes a magnetic field, magnets around it push and pull, and the shaft spins. In a brushed motor, a commutator and brushes keep moving the current to the next coil so the shaft keeps turning.

What are the two types of DC motors?

The two main types are brushed and brushless. A brushed motor switches its coils mechanically, so it runs as soon as you connect power. A brushless motor switches them with electronics, so it needs a controller. Brushed motors split further into permanent-magnet, shunt-wound, series-wound and compound-wound types.

What is the most common DC motor?

Among brushed motors, Microchip's application note AN905 (opens in a new tab) says permanent-magnet motors are the most common. They use permanent magnets for the fixed field, which is cheaper than coils at small sizes. Toy and kit motors are usually this type.

How do you control the speed of a DC motor?

Change the average voltage the motor gets. With a microcontroller, you use PWM: a transistor or driver switches full power on and off very fast, and the share of on-time sets the speed. A 50% duty cycle gives about half the voltage and, ideally, about half the speed.

How do you reverse a DC motor?

Reverse the current through it. By hand, swap its two wires. With a microcontroller, use an H-bridge, four switches that send current through the motor either way. Driver chips such as the TB6612FNG and DRV8833 each hold two.

Can I connect a DC motor directly to an Arduino or ESP32 pin?

No. A pin gives about 40 mA, while even a small hobby motor can pull hundreds of milliamps when it starts, and its back EMF spike can damage the pin. Use a transistor, a motor driver or a relay, with the motor on its own supply.

Are DC motors still used?

Yes. Microchip's brushed motor note (opens in a new tab) describes brushed DC motors in everything from toys to adjustable car seats, because they are cheap and easy to drive. Brushless motors avoid the brushed type's main weak point, since they have no brushes to wear out.

Can the MakerBuddy kit control a fan's speed?

No. The kit can switch a small 5 V fan through its relay, which is on or off, so the fan runs at full speed or stops. A rule can switch it automatically, for example on above 30 °C and off below 26 °C. For speed control, use a separate board with a motor driver. More guides like this one are on the MakerBuddy blog, including our guide to actuators, motors, relays, buzzers and displays.

Sources

Keep reading

Motors, Relays & Outputs

Active vs Passive Buzzer: How to Tell Them Apart

An active buzzer beeps on its own when you give it power. A passive buzzer needs a signal that wiggles, and plays whatever note you send. Here is how to tell them apart, wire them and use them.

20 min read

Motors, Relays & Outputs

What Is a Relay? How a Small Signal Switches a Big Load

A relay is a switch flipped by an electromagnet, so a weak signal can turn a separate, bigger circuit on and off. Learn how it works, the main types, where relays are used and how to try one safely.

19 min read

Learn with MakerBuddy

32 free lessons, one kit, no wiring to start.

Every part in these guides has its own lesson. Read them free, or get a kit for your class.