Files
RP2040-Decoder/docs/sphinx/build/html/hardware/hw_description.html
T
2024-11-27 22:13:44 +00:00

362 lines
16 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="../">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Hardware Description &mdash; RP2040-Decoder 0.3, 1.0 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../_static/css/theme.css?v=e59714d7" />
<script src="../_static/jquery.js?v=5d32c60e"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../_static/documentation_options.js?v=6bd3bce2"></script>
<script src="../_static/doctools.js?v=9bcbadda"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Software" href="../software/sw.html" />
<link rel="prev" title="Hardware" href="hw.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home">
RP2040-Decoder
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../other/getting_started.html">Getting started</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="hw.html">Hardware</a><ul class="current">
<li class="toctree-l2 current"><a class="current reference internal" href="#">Hardware Description</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#overview">Overview</a></li>
<li class="toctree-l3"><a class="reference internal" href="#characteristics">Characteristics</a></li>
<li class="toctree-l3"><a class="reference internal" href="#input-stage">Input Stage</a></li>
<li class="toctree-l3"><a class="reference internal" href="#motor-driver">Motor Driver</a></li>
<li class="toctree-l3"><a class="reference internal" href="#auxiliary-output">Auxiliary Output</a></li>
<li class="toctree-l3"><a class="reference internal" href="#gpio">GPIO</a></li>
<li class="toctree-l3"><a class="reference internal" href="#microcontroller">Microcontroller</a></li>
<li class="toctree-l3"><a class="reference internal" href="#complete-schematic">Complete Schematic</a></li>
<li class="toctree-l3"><a class="reference internal" href="#bom-alternative-parts">BOM &amp; Alternative Parts</a></li>
<li class="toctree-l3"><a class="reference internal" href="#alternatives-for-bdr6133">Alternatives for BDR6133:</a></li>
<li class="toctree-l3"><a class="reference internal" href="#alternative-for-ht7533s">Alternative for HT7533S:</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../software/sw.html">Software</a></li>
<li class="toctree-l1"><a class="reference internal" href="../other/CV_list.html">Configuration Variables (CV)</a></li>
<li class="toctree-l1"><a class="reference internal" href="../other/troubleshooting.html">Troubleshooting</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">RP2040-Decoder</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="hw.html">Hardware</a></li>
<li class="breadcrumb-item active">Hardware Description</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/hardware/hw_description.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="hardware-description">
<h1>Hardware Description<a class="headerlink" href="#hardware-description" title="Link to this heading"></a></h1>
<section id="overview">
<h2>Overview<a class="headerlink" href="#overview" title="Link to this heading"></a></h2>
<img alt="Block Diagram" src="https://github.com/1nct/RP2040-Decoder/blob/main/docs/svg/Block_Diagram.svg" />
<p>The above block diagram gives a general overview regarding the operation of components. For better illustration it has been divided into four functional blocks. Furthermore, these functional blocks can be subdivided and will be explained below.</p>
<ul class="simple">
<li><p><strong>Input Stage</strong>
- DCC Signal Level Shift
- Bridge Rectifier &amp; Voltage Regulator</p></li>
<li><p><strong>Motor Driver</strong>
- Motor Driver
- Back EMF measurement (ADC)</p></li>
<li><p><strong>General Purpose</strong>
- GPIO
- Auxiliary output</p></li>
<li><p><strong>Microcontroller</strong>
- Flash memory
- Crystal oscillator</p></li>
</ul>
</section>
<section id="characteristics">
<h2>Characteristics<a class="headerlink" href="#characteristics" title="Link to this heading"></a></h2>
<table class="docutils align-default" id="id1">
<caption><span class="caption-text">Characteristics table</span><a class="headerlink" href="#id1" title="Link to this table"></a></caption>
<thead>
<tr class="row-odd"><th class="head"><p>Parameter</p></th>
<th class="head"><p>Symbol</p></th>
<th class="head"><p>Minimum</p></th>
<th class="head"><p>Maximum</p></th>
<th class="head"><p>Unit</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>Absolute max. DCC Input Voltage</p></td>
<td><p>V<sub>DCC</sub></p></td>
<td><p>-25</p></td>
<td><p>+25</p></td>
<td><p>V</p></td>
</tr>
<tr class="row-odd"><td><p>Absolute max. GPIO Voltage<sup>(0)</sup></p></td>
<td><p>V<sub>PIN</sub></p></td>
<td><p>-0.5</p></td>
<td><p>3.3+0.5</p></td>
<td><p>V</p></td>
</tr>
<tr class="row-even"><td><p>Input Voltage High<sup>(0)</sup></p></td>
<td><p>V<sub>IH</sub></p></td>
<td><p>2.145</p></td>
<td><p>3.6</p></td>
<td><p>V</p></td>
</tr>
<tr class="row-odd"><td><p>Input Voltage Low<sup>(0)</sup></p></td>
<td><p>V<sub>IL</sub></p></td>
<td><p>0</p></td>
<td><p>1.155</p></td>
<td><p>V</p></td>
</tr>
<tr class="row-even"><td><p>Total GPIO Current<sup>(0)</sup></p></td>
<td><p>I<sub>IOVDD</sub></p></td>
<td></td>
<td><p>50</p></td>
<td><p>mA</p></td>
</tr>
<tr class="row-odd"><td><p>Absolute max. motor output current<sup>(1)</sup></p></td>
<td><p>I<sub>MOTOR</sub></p></td>
<td></td>
<td><p>2.8</p></td>
<td><p>A</p></td>
</tr>
<tr class="row-even"><td><p>Absolute max. auxiliary output current <sup>(2)</sup></p></td>
<td><p>I<sub>AUX</sub></p></td>
<td></td>
<td><p>400</p></td>
<td><p>mA</p></td>
</tr>
</tbody>
</table>
<p>(0): According to: <a class="reference external" href="https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf">RP2040 Datasheet</a> (assuming V<sub>DD</sub>= 3.3V)</p>
<p>(1): According to: <a class="reference external" href="https://datasheet.lcsc.com/lcsc/2101211904_Bardeen-Micro--BDR6133_C2687793.pdf">BDR6133 Datasheet</a></p>
<p>(2): According to: <a class="reference external" href="https://datasheet.lcsc.com/lcsc/1810271831_TOSHIBA-T2N7002BK-LM_C146372.pdf">T2N7002BK Datasheet</a></p>
</section>
<section id="input-stage">
<h2>Input Stage<a class="headerlink" href="#input-stage" title="Link to this heading"></a></h2>
<img alt="Input Stage" src="https://github.com/1nct/RP2040-Decoder/blob/main/docs/svg/Input_Stage.svg" />
<p>D1 Rectifies the DCC square-wave into +V, the amplitude is not critical as long as it’s within the 25V limit. The rectified voltage +V is then provided to the 3.3V voltage regulator (U1) and to the motor driver (U2).</p>
<p>The MOSFET on the right effectively translates the rather high DCC voltage to a suitable level for the microcontroller to process. When Q1 is turned off GPIO21 is pulled high by the RP2040 internal pull-up resistor, as soon as Q1 gets turned on (V&lt;sub&gt;GS&lt;/sub&gt; &gt; V&lt;sub&gt;GS,th&lt;/sub&gt;), GPIO21 gets pulled to GND potential. R1 and R2 ensure that V&lt;sub&gt;GS&lt;/sub&gt; doesn’t exceed ±20V.</p>
</section>
<section id="motor-driver">
<h2>Motor Driver<a class="headerlink" href="#motor-driver" title="Link to this heading"></a></h2>
<img alt="Motor Driver" src="https://github.com/1nct/RP2040-Decoder/blob/main/docs/svg/Motor_Driver.svg" />
<p>The Motor Driver is a complete H-Bridge IC specifically made for DC-Motors.</p>
<p>In order to control the motor, it is necessary to measure the back-EMF. This is done by the ADC, which measures at Points ADC_EMF_A and ADC_EMF_B respectively. The two resistors are used as a voltage divider.</p>
</section>
<section id="auxiliary-output">
<h2>Auxiliary Output<a class="headerlink" href="#auxiliary-output" title="Link to this heading"></a></h2>
<img alt="Auxiliary Output" src="https://github.com/1nct/RP2040-Decoder/blob/main/docs/svg/Aux_Outputs.svg" />
<p>Switching of loads up to a maximum of about ~400mA can be done using four N-Channel MOSFETs. They are switching on the low-side, which means the load effectively gets connected to GND potential as the transistor starts to conduct. GPIO24 - GPIO27 are used.</p>
</section>
<section id="gpio">
<h2>GPIO<a class="headerlink" href="#gpio" title="Link to this heading"></a></h2>
<p>To switch lighter loads, six soldering pads on the back side of the PCB are connected to GPIO0 - GPIO5 pins. Although not implemented yet, they could theoretically be used as inputs as well (e.g., Reed switch).</p>
</section>
<section id="microcontroller">
<h2>Microcontroller<a class="headerlink" href="#microcontroller" title="Link to this heading"></a></h2>
<img alt="Microcontroller" src="https://github.com/1nct/RP2040-Decoder/blob/main/docs/svg/Microcontroller.svg" />
<p>The Microcontroller needs a crystal oscillator to function properly. External flash memory is also needed as it holds the configuration variables and the program itself. R3 &amp; C14 are used to filter ADC_AVDD (ADC Reference Voltage).</p>
</section>
<section id="complete-schematic">
<h2>Complete Schematic<a class="headerlink" href="#complete-schematic" title="Link to this heading"></a></h2>
<img alt="Complete Schematic" src="https://github.com/1nct/RP2040-Decoder/blob/main/docs/svg/RP2040-Decoder.svg" />
</section>
<section id="bom-alternative-parts">
<h2>BOM &amp; Alternative Parts<a class="headerlink" href="#bom-alternative-parts" title="Link to this heading"></a></h2>
<table class="docutils align-default" id="id2">
<caption><span class="caption-text">BOM</span><a class="headerlink" href="#id2" title="Link to this table"></a></caption>
<thead>
<tr class="row-odd"><th class="head"><p>Ref</p></th>
<th class="head"><p>Quantity</p></th>
<th class="head"><p>Value Component Type</p></th>
<th class="head"><p>Component Name</p></th>
<th class="head"><p>Footprint</p></th>
<th class="head"></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>C1, C2, C5, C6, C14</p></td>
<td><p>5</p></td>
<td><p>10u</p></td>
<td><p>Ceramic Capacitor</p></td>
<td><p>/</p></td>
<td><p>0603_1608Metric</p></td>
</tr>
<tr class="row-odd"><td><p>C3, C4, C7, C8, C9, C10, C11, C12, C13, C15</p></td>
<td><p>10</p></td>
<td><p>100n</p></td>
<td><p>Ceramic Capacitor</p></td>
<td><p>/</p></td>
<td><p>0603_1608Metric</p></td>
</tr>
<tr class="row-even"><td><p>C16, C17</p></td>
<td><p>2</p></td>
<td><p>33p</p></td>
<td><p>Ceramic Capacitor</p></td>
<td><p>/</p></td>
<td><p>0603_1608Metric</p></td>
</tr>
<tr class="row-odd"><td><p>D1</p></td>
<td><p>1</p></td>
<td><p>V<sub>RMS</sub>=40V, I<sub>F</sub>=2A</p></td>
<td><p>Bridge Rectifier</p></td>
<td><p>KMB24F</p></td>
<td><p>MBS (TO-269AA)</p></td>
</tr>
<tr class="row-even"><td><p>Q1, Q2, Q3, Q4, Q5</p></td>
<td><p>5</p></td>
<td><p>V<sub>DS</sub>=60V, I<sub>D</sub>=0.4A</p></td>
<td><p>N-Channel MOSFET</p></td>
<td><p>T2N7002BK</p></td>
<td><p>SOT-23</p></td>
</tr>
<tr class="row-odd"><td><p>R1, R2, R5, R6</p></td>
<td><p>4</p></td>
<td><p>6k8</p></td>
<td><p>Resistor</p></td>
<td><p>/</p></td>
<td><p>0603_1608Metric</p></td>
</tr>
<tr class="row-even"><td><p>R3</p></td>
<td><p>1</p></td>
<td><p>200</p></td>
<td><p>Resistor</p></td>
<td><p>/</p></td>
<td><p>0603_1608Metric</p></td>
</tr>
<tr class="row-odd"><td><p>R7, R8, R9</p></td>
<td><p>3</p></td>
<td><p>1k</p></td>
<td><p>Resistor</p></td>
<td><p>/</p></td>
<td><p>0603_1608Metric</p></td>
</tr>
<tr class="row-even"><td><p>U1</p></td>
<td><p>1</p></td>
<td><p>V<sub>OUT</sub>=3.3V</p></td>
<td><p>Low Dropout Voltage Regulator</p></td>
<td><p>HT7533S</p></td>
<td><p>SOT-23</p></td>
</tr>
<tr class="row-odd"><td><p>U2</p></td>
<td><p>1</p></td>
<td><p>I=2.8A</p></td>
<td><p>H-Bridge Driver</p></td>
<td><p>BDR6133</p></td>
<td><p>SOIC-8</p></td>
</tr>
<tr class="row-even"><td><p>U3</p></td>
<td><p>1</p></td>
<td><p>64Mb</p></td>
<td><p>Flash Memory</p></td>
<td><p>W25Q64JVSSIQ</p></td>
<td><p>SOIC-8</p></td>
</tr>
<tr class="row-odd"><td><p>U4</p></td>
<td><p>1</p></td>
<td><p>/</p></td>
<td><p>Microcontroller</p></td>
<td><p>RP2040</p></td>
<td><p>QFN-56-1EP_7x7mm_P0.4mm</p></td>
</tr>
<tr class="row-even"><td><p>Y1</p></td>
<td><p>1</p></td>
<td><p>f=12MHz</p></td>
<td><p>Crystal Oscillator</p></td>
<td><p>X322512MSB4SI</p></td>
<td><p>Crystal_SMD_3225-4Pin_3.2x2.5mm</p></td>
</tr>
</tbody>
</table>
<p>NOTE: Keep capacitor V<sub>max</sub> in mind!</p>
</section>
<section id="alternatives-for-bdr6133">
<h2>Alternatives for BDR6133:<a class="headerlink" href="#alternatives-for-bdr6133" title="Link to this heading"></a></h2>
<ul class="simple">
<li><p><a class="reference external" href="https://lcsc.com/product-detail/Motor-Driver-ICs_PTC-Princeton-Tech-PT5126A-S-TP_C162093.html">PT5126A-S-TP</a></p></li>
<li><p><a class="reference external" href="https://lcsc.com/product-detail/Motor-Driver-ICs_PTC-Princeton-Tech-PT2476_C481903.html">PT2476</a></p></li>
</ul>
</section>
<section id="alternative-for-ht7533s">
<h2>Alternative for HT7533S:<a class="headerlink" href="#alternative-for-ht7533s" title="Link to this heading"></a></h2>
<ul class="simple">
<li><p><a class="reference external" href="https://www.lcsc.com/product-detail/Linear-Voltage-Regulators-LDO_Gainsil-GS7533-33TR3_C7427372.html">GS7533-33TR3</a></p></li>
</ul>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="hw.html" class="btn btn-neutral float-left" title="Hardware" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="../software/sw.html" class="btn btn-neutral float-right" title="Software" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2024, Gabriel Koppenstein.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>