Home › Lessons › Embedded (Arduino) › Arduino Nano on a breadboard: a servo sweep

Arduino Nano on a breadboard: a servo sweep

Embedded (Arduino) · Intermediate · about 15 minutes · part of Zen’s Electronics Design Mastery

The Nano is an Uno shrunk to 45 × 18 mm, with the same ATmega328P. The Servo library makes 50 Hz pulses on any pin: 544 µs is 0°, 2400 µs is 180°. It borrows timer 1, so analogWrite stops working on pins 9 and 10. Servos can draw 200 mA or more while moving, so on a real build give them their own 5 V.

Arduino Nano on a breadboard: a servo sweep: the circuit on the simulator's bench

Open this lesson in the labFree, in your browser, no account needed.

Try it on the bench

  1. Watch the 5 V rail dip while the servo moves: on USB the Nano’s diode already drops it to about 4.7 V.
  2. Change the delay(15) to delay(2): the servo cannot keep up and lags behind the commanded angle.
  3. This Nano has the new bootloader. Select it and set “Bootloader on this board” to Old, then upload: it fails with “not in sync” until you pick ATmega328P (Old Bootloader) in the IDE.

Parts on the bench

In the course

Zen’s Electronics Design Mastery, module “Microcontrollers & Embedded”.

More on embedded (arduino)