====AF Motor Shield V1====
{{interfaces:mabuchi.jpg?200}} \\ \\
{{interfaces:afmotorv1clone.jpg?100}} {{interfaces:sg90servo.png?100}}
No longer in production but available as various clones, this board can
drive two 5V servos and up to 4 motors attached to two L293D driver ICs.
A shift register is used to provide the direction inputs to the ICs and PWM outputs from the CPU connect to the driver enable inputs to control the motor power (speed).
===PWM====
^Motor^Motor #^Arduino^UNO^MEGA2560^
|Servo | 1 |10 | Timer1B PB2 | Timer2A PB4 |
|Servo | 2 | 9 | Timer1A PB1 | Timer2B PH6 |
|L293D IC1 1,2EN | 1 |11 | Timer2A PB3 | Timer1A PB5 |
|L293D IC1 3,4EN | 2 | 3 | Timer2B PD3 | Timer3C PE5 |
|L293D IC2 3,4EN | 3 | 6 | Timer0A PD6 | Timer4A PH3 |
|L293D IC2 1,2EN | 4 | 5 | Timer0B PD5 | Timer3A PE3 |
===L293D===
1,2EN 1-----16 VCC1
1A 2 15 4A
1Y 3 14 4Y
GND 4 13 GND
GND 5 12 GND
2Y 6 11 3Y
2A 7 10 3A
VCC2 8-----9 3,4EN
===Shift register===
Q1 1-------16 VCC
Q2 2 15 Q0
Q3 3 14 DS
Q4 4 13 !OE
Q5 5 12 STCP
Q6 6 11 SHCP
Q7 7 10 !MR
GND 8-------9 Q7S
^74HCT595^Function^Arduino^UNO^MEGA2560^
|STCP |STORAGE CLOCK |D12 |PB4| PB6|
|SHCP |SHIFT CLOCK |D4 |PD4| PG5|
|!OE |O/P ENABLE |D7 |PD7| PH4|
|DS |DATA |D8 |PB0| PH5|
^Q^Input^Motor #^
|0|L293D IC2 1A | 4 |
|1|L293D IC1 4A | 2 |
|2|L293D IC1 1A | 1 |
|3|L293D IC1 2A | 1 |
|4|L293D IC1 3A | 2 |
|5|L293D IC2 4A | 3 |
|6|L293D IC2 2A | 4 |
|7|L293D IC2 3A | 3 |
===Resources===
[[https://learn.adafruit.com/adafruit-motor-shield|Product page]]
[[https://cdn-learn.adafruit.com/downloads/pdf/adafruit-motor-shield.pdf|User manual]]
[[https://cdn-learn.adafruit.com/assets/assets/000/009/769/original/mshieldv1-schem.png|Schematic]]
[[https://assets.nexperia.com/documents/data-sheet/74HC_HCT595.pdf|74HCT595 Data-sheet]]
[[https://www.ti.com/product/L293D|L293D product page]]
[[https://en.wikipedia.org/wiki/Servo_control|Servo control]]