- The diagram below depicts how I plan to wire and solder the two motor drivers. (For clarity, only one motor driver is actually shown, but the other is connected identically with the exceptions that Ain1 and Bin1 are connected to Pin 2 and Ain2 and Bin2 are connected to Pin 3.)
- In the lab, I connected the power supply to the Vin and GND pins of the motor driver, Channel 1 of the oscilloscope to Ain1 and Bin1 (also connected to pin 0 of the Artemis), Channel 2 of the oscilliscope to Ain2 and Bin2 (also connected to pin 1 of the Artemis), and the final GND pin to the GND pin adjacent to thee QWIIC connector.
- Because the operating voltage of the motor drivers is 2.7 - 10.8 V (according to the datasheet) and the Artemis generally operates between 3.3 - 5 V (according to its data), a reasonable setting to start the power supply at would be 3.3 V, which is what I set it to in the lab. The 850 mAh battery notes that the battery supplies 3.7 V, which would be a reasonable maximum supply.
- The code to test the motor drivers was very simple, and was largely derived from Mikayla Lahr's example.
void setup() {
pinMode(0, OUTPUT); //A/Bin1
pinMode(1, OUTPUT); //A/Bin2
}
void loop() {
analogWrite(0, 255);
analogWrite(1, 0);
delay(1000);
analogWrite(0, 0);
analogWrite(1, 255);
delay(1000);
}
- Image of your oscilloscope
- Short video of wheels spinning as expected (including code snippet it’s running on)
- Short video of both wheels spinning (with battery driving the motor drivers)
- The picture below shows the motor drivers soldered into the vehicle.

