diff --git a/docs/_assets/images/motor_controller_with_usb.png b/docs/_assets/images/motor_controller_with_usb.png new file mode 100644 index 00000000..39804e17 Binary files /dev/null and b/docs/_assets/images/motor_controller_with_usb.png differ diff --git a/docs/_assets/images/motor_with_external_power.png b/docs/_assets/images/motor_with_external_power.png index 916b5c20..a0f9ebca 100644 Binary files a/docs/_assets/images/motor_with_external_power.png and b/docs/_assets/images/motor_with_external_power.png differ diff --git a/docs/_sections/_guide-primaries/sensors-and-actuators/actuators.md b/docs/_sections/_guide-primaries/sensors-and-actuators/actuators.md index 7f431ca2..ce759cb5 100644 --- a/docs/_sections/_guide-primaries/sensors-and-actuators/actuators.md +++ b/docs/_sections/_guide-primaries/sensors-and-actuators/actuators.md @@ -29,20 +29,27 @@ A motor controller, such as the L298N, acts as an intermediary between the micro The following information is an adapted version of [this guide.](https://lastminuteengineers.com/l298n-dc-stepper-driver-arduino-tutorial/) # How to Use Motor and Motor Controller? + +# Battery Pack Power First we will go over using an external power source for the ESP32. For this competition, you will be able to control your robot with a wireless game controller to navigate around the field (sensor challenges should be completed autonomously). It would be impractical to power your ESP32 through USB on the field, so you will use a battery pack. We need to reduce the voltage of the battery pack down to a level the ESP32 can safely use through the motor controller's 5V voltage regulator. -Here is a diagram of how your circuit should look when using the battery pack (voltage regulator jumper needs to be in place to enable the motor controller's 5V output to the ESP32): +Here is a diagram of how your circuit should look when using the battery pack: external_ESP32_power.png -motor_controller_jumper.png +* Notice how the blue lines are shared between all components so that they have a common ground + +However, if you want to be able to use your motors and plug your ESP32 into your laptop to use the serial monitor for debugging, then you'll have to change the wiring (or else you will fry your equipment!): + +motor_controller_with_usb.png +* Note how the line from the motor controller's 5V line is now gone! -If you want to power your ESP32 and motors while using a USB connection, simply remove one battery from the battery pack (creates open circuit) and take out the voltage regulator jumper on the motor controller (will make 5V terminal receive input). You should now be able use your USB connection safely! +You should now be able use your USB connection safely! {: .highlight} Do NOT power your ESP32 through its 5V pin with the battery pack while simultaneously connecting it to your computer through USB! This may irreversibly damage your devices (only do one at a time). {: .callout-toby} -To control a DC motor using the ESP32, a motor controller, and AA battery pack, you can connect them together as shown below: +To control a DC motor using the ESP32, a motor controller, and battery pack (**WITH USB CONNECTION**), you can connect them together as shown below: motor_with_external_power.png