RC Robot Tutorial

This commit is contained in:
2025-07-19 01:48:54 -04:00
parent 66bf0879e8
commit 58ccd3465e
7 changed files with 112 additions and 12 deletions

View File

@@ -22,9 +22,25 @@ x- and y- axis potentionometers (**GPIO0** and **GPIO1**).
Controlling the Direction and Speed Controlling the Direction and Speed
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The pairs of DC motors on the left side are wired to the dedicated PWM channels. This means that *ESP32-C3 Breadboard DevBoard* can control rotation speed and direction of DC motors in pairs only (i.e. left and right side). To set any desired speed of BiteRider RC car, the *ESP32-C3 Breadboard Adapter DevBoard* uses PWM to control the rotation speed
Consequently, only four PWM channels are sufficient for controlling the direction of the RC car. of DR motors. Similarly, to set the direction of the RC car, the rotation speed of corresponding DC motors is changed as required.
Based on this constraint, the RC car can only move front, back, and turn/rotate left and right. Any other movements are not possible (i.e. diagonal or sideways).
Due to the design and limited number of available GPIOs, the *ESP32-C3 Breadboard DevBoard* can control rotation speed and direction
of DC motors in pairs only (i.e. left and right side). Consequently, this means that the four PWM channels used for controlling the
direction of the RC car.
Based on this constraint, the RC car can only move front, back, and turn/rotate left and right. Any other movements are not
possible (i.e. diagonal or sideways).
+--------------------------+-------------------------------+
| PWM of DC Motors | Direction |
+--------------------------+-------------------------------+
| PWM (left) = PWM (right) | Straight (Forward or Reverse) |
+--------------------------+-------------------------------+
| PWM (left) > PWM (right) | Turn Left |
+--------------------------+-------------------------------+
| PWM (left) < PWM (right) | Turn Right |
+--------------------------+-------------------------------+
.. admonition:: What is PWM? .. admonition:: What is PWM?

View File

@@ -48,9 +48,29 @@ x- and y- axis potentionometers (<strong>GPIO0</strong> and <strong>GPIO1</stron
</section> </section>
<section id="controlling-the-direction-and-speed"> <section id="controlling-the-direction-and-speed">
<h3><span class="section-number">2.1.2. </span>Controlling the Direction and Speed<a class="headerlink" href="#controlling-the-direction-and-speed" title="Link to this heading"></a></h3> <h3><span class="section-number">2.1.2. </span>Controlling the Direction and Speed<a class="headerlink" href="#controlling-the-direction-and-speed" title="Link to this heading"></a></h3>
<p>The pairs of DC motors on the left side are wired to the dedicated PWM channels. This means that <em>ESP32-C3 Breadboard DevBoard</em> can control rotation speed and direction of DC motors in pairs only (i.e. left and right side). <p>To set any desired speed of BiteRider RC car, the <em>ESP32-C3 Breadboard Adapter DevBoard</em> uses PWM to control the rotation speed
Consequently, only four PWM channels are sufficient for controlling the direction of the RC car. of DR motors. Similarly, to set the direction of the RC car, the rotation speed of corresponding DC motors is changed as required.</p>
Based on this constraint, the RC car can only move front, back, and turn/rotate left and right. Any other movements are not possible (i.e. diagonal or sideways).</p> <p>Due to the design and limited number of available GPIOs, the <em>ESP32-C3 Breadboard DevBoard</em> can control rotation speed and direction
of DC motors in pairs only (i.e. left and right side). Consequently, this means that the four PWM channels used for controlling the
direction of the RC car.</p>
<p>Based on this constraint, the RC car can only move front, back, and turn/rotate left and right. Any other movements are not
possible (i.e. diagonal or sideways).</p>
<table class="docutils align-default">
<tbody>
<tr class="row-odd"><td><p>PWM of DC Motors</p></td>
<td><p>Direction</p></td>
</tr>
<tr class="row-even"><td><p>PWM (left) = PWM (right)</p></td>
<td><p>Straight (Forward or Reverse)</p></td>
</tr>
<tr class="row-odd"><td><p>PWM (left) &gt; PWM (right)</p></td>
<td><p>Turn Left</p></td>
</tr>
<tr class="row-even"><td><p>PWM (left) &lt; PWM (right)</p></td>
<td><p>Turn Right</p></td>
</tr>
</tbody>
</table>
<div class="admonition-what-is-pwm admonition"> <div class="admonition-what-is-pwm admonition">
<p class="admonition-title">What is PWM?</p> <p class="admonition-title">What is PWM?</p>
<p><strong>PWM</strong> stands for Pulse Width Modulation. It is a technique used to simulate analog voltage levels using discrete digital signals. It works by <p><strong>PWM</strong> stands for Pulse Width Modulation. It is a technique used to simulate analog voltage levels using discrete digital signals. It works by

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
# Sphinx build info version 1 # Sphinx build info version 1
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done. # This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 1584acc0da0952bbe91b77f110c060a0 config: 8b29499e4c17b20d084216bf1331defb
tags: 62a1e7829a13fc7881b6498c52484ec0 tags: 62a1e7829a13fc7881b6498c52484ec0

View File

@@ -337,14 +337,78 @@ x- and y- axis potentionometers (
</a> </a>
</h4> </h4>
<p> <p>
The pairs of DC motors on the left side are wired to the dedicated PWM channels. This means that To set any desired speed of BiteRider RC car, the
<em>
ESP32-C3 Breadboard Adapter DevBoard
</em>
uses PWM to control the rotation speed
of DR motors. Similarly, to set the direction of the RC car, the rotation speed of corresponding DC motors is changed as required.
</p>
<p>
Due to the design and limited number of available GPIOs, the
<em> <em>
ESP32-C3 Breadboard DevBoard ESP32-C3 Breadboard DevBoard
</em> </em>
can control rotation speed and direction of DC motors in pairs only (i.e. left and right side). can control rotation speed and direction
Consequently, only four PWM channels are sufficient for controlling the direction of the RC car. of DC motors in pairs only (i.e. left and right side). Consequently, this means that the four PWM channels used for controlling the
Based on this constraint, the RC car can only move front, back, and turn/rotate left and right. Any other movements are not possible (i.e. diagonal or sideways). direction of the RC car.
</p> </p>
<p>
Based on this constraint, the RC car can only move front, back, and turn/rotate left and right. Any other movements are not
possible (i.e. diagonal or sideways).
</p>
<table class="docutils align-default">
<tbody>
<tr class="row-odd">
<td>
<p>
PWM of DC Motors
</p>
</td>
<td>
<p>
Direction
</p>
</td>
</tr>
<tr class="row-even">
<td>
<p>
PWM (left) = PWM (right)
</p>
</td>
<td>
<p>
Straight (Forward or Reverse)
</p>
</td>
</tr>
<tr class="row-odd">
<td>
<p>
PWM (left) &gt; PWM (right)
</p>
</td>
<td>
<p>
Turn Left
</p>
</td>
</tr>
<tr class="row-even">
<td>
<p>
PWM (left) &lt; PWM (right)
</p>
</td>
<td>
<p>
Turn Right
</p>
</td>
</tr>
</tbody>
</table>
<div class="admonition-what-is-pwm admonition"> <div class="admonition-what-is-pwm admonition">
<p class="admonition-title"> <p class="admonition-title">
What is PWM? What is PWM?