mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-09 19:15:29 +00:00
RC Robot Tutorial
This commit is contained in:
@@ -48,9 +48,29 @@ x- and y- axis potentionometers (<strong>GPIO0</strong> and <strong>GPIO1</stron
|
||||
</section>
|
||||
<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>
|
||||
<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).
|
||||
Consequently, only four PWM channels are sufficient 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).</p>
|
||||
<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
|
||||
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>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) > PWM (right)</p></td>
|
||||
<td><p>Turn Left</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p>PWM (left) < PWM (right)</p></td>
|
||||
<td><p>Turn Right</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="admonition-what-is-pwm admonition">
|
||||
<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
|
||||
|
Reference in New Issue
Block a user