This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:iot-open:practical:hardware:taltech:arduino:scenarios:dc [2025/07/18 11:03] – ingmar05 | en:iot-open:practical:hardware:taltech:arduino:scenarios:dc [2025/09/02 15:02] (current) – raivo.sell | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Controlling a DC Motor ====== | + | < |
| + | ====== Controlling a DC motor ====== | ||
| This scenario demonstrates how to control a DC motor' | This scenario demonstrates how to control a DC motor' | ||
| + | |||
| + | {{: | ||
| ===== Prerequisites ===== | ===== Prerequisites ===== | ||
| - | * Familiarize yourself with Arduino hardware reference. | + | * Familiarize yourself with the Arduino hardware reference. |
| * Understand basic PWM concepts. | * Understand basic PWM concepts. | ||
| * Familiarity with the Pololu TB6612FNG motor driver. | * Familiarity with the Pololu TB6612FNG motor driver. | ||
| ===== Hardware Connections ===== | ===== Hardware Connections ===== | ||
| - | | Motor Driver Pin | Arduino Pin | | + | ^ Motor Driver Pin |
| - | |------------------|-------------| | + | | AIN1 | 12 |
| - | | AIN1 | + | | AIN2 | 11 |
| - | | AIN2 | + | | PWMA | 3 (PWM) | |
| - | | PWMA | + | |
| **Motor specifications: | **Motor specifications: | ||
| Line 21: | Line 23: | ||
| * Shaft Diameter: 4 mm | * Shaft Diameter: 4 mm | ||
| - | ===== Suggested Knowledge Resources ===== | ||
| - | * Arduino programming fundamentals | ||
| - | * [[taltech: | ||
| ===== Task ===== | ===== Task ===== | ||
| - | Implement a program that rotates the DC motor forward at full speed for 5 seconds, pauses for 2 seconds, reverses at half speed for 5 seconds, then pauses again for 2 seconds, | + | Implement a program that rotates the DC motor forward at full speed for 5 seconds, pauses for 2 seconds, reverses at half speed for 5 seconds, |
| ===== Steps ===== | ===== Steps ===== | ||