Lesson plan

Servos, solenoids and actuators lesson plan

Everything that moves a thing to a place: servo pulses measured and calibrated, big servos and their supply, easing curves, solenoids with a flyback diode, linear actuators, vibration motors, and an animatronic face on a PCA9685.

4 chapters, 7 lessons, about 6 hours, on the Arduino Uno R3. Every lesson runs in the browser, with nothing to install.

The unit

Objectives and materials

By the end, students can

  • Pulse widths you can predict, a window you can calibrate, a big servo’s supply, and motion that eases.
  • A solenoid and the diode that saves its MOSFET, and a linear actuator placed by the clock.
  • A coin vibration motor: its start voltage, a kick-start, and patterns that carry meaning.
  • An animatronic face on a PCA9685 with moods, blinks, glances and a jaw that talks.

Materials for the whole unit

  • Arduino Uno R3
  • Battery: AA, coin cell, LiPo
  • Bench power supply
  • Diode
  • Full-size breadboard
  • Hobby servo x 4
  • Linear actuator, 12 V
  • MOSFET
  • Motor driver module, L298N
  • Potentiometer
  • Pushbutton
  • Resistor
  • Servo driver, PCA9685 16-channel
  • Servo, MG996R metal gear
  • Slide potentiometer
  • Solenoid
  • Transistor (NPN or PNP)
  • Vibration motor

Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.

Chapter 1. About 2 h 30 min

Servos for real

Pulse widths you can predict, a window you can calibrate, a big servo’s supply, and motion that eases.

LessonTimeWhat students do
Servo pulses: measure, predict, calibrateSend a servo any pulse width you like from the Serial Monitor, predict the angle before you press Enter, read the current it draws while it moves, and calibrate for a servo with a different window.50 min
  1. Run it
  2. Fifty pulses a second
  3. Predict the angle
  4. Past the end
  5. The current while it moves
  6. Calibrate a different servo
Big servos: the amps are the hard partAn MG996R metal-gear servo on its own 6 V pack. The same pulses as an SG90, but a supply that has to give amps, a speed that falls with the voltage, and a servo that gives up below 4 V.50 min
  1. Run it
  2. Same pulse, bigger horn
  3. Predict the speed
  4. Where the amps go
  5. Tired batteries
  6. Plan the supply
Easing: motion that looks aliveThe same servo move three ways: linear, smoothstep and ease-out-back. Predict where each curve puts the horn at a quarter of the time, then make the move slower.50 min
  1. Run it
  2. An easing curve is a function
  3. Predict smoothstep
  4. Overshoot on purpose
  5. Make it slower
  6. Why the servo still limits you

Materials

  • Arduino Uno R3
  • Battery: AA, coin cell, LiPo
  • Bench power supply
  • Full-size breadboard
  • Hobby servo
  • Potentiometer
  • Pushbutton
  • Resistor
  • Servo, MG996R metal gear
  • Slide potentiometer

Check for understanding

Each student finishes "Easing: motion that looks alive" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Why the servo still limits you".

Chapter 2. About 1 h 40 min

Push and pull

A solenoid and the diode that saves its MOSFET, and a linear actuator placed by the clock.

LessonTimeWhat students do
Solenoids and the flyback diodeA 12 V push-pull solenoid on a logic-level MOSFET. Predict the coil current from Ohm’s law, watch the diode carry the kick when the MOSFET lets go, and tap faster.50 min
  1. Run it
  2. The plunger seats
  3. Predict the coil current
  4. The diode catches the kick
  5. Tap faster
  6. Every coil gets a diode
Linear actuators and end stopsA 12 V linear actuator on an L298N. Drive it to its end switches, place it by the clock alone, and see dead reckoning come up short the moment the load changes.50 min
  1. Run it
  2. All the way out
  3. Go to 40 by the clock
  4. And back to 20
  5. Put a load on it
  6. Feedback, current and fuses

Materials

  • Arduino Uno R3
  • Bench power supply
  • Diode
  • Full-size breadboard
  • Linear actuator, 12 V
  • MOSFET
  • Motor driver module, L298N
  • Solenoid

Check for understanding

Each student finishes "Linear actuators and end stops" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Feedback, current and fuses".

Chapter 3. About 50 min

Feel it

A coin vibration motor: its start voltage, a kick-start, and patterns that carry meaning.

LessonTimeWhat students do
Vibration motors: hapticsA coin vibration motor on a 2N2222. Predict its current, find the duty where it will not start, kick-start it, and play and tune haptic patterns.50 min
  1. Run it
  2. Predict the current
  3. Too weak to start
  4. Kick-start it
  5. Patterns are information
  6. Tune the tap

Materials

  • Arduino Uno R3
  • Diode
  • Pushbutton
  • Resistor
  • Transistor (NPN or PNP)
  • Vibration motor

Check for understanding

Each student finishes "Vibration motors: haptics" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Tune the tap".

Chapter 4. About 1 h

Boss build

An animatronic face on a PCA9685 with moods, blinks, glances and a jaw that talks.

LessonTimeWhat students do
Boss: an animatronic faceEyes, eyelids, brows and a jaw on four servos through a PCA9685. Moods from a table, blinks and glances on millis(), a talk command, and a face you make your own.60 min
  1. Run it
  2. Four channels live
  3. It blinks on its own
  4. Surprise it
  5. Make it talk
  6. Blink faster
  7. Make it yours

Materials

  • Arduino Uno R3
  • Hobby servo x 4
  • Pushbutton
  • Servo driver, PCA9685 16-channel

Check for understanding

Each student finishes "Boss: an animatronic face" on their own, without opening the hints. The simulator checks 7 of its 7 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Make it yours".

Your class

Teach this unit as a class

Start a class from this course and its 7 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.

The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.