<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Électronique &#8211; Electronique et Informatique</title>
	<atom:link href="https://amaury-laurent.fr/tag/electronique/feed/" rel="self" type="application/rss+xml" />
	<link>https://amaury-laurent.fr</link>
	<description>Site web d&#039;Amaury LAURENT</description>
	<lastBuildDate>Sat, 17 Oct 2026 20:22:30 +0000</lastBuildDate>
	<language>fr-FR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.3</generator>

<image>
	<url>https://ml9zfxsqktal.i.optimole.com/w:32/h:32/q:mauto/f:best/dpr:2/https://amaury-laurent.fr/wp-content/uploads/2026/10/site-icon-al-2026.png</url>
	<title>Électronique &#8211; Electronique et Informatique</title>
	<link>https://amaury-laurent.fr</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Le protocole DShot décortiqué : trames, CRC et DShot bidirectionnel</title>
		<link>https://amaury-laurent.fr/protocole-dshot/</link>
					<comments>https://amaury-laurent.fr/protocole-dshot/#respond</comments>
		
		<dc:creator><![CDATA[Amaury LAURENT]]></dc:creator>
		<pubDate>Tue, 20 Oct 2026 15:15:15 +0000</pubDate>
				<category><![CDATA[Tutoriaux]]></category>
		<category><![CDATA[Électronique]]></category>
		<category><![CDATA[Microcontrôleurs]]></category>
		<guid isPermaLink="false">https://amaury-laurent.fr/?p=1393</guid>

					<description><![CDATA[Le DShot au niveau du bit : codage, format de trame, CRC et commandes, puis le DShot bidirectionnel avec sa réponse eRPM codée en GCR, exemples calculés et code C.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Sur un multirotor, le contrôleur de vol recalcule la consigne de chaque moteur plusieurs milliers de fois par seconde. Le lien entre le contrôleur de vol et les contrôleurs de moteur (ESC) est donc devenu un point critique : il doit être rapide, insensible aux parasites et, idéalement, capable de remonter des informations. Le DShot répond à ces trois besoins. Cet article décortique le protocole au niveau du bit, puis sa variante bidirectionnelle qui renvoie la vitesse de rotation des moteurs sur le même fil.</p>



<p class="note wp-block-paragraph">Un <a href="#calculateur">calculateur</a> en fin d’article encode et décode les trames décrites ici, commande comme réponse bidirectionnelle. Le côté pratique (réglages Betaflight, câblage, choix de la variante) est traité sur <a href="https://fabrique-du-drone.com/?p=203">La fabrique du drone</a>.</p>



<h2 class="wp-block-heading">Du PWM au DShot</h2>



<p class="wp-block-paragraph">Historiquement, une consigne d’actionneur RC est une impulsion dont la largeur code la valeur : 1 ms pour 0 %, 2 ms pour 100 %, répétée environ toutes les 20 ms (50 Hz). Ce codage analogique convient parfaitement à un servo ou au variateur d’un avion, dont la bande passante utile se limite à celle des doigts du pilote. Il pose en revanche trois problèmes sur un drone :</p>



<ul class="wp-block-list">
<li><strong>Fréquence de rafraîchissement</strong> : même poussé à 400–490 Hz, le PWM reste très en dessous des boucles de régulation modernes (4 à 8 kHz) ;</li>



<li><strong>Précision</strong> : la valeur dépend de la mesure d’une durée par l’ESC, donc de la gigue des horloges et du bruit sur la ligne ; il faut en plus <em>calibrer</em> les bornes de gaz de chaque ESC ;</li>



<li><strong>Immunité au bruit</strong> : une impulsion déformée par un parasite donne une consigne fausse, sans aucun moyen de le détecter.</li>
</ul>



<p class="wp-block-paragraph">Les premières évolutions ont simplement raccourci les impulsions pour augmenter la cadence, sans changer de principe :</p>



<figure class="wp-block-table is-style-stripes"><table class="has-fixed-layout"><thead><tr><th>Protocole</th><th>Codage</th><th>Plage d’impulsion</th><th>Cadence maximale typique</th><th>Calibration</th></tr></thead><tbody><tr><td>PWM</td><td>analogique</td><td>1000–2000 µs</td><td>≈ 490 Hz</td><td>oui</td></tr><tr><td>OneShot125</td><td>analogique</td><td>125–250 µs</td><td>≈ 4 kHz</td><td>oui</td></tr><tr><td>OneShot42</td><td>analogique</td><td>42–84 µs</td><td>≈ 11 kHz</td><td>oui</td></tr><tr><td>Multishot</td><td>analogique</td><td>5–25 µs</td><td>≈ 32 kHz</td><td>oui</td></tr><tr><td>DShot300</td><td>numérique</td><td>trame de 53 µs</td><td>≈ 16 kHz (théorique)</td><td>non</td></tr><tr><td>DShot600</td><td>numérique</td><td>trame de 27 µs</td><td>≈ 32 kHz (théorique)</td><td>non</td></tr></tbody></table><figcaption class="wp-element-caption">Évolution des protocoles contrôleur de vol → ESC</figcaption></figure>



<p class="wp-block-paragraph">OneShot et Multishot repoussent la limite de cadence mais gardent les défauts d’un signal analogique : plus l’impulsion est courte, plus quelques dizaines de nanosecondes d’erreur pèsent lourd. Le DShot (<em>Digital Shot</em>) transmet au contraire une valeur numérique protégée par une somme de contrôle : l’ESC reçoit exactement la valeur émise, ou rejette la trame.</p>



<h2 class="wp-block-heading">Le DShot côté physique</h2>



<p class="wp-block-paragraph">Le DShot utilise le même fil que le PWM, avec les mêmes niveaux logiques (3,3 V ou 5 V selon le contrôleur). Le nombre qui suit le nom est le débit en kbit/s : le DShot600 transmet 600 kbit/s. Il n’y a pas d’horloge séparée : chaque bit commence par un front montant, et c’est la durée de l’état haut qui donne sa valeur.</p>



<figure class="wp-block-image size-full fig-svg"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 820 222" role="img" aria-label="Codage d’un bit DShot600 : un 0 reste à l’état haut 0,625 µs, un 1 reste haut 1,25 µs, sur une période de 1,67 µs" style="width:100%;height:auto;max-width:820px;display:block;margin:0 auto;background:#fff;border:1px solid #cfd8cc;border-radius:12px" font-family="Manrope, Arial, sans-serif" font-size="14" fill="#18211C"><rect x="80" y="40" width="330" height="100" fill="#f4f6f3" stroke="none"/><text x="245.0" y="30" text-anchor="middle" font-size="16" font-weight="800" fill="#18211C">bit 0</text><path d="M80 166H203.75M80 161V171M203.75 161V171" stroke="#18211C" stroke-width="1.2" fill="none"/><text x="141.875" y="159" text-anchor="middle" font-size="12" font-weight="400" fill="#18211C">T0H = 0,625 µs (37,5 %)</text><path d="M80 40V186" stroke="#cfd8cc" stroke-dasharray="4 4"/><rect x="410" y="40" width="330" height="100" fill="#eef7e8" stroke="none"/><text x="575.0" y="30" text-anchor="middle" font-size="16" font-weight="800" fill="#2E7D12">bit 1</text><path d="M410 166H657.5M410 161V171M657.5 161V171" stroke="#2E7D12" stroke-width="1.2" fill="none"/><text x="533.75" y="159" text-anchor="middle" font-size="12" font-weight="400" fill="#2E7D12">T1H = 1,25 µs (75 %)</text><path d="M410 40V186" stroke="#cfd8cc" stroke-dasharray="4 4"/><path d="M740 40V186" stroke="#cfd8cc" stroke-dasharray="4 4"/><path d="M80 204H410M80 199V209M410 199V209" stroke="#5d6862" stroke-width="1.2" fill="none"/><text x="245.0" y="197" text-anchor="middle" font-size="12" font-weight="400" fill="#5d6862">période d’un bit = 1,67 µs (DShot600)</text><text x="22" y="55" text-anchor="middle" font-size="12" font-weight="400" fill="#5d6862">H</text><text x="22" y="135" text-anchor="middle" font-size="12" font-weight="400" fill="#5d6862">L</text><path d="M30 130H80V50H203.75V130H410V50H657.5V130H740H780" stroke="#18211C" stroke-width="3" fill="none" stroke-linejoin="round"/></svg><figcaption class="wp-element-caption">Un bit DShot : la ligne monte en début de période ; un état haut court code un 0, un état haut long code un 1.</figcaption></figure>



<p class="wp-block-paragraph">Le rapport est de 1 à 2 entre les deux durées : environ 37,5 % de la période pour un 0, 75 % pour un 1. Les implémentations varient un peu autour de ces valeurs (Betaflight génère par exemple ses bits avec un timer et les ESC tolèrent un écart confortable), car le récepteur se contente de comparer la durée de l’état haut à un seuil. Ce principe est le même que celui des LED adressables WS2812, avec d’autres durées.</p>



<figure class="wp-block-table is-style-stripes"><table class="has-fixed-layout"><thead><tr><th>Variante</th><th>Débit</th><th>T1H (µs)</th><th>T0H (µs)</th><th>Bit (µs)</th><th>Trame de 16 bits (µs)</th></tr></thead><tbody><tr><td>DShot150</td><td>150 kbit/s</td><td>5,00</td><td>2,50</td><td>6,67</td><td>106,7</td></tr><tr><td>DShot300</td><td>300 kbit/s</td><td>2,50</td><td>1,25</td><td>3,33</td><td>53,3</td></tr><tr><td>DShot600</td><td>600 kbit/s</td><td>1,25</td><td>0,625</td><td>1,67</td><td>26,7</td></tr><tr><td>DShot1200</td><td>1200 kbit/s</td><td>0,625</td><td>0,313</td><td>0,83</td><td>13,3</td></tr></tbody></table><figcaption class="wp-element-caption">Durées des variantes DShot (source : brushlesswhoop.com)</figcaption></figure>



<p class="wp-block-paragraph">Entre deux trames, la ligne reste à l’état bas ; c’est ce silence qui permet à l’ESC de se resynchroniser sur le début de la trame suivante. La cadence d’envoi n’est pas imposée par le protocole : elle suit en général la boucle de régulation du contrôleur de vol.</p>



<h2 class="wp-block-heading">Format de la trame</h2>



<p class="wp-block-paragraph">Une trame DShot fait toujours 16 bits, transmis poids fort en premier :</p>



<ul class="wp-block-list">
<li><strong>11 bits de valeur</strong> (0 à 2047) ;</li>



<li><strong>1 bit de demande de télémétrie</strong>, qui demande à l’ESC de renvoyer ses mesures sur le fil de télémétrie série, s’il existe ;</li>



<li><strong>4 bits de CRC</strong>, calculés sur les 12 bits précédents.</li>
</ul>



<figure class="wp-block-image size-full fig-svg"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 860 260" role="img" aria-label="Trame DShot 0x82C6 : 11 bits de gaz valant 1046, bit de télémétrie à 0, CRC égal à 6, et sa forme d’onde" style="width:100%;height:auto;max-width:860px;display:block;margin:0 auto;background:#fff;border:1px solid #cfd8cc;border-radius:12px" font-family="Manrope, Arial, sans-serif" font-size="14" fill="#18211C"><rect x="30" y="60" width="50" height="44" fill="#eef7e8" stroke="#2E7D12" stroke-width="1.5"/><text x="55.0" y="89" text-anchor="middle" font-size="20" font-weight="800" fill="#2E7D12" font-family="Consolas, ui-monospace, monospace">1</text><text x="55.0" y="120" text-anchor="middle" font-size="11" font-weight="400" fill="#5d6862">15</text><rect x="80" y="60" width="50" height="44" fill="#eef7e8" stroke="#2E7D12" stroke-width="1.5"/><text x="105.0" y="89" text-anchor="middle" font-size="20" font-weight="800" fill="#2E7D12" font-family="Consolas, ui-monospace, monospace">0</text><text x="105.0" y="120" text-anchor="middle" font-size="11" font-weight="400" fill="#5d6862">14</text><rect x="130" y="60" width="50" height="44" fill="#eef7e8" stroke="#2E7D12" stroke-width="1.5"/><text x="155.0" y="89" text-anchor="middle" font-size="20" font-weight="800" fill="#2E7D12" font-family="Consolas, ui-monospace, monospace">0</text><text x="155.0" y="120" text-anchor="middle" font-size="11" font-weight="400" fill="#5d6862">13</text><rect x="180" y="60" width="50" height="44" fill="#eef7e8" stroke="#2E7D12" stroke-width="1.5"/><text x="205.0" y="89" text-anchor="middle" font-size="20" font-weight="800" fill="#2E7D12" font-family="Consolas, ui-monospace, monospace">0</text><text x="205.0" y="120" text-anchor="middle" font-size="11" font-weight="400" fill="#5d6862">12</text><rect x="230" y="60" width="50" height="44" fill="#eef7e8" stroke="#2E7D12" stroke-width="1.5"/><text x="255.0" y="89" text-anchor="middle" font-size="20" font-weight="800" fill="#2E7D12" font-family="Consolas, ui-monospace, monospace">0</text><text x="255.0" y="120" text-anchor="middle" font-size="11" font-weight="400" fill="#5d6862">11</text><rect x="280" y="60" width="50" height="44" fill="#eef7e8" stroke="#2E7D12" stroke-width="1.5"/><text x="305.0" y="89" text-anchor="middle" font-size="20" font-weight="800" fill="#2E7D12" font-family="Consolas, ui-monospace, monospace">0</text><text x="305.0" y="120" text-anchor="middle" font-size="11" font-weight="400" fill="#5d6862">10</text><rect x="330" y="60" width="50" height="44" fill="#eef7e8" stroke="#2E7D12" stroke-width="1.5"/><text x="355.0" y="89" text-anchor="middle" font-size="20" font-weight="800" fill="#2E7D12" font-family="Consolas, ui-monospace, monospace">1</text><text x="355.0" y="120" text-anchor="middle" font-size="11" font-weight="400" fill="#5d6862">9</text><rect x="380" y="60" width="50" height="44" fill="#eef7e8" stroke="#2E7D12" stroke-width="1.5"/><text x="405.0" y="89" text-anchor="middle" font-size="20" font-weight="800" fill="#2E7D12" font-family="Consolas, ui-monospace, monospace">0</text><text x="405.0" y="120" text-anchor="middle" font-size="11" font-weight="400" fill="#5d6862">8</text><rect x="430" y="60" width="50" height="44" fill="#eef7e8" stroke="#2E7D12" stroke-width="1.5"/><text x="455.0" y="89" text-anchor="middle" font-size="20" font-weight="800" fill="#2E7D12" font-family="Consolas, ui-monospace, monospace">1</text><text x="455.0" y="120" text-anchor="middle" font-size="11" font-weight="400" fill="#5d6862">7</text><rect x="480" y="60" width="50" height="44" fill="#eef7e8" stroke="#2E7D12" stroke-width="1.5"/><text x="505.0" y="89" text-anchor="middle" font-size="20" font-weight="800" fill="#2E7D12" font-family="Consolas, ui-monospace, monospace">1</text><text x="505.0" y="120" text-anchor="middle" font-size="11" font-weight="400" fill="#5d6862">6</text><rect x="530" y="60" width="50" height="44" fill="#eef7e8" stroke="#2E7D12" stroke-width="1.5"/><text x="555.0" y="89" text-anchor="middle" font-size="20" font-weight="800" fill="#2E7D12" font-family="Consolas, ui-monospace, monospace">0</text><text x="555.0" y="120" text-anchor="middle" font-size="11" font-weight="400" fill="#5d6862">5</text><rect x="580" y="60" width="50" height="44" fill="#fdf0dd" stroke="#C26A00" stroke-width="1.5"/><text x="605.0" y="89" text-anchor="middle" font-size="20" font-weight="800" fill="#C26A00" font-family="Consolas, ui-monospace, monospace">0</text><text x="605.0" y="120" text-anchor="middle" font-size="11" font-weight="400" fill="#5d6862">4</text><rect x="630" y="60" width="50" height="44" fill="#e3f0f9" stroke="#0E6BA8" stroke-width="1.5"/><text x="655.0" y="89" text-anchor="middle" font-size="20" font-weight="800" fill="#0E6BA8" font-family="Consolas, ui-monospace, monospace">0</text><text x="655.0" y="120" text-anchor="middle" font-size="11" font-weight="400" fill="#5d6862">3</text><rect x="680" y="60" width="50" height="44" fill="#e3f0f9" stroke="#0E6BA8" stroke-width="1.5"/><text x="705.0" y="89" text-anchor="middle" font-size="20" font-weight="800" fill="#0E6BA8" font-family="Consolas, ui-monospace, monospace">1</text><text x="705.0" y="120" text-anchor="middle" font-size="11" font-weight="400" fill="#5d6862">2</text><rect x="730" y="60" width="50" height="44" fill="#e3f0f9" stroke="#0E6BA8" stroke-width="1.5"/><text x="755.0" y="89" text-anchor="middle" font-size="20" font-weight="800" fill="#0E6BA8" font-family="Consolas, ui-monospace, monospace">1</text><text x="755.0" y="120" text-anchor="middle" font-size="11" font-weight="400" fill="#5d6862">1</text><rect x="780" y="60" width="50" height="44" fill="#e3f0f9" stroke="#0E6BA8" stroke-width="1.5"/><text x="805.0" y="89" text-anchor="middle" font-size="20" font-weight="800" fill="#0E6BA8" font-family="Consolas, ui-monospace, monospace">0</text><text x="805.0" y="120" text-anchor="middle" font-size="11" font-weight="400" fill="#5d6862">0</text><path d="M34 52V44H576V52" stroke="#2E7D12" stroke-width="2" fill="none"/><text x="305.0" y="36" text-anchor="middle" font-size="14" font-weight="700" fill="#2E7D12">valeur de gaz : 1046 (11 bits)</text><path d="M584 52V44H626V52" stroke="#C26A00" stroke-width="2" fill="none"/><text x="605.0" y="36" text-anchor="middle" font-size="14" font-weight="700" fill="#C26A00">T</text><path d="M634 52V44H826V52" stroke="#0E6BA8" stroke-width="2" fill="none"/><text x="730.0" y="36" text-anchor="middle" font-size="14" font-weight="700" fill="#0E6BA8">CRC : 6</text><path d="M10 210H30V170H67.5V210H80V170H98.75V210H130V170H148.75V210H180V170H198.75V210H230V170H248.75V210H280V170H298.75V210H330V170H367.5V210H380V170H398.75V210H430V170H467.5V210H480V170H517.5V210H530V170H548.75V210H580V170H598.75V210H630V170H648.75V210H680V170H717.5V210H730V170H767.5V210H780V170H798.75V210H830H850" stroke="#18211C" stroke-width="2.5" fill="none" stroke-linejoin="round"/><text x="430" y="245" text-anchor="middle" font-size="13" font-weight="400" fill="#5d6862">Trame 0x82C6 sur la ligne : impulsions longues = 1, courtes = 0, poids fort en premier — 26,7 µs en DShot600</text></svg><figcaption class="wp-element-caption">Exemple : valeur 1046 sans demande de télémétrie, soit la trame 0x82C6.</figcaption></figure>



<h3 class="wp-block-heading">Valeurs de gaz et commandes</h3>



<p class="wp-block-paragraph">Les 11 bits de valeur ne codent pas que les gaz :</p>



<ul class="wp-block-list">
<li><strong>0</strong> : moteur désarmé (arrêt) ;</li>



<li><strong>1 à 47</strong> : commandes spéciales, exécutées uniquement moteur arrêté ;</li>



<li><strong>48 à 2047</strong> : gaz, soit 2000 pas de 0 à 100 %. En mode 3D (moteur réversible), la plage est coupée en deux : 48–1047 dans un sens, 1048–2047 dans l’autre.</li>
</ul>



<figure class="wp-block-table is-style-stripes"><table class="has-fixed-layout"><thead><tr><th>Commande</th><th>Rôle</th><th>Remarque</th></tr></thead><tbody><tr><td>1 à 5</td><td>bips de l’ESC</td><td>attendre au moins 260 ms avant la commande suivante</td></tr><tr><td>6</td><td>demande d’informations ESC</td><td>réponse sur la télémétrie</td></tr><tr><td>7, 8</td><td>sens de rotation 1 / 2</td><td>à envoyer 6 fois</td></tr><tr><td>9, 10</td><td>mode 3D désactivé / activé</td><td>à envoyer 6 fois</td></tr><tr><td>12</td><td>sauvegarde des réglages</td><td>à envoyer 6 fois, puis attendre 35 ms</td></tr><tr><td>13, 14</td><td>télémétrie DShot étendue (EDT) activée / désactivée</td><td>à envoyer 6 fois</td></tr><tr><td>20, 21</td><td>sens de rotation normal / inversé</td><td>à envoyer 6 fois</td></tr><tr><td>22 à 29</td><td>LED 0 à 3 allumées puis éteintes</td><td>surtout BLHeli_32</td></tr></tbody></table><figcaption class="wp-element-caption">Principales commandes DShot</figcaption></figure>



<p class="wp-block-paragraph">Les commandes sensibles sont répétées pour qu’une trame isolée, même avec un CRC valide par hasard, ne puisse pas inverser un moteur. Betaflight les envoie avec le bit de télémétrie à 1.</p>



<h3 class="wp-block-heading">Le CRC</h3>



<p class="wp-block-paragraph">Le « CRC » du DShot est en réalité un simple XOR des trois quartets de la valeur de 12 bits (11 bits de gaz + bit de télémétrie) :</p>



<p class="wp-block-paragraph"><code>crc = (v ^ (v &gt;&gt; 4) ^ (v &gt;&gt; 8)) &amp; 0x0F</code></p>



<p class="wp-block-paragraph">Sur l’exemple : 1046 décalé d’un bit avec le bit de télémétrie à 0 donne v = 0x82C. Les trois quartets 8, 2 et C donnent 8 ⊕ 2 ⊕ C = 6, d’où la trame 0x82C6. Ce contrôle détecte toute erreur sur un bit isolé, mais pas deux erreurs à la même position dans deux quartets différents : c’est rudimentaire, et suffisant pour une liaison courte répétée des milliers de fois par seconde. Une trame rejetée est simplement remplacée par la suivante.</p>


<div class="snippetcpt-wrap" id="snippet-1643" data-id="1643" data-edit="" data-copy="/tag/electronique/feed/?snippet=813ace0e85&#038;id=1643" data-fullscreen="https://amaury-laurent.fr/code-snippets/dshot-encode-c/?full-screen=1">
				<pre class="prettyprint linenums lang-c_cpp" title="DShot : construction d’une trame (C)">/* Construit une trame DShot de 16 bits.
   valeur    : 0 = arr&ecirc;t, 1..47 = commande, 48..2047 = gaz
   telemetrie: bit de demande de t&eacute;l&eacute;m&eacute;trie
   bidir     : true en DShot bidirectionnel (CRC invers&eacute;) */
uint16_t dshot_trame(uint16_t valeur, bool telemetrie, bool bidir)
{
    uint16_t v = (uint16_t)((valeur &lt;&lt; 1) | (telemetrie ? 1u : 0u));
    uint16_t crc = (v ^ (v &gt;&gt; 4) ^ (v &gt;&gt; 8)) &amp; 0x0F;
    if (bidir)
        crc = (~crc) &amp; 0x0F;
    return (uint16_t)((v &lt;&lt; 4) | crc);
}
</pre>
			</div>



<h2 class="wp-block-heading" id="bidir">Le DShot bidirectionnel</h2>



<h3 class="wp-block-heading">À quoi sert la vitesse des moteurs ?</h3>



<p class="wp-block-paragraph">Le contrôleur de vol stabilise le drone à partir d’un gyroscope MEMS, très sensible aux vibrations. La principale source de vibrations est le balourd des hélices et des moteurs, dont la fréquence est exactement la vitesse de rotation de chaque moteur (et ses harmoniques, notamment celle du passage des pales). Si le contrôleur de vol connaît ces vitesses en temps réel, il peut placer des filtres réjecteurs (notch) qui suivent précisément chaque moteur : c’est le <strong>filtre RPM</strong> de Betaflight. Le filtrage est plus efficace et introduit moins de retard qu’un filtre passe-bas fixe ; un drone qui vibre reste pilotable.</p>



<p class="wp-block-paragraph">Les ESC savaient déjà renvoyer leur vitesse par un fil de télémétrie série séparé (protocole KISS, à environ 115 kbit/s), mais trop lentement et sur un fil supplémentaire. Le DShot bidirectionnel renvoie la vitesse sur le fil de commande, après chaque trame.</p>



<h3 class="wp-block-heading">Le principe de l’échange</h3>



<figure class="wp-block-image size-full fig-svg"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 909 215" role="img" aria-label="Échange DShot600 bidirectionnel : commande inversée de 26,7 µs, retournement de 30 µs, réponse de 21 bits en 28 µs" style="width:100%;height:auto;max-width:909px;display:block;margin:0 auto;background:#fff;border:1px solid #cfd8cc;border-radius:12px" font-family="Manrope, Arial, sans-serif" font-size="14" fill="#18211C"><rect x="70" y="40" width="245.64" height="100" fill="#eef7e8"/><rect x="591.64" y="40" width="257.6" height="100" fill="#e3f0f9"/><path d="M40 70H70V120H81.514375V70H85.35249999999999V120H91.10968749999999V70H100.70499999999998V120H106.4621875V70H116.0575V120H121.8146875V70H131.41V120H137.16718749999998V70H146.7625V120H152.51968749999997V70H162.11499999999998V120H173.629375V70H177.4675V120H183.2246875V70H192.82V120H204.334375V70H208.17249999999999V120H219.686875V70H223.52499999999998V120H229.28218749999996V70H238.87749999999997V120H244.63468749999998V70H254.23V120H265.744375V70H269.5825V120H275.33968749999997V70H284.935V120H290.6921875V70H300.2875V120H311.801875V70H315.64000000000004H591.64V120H603.9066666666666V70H616.1733333333333V120H628.4399999999999V120H640.7066666666667V70H652.9733333333334V120H665.24V120H677.5066666666667V70H689.7733333333333V120H702.04V120H714.3066666666666V70H726.5733333333333V120H738.84V70H751.1066666666667V120H763.3733333333333V70H775.64V70H787.9066666666666V70H800.1733333333334V120H812.44V70H824.7066666666667V120H836.9733333333334V70H849.24V70H889.24" stroke="#18211C" stroke-width="2.2" fill="none" stroke-linejoin="round"/><text x="192.82" y="30" text-anchor="middle" font-size="14" font-weight="700" fill="#2E7D12">Contrôleur de vol → ESC</text><text x="720.44" y="30" text-anchor="middle" font-size="14" font-weight="700" fill="#0E6BA8">ESC → contrôleur de vol</text><text x="453.64" y="30" text-anchor="middle" font-size="14" font-weight="700" fill="#5d6862">retournement</text><path d="M70 168H315.64M70 163V173M315.64 163V173" stroke="#2E7D12" stroke-width="1.2" fill="none"/><text x="192.82" y="161" text-anchor="middle" font-size="12" font-weight="400" fill="#2E7D12">commande 16 bits : 26,7 µs</text><path d="M315.64 168H591.64M315.64 163V173M591.64 163V173" stroke="#5d6862" stroke-width="1.2" fill="none"/><text x="453.64" y="161" text-anchor="middle" font-size="12" font-weight="400" fill="#5d6862">≈ 30 µs</text><path d="M591.64 168H849.24M591.64 163V173M849.24 163V173" stroke="#0E6BA8" stroke-width="1.2" fill="none"/><text x="720.44" y="161" text-anchor="middle" font-size="12" font-weight="400" fill="#0E6BA8">réponse 21 bits à 750 kbit/s : 28 µs</text><text x="192.82" y="200" text-anchor="middle" font-size="12" font-weight="400" fill="#5d6862">signal inversé, CRC inversé</text><text x="720.44" y="200" text-anchor="middle" font-size="12" font-weight="400" fill="#5d6862">codage GCR + transitions</text><text x="453.64" y="200" text-anchor="middle" font-size="12" font-weight="400" fill="#5d6862">la broche passe en entrée</text><text x="26" y="75" text-anchor="middle" font-size="12" font-weight="400" fill="#5d6862">H</text><text x="26" y="125" text-anchor="middle" font-size="12" font-weight="400" fill="#5d6862">L</text></svg><figcaption class="wp-element-caption">Un cycle DShot600 bidirectionnel complet dure environ 85 µs : commande, retournement de la ligne, réponse de l’ESC.</figcaption></figure>



<p class="wp-block-paragraph">Deux modifications de la trame de commande signalent à l’ESC qu’une réponse est attendue :</p>



<ul class="wp-block-list">
<li><strong>le signal est inversé</strong> : la ligne est haute au repos et chaque bit commence par un front descendant ; c’est la durée de l’état bas qui code la valeur ;</li>



<li><strong>le CRC est inversé</strong> : <code>crc = ~(v ^ (v &gt;&gt; 4) ^ (v &gt;&gt; 8)) &amp; 0x0F</code>. La trame 0x82C6 devient ainsi 0x82C9.</li>
</ul>



<p class="wp-block-paragraph">Après sa trame, le contrôleur de vol passe la broche en entrée (avec résistance de tirage vers le haut). L’ESC attend environ 30 µs, puis répond avec une trame de 21 bits émise à 5/4 du débit de la commande : 750 kbit/s en DShot600. Le bidirectionnel n’existe qu’à partir du DShot300.</p>



<h3 class="wp-block-heading">Contenu de la réponse</h3>



<p class="wp-block-paragraph">L’ESC ne transmet pas une vitesse mais la <strong>période électrique</strong> du moteur en microsecondes, sous une forme flottante très compacte :</p>



<ul class="wp-block-list">
<li><strong>3 bits d’exposant</strong> e et <strong>9 bits de mantisse</strong> m : période = m × 2<sup>e</sup> µs ;</li>



<li><strong>4 bits de CRC</strong>, inversé comme dans la commande : le XOR des quatre quartets de la trame vaut 0xF ;</li>



<li>la valeur maximale (période de 65 408 µs) signifie « moteur arrêté ».</li>
</ul>



<p class="wp-block-paragraph">Le contrôleur de vol en déduit la vitesse électrique : eRPM = 60 000 000 / période. La vitesse mécanique s’obtient en divisant par le nombre de paires de pôles du moteur (7 pour un moteur à 14 aimants, cas le plus courant sur un 5 pouces) : c’est pour cela que Betaflight demande le paramètre <code>motor_poles</code>.</p>



<h3 class="wp-block-heading">Le codage GCR</h3>



<p class="wp-block-paragraph">La réponse n’est pas transmise comme la commande. L’ESC émet alors que le contrôleur de vol n’a aucune horloge commune avec lui ; le décodage se fait par suréchantillonnage (Betaflight échantillonne la ligne à environ trois fois le débit). Pour que le récepteur puisse se recaler, il faut garantir des fronts fréquents. Deux étapes s’en chargent :</p>



<ul class="wp-block-list">
<li><strong>codage GCR 4b/5b</strong> : chaque quartet est remplacé par un code de 5 bits choisi pour ne jamais contenir plus de deux 0 consécutifs, même en enchaînant les codes ;</li>



<li><strong>codage en transitions</strong> (type NRZI) : un bit GCR à 1 provoque un changement de niveau de la ligne, un bit à 0 le laisse inchangé. Une trame commence par un bit de départ à 0, ce qui donne 1 + 4 × 5 = 21 bits.</li>
</ul>



<figure class="wp-block-table is-style-stripes"><table class="has-fixed-layout"><thead><tr><th>Quartet</th><th>0</th><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th><th>7</th></tr></thead><tbody><tr><td>GCR</td><td>11001</td><td>11011</td><td>10010</td><td>10011</td><td>11101</td><td>10101</td><td>10110</td><td>10111</td></tr></tbody></table></figure>



<figure class="wp-block-table is-style-stripes"><table class="has-fixed-layout"><thead><tr><th>Quartet</th><th>8</th><th>9</th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th><th>F</th></tr></thead><tbody><tr><td>GCR</td><td>11010</td><td>01001</td><td>01010</td><td>01011</td><td>11110</td><td>01101</td><td>01110</td><td>01111</td></tr></tbody></table><figcaption class="wp-element-caption">Table de codage GCR 4b/5b</figcaption></figure>



<h3 class="wp-block-heading">Exemple complet de réponse</h3>



<p class="wp-block-paragraph">Un moteur à 7 paires de pôles tourne à 18 000 tr/min, soit 126 000 eRPM et une période électrique d’environ 476 µs :</p>



<figure class="wp-block-table is-style-stripes"><table class="has-fixed-layout"><thead><tr><th>Étape</th><th>Résultat</th></tr></thead><tbody><tr><td>Période</td><td>476 µs : tient sur 9 bits, donc e = 0, m = 476</td></tr><tr><td>Valeur 12 bits</td><td>0x1DC</td></tr><tr><td>CRC</td><td>1 ⊕ D ⊕ C = 0, inversé : F → trame 0x1DCF</td></tr><tr><td>GCR des quartets 1, D, C, F</td><td>11011 01101 11110 01111</td></tr><tr><td>Transitions, bit de départ en tête</td><td>0 10010 01001 01011 10101</td></tr><tr><td>Décodage côté contrôleur de vol</td><td>60 000 000 / 476 = 126 050 eRPM, soit 18 007 tr/min</td></tr></tbody></table></figure>



<figure class="wp-block-image size-full fig-svg"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 878 245" role="img" aria-label="Réponse eRPM de 21 bits : bit de départ puis 20 bits GCR codés en transitions" style="width:100%;height:auto;max-width:878px;display:block;margin:0 auto;background:#fff;border:1px solid #cfd8cc;border-radius:12px" font-family="Manrope, Arial, sans-serif" font-size="14" fill="#18211C"><rect x="80" y="20" width="186" height="62" rx="6" fill="#eef7e8" stroke="#2E7D12"/><text x="173.0" y="42" text-anchor="middle" font-size="13" font-weight="700" fill="#2E7D12">quartet 1</text><text x="173.0" y="68" text-anchor="middle" font-size="15" font-weight="400" fill="#2E7D12" font-family="Consolas, ui-monospace, monospace">GCR 11011</text><rect x="270" y="20" width="186" height="62" rx="6" fill="#eef7e8" stroke="#2E7D12"/><text x="363.0" y="42" text-anchor="middle" font-size="13" font-weight="700" fill="#2E7D12">quartet D</text><text x="363.0" y="68" text-anchor="middle" font-size="15" font-weight="400" fill="#2E7D12" font-family="Consolas, ui-monospace, monospace">GCR 01101</text><rect x="460" y="20" width="186" height="62" rx="6" fill="#eef7e8" stroke="#2E7D12"/><text x="553.0" y="42" text-anchor="middle" font-size="13" font-weight="700" fill="#2E7D12">quartet C</text><text x="553.0" y="68" text-anchor="middle" font-size="15" font-weight="400" fill="#2E7D12" font-family="Consolas, ui-monospace, monospace">GCR 11110</text><rect x="650" y="20" width="186" height="62" rx="6" fill="#e3f0f9" stroke="#0E6BA8"/><text x="743.0" y="42" text-anchor="middle" font-size="13" font-weight="700" fill="#0E6BA8">quartet F (CRC)</text><text x="743.0" y="68" text-anchor="middle" font-size="15" font-weight="400" fill="#0E6BA8" font-family="Consolas, ui-monospace, monospace">GCR 01111</text><rect x="42" y="20" width="34" height="62" rx="6" fill="#f4f6f3" stroke="#5d6862"/><text x="59.0" y="56" text-anchor="middle" font-size="10" font-weight="400" fill="#5d6862">départ</text><text x="59.0" y="200" text-anchor="middle" font-size="15" font-weight="700" fill="#18211C" font-family="Consolas, ui-monospace, monospace">0</text><text x="97.0" y="200" text-anchor="middle" font-size="15" font-weight="700" fill="#18211C" font-family="Consolas, ui-monospace, monospace">1</text><circle cx="78" cy="145.0" r="4" fill="#C26A00"/><text x="135.0" y="200" text-anchor="middle" font-size="15" font-weight="700" fill="#18211C" font-family="Consolas, ui-monospace, monospace">0</text><circle cx="116" cy="145.0" r="4" fill="#C26A00"/><text x="173.0" y="200" text-anchor="middle" font-size="15" font-weight="700" fill="#18211C" font-family="Consolas, ui-monospace, monospace">0</text><text x="211.0" y="200" text-anchor="middle" font-size="15" font-weight="700" fill="#18211C" font-family="Consolas, ui-monospace, monospace">1</text><circle cx="192" cy="145.0" r="4" fill="#C26A00"/><text x="249.0" y="200" text-anchor="middle" font-size="15" font-weight="700" fill="#18211C" font-family="Consolas, ui-monospace, monospace">0</text><circle cx="230" cy="145.0" r="4" fill="#C26A00"/><text x="287.0" y="200" text-anchor="middle" font-size="15" font-weight="700" fill="#18211C" font-family="Consolas, ui-monospace, monospace">0</text><text x="325.0" y="200" text-anchor="middle" font-size="15" font-weight="700" fill="#18211C" font-family="Consolas, ui-monospace, monospace">1</text><circle cx="306" cy="145.0" r="4" fill="#C26A00"/><text x="363.0" y="200" text-anchor="middle" font-size="15" font-weight="700" fill="#18211C" font-family="Consolas, ui-monospace, monospace">0</text><circle cx="344" cy="145.0" r="4" fill="#C26A00"/><text x="401.0" y="200" text-anchor="middle" font-size="15" font-weight="700" fill="#18211C" font-family="Consolas, ui-monospace, monospace">0</text><text x="439.0" y="200" text-anchor="middle" font-size="15" font-weight="700" fill="#18211C" font-family="Consolas, ui-monospace, monospace">1</text><circle cx="420" cy="145.0" r="4" fill="#C26A00"/><text x="477.0" y="200" text-anchor="middle" font-size="15" font-weight="700" fill="#18211C" font-family="Consolas, ui-monospace, monospace">0</text><circle cx="458" cy="145.0" r="4" fill="#C26A00"/><text x="515.0" y="200" text-anchor="middle" font-size="15" font-weight="700" fill="#18211C" font-family="Consolas, ui-monospace, monospace">1</text><circle cx="496" cy="145.0" r="4" fill="#C26A00"/><text x="553.0" y="200" text-anchor="middle" font-size="15" font-weight="700" fill="#18211C" font-family="Consolas, ui-monospace, monospace">0</text><circle cx="534" cy="145.0" r="4" fill="#C26A00"/><text x="591.0" y="200" text-anchor="middle" font-size="15" font-weight="700" fill="#18211C" font-family="Consolas, ui-monospace, monospace">1</text><circle cx="572" cy="145.0" r="4" fill="#C26A00"/><text x="629.0" y="200" text-anchor="middle" font-size="15" font-weight="700" fill="#18211C" font-family="Consolas, ui-monospace, monospace">1</text><text x="667.0" y="200" text-anchor="middle" font-size="15" font-weight="700" fill="#18211C" font-family="Consolas, ui-monospace, monospace">1</text><text x="705.0" y="200" text-anchor="middle" font-size="15" font-weight="700" fill="#18211C" font-family="Consolas, ui-monospace, monospace">0</text><circle cx="686" cy="145.0" r="4" fill="#C26A00"/><text x="743.0" y="200" text-anchor="middle" font-size="15" font-weight="700" fill="#18211C" font-family="Consolas, ui-monospace, monospace">1</text><circle cx="724" cy="145.0" r="4" fill="#C26A00"/><text x="781.0" y="200" text-anchor="middle" font-size="15" font-weight="700" fill="#18211C" font-family="Consolas, ui-monospace, monospace">0</text><circle cx="762" cy="145.0" r="4" fill="#C26A00"/><text x="819.0" y="200" text-anchor="middle" font-size="15" font-weight="700" fill="#18211C" font-family="Consolas, ui-monospace, monospace">1</text><circle cx="800" cy="145.0" r="4" fill="#C26A00"/><path d="M15 120H40V170H78V120H116V170H154V170H192V120H230V170H268V170H306V120H344V170H382V170H420V120H458V170H496V120H534V170H572V120H610V120H648V120H686V170H724V120H762V170H800V120H838V120H863" stroke="#18211C" stroke-width="2.5" fill="none" stroke-linejoin="round"/><text x="439.0" y="232" text-anchor="middle" font-size="13" font-weight="400" fill="#5d6862">Chaque point orange est une transition = un bit GCR à 1 ; pas de transition = bit GCR à 0</text></svg><figcaption class="wp-element-caption">La réponse 0x1DCF sur la ligne : 21 bits, un niveau par bit, les bits GCR à 1 sont portés par les transitions.</figcaption></figure>



<p class="wp-block-paragraph">Le décodage suit le chemin inverse : XOR de la trame brute avec elle-même décalée d’un bit pour retrouver les bits GCR, table inverse pour les quartets, vérification du CRC, puis calcul de la période.</p>


<div class="snippetcpt-wrap" id="snippet-1644" data-id="1644" data-edit="" data-copy="/tag/electronique/feed/?snippet=813ace0e85&#038;id=1644" data-fullscreen="https://amaury-laurent.fr/code-snippets/dshot-decode-c/?full-screen=1">
				<pre class="prettyprint linenums lang-c_cpp" title="DShot bidirectionnel : décodage de la réponse eRPM (C)">/* Table GCR inverse : code 5 bits -&gt; quartet, -1 si code invalide */
static const int8_t gcr_inv[32] = {
    -1, -1, -1, -1, -1, -1, -1, -1, -1,  9, 10, 11, -1, 13, 14, 15,
    -1, -1,  2,  3, -1,  5,  6,  7, -1,  0,  8,  1, -1,  4, 12, -1
};

/* D&eacute;code une r&eacute;ponse eRPM de 21 bits (bit de d&eacute;part en t&ecirc;te, poids fort d'abord).
   Renvoie la vitesse en eRPM, 0 moteur arr&ecirc;t&eacute;, -1 si la trame est invalide. */
int32_t dshot_reponse_erpm(uint32_t brut21)
{
    uint32_t gcr = (brut21 ^ (brut21 &gt;&gt; 1)) &amp; 0xFFFFF;  /* transitions -&gt; 20 bits GCR */
    uint32_t trame = 0;
    for (int q = 3; q &gt;= 0; q--) {
        int8_t n = gcr_inv[(gcr &gt;&gt; (q * 5)) &amp; 0x1F];
        if (n &lt; 0)
            return -1;
        trame = (trame &lt;&lt; 4) | (uint32_t)n;
    }
    uint32_t x = trame ^ (trame &gt;&gt; 8);
    x ^= x &gt;&gt; 4;
    if ((x &amp; 0x0F) != 0x0F)          /* le XOR des 4 quartets doit valoir 0xF */
        return -1;
    uint32_t v = trame &gt;&gt; 4;         /* 12 bits : eee mmmmmmmmm */
    uint32_t periode_us = (v &amp; 0x1FF) &lt;&lt; (v &gt;&gt; 9);
    if (periode_us == 0 || periode_us &gt;= 65408u)
        return 0;                    /* p&eacute;riode maximale : moteur arr&ecirc;t&eacute; */
    return (int32_t)(60000000u / periode_us);
}
</pre>
			</div>



<h3 class="wp-block-heading">Budget de temps</h3>



<figure class="wp-block-table is-style-stripes"><table class="has-fixed-layout"><thead><tr><th>Variante</th><th>Commande</th><th>Retournement</th><th>Réponse</th><th>Cycle complet</th><th>Boucle compatible</th></tr></thead><tbody><tr><td>DShot300</td><td>53,3 µs</td><td>≈ 30 µs</td><td>56 µs</td><td>≈ 140 µs</td><td>4 kHz</td></tr><tr><td>DShot600</td><td>26,7 µs</td><td>≈ 30 µs</td><td>28 µs</td><td>≈ 85 µs</td><td>8 kHz</td></tr><tr><td>DShot1200</td><td>13,3 µs</td><td>≈ 30 µs</td><td>14 µs</td><td>≈ 57 µs</td><td>8 kHz et plus</td></tr></tbody></table><figcaption class="wp-element-caption">Durée d’un échange bidirectionnel</figcaption></figure>



<p class="wp-block-paragraph">C’est pour cela que Betaflight associe généralement le DShot300 bidirectionnel à une boucle de 4 kHz et le DShot600 à une boucle de 8 kHz : un cycle de 140 µs ne tient pas dans les 125 µs d’une boucle à 8 kHz.</p>



<h3 class="wp-block-heading">Télémétrie DShot étendue (EDT)</h3>



<p class="wp-block-paragraph">Une fois activée par la commande 13, la télémétrie étendue intercale d’autres mesures entre les trames de vitesse. Elle exploite un motif que les trames de période n’utilisent jamais : une période normalisée a toujours le bit de poids fort de la mantisse à 1 dès que l’exposant est non nul. Une trame dont les 4 premiers bits valent 0x2, 0x4, 0x6… porte donc une donnée de 8 bits d’un autre type :</p>



<figure class="wp-block-table is-style-stripes"><table class="has-fixed-layout"><thead><tr><th>Type</th><th>Donnée</th><th>Unité</th></tr></thead><tbody><tr><td>0x02</td><td>température</td><td>°C</td></tr><tr><td>0x04</td><td>tension</td><td>0,25 V par pas</td></tr><tr><td>0x06</td><td>courant</td><td>A</td></tr><tr><td>0x08, 0x0A, 0x0C</td><td>valeurs de débogage</td><td>selon le firmware</td></tr><tr><td>0x0E</td><td>état / événements</td><td>selon le firmware</td></tr></tbody></table><figcaption class="wp-element-caption">Types de trames EDT</figcaption></figure>



<p class="wp-block-paragraph">Le support dépend du firmware de l’ESC : la tension et le courant sont surtout disponibles sur BLHeli_32 et AM32 ; Bluejay (firmware ouvert pour les ESC BLHeli_S) transmet notamment la température.</p>



<h2 class="wp-block-heading" id="calculateur">Calculateur de trames DShot</h2>



<p class="wp-block-paragraph">Le premier onglet construit une trame de commande et sa forme d’onde. Le second suit le chemin de la réponse bidirectionnelle : d’une vitesse de rotation jusqu’aux 21 bits émis par l’ESC, ou l’inverse à partir d’une trame relevée à l’analyseur logique.</p>



<div class="tool"><style>
.tool{--t-b:#cfd8cc;--t-m:#5d6862;--t-ink:#18211C;--t-acc:#2E7D12;border:1px solid var(--t-b);border-radius:12px;background:#fff;padding:1.25rem 1.25rem 1rem;margin:1.5rem 0;font-variant-numeric:tabular-nums;color:var(--t-ink)}
.tool .t-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(10rem,1fr));gap:.75rem 1rem;align-items:end}
.tool label{display:block;font-size:.85rem;font-weight:600;color:var(--t-m)}
.tool label>input,.tool label>select,.tool label>textarea{display:block;margin-top:.3rem}
.tool label.t-check{display:flex;align-items:center;gap:.4rem;font-weight:500}
.tool label.t-check>input{margin:0}
.tool input[type=text],.tool input[type=number],.tool select,.tool textarea{font:inherit;font-size:1rem;padding:.45rem .6rem;border:1px solid var(--t-b);border-radius:8px;background:#fff;color:var(--t-ink);width:100%;box-sizing:border-box}
.tool textarea{font-family:ui-monospace,Consolas,monospace;min-height:4.5rem}
.tool input:focus,.tool select:focus,.tool textarea:focus{outline:2px solid var(--t-acc);outline-offset:1px}
.tool .t-help{font-size:.82rem;color:var(--t-m);margin:.5rem 0 0}
.tool .t-out{display:grid;grid-template-columns:repeat(auto-fit,minmax(10.5rem,1fr));gap:.7rem;margin-top:1rem}
.tool .t-card{border:1px solid var(--t-b);border-radius:10px;padding:.65rem .8rem}
.tool .t-k{font-size:.75rem;text-transform:uppercase;letter-spacing:.05em;color:var(--t-m);margin:0 0 .2rem}
.tool .t-v{font-size:1.2rem;font-weight:700;margin:0;word-break:break-word}
.tool .t-s{font-size:.82rem;color:var(--t-m);margin:.2rem 0 0}
.tool .t-mono{font-family:ui-monospace,Consolas,monospace}
.tool .t-wrap{overflow-x:auto;margin-top:1rem}
.tool table.t-table{border-collapse:collapse;width:100%;font-size:.9rem}
.tool .t-table th,.tool .t-table td{border-bottom:1px solid var(--t-b);padding:.4rem .5rem;text-align:right;white-space:nowrap}
.tool .t-table th{color:var(--t-m);font-weight:600;font-size:.78rem;letter-spacing:.02em}
.tool .t-table td:first-child,.tool .t-table th:first-child{text-align:left}
.tool .t-table tr.t-best td{background:#eef7e8;font-weight:600}
.tool .t-ok{color:#2E7D12}.tool .t-warn{color:#b26a00}.tool .t-bad{color:#b3261e}
.tool .t-err{color:#b3261e;font-weight:600;margin:.75rem 0 0}
.tool .t-svg{display:block;width:100%;height:auto;margin:1rem 0 .25rem}
.tool .t-tabs{display:flex;gap:.4rem;flex-wrap:wrap;margin-bottom:1rem}
.tool .t-tabs button{font:inherit;font-size:.9rem;padding:.35rem .8rem;border:1px solid var(--t-b);border-radius:999px;background:#fff;cursor:pointer;color:var(--t-ink)}
.tool .t-tabs button[aria-selected=true]{background:var(--t-ink);color:#fff;border-color:var(--t-ink)}
.tool [hidden]{display:none!important}
</style>
<style>.tool .h-sch{max-width:440px;margin:.25rem auto 1rem;color:var(--t-ink)}.tool .h-sch text{font-family:inherit}.tool .h-bits{max-width:none;margin:.5rem 0 1rem;color:var(--t-ink)}
.tool .fx-steps{margin:.3rem 0 1rem;padding-left:1.4rem;font-size:.9rem;line-height:1.6}
.tool .fx-steps code{font-family:ui-monospace,Consolas,monospace;background:#f2f5f0;padding:0 .25rem;border-radius:4px;word-break:break-all}
.tool [data-id=p2] [hidden]{display:none}</style>
<div class="t-tabs" role="tablist"><button type="button" data-id="tab1" aria-selected="true">Commande</button><button type="button" data-id="tab2" aria-selected="false">Réponse bidirectionnelle</button></div>
<div data-id="p1">
<div class="t-form">
<label>Valeur (0–2047)<input type="number" data-id="dv" value="1046" min="0" max="2047"></label>
<label>Débit<select data-id="drate"><option value="150">DShot150</option><option value="300">DShot300</option><option value="600" selected>DShot600</option><option value="1200">DShot1200</option></select></label>
<label class="t-check"><input type="checkbox" data-id="dt"> Demande de télémétrie</label>
<label class="t-check"><input type="checkbox" data-id="dbi"> Bidirectionnel (signal et CRC inversés)</label>
</div>
<svg class="t-svg h-sch h-bits" data-id="gDs" viewBox="0 0 600 170" role="img" aria-label="Trame DShot : 11 bits de valeur, bit de télémétrie, 4 bits de CRC, et forme d'onde"></svg>
<div class="t-out">
<div class="t-card"><p class="t-k">Trame (16 bits)</p><p class="t-v t-mono" data-id="dframe">–</p><p class="t-s t-mono" data-id="dbits"></p></div>
<div class="t-card"><p class="t-k">CRC</p><p class="t-v t-mono" data-id="dcrc">–</p><p class="t-s" data-id="dcrcs"></p></div>
<div class="t-card"><p class="t-k">Signification</p><p class="t-v" data-id="dsens" style="font-size:1rem">–</p></div>
<div class="t-card"><p class="t-k">Durée</p><p class="t-v" data-id="dtime">–</p><p class="t-s" data-id="dtimes"></p></div>
</div></div>
<div data-id="p2" hidden>
<div class="t-form">
<label>Opération<select data-id="rmode"><option value="enc">Encoder une vitesse</option><option value="dec">Décoder une trame reçue</option></select></label>
<label data-id="rrpml">Vitesse (tr/min)<input type="number" data-id="rrpm" value="18000" min="0"></label>
<label data-id="rrawl" hidden>Trame reçue (21 bits, binaire ou 0x…)<input type="text" data-id="rraw" value="0 10010 01001 01011 10101"></label>
<label>Aimants du moteur<input type="number" data-id="rpol" value="14" min="2" max="64" step="2"></label>
<label>Débit de la commande<select data-id="rrate"><option value="300">DShot300</option><option value="600" selected>DShot600</option><option value="1200">DShot1200</option></select></label>
</div>
<svg class="t-svg h-sch h-bits" data-id="gRp" viewBox="0 0 600 150" role="img" aria-label="Réponse DShot bidirectionnelle : bit de départ, quatre groupes GCR de 5 bits et forme d'onde"></svg>
<ol class="fx-steps" data-id="rst"></ol>
<div class="t-out">
<div class="t-card"><p class="t-k">Trame 16 bits</p><p class="t-v t-mono" data-id="rfr">–</p><p class="t-s t-mono" data-id="rfrs"></p></div>
<div class="t-card"><p class="t-k">Période électrique</p><p class="t-v" data-id="rper">–</p><p class="t-s" data-id="rpers"></p></div>
<div class="t-card"><p class="t-k">Vitesse</p><p class="t-v" data-id="rspd">–</p><p class="t-s" data-id="rspds"></p></div>
<div class="t-card"><p class="t-k">Sur la ligne</p><p class="t-v t-mono" data-id="rline" style="font-size:.85rem">–</p><p class="t-s" data-id="rlines"></p></div>
</div></div>

<p class="t-err" data-id="err" hidden></p>
<script src="data:text/javascript;charset=utf-8;base64,KGZ1bmN0aW9uKCl7CnZhciBUT09MPWRvY3VtZW50LmN1cnJlbnRTY3JpcHQ/ZG9jdW1lbnQuY3VycmVudFNjcmlwdC5wYXJlbnROb2RlOm51bGw7CmZ1bmN0aW9uIHEoaWQpe3JldHVybiBUT09MP1RPT0wucXVlcnlTZWxlY3RvcignW2RhdGEtaWQ9IicraWQrJyJdJyk6bnVsbDt9CnZhciBFQj17RTM6WzEwLDIyLDQ3XSxFNjpbMTAsMTUsMjIsMzMsNDcsNjhdLEUxMjpbMTAsMTIsMTUsMTgsMjIsMjcsMzMsMzksNDcsNTYsNjgsODJdLEUyNDpbMTAsMTEsMTIsMTMsMTUsMTYsMTgsMjAsMjIsMjQsMjcsMzAsMzMsMzYsMzksNDMsNDcsNTEsNTYsNjIsNjgsNzUsODIsOTFdfTsKWydFNDgnLCdFOTYnLCdFMTkyJ10uZm9yRWFjaChmdW5jdGlvbihzKXt2YXIgbj0rcy5zbGljZSgxKSxhPVtdO2Zvcih2YXIgaT0wO2k8bjtpKyspe3ZhciB2PU1hdGgucm91bmQoMTAwKk1hdGgucG93KDEwLGkvbikpO2lmKHM9PT0nRTE5MicmJnY9PT05MTkpdj05MjA7YS5wdXNoKHYpO31FQltzXT1hO30pOwp2YXIgRVRPTD17RTM6MjAsRTY6MjAsRTEyOjEwLEUyNDo1LEU0ODoyLEU5NjoxLEUxOTI6MC41fTsKZnVuY3Rpb24gZURpZ2l0cyhzKXtyZXR1cm4gRUJbc11bMF0+PTE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AgJytmcihyYXRlLDQpKycga2JpdC9zID0gJytmcigyMSpiaXQsMykrJyDCtXMnOwogcmVzcERyYXcoci5iaXRzLHIubmliKTt9KTsKCn0pKCk7"></script>
</div>



<h2 class="wp-block-heading">Mise en œuvre sur microcontrôleur</h2>



<p class="wp-block-paragraph">Générer des fronts à 1,67 µs près sur quatre moteurs ou plus ne se fait pas en logiciel pur. Côté émission, les contrôleurs de vol STM32 utilisent un timer en mode PWM dont le registre de comparaison est rechargé par DMA à chaque bit : le cœur prépare un tableau de 16 durées et le matériel fait le reste. Côté réception, deux approches coexistent :</p>



<ul class="wp-block-list">
<li><strong>capture d’entrée par timer</strong> : le timer horodate chaque front et le DMA stocke les dates ;</li>



<li><strong>mode « bitbang »</strong> de Betaflight : le DMA recopie l’état d’un port GPIO complet à intervalle fixe, ce qui permet de lire plusieurs moteurs sur le même port avec un seul flux DMA. Ce mode s’accommode de presque toutes les affectations de broches, ce qui explique qu’il soit souvent choisi automatiquement.</li>
</ul>



<p class="wp-block-paragraph">Côté ESC, le protocole bidirectionnel demande un firmware compatible : BLHeli_32, AM32, et pour les ESC BLHeli_S les firmwares Bluejay ou JESC (le BLHeli_S d’origine ne le gère pas). Dans Betaflight, il s’active avec <code>set dshot_bidir = ON</code> ; l’onglet Moteurs affiche alors la vitesse de chaque moteur et le taux d’erreurs de réception, à vérifier avant de voler.</p>



<h2 class="wp-block-heading">Mise en œuvre en LabVIEW FPGA</h2>



<p class="wp-block-paragraph">Sur une cible FPGA, le DShot se prête bien à une implémentation matérielle : chaque bit est une simple durée à l&rsquo;état haut, et la réponse bidirectionnelle se lit en échantillonnant la ligne. Les diagrammes ci-dessous viennent d&rsquo;une implémentation en LabVIEW FPGA ; ils suivent pas à pas les calculs décrits plus haut.</p>



<h3 class="wp-block-heading">Construire la trame</h3>



<figure class="wp-block-image size-full"><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-encode-dshot.webp"><img fetchpriority="high" decoding="async" width="930" height="265" src="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-encode-dshot.webp" alt="Construction de la trame : consigne, décalage d’un bit, bit de télémétrie, CRC, puis remise en ordre des bits." class="wp-image-1634" srcset="https://ml9zfxsqktal.i.optimole.com/w:930/h:265/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-encode-dshot.webp 930w, https://ml9zfxsqktal.i.optimole.com/w:300/h:85/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-encode-dshot.webp 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:219/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-encode-dshot.webp 768w" sizes="(max-width: 930px) 100vw, 930px" /></a><figcaption class="wp-element-caption">Construction de la trame : consigne, décalage d’un bit, bit de télémétrie, CRC, puis remise en ordre des bits.</figcaption></figure>



<p class="wp-block-paragraph">La consigne de gaz arrive sur 0–2000 ; le booléen <em>Setting</em> distingue une commande spéciale d&rsquo;une consigne de gaz, qui est alors décalée au-delà des 47 commandes. La valeur est ensuite décalée d&rsquo;un bit, le bit de télémétrie ajouté, puis le sous-VI de CRC complète les 16 bits. La trame est enfin convertie en tableau de booléens dans l&rsquo;ordre d&rsquo;émission, poids fort en premier.</p>



<figure class="wp-block-image size-full"><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-encode-dshot-crc.webp"><img decoding="async" width="844" height="217" src="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-encode-dshot-crc.webp" alt="Le CRC DShot en LabVIEW : XOR de la valeur avec elle-même décalée de 4 et 8 bits, masque 0xF, inversion en mode bidirectionnel." class="wp-image-1635" srcset="https://ml9zfxsqktal.i.optimole.com/w:844/h:217/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-encode-dshot-crc.webp 844w, https://ml9zfxsqktal.i.optimole.com/w:300/h:77/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-encode-dshot-crc.webp 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:197/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-encode-dshot-crc.webp 768w" sizes="(max-width: 844px) 100vw, 844px" /></a><figcaption class="wp-element-caption">Le CRC DShot en LabVIEW : XOR de la valeur avec elle-même décalée de 4 et 8 bits, masque 0xF, inversion en mode bidirectionnel.</figcaption></figure>



<p class="wp-block-paragraph">Le sous-VI de CRC est la traduction directe de <code>(v ^ (v &gt;&gt; 4) ^ (v &gt;&gt; 8)) &amp; 0xF</code> ; la structure Condition inverse le résultat en mode bidirectionnel. Il renvoie à la fois le CRC seul et la trame complète <code>(v &lt;&lt; 4) + crc</code>.</p>



<h3 class="wp-block-heading">Générer les bits</h3>



<figure class="wp-block-image size-full"><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-write-dshot.webp"><img decoding="async" width="858" height="485" src="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-write-dshot.webp" alt="Table des durées par variante et envoi des 16 bits dans une FIFO vers la boucle de génération." class="wp-image-1636" srcset="https://ml9zfxsqktal.i.optimole.com/w:858/h:485/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-write-dshot.webp 858w, https://ml9zfxsqktal.i.optimole.com/w:300/h:170/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-write-dshot.webp 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:434/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-write-dshot.webp 768w" sizes="(max-width: 858px) 100vw, 858px" /></a><figcaption class="wp-element-caption">Table des durées par variante et envoi des 16 bits dans une FIFO vers la boucle de génération.</figcaption></figure>



<p class="wp-block-paragraph">Plutôt que de calculer les durées à la volée, une constante indexée par la variante donne, pour un bit à 1 et pour un bit à 0, trois durées exprimées en périodes d&rsquo;une horloge à 200 MHz (5 ns) : le temps à l&rsquo;état haut, la période du bit, et la période d&rsquo;un bit de la réponse (5/4 du débit). On retrouve les valeurs du tableau de début d&rsquo;article : en DShot600, 250 périodes (1,25 µs) pour un 1, 125 (0,625 µs) pour un 0, 334 (1,67 µs) par bit et 267 (1,33 µs) par bit de réponse. Les 16 descripteurs de bits sont poussés dans une FIFO, lue par la boucle cadencée qui pilote la broche : la génération des fronts reste ainsi parfaitement régulière, quelle que soit la charge du reste du code.</p>



<h3 class="wp-block-heading">Décoder la réponse</h3>



<p class="wp-block-paragraph">La reconstitution des 21 bits à partir de la ligne échantillonnée (suréchantillonnage, puis décodage des transitions) se fait dans la boucle d&rsquo;acquisition. Les 20 bits GCR obtenus passent ensuite par le décodeur ci-dessous.</p>



<figure class="wp-block-image size-full"><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-decode-telemetry.webp"><img decoding="async" width="1015" height="665" src="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-decode-telemetry.webp" alt="Décodage GCR : table inverse de 32 entrées, quatre groupes de 5 bits, puis contrôle du CRC." class="wp-image-1637" srcset="https://ml9zfxsqktal.i.optimole.com/w:1015/h:665/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-decode-telemetry.webp 1015w, https://ml9zfxsqktal.i.optimole.com/w:300/h:197/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-decode-telemetry.webp 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:503/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-decode-telemetry.webp 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></a><figcaption class="wp-element-caption">Décodage GCR : table inverse de 32 entrées, quatre groupes de 5 bits, puis contrôle du CRC.</figcaption></figure>



<p class="wp-block-paragraph">La table inverse compte 32 entrées : chaque code GCR valide donne son quartet, les 16 autres valent 65535 et signalent une trame corrompue. La boucle traite quatre groupes de 5 bits, du poids fort au poids faible, et reconstruit la trame de 16 bits quartet par quartet. Le sous-VI <em>Check CRC</em> vérifie ensuite que le XOR des quatre quartets vaut 0xF, et la sortie <em>Frame OK</em> combine les deux contrôles.</p>



<figure class="wp-block-image size-full"><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-calculate-erpm.webp"><img decoding="async" width="382" height="102" src="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-calculate-erpm.webp" alt="Période en microsecondes : mantisse sur 9 bits décalée de l’exposant." class="wp-image-1638" srcset="https://ml9zfxsqktal.i.optimole.com/w:382/h:102/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-calculate-erpm.webp 382w, https://ml9zfxsqktal.i.optimole.com/w:300/h:80/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-calculate-erpm.webp 300w" sizes="(max-width: 382px) 100vw, 382px" /></a><figcaption class="wp-element-caption">Période en microsecondes : mantisse sur 9 bits décalée de l’exposant.</figcaption></figure>



<figure class="wp-block-image size-full"><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-calculate-erpm-value.webp"><img decoding="async" width="495" height="213" src="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-calculate-erpm-value.webp" alt="Conversion de la période en eRPM (par centaines) puis en tours par minute." class="wp-image-1639" srcset="https://ml9zfxsqktal.i.optimole.com/w:495/h:213/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-calculate-erpm-value.webp 495w, https://ml9zfxsqktal.i.optimole.com/w:300/h:129/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2026/10/lv-calculate-erpm-value.webp 300w" sizes="(max-width: 495px) 100vw, 495px" /></a><figcaption class="wp-element-caption">Conversion de la période en eRPM (par centaines) puis en tours par minute.</figcaption></figure>



<p class="wp-block-paragraph">Les 12 bits utiles donnent la période : la mantisse (masque 0x1FF) décalée vers la gauche de l&rsquo;exposant (les 3 bits de poids fort). La conversion suit la convention de Betaflight, qui compte les eRPM par centaines : <code>(600000 + période/2) / période</code>, l&rsquo;ajout de la demi-période assurant l&rsquo;arrondi. La vitesse mécanique s&rsquo;en déduit en multipliant par 200 et en divisant par le nombre d&rsquo;aimants, soit 100 × eRPM / nombre de paires de pôles.</p>



<p class="wp-block-paragraph">Les images sont des <em>VI snippets</em> : dans leur version d&rsquo;origine, un fichier PNG glissé dans un diagramme LabVIEW recrée le code. Les versions publiées ici sont optimisées pour le web et ne servent qu&rsquo;à la lecture.</p>



<h2 class="wp-block-heading">Références</h2>



<ul class="wp-block-list">
<li><a href="https://brushlesswhoop.com/dshot-and-bidirectional-dshot/">DShot and Bidirectional DShot</a> (brushlesswhoop.com) : durées, commandes, codage GCR et télémétrie étendue ;</li>



<li><a href="https://github.com/betaflight/betaflight/tree/master/src/main/drivers">Pilotes DShot de Betaflight</a> (dshot.c, dshot_bitbang_decode.c) : implémentation de référence du codage et du décodage ;</li>



<li><a href="https://github.com/bird-sanctuary/extended-dshot-telemetry">Extended DShot Telemetry</a> : spécification de l’EDT ;</li>



<li><a href="#calculateur">Calculateur de trames DShot</a> de cet article, et le <a href="https://amaury-laurent.fr/?p=1488">calculateur de CRC</a> pour les vrais CRC (CRSF, Modbus…).</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://amaury-laurent.fr/protocole-dshot/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Résistances en série et en parallèle : atteindre une valeur hors série</title>
		<link>https://amaury-laurent.fr/outil-resistances-serie-parallele/</link>
					<comments>https://amaury-laurent.fr/outil-resistances-serie-parallele/#respond</comments>
		
		<dc:creator><![CDATA[Amaury LAURENT]]></dc:creator>
		<pubDate>Sat, 17 Oct 2026 15:15:22 +0000</pubDate>
				<category><![CDATA[Outils]]></category>
		<category><![CDATA[Électronique]]></category>
		<guid isPermaLink="false">https://amaury-laurent.fr/?p=1479</guid>

					<description><![CDATA[Quelle combinaison de deux résistances normalisées donne la valeur visée : une seule, deux en série ou deux en parallèle, avec l'erreur de chacune.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Quand la valeur voulue n&rsquo;existe pas dans la série dont vous disposez, deux résistances bien choisies suffisent souvent. L&rsquo;outil compare la meilleure valeur unique avec les meilleures associations en série et en parallèle.</p>



<div class="tool"><style>
.tool{--t-b:#cfd8cc;--t-m:#5d6862;--t-ink:#18211C;--t-acc:#2E7D12;border:1px solid var(--t-b);border-radius:12px;background:#fff;padding:1.25rem 1.25rem 1rem;margin:1.5rem 0;font-variant-numeric:tabular-nums;color:var(--t-ink)}
.tool .t-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(10rem,1fr));gap:.75rem 1rem;align-items:end}
.tool label{display:block;font-size:.85rem;font-weight:600;color:var(--t-m)}
.tool label>input,.tool label>select,.tool label>textarea{display:block;margin-top:.3rem}
.tool label.t-check{display:flex;align-items:center;gap:.4rem;font-weight:500}
.tool label.t-check>input{margin:0}
.tool input[type=text],.tool input[type=number],.tool select,.tool textarea{font:inherit;font-size:1rem;padding:.45rem .6rem;border:1px solid var(--t-b);border-radius:8px;background:#fff;color:var(--t-ink);width:100%;box-sizing:border-box}
.tool textarea{font-family:ui-monospace,Consolas,monospace;min-height:4.5rem}
.tool input:focus,.tool select:focus,.tool textarea:focus{outline:2px solid var(--t-acc);outline-offset:1px}
.tool .t-help{font-size:.82rem;color:var(--t-m);margin:.5rem 0 0}
.tool .t-out{display:grid;grid-template-columns:repeat(auto-fit,minmax(10.5rem,1fr));gap:.7rem;margin-top:1rem}
.tool .t-card{border:1px solid var(--t-b);border-radius:10px;padding:.65rem .8rem}
.tool .t-k{font-size:.75rem;text-transform:uppercase;letter-spacing:.05em;color:var(--t-m);margin:0 0 .2rem}
.tool .t-v{font-size:1.2rem;font-weight:700;margin:0;word-break:break-word}
.tool .t-s{font-size:.82rem;color:var(--t-m);margin:.2rem 0 0}
.tool .t-mono{font-family:ui-monospace,Consolas,monospace}
.tool .t-wrap{overflow-x:auto;margin-top:1rem}
.tool table.t-table{border-collapse:collapse;width:100%;font-size:.9rem}
.tool .t-table th,.tool .t-table td{border-bottom:1px solid var(--t-b);padding:.4rem .5rem;text-align:right;white-space:nowrap}
.tool .t-table th{color:var(--t-m);font-weight:600;font-size:.78rem;letter-spacing:.02em}
.tool .t-table td:first-child,.tool .t-table th:first-child{text-align:left}
.tool .t-table tr.t-best td{background:#eef7e8;font-weight:600}
.tool .t-ok{color:#2E7D12}.tool .t-warn{color:#b26a00}.tool .t-bad{color:#b3261e}
.tool .t-err{color:#b3261e;font-weight:600;margin:.75rem 0 0}
.tool .t-svg{display:block;width:100%;height:auto;margin:1rem 0 .25rem}
.tool .t-tabs{display:flex;gap:.4rem;flex-wrap:wrap;margin-bottom:1rem}
.tool .t-tabs button{font:inherit;font-size:.9rem;padding:.35rem .8rem;border:1px solid var(--t-b);border-radius:999px;background:#fff;cursor:pointer;color:var(--t-ink)}
.tool .t-tabs button[aria-selected=true]{background:var(--t-ink);color:#fff;border-color:var(--t-ink)}
.tool [hidden]{display:none!important}
</style>
<style>.tool .h-sch{max-width:440px;margin:.25rem auto 1rem;color:var(--t-ink)}.tool .h-sch text{font-family:inherit}.tool .h-bits{max-width:none;margin:.5rem 0 1rem;color:var(--t-ink)}</style>
<svg class="t-svg h-sch" viewBox="0 0 460 150" role="img" aria-label="Schémas : deux résistances en série et deux en parallèle"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="14" cy="72" r="4"/><path d="M18 72H34"/><rect x="34" y="63" width="50" height="18"/><path d="M84 72H100"/><rect x="100" y="63" width="50" height="18"/><path d="M150 72H166"/><circle cx="170" cy="72" r="4"/><circle cx="240" cy="72" r="4"/><path d="M244 72H270V46H300M356 46H390V72M270 72V98H300M356 98H390V72M390 72H416"/><circle cx="270" cy="72" r="3" fill="currentColor"/><circle cx="390" cy="72" r="3" fill="currentColor"/><rect x="300" y="37" width="56" height="18"/><rect x="300" y="89" width="56" height="18"/><circle cx="420" cy="72" r="4"/></g><g fill="currentColor" font-size="13"><text x="92" y="14" text-anchor="middle" font-size="12">Série</text><text x="59" y="100" text-anchor="middle" font-size="12" data-id="gSa">Ra</text><text x="125" y="100" text-anchor="middle" font-size="12" data-id="gSb">Rb</text><text x="92" y="128" text-anchor="middle" font-size="12" data-id="gS"></text><text x="330" y="14" text-anchor="middle" font-size="12">Parallèle</text><text x="328" y="32" text-anchor="middle" font-size="12" data-id="gPa">Ra</text><text x="328" y="124" text-anchor="middle" font-size="12" data-id="gPb">Rb</text><text x="330" y="144" text-anchor="middle" font-size="12" data-id="gP"></text></g></svg>
<div class="t-form">
<label>Valeur visée<input type="text" data-id="target" value="3k"></label>
<label>Série disponible<select data-id="ser"><option value="E6">E6 (± 20 %)</option><option value="E12" selected>E12 (± 10 %)</option><option value="E24">E24 (± 5 %)</option><option value="E48">E48 (± 2 %)</option><option value="E96">E96 (± 1 %)</option><option value="E192">E192 (± 0,5 %)</option></select></label>
</div>
<div class="t-out">
<div class="t-card"><p class="t-k">Une seule résistance</p><p class="t-v" data-id="one">–</p><p class="t-s" data-id="onee"></p></div>
<div class="t-card"><p class="t-k">Deux en série</p><p class="t-v" data-id="ser2">–</p><p class="t-s" data-id="ser2e"></p></div>
<div class="t-card"><p class="t-k">Deux en parallèle</p><p class="t-v" data-id="par2">–</p><p class="t-s" data-id="par2e"></p></div>
</div>
<div class="t-wrap"><table class="t-table"><thead><tr><th>Montage</th><th>Ra</th><th>Rb</th><th>Résultat</th><th>Erreur</th></tr></thead><tbody data-id="res"></tbody></table></div>
<p class="t-err" data-id="err" hidden></p>
<script src="data:text/javascript;charset=utf-8;base64,KGZ1bmN0aW9uKCl7CnZhciBUT09MPWRvY3VtZW50LmN1cnJlbnRTY3JpcHQ/ZG9jdW1lbnQuY3VycmVudFNjcmlwdC5wYXJlbnROb2RlOm51bGw7CmZ1bmN0aW9uIHEoaWQpe3JldHVybiBUT09MP1RPT0wucXVlcnlTZWxlY3RvcignW2RhdGEtaWQ9IicraWQrJyJdJyk6bnVsbDt9CnZhciBFQj17RTM6WzEwLDIyLDQ3XSxFNjpbMTAsMTUsMjIsMzMsNDcsNjhdLEUxMjpbMTAsMTIsMTUsMTgsMjIsMjcsMzMsMzksNDcsNTYsNjgsODJdLEUyNDpbMTAsMTEsMTIsMTMsMTUsMTYsMTgsMjAsMjIsMjQsMjcsMzAsMzMsMzYsMzksNDMsNDcsNTEsNTYsNjIsNjgsNzUsODIsOTFdfTsKWydFNDgnLCdFOTYnLCdFMTkyJ10uZm9yRWFjaChmdW5jdGlvbihzKXt2YXIgbj0rcy5zbGljZSgxKSxhPVtdO2Zvcih2YXIgaT0wO2k8bjtpKyspe3ZhciB2PU1hdGgucm91bmQoMTAwKk1hdGgucG93KDEwLGkvbikpO2lmKHM9PT0nRTE5MicmJnY9PT05MTkpdj05MjA7YS5wdXNoKHYpO31FQltzXT1hO30pOwp2YXIgRVRPTD17RTM6MjAsRTY6MjAsRTEyOjEwLEUyNDo1LEU0ODoyLEU5NjoxLEUxOTI6MC41fTsKZnVuY3Rpb24gZURpZ2l0cyhzKXtyZXR1cm4gRUJbc11bMF0+PTEwMD8zOjI7fQpmdW5jdG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YSwnzqknKTonUmEnO3EoJ2dQYicpLnRleHRDb250ZW50PXA/c2kocC5iLCfOqScpOidSYic7cSgnZ1AnKS50ZXh0Q29udGVudD1wPyc9ICcrc2kocC5yLCfOqScsNSkrJyAoJytwY3QocC5lKSsnKSc6Jyc7fSk7Cn0pKCk7"></script>
</div>



<h2 class="wp-block-heading">Les formules</h2>



<pre class="wp-block-code"><code>Série     : R = Ra + Rb
Parallèle : R = Ra × Rb / (Ra + Rb)</code></pre>



<p class="wp-block-paragraph">En série, la plus grande des deux résistances donne l&rsquo;essentiel de la valeur et la seconde ajuste ; en parallèle, c&rsquo;est l&rsquo;inverse, la plus petite fixe la valeur. L&rsquo;outil explore les associations où la résistance principale va du centième de la valeur visée à la valeur elle-même (série), ou de la valeur visée à cent fois cette valeur (parallèle).</p>



<h2 class="wp-block-heading">Tolérance</h2>



<p class="wp-block-paragraph">La tolérance relative d&rsquo;une association de résistances de même tolérance ne dépasse pas celle des composants : deux résistances à 5 % donnent un résultat à 5 % au pire. L&rsquo;erreur affichée est l&rsquo;erreur nominale, à laquelle s&rsquo;ajoute cette tolérance.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://amaury-laurent.fr/outil-resistances-serie-parallele/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Circuit imprimé : largeur de piste selon le courant et PCB aluminium pour LED</title>
		<link>https://amaury-laurent.fr/outil-largeur-piste-pcb/</link>
					<comments>https://amaury-laurent.fr/outil-largeur-piste-pcb/#respond</comments>
		
		<dc:creator><![CDATA[Amaury LAURENT]]></dc:creator>
		<pubDate>Sat, 17 Oct 2026 14:53:46 +0000</pubDate>
				<category><![CDATA[Outils]]></category>
		<category><![CDATA[Électronique]]></category>
		<guid isPermaLink="false">https://amaury-laurent.fr/?p=1484</guid>

					<description><![CDATA[Largeur minimale d'une piste selon le courant, l'échauffement admis et l'épaisseur de cuivre (IPC-2221), avec sa résistance et sa chute de tension.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Quelle largeur donner à une piste pour qu&rsquo;elle transporte un courant donné sans trop chauffer ? Le premier onglet applique la relation empirique de la norme IPC-2221 et calcule en plus la résistance de la piste et la chute de tension qu&rsquo;elle provoque. Le second traite l&rsquo;autre problème thermique du circuit imprimé : évacuer la chaleur d&rsquo;une LED de puissance à travers un PCB sur aluminium, couche par couche, jusqu&rsquo;au radiateur.</p>



<div class="tool"><style>
.tool{--t-b:#cfd8cc;--t-m:#5d6862;--t-ink:#18211C;--t-acc:#2E7D12;border:1px solid var(--t-b);border-radius:12px;background:#fff;padding:1.25rem 1.25rem 1rem;margin:1.5rem 0;font-variant-numeric:tabular-nums;color:var(--t-ink)}
.tool .t-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(10rem,1fr));gap:.75rem 1rem;align-items:end}
.tool label{display:block;font-size:.85rem;font-weight:600;color:var(--t-m)}
.tool label>input,.tool label>select,.tool label>textarea{display:block;margin-top:.3rem}
.tool label.t-check{display:flex;align-items:center;gap:.4rem;font-weight:500}
.tool label.t-check>input{margin:0}
.tool input[type=text],.tool input[type=number],.tool select,.tool textarea{font:inherit;font-size:1rem;padding:.45rem .6rem;border:1px solid var(--t-b);border-radius:8px;background:#fff;color:var(--t-ink);width:100%;box-sizing:border-box}
.tool textarea{font-family:ui-monospace,Consolas,monospace;min-height:4.5rem}
.tool input:focus,.tool select:focus,.tool textarea:focus{outline:2px solid var(--t-acc);outline-offset:1px}
.tool .t-help{font-size:.82rem;color:var(--t-m);margin:.5rem 0 0}
.tool .t-out{display:grid;grid-template-columns:repeat(auto-fit,minmax(10.5rem,1fr));gap:.7rem;margin-top:1rem}
.tool .t-card{border:1px solid var(--t-b);border-radius:10px;padding:.65rem .8rem}
.tool .t-k{font-size:.75rem;text-transform:uppercase;letter-spacing:.05em;color:var(--t-m);margin:0 0 .2rem}
.tool .t-v{font-size:1.2rem;font-weight:700;margin:0;word-break:break-word}
.tool .t-s{font-size:.82rem;color:var(--t-m);margin:.2rem 0 0}
.tool .t-mono{font-family:ui-monospace,Consolas,monospace}
.tool .t-wrap{overflow-x:auto;margin-top:1rem}
.tool table.t-table{border-collapse:collapse;width:100%;font-size:.9rem}
.tool .t-table th,.tool .t-table td{border-bottom:1px solid var(--t-b);padding:.4rem .5rem;text-align:right;white-space:nowrap}
.tool .t-table th{color:var(--t-m);font-weight:600;font-size:.78rem;letter-spacing:.02em}
.tool .t-table td:first-child,.tool .t-table th:first-child{text-align:left}
.tool .t-table tr.t-best td{background:#eef7e8;font-weight:600}
.tool .t-ok{color:#2E7D12}.tool .t-warn{color:#b26a00}.tool .t-bad{color:#b3261e}
.tool .t-err{color:#b3261e;font-weight:600;margin:.75rem 0 0}
.tool .t-svg{display:block;width:100%;height:auto;margin:1rem 0 .25rem}
.tool .t-tabs{display:flex;gap:.4rem;flex-wrap:wrap;margin-bottom:1rem}
.tool .t-tabs button{font:inherit;font-size:.9rem;padding:.35rem .8rem;border:1px solid var(--t-b);border-radius:999px;background:#fff;cursor:pointer;color:var(--t-ink)}
.tool .t-tabs button[aria-selected=true]{background:var(--t-ink);color:#fff;border-color:var(--t-ink)}
.tool [hidden]{display:none!important}
</style>
<style>.tool .h-sch{max-width:440px;margin:.25rem auto 1rem;color:var(--t-ink)}.tool .h-sch text{font-family:inherit}.tool .h-bits{max-width:none;margin:.5rem 0 1rem;color:var(--t-ink)}</style>
<div class="t-tabs" role="tablist"><button type="button" data-id="tab1" aria-selected="true">Largeur de piste</button><button type="button" data-id="tab2" aria-selected="false">PCB aluminium (LED)</button></div>
<div data-id="p1">
<svg class="t-svg h-sch" data-id="gPcb" viewBox="0 0 420 170" role="img" aria-label="Coupe de la piste de cuivre sur le circuit imprimé" style="max-width:520px"></svg>
<div class="t-form">
<label>Courant<input type="text" data-id="i" value="1A"></label>
<label>Échauffement admis (°C)<input type="text" data-id="dt" value="10"></label>
<label>Épaisseur de cuivre<select data-id="cu"><option value="17.5">0,5 oz (17,5 µm)</option><option value="35" selected>1 oz (35 µm)</option><option value="70">2 oz (70 µm)</option><option value="105">3 oz (105 µm)</option></select></label>
<label>Couche<select data-id="layer"><option value="0.048">Externe</option><option value="0.024">Interne</option></select></label>
<label>Longueur de piste (mm)<input type="text" data-id="len" value="50"></label>
<label>Température ambiante (°C)<input type="text" data-id="ta" value="25"></label>
</div>
<div class="t-out">
<div class="t-card"><p class="t-k">Largeur minimale</p><p class="t-v" data-id="w">–</p><p class="t-s" data-id="ws"></p></div>
<div class="t-card"><p class="t-k">Section</p><p class="t-v" data-id="a">–</p><p class="t-s" data-id="as"></p></div>
<div class="t-card"><p class="t-k">Résistance de la piste</p><p class="t-v" data-id="r">–</p><p class="t-s" data-id="rs"></p></div>
<div class="t-card"><p class="t-k">Chute de tension</p><p class="t-v" data-id="u">–</p><p class="t-s" data-id="us"></p></div>
</div></div>
<div data-id="p2" hidden>
<svg class="t-svg h-sch h-bits" data-id="gIms" viewBox="0 0 600 300" role="img" aria-label="Coupe d'un circuit imprimé sur aluminium sous une LED, résistance thermique et échauffement de chaque couche"></svg>
<div class="t-form">
<label>Puissance électrique par LED (W)<input type="text" data-id="pe" value="3"></label>
<label>Rendement lumineux (%)<input type="text" data-id="eta" value="35"></label>
<label>Nombre de LED<input type="number" data-id="nl" value="4" min="1"></label>
<label>R<sub>th</sub> jonction → pad (K/W)<input type="text" data-id="rjc" value="2,5"></label>
<label>Surface du pad thermique (mm²)<input type="text" data-id="apad" value="4"></label>
<label>Cuivre autour de la LED, côté (mm)<input type="text" data-id="scu" value="10"></label>
<label>Épaisseur de cuivre<select data-id="cu2"><option value="35" selected>1 oz (35 µm)</option><option value="70">2 oz (70 µm)</option><option value="105">3 oz (105 µm)</option></select></label>
<label>Diélectrique<select data-id="die"><option value="1" selected>1,0 W/m·K, 100 µm (standard)</option><option value="1.3">1,3 W/m·K, 100 µm</option><option value="2.2">2,2 W/m·K, 75 µm (haute performance)</option><option value="3">3,0 W/m·K, 75 µm</option><option value="dtp">Aucun : pad en contact direct avec la base (DTP)</option></select></label>
<label>Base<select data-id="base"><option value="138" selected>Aluminium 5052 (138 W/m·K)</option><option value="167">Aluminium 6061 (167 W/m·K)</option><option value="390">Cuivre (390 W/m·K)</option></select></label>
<label>Épaisseur de la base (mm)<input type="text" data-id="tb" value="1,5"></label>
<label>Pas entre LED (mm)<input type="text" data-id="pitch" value="20"></label>
<label>Interface thermique<select data-id="tim"><option value="paste" selected>Pâte, 50 µm (3 W/m·K)</option><option value="pad">Pad silicone, 0,5 mm (3 W/m·K)</option><option value="tape">Adhésif thermique, 0,2 mm (1 W/m·K)</option></select></label>
<label>Radiateur, pour l&rsquo;ensemble (K/W)<input type="text" data-id="rhs" value="2"></label>
<label>Température ambiante (°C)<input type="text" data-id="ta2" value="25"></label>
<label>T<sub>j</sub> maximale de la LED (°C)<input type="text" data-id="tjm" value="135"></label>
</div>
<div class="t-out">
<div class="t-card"><p class="t-k">Température de jonction</p><p class="t-v" data-id="tj">–</p><p class="t-s" data-id="tjs"></p></div>
<div class="t-card"><p class="t-k">Chaleur à évacuer</p><p class="t-v" data-id="qq">–</p><p class="t-s" data-id="qqs"></p></div>
<div class="t-card"><p class="t-k">Résistance du circuit</p><p class="t-v" data-id="rb">–</p><p class="t-s" data-id="rbs"></p></div>
<div class="t-card"><p class="t-k">Comparaison FR-4</p><p class="t-v" data-id="fr4">–</p><p class="t-s" data-id="fr4s"></p></div>
</div></div>
<p class="t-err" data-id="err" hidden></p>
<script src="data:text/javascript;charset=utf-8;base64,KGZ1bmN0aW9uKCl7CnZhciBUT09MPWRvY3VtZW50LmN1cnJlbnRTY3JpcHQ/ZG9jdW1lbnQuY3VycmVudFNjcmlwdC5wYXJlbnROb2RlOm51bGw7CmZ1bmN0aW9uIHEoaWQpe3JldHVybiBUT09MP1RPT0wucXVlcnlTZWxlY3RvcignW2RhdGEtaWQ9IicraWQrJyJdJyk6bnVsbDt9CnZhciBFQj17RTM6WzEwLDIyLDQ3XSxFNjpbMTAsMTUsMjIsMzMsNDcsNjhdLEUxMjpb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NCkrJyIgeT0iJytseSsnIiBmb250LXNpemU9IjEwIiBmaWxsPSIjNWQ2ODYyIj4nK2wubisnPC90ZXh0Pic7bHgrPTE0K2wubi5sZW5ndGgqNS4yKzE0O2lmKGx4PjUyMCl7bHg9MTA7bHkrPTE2O319KTsKIGRyYXdTdmcoJ2dJbXMnLGx5KzEyLHMsNjAwKTt9CgpiaW5kKFsncGUnLCdldGEnLCdubCcsJ3JqYycsJ2FwYWQnLCdzY3UnLCdjdTInLCdkaWUnLCdiYXNlJywndGInLCdwaXRjaCcsJ3RpbScsJ3JocycsJ3RhMicsJ3RqbSddLGltc1J1bik7Cn0pKCk7"></script>
</div>



<h2 class="wp-block-heading">La relation IPC-2221</h2>



<pre class="wp-block-code"><code>I = k × ΔT^0,44 × A^0,725
k = 0,048 (couche externe), 0,024 (couche interne)
A : section en mil², ΔT : échauffement en °C, I en A</code></pre>



<p class="wp-block-paragraph">La section obtenue est divisée par l&rsquo;épaisseur de cuivre pour donner la largeur. Une couche interne, entourée d&rsquo;époxy, évacue moins bien la chaleur : à courant égal, elle demande environ deux fois plus de section.</p>



<figure class="wp-block-table is-style-stripes"><table class="has-fixed-layout"><thead><tr><th>Cuivre</th><th>Épaisseur</th></tr></thead><tbody><tr><td>0,5 oz/ft²</td><td>17,5 µm</td></tr><tr><td>1 oz/ft²</td><td>35 µm</td></tr><tr><td>2 oz/ft²</td><td>70 µm</td></tr><tr><td>3 oz/ft²</td><td>105 µm</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">Ne pas s&rsquo;arrêter à l&rsquo;échauffement</h2>



<p class="wp-block-paragraph">La chute de tension est souvent le vrai critère : 0,3 mm de cuivre 35 µm font environ 1,6 mΩ par millimètre, soit près de 80 mΩ sur 5 cm. À 1 A, cela fait déjà 80 mV perdus, beaucoup pour une alimentation 3,3 V ou une mesure de courant. La résistance est calculée à la température de la piste en charge (coefficient du cuivre 0,393 %/°C).</p>



<ul class="wp-block-list">
<li>La norme IPC-2221 date des années 1950 et est jugée prudente ; la norme IPC-2152, plus récente, tient compte des plans de cuivre voisins et donne souvent des pistes plus étroites.</li>


<li>Les vias et les pastilles d&rsquo;un connecteur sont des goulots d&rsquo;étranglement : un via standard supporte de l&rsquo;ordre de 1 A.</li>


<li>Pour les forts courants, un plan de cuivre, un cuivre plus épais ou un renfort d&rsquo;étain valent mieux qu&rsquo;une piste très large.</li>
</ul>



<h2 class="wp-block-heading">PCB sur aluminium pour LED de puissance</h2>



<p class="wp-block-paragraph">Une LED de puissance transforme encore la majeure partie de son énergie électrique en chaleur, concentrée sur quelques millimètres carrés. Le FR-4, isolant thermique (environ 0,3 W/m·K), ne sait pas l&rsquo;évacuer : c&rsquo;est le rôle des circuits sur substrat métallique isolé (IMS, ou MCPCB). Une seule couche de cuivre est posée sur un diélectrique très mince, lui-même collé sur une semelle d&rsquo;aluminium de 1 à 1,6 mm.</p>



<h3 class="wp-block-heading">Le modèle de calcul</h3>



<p class="wp-block-paragraph">L&rsquo;outil additionne les résistances thermiques en série, du point chaud de la LED jusqu&rsquo;à l&rsquo;air ambiant :</p>



<ul class="wp-block-list">
<li><strong>jonction → pad</strong> : donnée par la fiche technique de la LED (souvent notée R<sub>th j-sp</sub>, <em>junction to solder point</em>) ;</li>


<li><strong>brasure et cuivre</strong> : traversée verticale, faible ;</li>


<li><strong>diélectrique</strong> : c&rsquo;est le goulot d&rsquo;étranglement. Le cuivre étale d&rsquo;abord la chaleur latéralement, comme une ailette : sur une longueur caractéristique L = √(k<sub>cu</sub>·t<sub>cu</sub>·t<sub>d</sub>/k<sub>d</sub>), environ 1 mm pour 35 µm de cuivre sur 100 µm de diélectrique. La surface utile du diélectrique est donc celle du pad élargie de L de chaque côté, dans la limite du cuivre disponible ;</li>


<li><strong>base métallique</strong> : la chaleur s&rsquo;y étale à 45°, d&rsquo;un carré de côté a à un carré de côté b, soit R = t / (k·a·b) ;</li>


<li><strong>interface thermique</strong> : pâte, pad ou adhésif entre la semelle et le radiateur, sur la surface atteinte par l&rsquo;étalement dans la semelle ;</li>


<li><strong>radiateur</strong> : partagé par toutes les LED, il compte pour N × R<sub>radiateur</sub> dans la chaîne de chacune.</li>
</ul>



<p class="wp-block-paragraph">Le modèle reste un modèle 1D amélioré : il donne le bon ordre de grandeur et surtout le poids relatif de chaque couche. Pour un dimensionnement serré, une simulation thermique ou une mesure (thermocouple sur le point de brasure, caméra thermique) reste nécessaire.</p>



<h3 class="wp-block-heading">Ce que montrent les chiffres</h3>



<ul class="wp-block-list">
<li>Le diélectrique pèse souvent plus que tout le reste du circuit : passer d&rsquo;un diélectrique standard (1 W/m·K, 100 µm) à un diélectrique haute performance (2,2 W/m·K, 75 µm) gagne plus qu&rsquo;épaissir la semelle.</li>


<li>Une grande surface de cuivre autour du pad thermique aide, mais au-delà de 2 à 3 fois la longueur L, elle n&rsquo;apporte plus rien : il vaut mieux du cuivre plus épais.</li>


<li>Sur FR-4 sans vias, la même LED chauffe plusieurs dizaines de degrés de plus. Des vias thermiques sous le pad réduisent l&rsquo;écart : un via de 0,3 mm métallisé à 25 µm dans 1,6 mm de FR-4 fait environ 190 K/W, il en faut donc une vingtaine en parallèle pour descendre vers 10 K/W.</li>


<li>Les substrats à chemin thermique direct (DTP, <em>direct thermal path</em>) suppriment le diélectrique sous le pad thermique, qui touche directement une base en cuivre. Ils exigent une LED dont le pad thermique est électriquement neutre.</li>
</ul>



<h3 class="wp-block-heading">Contraintes de conception</h3>



<ul class="wp-block-list">
<li>Une seule couche de routage en pratique, pas de trous métallisés traversant la semelle.</li>


<li>Le diélectrique fixe aussi la tenue en tension entre les pistes et la semelle, de l&rsquo;ordre de quelques kilovolts : un diélectrique plus mince conduit mieux la chaleur mais isole moins.</li>


<li>La dilatation de l&rsquo;aluminium (environ 23 ppm/°C contre 17 pour le cuivre et 6 à 7 pour une céramique de LED) fatigue les brasures en cyclage thermique : soigner le profil de refusion et éviter les très gros boîtiers céramiques.</li>


<li>La découpe se fait à la fraise ou en V-cut avec des outils adaptés à l&rsquo;aluminium : à prévoir avec le fabricant.</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://amaury-laurent.fr/outil-largeur-piste-pcb/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Filtres RC, RL et RLC : coupure, résonance et diagrammes de Bode</title>
		<link>https://amaury-laurent.fr/outil-filtre-rc-lc/</link>
					<comments>https://amaury-laurent.fr/outil-filtre-rc-lc/#respond</comments>
		
		<dc:creator><![CDATA[Amaury LAURENT]]></dc:creator>
		<pubDate>Tue, 13 Oct 2026 06:02:55 +0000</pubDate>
				<category><![CDATA[Outils]]></category>
		<category><![CDATA[Électronique]]></category>
		<guid isPermaLink="false">https://amaury-laurent.fr/?p=1485</guid>

					<description><![CDATA[RC et RL passe-bas ou passe-haut, RLC série passe-bas, passe-haut, passe-bande et coupe-bande : fréquence, Q, bande passante, Bode en amplitude et en phase, dimensionnement.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Filtres passifs du premier et du second ordre : RC et RL passe-bas ou passe-haut, RLC série passe-bas, passe-haut, passe-bande et coupe-bande. L&rsquo;outil calcule la fréquence de coupure ou propre, le facteur de qualité et la bande passante, trace le diagramme de Bode en amplitude et en phase, et dimensionne le composant manquant pour une fréquence visée.</p>



<div class="tool"><style>
.tool{--t-b:#cfd8cc;--t-m:#5d6862;--t-ink:#18211C;--t-acc:#2E7D12;border:1px solid var(--t-b);border-radius:12px;background:#fff;padding:1.25rem 1.25rem 1rem;margin:1.5rem 0;font-variant-numeric:tabular-nums;color:var(--t-ink)}
.tool .t-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(10rem,1fr));gap:.75rem 1rem;align-items:end}
.tool label{display:block;font-size:.85rem;font-weight:600;color:var(--t-m)}
.tool label>input,.tool label>select,.tool label>textarea{display:block;margin-top:.3rem}
.tool label.t-check{display:flex;align-items:center;gap:.4rem;font-weight:500}
.tool label.t-check>input{margin:0}
.tool input[type=text],.tool input[type=number],.tool select,.tool textarea{font:inherit;font-size:1rem;padding:.45rem .6rem;border:1px solid var(--t-b);border-radius:8px;background:#fff;color:var(--t-ink);width:100%;box-sizing:border-box}
.tool textarea{font-family:ui-monospace,Consolas,monospace;min-height:4.5rem}
.tool input:focus,.tool select:focus,.tool textarea:focus{outline:2px solid var(--t-acc);outline-offset:1px}
.tool .t-help{font-size:.82rem;color:var(--t-m);margin:.5rem 0 0}
.tool .t-out{display:grid;grid-template-columns:repeat(auto-fit,minmax(10.5rem,1fr));gap:.7rem;margin-top:1rem}
.tool .t-card{border:1px solid var(--t-b);border-radius:10px;padding:.65rem .8rem}
.tool .t-k{font-size:.75rem;text-transform:uppercase;letter-spacing:.05em;color:var(--t-m);margin:0 0 .2rem}
.tool .t-v{font-size:1.2rem;font-weight:700;margin:0;word-break:break-word}
.tool .t-s{font-size:.82rem;color:var(--t-m);margin:.2rem 0 0}
.tool .t-mono{font-family:ui-monospace,Consolas,monospace}
.tool .t-wrap{overflow-x:auto;margin-top:1rem}
.tool table.t-table{border-collapse:collapse;width:100%;font-size:.9rem}
.tool .t-table th,.tool .t-table td{border-bottom:1px solid var(--t-b);padding:.4rem .5rem;text-align:right;white-space:nowrap}
.tool .t-table th{color:var(--t-m);font-weight:600;font-size:.78rem;letter-spacing:.02em}
.tool .t-table td:first-child,.tool .t-table th:first-child{text-align:left}
.tool .t-table tr.t-best td{background:#eef7e8;font-weight:600}
.tool .t-ok{color:#2E7D12}.tool .t-warn{color:#b26a00}.tool .t-bad{color:#b3261e}
.tool .t-err{color:#b3261e;font-weight:600;margin:.75rem 0 0}
.tool .t-svg{display:block;width:100%;height:auto;margin:1rem 0 .25rem}
.tool .t-tabs{display:flex;gap:.4rem;flex-wrap:wrap;margin-bottom:1rem}
.tool .t-tabs button{font:inherit;font-size:.9rem;padding:.35rem .8rem;border:1px solid var(--t-b);border-radius:999px;background:#fff;cursor:pointer;color:var(--t-ink)}
.tool .t-tabs button[aria-selected=true]{background:var(--t-ink);color:#fff;border-color:var(--t-ink)}
.tool [hidden]{display:none!important}
</style>
<style>.tool .h-sch{max-width:520px;margin:.25rem auto 1rem;color:var(--t-ink)}.tool .h-sch text{font-family:inherit}.tool .h-plot{margin:.6rem 0 0}</style>
<svg class="t-svg h-sch" data-id="sch" viewBox="0 0 400 170" role="img" aria-label="Schéma du filtre"></svg>
<div class="t-form">
<label>Architecture<select data-id="arch"><optgroup label="Premier ordre"><option value="rc_lp">RC passe-bas</option><option value="rc_hp">RC passe-haut</option><option value="rl_lp">RL passe-bas</option><option value="rl_hp">RL passe-haut</option></optgroup><optgroup label="RLC série (second ordre)"><option value="rlc_lp">Passe-bas (sortie sur C)</option><option value="rlc_hp">Passe-haut (sortie sur L)</option><option value="rlc_bp">Passe-bande (sortie sur R)</option><option value="rlc_bs">Coupe-bande (sortie sur L + C)</option></optgroup></select></label>
<label>Calcul<select data-id="mode"><option value="an">Analyser : composants → fréquence</option><option value="dim">Dimensionner : fréquence → composant</option></select></label>
<label data-id="lcalc" hidden>Composant à calculer<select data-id="calc"></select></label>
<label data-id="lf" hidden>Fréquence visée<input type="text" data-id="f" value="1k"></label>
<label data-id="lq" hidden>Facteur de qualité Q visé<input type="text" data-id="qv" value="0,707"></label>
<label data-id="lser" hidden>Série de normalisation<select data-id="ser"><option value="E6">E6</option><option value="E12" selected>E12</option><option value="E24">E24</option><option value="E96">E96</option></select></label>
<label data-id="lr">Résistance R<input type="text" data-id="r" value="100"></label>
<label data-id="ll">Inductance L<input type="text" data-id="l" value="10m"></label>
<label data-id="lc">Capacité C<input type="text" data-id="c" value="100n"></label>
</div>
<p class="t-help">Source idéale (impédance nulle) et sortie à vide : la résistance de la source s&rsquo;ajoute à R, la charge se met en parallèle sur l&rsquo;élément de sortie.</p>
<div class="t-out">
<div class="t-card"><p class="t-k" data-id="k1">Fréquence</p><p class="t-v" data-id="v1">–</p><p class="t-s" data-id="s1"></p></div>
<div class="t-card"><p class="t-k" data-id="k2"></p><p class="t-v" data-id="v2">–</p><p class="t-s" data-id="s2"></p></div>
<div class="t-card"><p class="t-k" data-id="k3"></p><p class="t-v" data-id="v3">–</p><p class="t-s" data-id="s3"></p></div>
<div class="t-card"><p class="t-k" data-id="k4"></p><p class="t-v" data-id="v4">–</p><p class="t-s" data-id="s4"></p></div>
</div>
<p class="t-k" style="margin-top:1.2rem">Bode — amplitude</p>
<svg class="t-svg h-plot" data-id="bode" viewBox="0 0 600 240" role="img" aria-label="Diagramme de Bode en amplitude"></svg>
<p class="t-k" style="margin-top:.6rem">Bode — phase</p>
<svg class="t-svg h-plot" data-id="phase" viewBox="0 0 600 200" role="img" aria-label="Diagramme de Bode en phase"></svg>
<p class="t-err" data-id="err" hidden></p>
<script src="data:text/javascript;charset=utf-8;base64,KGZ1bmN0aW9uKCl7CnZhciBUT09MPWRvY3VtZW50LmN1cnJlbnRTY3JpcHQ/ZG9jdW1lbnQuY3VycmVudFNjcmlwdC5wYXJlbnROb2RlOm51bGw7CmZ1bmN0aW9uIHEoaWQpe3JldHVybiBUT09MP1RPT0wucXVlcnlTZWxlY3RvcignW2RhdGEtaWQ9IicraWQrJyJdJyk6bnVsbDt9CnZhciBFQj17RTM6WzEwLDIyLDQ3XSxFNjpbMTAsMTUsMjIsMzMsNDcsNjhdLEUxMjpbMTAsMTIsMTUsMTgsMjIsMjcsMzMsMzksNDcsNTYsNjgsODJdLEUyNDpbMTAsMTEsMTIsMTMsMTUsMTYsMTgsMjAsMjIsMjQsMjcsMzAsMzMsMzYsMzksNDMsNDcsNTEsNTYsNjIsNjgsNzUsODIsOTFdfTsKWydFNDgnLCdFOTYnLCdFMTkyJ10uZm9yRWFjaChmdW5jdGlvbihzKXt2YXIgbj0rcy5zbGljZSgxKSxhPVtdO2Zvcih2YXIgaT0wO2k8bjtpKyspe3ZhciB2PU1hdGgucm91bmQoMTAwKk1hdGgucG93KDEwLGkvbikpO2lmKHM9PT0nRTE5MicmJnY9PT05MTkpdj05MjA7YS5wdXNoKHYpO31FQltzXT1hO30pOwp2YXIgRVRPTD17RTM6MjAs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CdyYWQvcycsNCksJ8+J4oKAID0gMSAvIOKImihMwrdDKScpOwogdmFyIG14PU1hdGgubWF4KDUsTWF0aC5jZWlsKChvLnBlYWsrMykvNSkqNSksbW49YS5vPT09Mj8tODA6LTYwO3Bsb3QoJ2JvZGUnLGYwLGZ1bmN0aW9uKGYpe3JldHVybiBkYihIKGFyY2gsUixMLEMsZikpO30sbW4sbXgsbXgtbW4+NjA/MjA6MTAsJyBkQicsbWFya3MuY29uY2F0KFt7djotM31dKSk7CiB2YXIgcG1pbj0xZTkscG1heD0tMWU5O2Zvcih2YXIgaT0wO2k8PTIwMDtpKyspe3ZhciBmPWYwLzEwMCpNYXRoLnBvdygxZTQsaS8yMDApLHA9cGgoSChhcmNoLFIsTCxDLGYpKTtwbWluPU1hdGgubWluKHBtaW4scCk7cG1heD1NYXRoLm1heChwbWF4LHApO31wbWluPU1hdGguZmxvb3IocG1pbi80NSkqNDU7cG1heD1NYXRoLmNlaWwocG1heC80NSkqNDU7aWYocG1heC1wbWluPDkwKXtwbWF4PU1hdGgubWF4KHBtYXgscG1pbis5MCk7fQogcGxvdCgncGhhc2UnLGYwLGZ1bmN0aW9uKGYpe3JldHVybiBwaChIKGFyY2gsUixMLEMsZikpO30scG1pbixwbWF4LDQ1LCfCsCcsbWFya3MuZmlsdGVyKGZ1bmN0aW9uKG0pe3JldHVybiBtLmY7fSkubWFwKGZ1bmN0aW9uKG0pe3JldHVybiB7ZjptLmZ9O30pKTt9KTsKfSkoKTs="></script>
</div>



<h2 class="wp-block-heading">Les architectures</h2>



<figure class="wp-block-table is-style-stripes"><table class="has-fixed-layout"><thead><tr><th>Montage</th><th>Sortie prise sur</th><th>Fréquence caractéristique</th><th>Pente</th></tr></thead><tbody><tr><td>RC passe-bas / passe-haut</td><td>C / R</td><td>fc = 1 / (2π R C)</td><td>20 dB/décade</td></tr><tr><td>RL passe-bas / passe-haut</td><td>R / L</td><td>fc = R / (2π L)</td><td>20 dB/décade</td></tr><tr><td>RLC série passe-bas</td><td>C</td><td>f₀ = 1 / (2π √(L C))</td><td>40 dB/décade</td></tr><tr><td>RLC série passe-haut</td><td>L</td><td>f₀</td><td>40 dB/décade</td></tr><tr><td>RLC série passe-bande</td><td>R</td><td>f₀, bande passante f₀ / Q</td><td>20 dB/décade de chaque côté</td></tr><tr><td>RLC série coupe-bande</td><td>L + C</td><td>f₀, bande rejetée f₀ / Q</td><td>réjection théoriquement infinie à f₀</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">Pour le RLC série, le facteur de qualité vaut Q = √(L/C) / R, et l&rsquo;amortissement ζ = 1 / (2Q). Au-dessus de Q = 0,707 (Butterworth), les passe-bas et passe-haut présentent une surtension près de f₀ : l&rsquo;outil donne sa valeur et sa fréquence. Les fréquences à −3 dB sont trouvées numériquement sur la fonction de transfert complète, sans approximation.</p>



<p class="wp-block-paragraph">Les diagrammes de Bode tracent le module (en dB) et la phase de la fonction de transfert H(jω) = Z<sub>sortie</sub> / Z<sub>totale</sub>, calculée en nombres complexes pour chaque fréquence, sur deux décades de part et d&rsquo;autre de la fréquence caractéristique.</p>



<h2 class="wp-block-heading">Dimensionner</h2>



<p class="wp-block-paragraph">En mode « Dimensionner », l&rsquo;outil calcule le composant manquant pour la fréquence visée, le ramène à la valeur normalisée la plus proche dans la série choisie, puis recalcule la fréquence réellement obtenue. Pour un RLC, f₀ ne dépend que de L et C ; R fixe le facteur de qualité, et se calcule à partir du Q visé.</p>



<h2 class="wp-block-heading">En pratique</h2>



<ul class="wp-block-list">
<li>La résistance de sortie de l&rsquo;étage qui attaque le filtre s&rsquo;ajoute à R, et la charge se met en parallèle sur l&rsquo;élément de sortie : un filtre passif chargé n&rsquo;a plus la réponse calculée à vide.</li>


<li>Une inductance réelle a une résistance série (DCR) qui s&rsquo;ajoute à R et limite le Q, ainsi qu&rsquo;une capacité parasite qui crée sa propre résonance.</li>


<li>Les condensateurs céramiques de classe 2 (X7R, X5R) perdent une grande part de leur capacité sous tension continue : pour un filtre précis, préférer du C0G ou du film.</li>


<li>Pour un anti-repliement avant un convertisseur analogique-numérique, placer la coupure nettement sous la moitié de la fréquence d&rsquo;échantillonnage.</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://amaury-laurent.fr/outil-filtre-rc-lc/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Régulateur réglable : calculer le pont de contre-réaction</title>
		<link>https://amaury-laurent.fr/outil-regulateur-reglable/</link>
					<comments>https://amaury-laurent.fr/outil-regulateur-reglable/#respond</comments>
		
		<dc:creator><![CDATA[Amaury LAURENT]]></dc:creator>
		<pubDate>Tue, 13 Oct 2026 05:56:04 +0000</pubDate>
				<category><![CDATA[Outils]]></category>
		<category><![CDATA[Électronique]]></category>
		<guid isPermaLink="false">https://amaury-laurent.fr/?p=1486</guid>

					<description><![CDATA[Les résistances R1 et R2 d'un LM317, d'un LM1117 ou d'un régulateur à découpage pour une tension de sortie donnée, avec le courant de la broche ADJ et la dissipation.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Un régulateur réglable maintient une tension fixe, sa tension de référence, entre sa sortie et sa broche de réglage. Un pont de deux résistances transforme cette référence en la tension de sortie voulue. L&rsquo;outil calcule R2, propose les meilleures paires normalisées et vérifie la dissipation d&rsquo;un régulateur linéaire.</p>



<div class="tool"><style>
.tool{--t-b:#cfd8cc;--t-m:#5d6862;--t-ink:#18211C;--t-acc:#2E7D12;border:1px solid var(--t-b);border-radius:12px;background:#fff;padding:1.25rem 1.25rem 1rem;margin:1.5rem 0;font-variant-numeric:tabular-nums;color:var(--t-ink)}
.tool .t-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(10rem,1fr));gap:.75rem 1rem;align-items:end}
.tool label{display:block;font-size:.85rem;font-weight:600;color:var(--t-m)}
.tool label>input,.tool label>select,.tool label>textarea{display:block;margin-top:.3rem}
.tool label.t-check{display:flex;align-items:center;gap:.4rem;font-weight:500}
.tool label.t-check>input{margin:0}
.tool input[type=text],.tool input[type=number],.tool select,.tool textarea{font:inherit;font-size:1rem;padding:.45rem .6rem;border:1px solid var(--t-b);border-radius:8px;background:#fff;color:var(--t-ink);width:100%;box-sizing:border-box}
.tool textarea{font-family:ui-monospace,Consolas,monospace;min-height:4.5rem}
.tool input:focus,.tool select:focus,.tool textarea:focus{outline:2px solid var(--t-acc);outline-offset:1px}
.tool .t-help{font-size:.82rem;color:var(--t-m);margin:.5rem 0 0}
.tool .t-out{display:grid;grid-template-columns:repeat(auto-fit,minmax(10.5rem,1fr));gap:.7rem;margin-top:1rem}
.tool .t-card{border:1px solid var(--t-b);border-radius:10px;padding:.65rem .8rem}
.tool .t-k{font-size:.75rem;text-transform:uppercase;letter-spacing:.05em;color:var(--t-m);margin:0 0 .2rem}
.tool .t-v{font-size:1.2rem;font-weight:700;margin:0;word-break:break-word}
.tool .t-s{font-size:.82rem;color:var(--t-m);margin:.2rem 0 0}
.tool .t-mono{font-family:ui-monospace,Consolas,monospace}
.tool .t-wrap{overflow-x:auto;margin-top:1rem}
.tool table.t-table{border-collapse:collapse;width:100%;font-size:.9rem}
.tool .t-table th,.tool .t-table td{border-bottom:1px solid var(--t-b);padding:.4rem .5rem;text-align:right;white-space:nowrap}
.tool .t-table th{color:var(--t-m);font-weight:600;font-size:.78rem;letter-spacing:.02em}
.tool .t-table td:first-child,.tool .t-table th:first-child{text-align:left}
.tool .t-table tr.t-best td{background:#eef7e8;font-weight:600}
.tool .t-ok{color:#2E7D12}.tool .t-warn{color:#b26a00}.tool .t-bad{color:#b3261e}
.tool .t-err{color:#b3261e;font-weight:600;margin:.75rem 0 0}
.tool .t-svg{display:block;width:100%;height:auto;margin:1rem 0 .25rem}
.tool .t-tabs{display:flex;gap:.4rem;flex-wrap:wrap;margin-bottom:1rem}
.tool .t-tabs button{font:inherit;font-size:.9rem;padding:.35rem .8rem;border:1px solid var(--t-b);border-radius:999px;background:#fff;cursor:pointer;color:var(--t-ink)}
.tool .t-tabs button[aria-selected=true]{background:var(--t-ink);color:#fff;border-color:var(--t-ink)}
.tool [hidden]{display:none!important}
</style>
<style>.tool .h-sch{max-width:440px;margin:.25rem auto 1rem;color:var(--t-ink)}.tool .h-sch text{font-family:inherit}.tool .h-bits{max-width:none;margin:.5rem 0 1rem;color:var(--t-ink)}</style>
<svg class="t-svg h-sch" viewBox="0 0 420 240" role="img" aria-label="Schéma : régulateur réglable, R1 entre OUT et ADJ, R2 entre ADJ et la masse"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="20" cy="50" r="4"/><path d="M24 50H110"/><rect x="110" y="25" width="100" height="60"/><path d="M210 50H340"/><circle cx="344" cy="50" r="4"/><circle cx="290" cy="50" r="3" fill="currentColor"/><path d="M290 50V70"/><rect x="281" y="70" width="18" height="46"/><path d="M290 116V150"/><circle cx="290" cy="140" r="3" fill="currentColor"/><rect x="281" y="150" width="18" height="46"/><path d="M290 196V206"/><path d="M290 206V214M276 214H304M281 220H299M286 226H294"/><path d="M160 85V140H290"/></g><g fill="currentColor" font-size="13"><text x="10" y="34">V<tspan dy="3" font-size="10">in</tspan></text><text x="34" y="34" data-id="gVin"></text><text x="116" y="55" font-size="11">IN</text><text x="204" y="55" text-anchor="end" font-size="11">OUT</text><text x="160" y="80" text-anchor="middle" font-size="11">ADJ</text><text x="160" y="18" text-anchor="middle" font-size="12" data-id="gIC"></text><text x="330" y="34" text-anchor="end">V<tspan dy="3" font-size="10">out</tspan></text><text x="352" y="34" data-id="gVo"></text><text x="306" y="98" data-id="gR1">R1</text><text x="306" y="178" data-id="gR2">R2</text><text x="174" y="134" text-anchor="start" font-size="11" data-id="gIa"></text></g></svg>
<div class="t-form">
<label>Régulateur<select data-id="ic"><option value="1.25|50|2.5">LM317 (1,25 V)</option><option value="1.25|60|1.3">LM1117-ADJ / AMS1117-ADJ (1,25 V)</option><option value="1.23|0|0">LM2596-ADJ, découpage (1,23 V)</option><option value="1.25|0|0">XL4015 / LM2576-ADJ, découpage (1,25 V)</option><option value="0.8|0|0">MP1584, MT3608… (0,8 V)</option><option value="custom">Autre…</option></select></label>
<label>Tension de référence (V)<input type="text" data-id="vref" value="1,25"></label>
<label>Courant de la broche ADJ (µA)<input type="text" data-id="iadj" value="50"></label>
<label>Tension de sortie visée<input type="text" data-id="vout" value="5"></label>
<label>R1 (entre OUT et ADJ)<input type="text" data-id="r1" value="240"></label>
<label>Série pour R2<select data-id="ser"><option value="E12">E12 (± 10 %)</option><option value="E24" selected>E24 (± 5 %)</option><option value="E48">E48 (± 2 %)</option><option value="E96">E96 (± 1 %)</option></select></label>
<label>Tension d&rsquo;entrée<input type="text" data-id="vin" value="9"></label>
<label>Courant de sortie<input type="text" data-id="iout" value="500m"></label>
</div>
<div class="t-out">
<div class="t-card"><p class="t-k">R2 calculée</p><p class="t-v" data-id="r2i">–</p><p class="t-s" data-id="r2is"></p></div>
<div class="t-card"><p class="t-k">R2 normalisée</p><p class="t-v" data-id="r2">–</p><p class="t-s" data-id="r2s"></p></div>
<div class="t-card"><p class="t-k">Dissipation</p><p class="t-v" data-id="p">–</p><p class="t-s" data-id="ps"></p></div>
</div>
<div class="t-wrap"><table class="t-table"><thead><tr><th>R1</th><th>R2</th><th>V<sub>out</sub></th><th>Erreur</th></tr></thead><tbody data-id="res"></tbody></table></div>
<p class="t-err" data-id="err" hidden></p>
<script src="data:text/javascript;charset=utf-8;base64,KGZ1bmN0aW9uKCl7CnZhciBUT09MPWRvY3VtZW50LmN1cnJlbnRTY3JpcHQ/ZG9jdW1lbnQuY3VycmVudFNjcmlwdC5wYXJlbnROb2RlOm51bGw7CmZ1bmN0aW9uIHEoaWQpe3JldHVybiBUT09MP1RPT0wucXVlcnlTZWxlY3RvcignW2RhdGEtaWQ9IicraWQrJyJdJyk6bnVsbDt9CnZhciBFQj17RTM6WzEwLDIyLDQ3XSxFNjpbMTAsMTUsMjIsMzMsNDcsNjhdLEUxMjpbMTAsMTIsMTUsMTgsMjIsMjcsMzMsMzksNDcsNTYsNjgsODJdLEUyND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XTonJztxKCdnVmluJykudGV4dENvbnRlbnQ9dmluPjA/ZnIodmluLDMpKycgVic6Jyc7CiBpZighb2spe3EoJ2dSMScpLnRleHRDb250ZW50PSdSMSc7cSgnZ1IyJykudGV4dENvbnRlbnQ9J1IyJztxKCdnVm8nKS50ZXh0Q29udGVudD0nJztyZXR1cm47fXZhciByMj1lTmVhcigodm8tdnJlZikvKHZyZWYvcjEraWFkaikscSgnc2VyJykudmFsdWUpLHY9dm91dCh2cmVmLGlhZGoscjEscjIpOwogcSgnZ1IxJykudGV4dENvbnRlbnQ9J1IxID0gJytzaShyMSwnzqknKTtxKCdnUjInKS50ZXh0Q29udGVudD0nUjIgPSAnK3NpKHIyLCfOqScpO3EoJ2dWbycpLnRleHRDb250ZW50PWZyKHYsNCkrJyBWJztxKCdnSWEnKS50ZXh0Q29udGVudD1pYWRqPjA/J0nigIlBREogPSAnK3NpKGlhZGosJ0EnLDIpOicnO30pOwp9KSgpOw=="></script>
</div>



<h2 class="wp-block-heading">La formule</h2>



<pre class="wp-block-code"><code>Vout = Vref × (1 + R2 / R1) + Iadj × R2
R2 = (Vout − Vref) / (Vref / R1 + Iadj)</code></pre>



<p class="wp-block-paragraph">Le terme I<sub>adj</sub> × R2 vient du courant qui sort de la broche ADJ du LM317 (50 µA typiques, jusqu&rsquo;à 100 µA). Il est négligeable tant que le courant dans le pont est grand devant lui : c&rsquo;est l&rsquo;une des raisons pour lesquelles on choisit R1 = 240 Ω ou 120 Ω.</p>



<h2 class="wp-block-heading">Le courant minimal du LM317</h2>



<p class="wp-block-paragraph">Un LM317 ne régule correctement que s&rsquo;il débite au moins quelques milliampères (jusqu&rsquo;à 10 mA selon la fiche technique). Le pont sert de charge minimale : avec R1 = 120 Ω, il absorbe 10 mA à lui seul. C&rsquo;est pourquoi les paires proposées pour les régulateurs linéaires gardent R1 entre 100 et 250 Ω, et celles des régulateurs à découpage entre 1 et 100 kΩ, où un pont de forte valeur réduit la consommation à vide.</p>



<h2 class="wp-block-heading">Dissipation</h2>



<p class="wp-block-paragraph">Un régulateur linéaire dissipe (V<sub>in</sub> − V<sub>out</sub>) × I<sub>out</sub>. De 9 V à 5 V sous 500 mA, cela fait 2 W : un TO-220 sans radiateur ne les supporte pas longtemps. Au-delà d&rsquo;un watt environ, un régulateur à découpage est presque toujours préférable.</p>



<ul class="wp-block-list">
<li>Respecter la différence minimale entrée-sortie (dropout) : environ 2 à 3 V pour un LM317, 1,1 à 1,3 V pour un LM1117.</li>


<li>Ajouter les condensateurs d&rsquo;entrée et de sortie recommandés par la fiche technique, et une diode de protection si la sortie peut rester chargée quand l&rsquo;entrée est coupée.</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://amaury-laurent.fr/outil-regulateur-reglable/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Résistance de LED : valeur, courant et puissance</title>
		<link>https://amaury-laurent.fr/outil-resistance-led/</link>
					<comments>https://amaury-laurent.fr/outil-resistance-led/#respond</comments>
		
		<dc:creator><![CDATA[Amaury LAURENT]]></dc:creator>
		<pubDate>Tue, 13 Oct 2026 05:51:07 +0000</pubDate>
				<category><![CDATA[Outils]]></category>
		<category><![CDATA[Électronique]]></category>
		<guid isPermaLink="false">https://amaury-laurent.fr/?p=1480</guid>

					<description><![CDATA[La résistance série d'une ou plusieurs LED, arrondie à la valeur normalisée supérieure, avec le courant réel, la puissance dissipée et le rendement.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">La résistance série limite le courant d&rsquo;une LED. L&rsquo;outil la calcule pour une ou plusieurs LED en série, l&rsquo;arrondit à la valeur normalisée immédiatement supérieure, pour ne jamais dépasser le courant visé, et indique la puissance à dissiper.</p>



<div class="tool"><style>
.tool{--t-b:#cfd8cc;--t-m:#5d6862;--t-ink:#18211C;--t-acc:#2E7D12;border:1px solid var(--t-b);border-radius:12px;background:#fff;padding:1.25rem 1.25rem 1rem;margin:1.5rem 0;font-variant-numeric:tabular-nums;color:var(--t-ink)}
.tool .t-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(10rem,1fr));gap:.75rem 1rem;align-items:end}
.tool label{display:block;font-size:.85rem;font-weight:600;color:var(--t-m)}
.tool label>input,.tool label>select,.tool label>textarea{display:block;margin-top:.3rem}
.tool label.t-check{display:flex;align-items:center;gap:.4rem;font-weight:500}
.tool label.t-check>input{margin:0}
.tool input[type=text],.tool input[type=number],.tool select,.tool textarea{font:inherit;font-size:1rem;padding:.45rem .6rem;border:1px solid var(--t-b);border-radius:8px;background:#fff;color:var(--t-ink);width:100%;box-sizing:border-box}
.tool textarea{font-family:ui-monospace,Consolas,monospace;min-height:4.5rem}
.tool input:focus,.tool select:focus,.tool textarea:focus{outline:2px solid var(--t-acc);outline-offset:1px}
.tool .t-help{font-size:.82rem;color:var(--t-m);margin:.5rem 0 0}
.tool .t-out{display:grid;grid-template-columns:repeat(auto-fit,minmax(10.5rem,1fr));gap:.7rem;margin-top:1rem}
.tool .t-card{border:1px solid var(--t-b);border-radius:10px;padding:.65rem .8rem}
.tool .t-k{font-size:.75rem;text-transform:uppercase;letter-spacing:.05em;color:var(--t-m);margin:0 0 .2rem}
.tool .t-v{font-size:1.2rem;font-weight:700;margin:0;word-break:break-word}
.tool .t-s{font-size:.82rem;color:var(--t-m);margin:.2rem 0 0}
.tool .t-mono{font-family:ui-monospace,Consolas,monospace}
.tool .t-wrap{overflow-x:auto;margin-top:1rem}
.tool table.t-table{border-collapse:collapse;width:100%;font-size:.9rem}
.tool .t-table th,.tool .t-table td{border-bottom:1px solid var(--t-b);padding:.4rem .5rem;text-align:right;white-space:nowrap}
.tool .t-table th{color:var(--t-m);font-weight:600;font-size:.78rem;letter-spacing:.02em}
.tool .t-table td:first-child,.tool .t-table th:first-child{text-align:left}
.tool .t-table tr.t-best td{background:#eef7e8;font-weight:600}
.tool .t-ok{color:#2E7D12}.tool .t-warn{color:#b26a00}.tool .t-bad{color:#b3261e}
.tool .t-err{color:#b3261e;font-weight:600;margin:.75rem 0 0}
.tool .t-svg{display:block;width:100%;height:auto;margin:1rem 0 .25rem}
.tool .t-tabs{display:flex;gap:.4rem;flex-wrap:wrap;margin-bottom:1rem}
.tool .t-tabs button{font:inherit;font-size:.9rem;padding:.35rem .8rem;border:1px solid var(--t-b);border-radius:999px;background:#fff;cursor:pointer;color:var(--t-ink)}
.tool .t-tabs button[aria-selected=true]{background:var(--t-ink);color:#fff;border-color:var(--t-ink)}
.tool [hidden]{display:none!important}
</style>
<style>.tool .h-sch{max-width:440px;margin:.25rem auto 1rem;color:var(--t-ink)}.tool .h-sch text{font-family:inherit}.tool .h-bits{max-width:none;margin:.5rem 0 1rem;color:var(--t-ink)}</style>
<svg class="t-svg h-sch" viewBox="0 0 400 130" role="img" aria-label="Schéma : alimentation, résistance série, LED, masse"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="24" cy="40" r="4"/><path d="M28 40H70"/><rect x="70" y="31" width="56" height="18"/><path d="M126 40H170"/><path d="M140 40h14m-5 -4l5 4l-5 4" stroke-width="1.6"/><path d="M170 29L192 40L170 51Z" fill="none"/><path d="M192 29V51"/><path d="M178 26l8 -10m-5 0h5v5M186 28l8 -10m-5 0h5v5" stroke-width="1.5"/><path d="M192 40H232M254 40H310V86"/><g data-id="gL2"><path d="M232 29L254 40L232 51Z" fill="none"/><path d="M254 29V51"/><path d="M240 26l8 -10m-5 0h5v5M248 28l8 -10m-5 0h5v5" stroke-width="1.5"/></g><path data-id="gW" d="M232 40H254"/><path d="M310 86V94M296 94H324M301 100H319M306 106H314"/></g><g fill="currentColor" font-size="13"><text x="14" y="24">V<tspan dy="3" font-size="10">s</tspan></text><text x="10" y="64" data-id="gV"></text><text x="98" y="68" text-anchor="middle" data-id="gR">R</text><text x="98" y="22" text-anchor="middle" font-size="12" data-id="gI"></text><text x="212" y="74" text-anchor="middle" data-id="gN"></text></g></svg>
<div class="t-form">
<label>Tension d&rsquo;alimentation<input type="text" data-id="vs" value="5"></label>
<label>Couleur de LED<select data-id="col"><option value="1.8">Rouge (≈ 1,8–2,0 V)</option><option value="2.1">Orange / jaune (≈ 2,1 V)</option><option value="2.2">Vert ancien (≈ 2,2 V)</option><option value="3.0">Vert InGaN (≈ 3,0 V)</option><option value="3.1" selected>Bleu / blanc (≈ 3,1 V)</option><option value="1.3">Infrarouge (≈ 1,3 V)</option><option value="custom">Autre…</option></select></label>
<label>Tension directe V<sub>f</sub><input type="text" data-id="vf" value="3,1"></label>
<label>Courant visé (mA)<input type="text" data-id="if" value="10"></label>
<label>LED en série<input type="number" data-id="n" value="1" min="1" max="50"></label>
<label>Série<select data-id="ser"><option value="E6">E6 (± 20 %)</option><option value="E12" selected>E12 (± 10 %)</option><option value="E24">E24 (± 5 %)</option><option value="E96">E96 (± 1 %)</option></select></label>
</div>
<div class="t-out">
<div class="t-card"><p class="t-k">Résistance</p><p class="t-v" data-id="r">–</p><p class="t-s" data-id="rs"></p></div>
<div class="t-card"><p class="t-k">Courant obtenu</p><p class="t-v" data-id="i">–</p><p class="t-s" data-id="is"></p></div>
<div class="t-card"><p class="t-k">Puissance résistance</p><p class="t-v" data-id="p">–</p><p class="t-s" data-id="ps"></p></div>
<div class="t-card"><p class="t-k">Rendement</p><p class="t-v" data-id="eta">–</p><p class="t-s" data-id="etas"></p></div>
</div>
<p class="t-err" data-id="err" hidden></p>
<script src="data:text/javascript;charset=utf-8;base64,KGZ1bmN0aW9uKCl7CnZhciBUT09MPWRvY3VtZW50LmN1cnJlbnRTY3JpcHQ/ZG9jdW1lbnQuY3VycmVudFNjcmlwdC5wYXJlbnROb2RlOm51bGw7CmZ1bmN0aW9uIHEoaWQpe3JldHVybiBUT09MP1RPT0wucXVlcnlTZWxlY3RvcignW2RhdGEtaWQ9IicraWQrJyJdJyk6bnVsbDt9CnZhciBFQj17RTM6WzEwLDIyLDQ3XSxFNjpbMTAsMTUsMjIsMzMsNDcsNjhdLEUxMjpbMTAsMTIsMTUsMTgsMjIsMjcsMzMsMzksND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nLCduJywnc2VyJywnY29sJ10sZnVuY3Rpb24oKXt2YXIgdnM9bnVtKHEoJ3ZzJykudmFsdWUpLHZmPW51bShxKCd2ZicpLnZhbHVlKSxpZmE9bnVtKHEoJ2lmJykudmFsdWUpLzEwMDAsbj1wYXJzZUludChxKCduJykudmFsdWUsMTApfHwxLHM9KHZzPjAmJnZmPjAmJmlmYT4wKT9zb2x2ZSh2cyx2ZixpZmEsbixxKCdzZXInKS52YWx1ZSk6bnVsbDsKIHEoJ2dSJykudGV4dENvbnRlbnQ9cz8nUiA9ICcrc2kocy5yLCfOqScpOidSJztxKCdnSScpLnRleHRDb250ZW50PXM/J0kgPSAnK3NpKHMuaSwnQScsMyk6KHZzPjAmJnZmPjA/J3RlbnNpb24gaW5zdWZmaXNhbnRlIDogJytuKycgw5cgJytmcih2ZiwzKSsnIFYg4omlICcrZnIodnMsMykrJyBWJzonJyk7dmFyIGdpPXEoJ2dJJyk7Z2kuc2V0QXR0cmlidXRlKCdmaWxsJyxzPydjdXJyZW50Q29sb3InOicjYjMyNjFlJyk7Z2kuc2V0QXR0cmlidXRlKCd4JyxzPzk4OjE0KTtnaS5zZXRBdHRyaWJ1dGUoJ3knLHM/MjI6MTE4KTtnaS5zZXRBdHRyaWJ1dGUoJ3RleHQtYW5jaG9yJyxzPydtaWRkbGUnOidzdGFydCcpO3EoJ2dWJykudGV4dENvbnRlbnQ9dnM+MD9mcih2cywzKSsnIFYnOicnO3EoJ2dOJykudGV4dENvbnRlbnQ9KG4+MT9uKycgTEVEIMOXICc6J1bigIlmID0gJykrKHZmPjA/ZnIodmYsMykrJyBWJzonJyk7cSgnZ0wyJykuc3R5bGUuZGlzcGxheT1uPjE/Jyc6J25vbmUnO3EoJ2dXJykuc3R5bGUuZGlzcGxheT1uPjE/J25vbmUnOicnO30pOwp9KSgpOw=="></script>
</div>



<h2 class="wp-block-heading">La formule</h2>



<pre class="wp-block-code"><code>R = (Vs − n × Vf) / I
P = I² × R</code></pre>



<p class="wp-block-paragraph">La tension directe V<sub>f</sub> dépend de la couleur, du courant et de la température : les valeurs proposées sont typiques et la fiche technique de la LED fait foi. Elle diminue quand la LED chauffe, ce qui augmente légèrement le courant.</p>



<h2 class="wp-block-heading">Pourquoi garder de la marge</h2>



<p class="wp-block-paragraph">Plus la tension restant aux bornes de la résistance est faible, plus le courant dépend de V<sub>f</sub> et des variations de l&rsquo;alimentation. Avec moins d&rsquo;un volt sur la résistance, une petite variation de V<sub>f</sub> change fortement le courant : au-delà de quelques LED en série, ou pour des LED de puissance, un régulateur de courant remplace avantageusement la résistance.</p>



<ul class="wp-block-list">
<li>Ne jamais brancher plusieurs LED en parallèle sur une seule résistance : leurs V<sub>f</sub> diffèrent et la LED de plus faible V<sub>f</sub> prend tout le courant.</li>


<li>Pour un témoin lumineux, 2 à 5 mA suffisent souvent avec les LED actuelles.</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://amaury-laurent.fr/outil-resistance-led/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Diviseur de tension et régulateur Zener : choisir les composants</title>
		<link>https://amaury-laurent.fr/outil-diviseur-de-tension/</link>
					<comments>https://amaury-laurent.fr/outil-diviseur-de-tension/#respond</comments>
		
		<dc:creator><![CDATA[Amaury LAURENT]]></dc:creator>
		<pubDate>Tue, 13 Oct 2026 05:46:10 +0000</pubDate>
				<category><![CDATA[Outils]]></category>
		<category><![CDATA[Électronique]]></category>
		<guid isPermaLink="false">https://amaury-laurent.fr/?p=1478</guid>

					<description><![CDATA[Pont de résistances normalisées (erreur, courant, pire cas) ou régulateur Zener (résistance série, puissance de la diode, régulation), avec schéma.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Obtenir 3,3 V à partir de 12 V, ramener une tension dans la plage d&rsquo;un convertisseur analogique-numérique, ou tirer une tension fixe d&rsquo;une alimentation qui varie : l&rsquo;onglet « Pont de résistances » cherche les paires normalisées les plus proches du rapport voulu, l&rsquo;onglet « Diode Zener » dimensionne la résistance série, la puissance de la Zener et la régulation obtenue.</p>



<div class="tool"><style>
.tool{--t-b:#cfd8cc;--t-m:#5d6862;--t-ink:#18211C;--t-acc:#2E7D12;border:1px solid var(--t-b);border-radius:12px;background:#fff;padding:1.25rem 1.25rem 1rem;margin:1.5rem 0;font-variant-numeric:tabular-nums;color:var(--t-ink)}
.tool .t-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(10rem,1fr));gap:.75rem 1rem;align-items:end}
.tool label{display:block;font-size:.85rem;font-weight:600;color:var(--t-m)}
.tool label>input,.tool label>select,.tool label>textarea{display:block;margin-top:.3rem}
.tool label.t-check{display:flex;align-items:center;gap:.4rem;font-weight:500}
.tool label.t-check>input{margin:0}
.tool input[type=text],.tool input[type=number],.tool select,.tool textarea{font:inherit;font-size:1rem;padding:.45rem .6rem;border:1px solid var(--t-b);border-radius:8px;background:#fff;color:var(--t-ink);width:100%;box-sizing:border-box}
.tool textarea{font-family:ui-monospace,Consolas,monospace;min-height:4.5rem}
.tool input:focus,.tool select:focus,.tool textarea:focus{outline:2px solid var(--t-acc);outline-offset:1px}
.tool .t-help{font-size:.82rem;color:var(--t-m);margin:.5rem 0 0}
.tool .t-out{display:grid;grid-template-columns:repeat(auto-fit,minmax(10.5rem,1fr));gap:.7rem;margin-top:1rem}
.tool .t-card{border:1px solid var(--t-b);border-radius:10px;padding:.65rem .8rem}
.tool .t-k{font-size:.75rem;text-transform:uppercase;letter-spacing:.05em;color:var(--t-m);margin:0 0 .2rem}
.tool .t-v{font-size:1.2rem;font-weight:700;margin:0;word-break:break-word}
.tool .t-s{font-size:.82rem;color:var(--t-m);margin:.2rem 0 0}
.tool .t-mono{font-family:ui-monospace,Consolas,monospace}
.tool .t-wrap{overflow-x:auto;margin-top:1rem}
.tool table.t-table{border-collapse:collapse;width:100%;font-size:.9rem}
.tool .t-table th,.tool .t-table td{border-bottom:1px solid var(--t-b);padding:.4rem .5rem;text-align:right;white-space:nowrap}
.tool .t-table th{color:var(--t-m);font-weight:600;font-size:.78rem;letter-spacing:.02em}
.tool .t-table td:first-child,.tool .t-table th:first-child{text-align:left}
.tool .t-table tr.t-best td{background:#eef7e8;font-weight:600}
.tool .t-ok{color:#2E7D12}.tool .t-warn{color:#b26a00}.tool .t-bad{color:#b3261e}
.tool .t-err{color:#b3261e;font-weight:600;margin:.75rem 0 0}
.tool .t-svg{display:block;width:100%;height:auto;margin:1rem 0 .25rem}
.tool .t-tabs{display:flex;gap:.4rem;flex-wrap:wrap;margin-bottom:1rem}
.tool .t-tabs button{font:inherit;font-size:.9rem;padding:.35rem .8rem;border:1px solid var(--t-b);border-radius:999px;background:#fff;cursor:pointer;color:var(--t-ink)}
.tool .t-tabs button[aria-selected=true]{background:var(--t-ink);color:#fff;border-color:var(--t-ink)}
.tool [hidden]{display:none!important}
</style>
<style>.tool .h-sch{max-width:380px;margin:.5rem auto 1rem;color:var(--t-ink)}</style>
<div class="t-tabs" role="tablist"><button type="button" data-tab="r" aria-selected="true">Pont de résistances</button><button type="button" data-tab="z" aria-selected="false">Diode Zener</button></div>
<div data-id="pr">
<svg class="t-svg h-sch" viewBox="0 0 300 220" role="img" aria-label="Schéma du pont diviseur : R1 entre Vin et la sortie, R2 entre la sortie et la masse"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="30" cy="20" r="4"/><path d="M34 20H110V45"/><rect x="100" y="45" width="20" height="50"/><path d="M110 95V125"/><circle cx="110" cy="125" r="3" fill="currentColor"/><path d="M110 125H226"/><circle cx="230" cy="125" r="4"/><rect x="100" y="140" width="20" height="50" transform="translate(0,-10)"/><path d="M110 125V130M110 180V198M94 198H126M99 204H121M104 210H116"/></g><g fill="currentColor" font-size="13" font-family="inherit"><text x="20" y="12">V<tspan dy="3" font-size="10">in</tspan></text><text x="128" y="66" data-id="s1">R1</text><text x="128" y="160" data-id="s2">R2</text><text x="220" y="115">V<tspan dy="3" font-size="10">out</tspan></text><text x="128" y="118" font-size="11" data-id="s3"></text></g></svg>
<div class="t-form">
<label>Tension d&rsquo;entrée V<sub>in</sub><input type="text" data-id="vin" value="12"></label>
<label>Tension de sortie visée<input type="text" data-id="vout" value="3,3"></label>
<label>Série<select data-id="ser"><option value="E6">E6 (± 20 %)</option><option value="E12">E12 (± 10 %)</option><option value="E24" selected>E24 (± 5 %)</option><option value="E48">E48 (± 2 %)</option><option value="E96">E96 (± 1 %)</option><option value="E192">E192 (± 0,5 %)</option></select></label>
<label>R1 + R2 minimum<input type="text" data-id="rmin" value="1k"></label>
<label>R1 + R2 maximum<input type="text" data-id="rmax" value="1M"></label>
</div>
<p class="t-help">R1 entre V<sub>in</sub> et la sortie, R2 entre la sortie et la masse. La plage R1 + R2 fixe le courant consommé par le pont.</p>
<div class="t-wrap"><table class="t-table"><thead><tr><th>R1</th><th>R2</th><th>V<sub>out</sub></th><th>Erreur</th><th>Courant</th><th>V<sub>out</sub> pire cas</th></tr></thead><tbody data-id="res"></tbody></table></div>
<p class="t-err" data-id="err" hidden></p>
</div>
<div data-id="pz" hidden>
<svg class="t-svg h-sch" viewBox="0 0 360 200" role="img" aria-label="Schéma du régulateur Zener : RS en série, Zener et charge en parallèle sur la sortie"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="20" cy="40" r="4"/><path d="M24 40H60"/><rect x="60" y="30" width="56" height="20"/><path d="M116 40H330"/><circle cx="170" cy="40" r="3" fill="currentColor"/><circle cx="260" cy="40" r="3" fill="currentColor"/><circle cx="334" cy="40" r="4"/><path d="M170 40V92"/><path d="M156 92H184M156 92L152 86M184 92L188 98"/><path d="M170 92L156 118H184Z"/><path d="M170 118V160"/><path d="M260 40V72"/><rect x="250" y="72" width="20" height="50"/><path d="M260 122V160"/><path d="M170 160H260M215 160V172M199 172H231M204 178H226M209 184H221"/></g><g fill="currentColor" font-size="13" font-family="inherit"><text x="10" y="26">V<tspan dy="3" font-size="10">in</tspan></text><text x="62" y="70" data-id="z1">R<tspan dy="3" font-size="10">S</tspan></text><text x="150" y="110" text-anchor="end" data-id="z2">V<tspan dy="3" font-size="10">Z</tspan></text><text x="278" y="100">Charge</text><text x="318" y="26">V<tspan dy="3" font-size="10">out</tspan></text><text x="128" y="26" font-size="11" data-id="z3"></text></g></svg>
<div class="t-form">
<label>V<sub>in</sub> minimum<input type="text" data-id="zvmin" value="10"></label>
<label>V<sub>in</sub> maximum<input type="text" data-id="zvmax" value="14,4"></label>
<label>Tension Zener V<sub>Z</sub><input type="text" data-id="zvz" value="5,1" list="zlist"></label>
<label>Tolérance V<sub>Z</sub><select data-id="ztol"><option value="0.05">C : ± 5 %</option><option value="0.02">B : ± 2 %</option><option value="0.01">A : ± 1 %</option></select></label>
<label>Courant de charge min.<input type="text" data-id="zilmin" value="0"></label>
<label>Courant de charge max.<input type="text" data-id="zilmax" value="10m"></label>
<label>Courant Zener min. (≈ I<sub>ZT</sub>)<input type="text" data-id="zizmin" value="5m"></label>
<label>Résistance dynamique r<sub>Z</sub><input type="text" data-id="zrz" value="10"></label>
<label>Puissance de la Zener<select data-id="zptot"><option value="0.3">300 mW (SOT-23, BZX84)</option><option value="0.5" selected>500 mW (DO-35, BZX55/79)</option><option value="1">1 W (DO-41, 1N47xx)</option><option value="1.3">1,3 W (BZX85)</option><option value="5">5 W (1N53xx)</option></select></label>
<label>Série de R<sub>S</sub><select data-id="zser"><option value="E6">E6 (± 20 %)</option><option value="E12">E12 (± 10 %)</option><option value="E24" selected>E24 (± 5 %)</option><option value="E48">E48 (± 2 %)</option><option value="E96">E96 (± 1 %)</option><option value="E192">E192 (± 0,5 %)</option></select></label>
</div>
<datalist id="zlist"><option value="2,4"></option><option value="2,7"></option><option value="3"></option><option value="3,3"></option><option value="3,6"></option><option value="3,9"></option><option value="4,3"></option><option value="4,7"></option><option value="5,1"></option><option value="5,6"></option><option value="6,2"></option><option value="6,8"></option><option value="7,5"></option><option value="8,2"></option><option value="9,1"></option><option value="10"></option><option value="11"></option><option value="12"></option><option value="13"></option><option value="15"></option><option value="16"></option><option value="18"></option><option value="20"></option><option value="22"></option><option value="24"></option><option value="27"></option><option value="30"></option><option value="33"></option><option value="36"></option><option value="39"></option><option value="43"></option><option value="47"></option><option value="51"></option><option value="56"></option><option value="62"></option><option value="68"></option><option value="75"></option></datalist>
<p class="t-help">R<sub>S</sub> en série entre V<sub>in</sub> et la sortie, Zener entre la sortie et la masse, charge en parallèle sur la Zener. Courants : 10m = 10 mA. I<sub>Z</sub> min. et r<sub>Z</sub> (Z<sub>ZT</sub>) se lisent dans la fiche technique, au courant de test I<sub>ZT</sub>.</p>
<div class="t-out" data-id="zout"></div>
<div class="t-wrap"><table class="t-table"><thead><tr><th>Cas</th><th>V<sub>in</sub></th><th>Charge</th><th>Courant R<sub>S</sub></th><th>I<sub>Z</sub></th><th>P<sub>Z</sub></th><th>V<sub>out</sub> typ.</th></tr></thead><tbody data-id="zres"></tbody></table></div>
<ul class="t-help" data-id="zmsg"></ul>
<p class="t-err" data-id="zerr" hidden></p>
</div>
<p class="t-err" data-id="err" hidden></p>
<script src="data:text/javascript;charset=utf-8;base64,KGZ1bmN0aW9uKCl7CnZhciBUT09MPWRvY3VtZW50LmN1cnJlbnRTY3JpcHQ/ZG9jdW1lbnQuY3VycmVudFNjcmlwdC5wYXJlbnROb2RlOm51bGw7CmZ1bmN0aW9uIHEoaWQpe3JldHVybiBUT09MP1RPT0wucXVlcnlTZWxlY3RvcignW2RhdGEtaWQ9IicraWQrJyJdJyk6bnVsbDt9CnZhciBFQj17RTM6WzEwLDIyLDQ3XSxFNjpbMTAsMTUsMjIsMzMsNDcsNjhdLEUxMjpbMTAsMTIsMTUsMTgsMjIsMjcsMzMsMzksNDcsNTYsNjgsODJdLEUyNDpbMTAsMTEsMTIsMTMsMTUsMTYsMTgsMjAsMjIsMjQsMjcsMzAsMzMsMzYsMzksNDMsNDcsNTEsNTYsNjIsNjgsNzUsODIsOTFdfTsKWydFNDgnLCdFOTYnLCdFMTkyJ10uZm9yRWFjaChmdW5jdGlvbih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saWw6aWwsaToodmluLXZvKS9ycyxpejppeixwejp2byppeix2bzp2b307fQogUi5jYXNlcz1bWydWX2luIG1pbi4sIGNoYXJnZSBtYXguJyxwdChvLnZtaW4sby5pbG1heCldLFsnVl9pbiBtYXguLCBjaGFyZ2UgbWF4LicscHQoby52bWF4LG8uaWxtYXgpXSxbJ1ZfaW4gbWluLiwgY2hhcmdlIG1pbi4nLHB0KG8udm1pbixvLmlsbWluKV0sWydWX2luIG1heC4sIGNoYXJnZSBtaW4uIChwaXJlIGNhcyBaZW5lciknLHB0KG8udm1heCxvLmlsbWluKV1dOwogdmFyIHc9Ui5jYXNlc1szXVsxXTtSLml6bWF4PXcuaXo7Ui5wej12eiooMStvLnRvbCkqdy5pejtSLnBycz1NYXRoLnBvdyhvLnZtYXgtdnoqKDEtby50b2wpLDIpL3JzO1IucHJSYXRpbmc9UFIuZmlsdGVyKGZ1bmN0aW9uKHgpe3JldHVybiB4Pj0yKlIucHJzO30pWzBdfHxOYU47Ui5sb2FkPVIucHovby5wdG90OwogUi5paW49KG8udm1heC12eikvcnM7Ui5lZmY9by5pbG1heD4wP3Z6Km8uaWxtYXgvKCgoby52bWluK28udm1heCkvMikqUi5jYXNlc1swXVsxXS5pKTowOwogUi5saW5lPXJ6Lyhycytyeik7Ui5scmVnPXJ6KnJzLyhycytyeik7CiBSLnZsbz12eiooMS1vLnRvbCkrTWF0aC5taW4uYXBwbHkobnVsbCxSLmNhc2VzLm1hcChmdW5jdGlvbihjKXtyZXR1cm4gY1sxXS52by12ejt9KSk7Ui52aGk9dnoqKDErby50b2wpK01hdGgubWF4LmFwcGx5KG51bGwsUi5jYXNlcy5tYXAoZnVuY3Rpb24oYyl7cmV0dXJuIGNbMV0udm8tdno7fSkpOwogdmFyIGl6bG89Ui5jYXNlc1swXVsxXS5pejtpZihpemxvPG8uaXptaW4qMC45OTkpUi5tc2cucHVzaChbJ2JhZCcsJ0F2ZWMgUl9TID0gJytzaShycywnzqknLDMpKycsIGxlIGNvdX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D48L3RyPic7fSkuam9pbignJyk7Cn0pOwp9KSgpOw=="></script>
</div>



<h2 class="wp-block-heading">La formule</h2>



<pre class="wp-block-code"><code>Vout = Vin × R2 / (R1 + R2)
R1 = R2 × (Vin / Vout − 1)</code></pre>



<p class="wp-block-paragraph">Pour chaque valeur R2 de la série, l&rsquo;outil calcule la valeur R1 idéale et teste les deux valeurs normalisées qui l&rsquo;encadrent. Les paires sont classées par erreur sur la tension de sortie ; à erreur égale, la paire dont le courant est le plus proche du milieu de la plage demandée passe devant.</p>



<h2 class="wp-block-heading">Le pire cas</h2>



<p class="wp-block-paragraph">Avec des résistances à ± <em>t</em>, la sortie est la plus basse quand R1 est au maximum et R2 au minimum, et inversement :</p>



<pre class="wp-block-code"><code>Vout min = Vin × R2(1 − t) / (R1(1 + t) + R2(1 − t))
Vout max = Vin × R2(1 + t) / (R1(1 − t) + R2(1 + t))</code></pre>



<p class="wp-block-paragraph">Une paire E24 « exacte » à 0,03 % près reste donc à quelques pour cent près en pratique : pour une référence précise, il faut une série fine (E96, E192) ou un ajustable.</p>



<h2 class="wp-block-heading">Limites</h2>



<ul class="wp-block-list">
<li>La charge branchée sur la sortie est en parallèle avec R2 : elle doit être grande devant R2, sinon la tension chute. Pour un convertisseur analogique-numérique, on vise une impédance de pont compatible avec le temps d&rsquo;échantillonnage de son entrée.</li>


<li>Un pont n&rsquo;est pas une alimentation : pour fournir du courant, il faut un régulateur.</li>
</ul>



<h2 class="wp-block-heading">Version Zener : une tension fixe qui ne dépend plus de V<sub>in</sub></h2>



<p class="wp-block-paragraph">Un pont de résistances divise : si V<sub>in</sub> varie de 20 %, la sortie aussi. En remplaçant R2 par une diode Zener polarisée en inverse, la sortie reste proche de V<sub>Z</sub> tant que la Zener conduit assez. C&rsquo;est le régulateur le plus simple qui soit, utile pour une référence, une alimentation de quelques milliampères ou une protection d&rsquo;entrée.</p>



<pre class="wp-block-code"><code>R_S max = (Vin min − V_Z) / (I_charge max + I_Z min)
I_Z max = (Vin max − V_Z) / R_S − I_charge min
P_Z     = V_Z × I_Z max
P_RS    = (Vin max − V_Z)² / R_S</code></pre>



<p class="wp-block-paragraph">L&rsquo;outil prend la plus grande valeur normalisée sous R<sub>S</sub> max : la Zener garde au moins I<sub>Z</sub> min. dans le cas le plus défavorable (entrée basse, charge maximale), et le courant gaspillé reste le plus faible possible. Il recalcule ensuite les quatre coins de fonctionnement avec la résistance dynamique r<sub>Z</sub> de la diode : V<sub>Z</sub> est donnée au courant de test I<sub>ZT</sub>, et la tension monte de r<sub>Z</sub> × (I<sub>Z</sub> − I<sub>ZT</sub>) au-delà.</p>



<h2 class="wp-block-heading">Ce qu&rsquo;il faut surveiller</h2>



<ul class="wp-block-list">
<li><strong>La charge débranchée</strong> : tout le courant de R<sub>S</sub> passe alors dans la Zener. C&rsquo;est ce cas, combiné à V<sub>in</sub> maximale, qui fixe sa puissance, pas le fonctionnement nominal.</li>


<li><strong>La puissance nominale</strong> d&rsquo;une Zener est donnée à 25 °C, souvent sur une carte de test généreuse : au-delà de la moitié, regardez la courbe de déclassement.</li>


<li><strong>La régulation</strong> vaut r<sub>Z</sub> / (R<sub>S</sub> + r<sub>Z</sub>) : avec r<sub>Z</sub> = 10 Ω et R<sub>S</sub> = 300 Ω, 3 % des variations d&rsquo;entrée passent en sortie. Une Zener régule, elle ne stabilise pas comme un régulateur intégré.</li>


<li><strong>La tension</strong> : sous 4,7 V, le coude est mou et la diode fuit bien avant V<sub>Z</sub> ; entre 5 et 6,2 V, le coefficient de température passe près de zéro ; au-delà, il devient positif (environ +0,1 %/K).</li>


<li><strong>Le rendement</strong> est mauvais par principe : au-delà de quelques dizaines de milliampères, un transistor ballast (Zener sur la base, sortie sur l&rsquo;émetteur, V<sub>Z</sub> − 0,65 V) ou un régulateur LDO font mieux. Pour une référence précise, une référence ajustable (TL431) ou à bande interdite remplace avantageusement la Zener.</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://amaury-laurent.fr/outil-diviseur-de-tension/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Écran multifonction pour simulateur de vol (MFD)</title>
		<link>https://amaury-laurent.fr/ecran-multifonction-pour-simulateur-de-vol-mfd/</link>
					<comments>https://amaury-laurent.fr/ecran-multifonction-pour-simulateur-de-vol-mfd/#respond</comments>
		
		<dc:creator><![CDATA[Amaury LAURENT]]></dc:creator>
		<pubDate>Sat, 02 Oct 2021 19:46:51 +0000</pubDate>
				<category><![CDATA[Réalisations]]></category>
		<category><![CDATA[Électronique]]></category>
		<category><![CDATA[Microcontrôleurs]]></category>
		<guid isPermaLink="false">https://amaury-laurent.fr/?p=1271</guid>

					<description><![CDATA[Introduction L&#8217;accès à certaines fonctionnalités embarqués sur un avion de combat (navigation, systèmes d&#8217;armes, désignateur, &#8230;) passe par un écran multifonctions (MultiFunction Display). Bien que certains simulateurs proposent un cockpit cliquable, il est toujours embêtant de devoir orienter le champ de vision à chaque fois que l&#8217;on souhaite effectuer une action. Du coup, l&#8217;utilisation d&#8217;un [&#8230;]]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>L&rsquo;accès à certaines fonctionnalités embarqués sur un avion de combat (navigation, systèmes d&rsquo;armes, désignateur, &#8230;) passe par un écran multifonctions (<em><strong>M</strong>ulti<strong>F</strong>unction <strong>D</strong>isplay</em>). Bien que certains simulateurs proposent un cockpit cliquable, il est toujours embêtant de devoir orienter le champ de vision à chaque fois que l&rsquo;on souhaite effectuer une action. Du coup, l&rsquo;utilisation d&rsquo;un périphérique matériel augmente l&rsquo;immersion et améliore l&rsquo;expérience de jeu.</p>
<p><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/Screen_200617_160247-scaled.jpg"><img decoding="async" class="aligncenter wp-image-1275 size-large" src="https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/Screen_200617_160247.jpg" alt="Écran multifonction pour simulateur de vol (MFD)" width="1024" height="576" srcset="https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/Screen_200617_160247-scaled.jpg 1024w, https://ml9zfxsqktal.i.optimole.com/w:300/h:169/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/Screen_200617_160247-scaled.jpg 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:432/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/Screen_200617_160247-scaled.jpg 768w, https://ml9zfxsqktal.i.optimole.com/w:1536/h:864/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/Screen_200617_160247-scaled.jpg 1536w, https://ml9zfxsqktal.i.optimole.com/w:1920/h:1080/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/Screen_200617_160247-scaled.jpg 2048w" sizes="(max-width: 1000px) 100vw, 1000px" /></a></p>
<p>Les solutions commerciales existantes (<a href="https://www.thrustmaster.com/fr_FR/produits/mfd-cougar-pack" target="_blank" rel="noopener">ThrustMaster Cougar Pack</a>) ne m&rsquo;ayant pas impressionné, j&rsquo;ai décidé de concevoir un écran multifonction fonctionnant sur USB.</p>
<p>Le projet que je présente est conçu pour fonctionner avec DCS. Cependant, comme il utilise un écran HDMI et des contrôles type joystick, il n&rsquo;y a pas de raisons pour que ça ne marche pas avec d&rsquo;autres simulateurs.</p>
<h2>Principes de fonctionnement</h2>
<p>L&rsquo;idée consiste à configurer DCS pour envoyer l&rsquo;image des MFD gauche et droite sur deux écrans supplémentaires. Pour ce faire, il faut créer un fichier de configuration dans le dossier MonitorSetup du jeu et ajouter ces deux paramètres (il faut bien évidemment ajuster les offsets pour tomber dans les bons écrans) :</p>
<p><div class="snippetcpt-wrap" id="snippet-1272" data-id="1272" data-edit="" data-copy="/tag/electronique/feed/?snippet=813ace0e85&#038;id=1272" data-fullscreen="https://amaury-laurent.fr/code-snippets/mfd_display-lua/?full-screen=1">
				<pre class="prettyprint linenums lang-lua" title="MFD_Display.lua">_  = function(p) return p; end;
name = _('MFD_Display');
Description = 'Config maison'
Viewports =
{
     Center =
     {
          x = 1920;
          y = 0;
          width  = 1920;
          height = 1080;
          viewDx = 0;
          viewDy = 0;
          aspect = 1.6;
     }
}

LEFT_MFCD =
{
    x = 1920*2+(1024/2-768/2);
    y = 0;
    width  = 768;
    height = 768;
}

RIGHT_MFCD =
{
    x = 1920*2+1024+(1024/2-768/2);
    y = 0;
    width  = 768;
    height = 768;
}

UIMainView = Viewports.Center
GU_MAIN_VIEWPORT = Viewports.Center</pre>
			</div></p>
<p>L&rsquo;assignation des touches se fait simplement dans DCS, comme n&rsquo;importe quel autre périphérique d&rsquo;entrée.</p>
<p>Pour l&rsquo;affichage, j&rsquo;ai choisi un écran LCD 4:3 de 8 pouces. Il a une résolution de 1024&#215;768 :</p>
<p>​​<a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/H7722be4a6fc64bfd84d52e6e3e1e65505.png"><img decoding="async" class="aligncenter wp-image-1299 size-full" src="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/H7722be4a6fc64bfd84d52e6e3e1e65505.png" alt="Écran multifonction pour simulateur de vol (MFD)" width="1000" height="1333" srcset="https://ml9zfxsqktal.i.optimole.com/w:810/h:1080/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/H7722be4a6fc64bfd84d52e6e3e1e65505.png 1000w, https://ml9zfxsqktal.i.optimole.com/w:225/h:300/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/H7722be4a6fc64bfd84d52e6e3e1e65505.png 225w, https://ml9zfxsqktal.i.optimole.com/w:768/h:1024/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/H7722be4a6fc64bfd84d52e6e3e1e65505.png 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></a></p>
<p>Son prix et sa taille en font une solution intéressante : <a href="https://fr.aliexpress.com/item/32325920866.html?spm=a2g0s.9042311.0.0.d0dd6c37EdzyS4​" target="_blank" rel="noopener">https://fr.aliexpress.com/item/32325920866.html?spm=a2g0s.9042311.0.0.d0dd6c37EdzyS4​</a></p>
<h2>L&rsquo;électronique</h2>
<h3>Conception</h3>
<p>Pour simplifier l&rsquo;intégration matérielle, j&rsquo;ai choisi d&rsquo;utiliser un petit microcontrôleur de chez Microchip capable de faire de l&rsquo;USB et de l&rsquo;I2C : le PIC18F25K50. Il communique avec 4 cartes filles qui s&rsquo;occupent chacune de 7 boutons.</p>
<p>La séparation en plusieurs cartes répond à deux impératifs :</p>
<ol>
<li>Rentrer dans une conception Autodesk EAGLE version gratuite</li>
<li>Diminuer les coûts de fabrication en réduisant la surface de circuit imprimé</li>
</ol>
<p>La carte mère sera montée au dos du MFD :<a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/carte_mere.png"><img decoding="async" class="aligncenter wp-image-1292 size-full" src="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/carte_mere.png" alt="Écran multifonction pour simulateur de vol (MFD)" width="766" height="468" srcset="https://ml9zfxsqktal.i.optimole.com/w:766/h:468/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/carte_mere.png 766w, https://ml9zfxsqktal.i.optimole.com/w:300/h:183/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/carte_mere.png 300w" sizes="(max-width: 766px) 100vw, 766px" /></a></p>
<p>Deux cartes en angle et deux cartes droites permettent de former un cadre autour de l&rsquo;écran LCD :</p>
<p>​<a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/carte_l.png"><img decoding="async" class="aligncenter size-large wp-image-1291" src="https://ml9zfxsqktal.i.optimole.com/w:1024/h:652/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/carte_l.png" alt="Écran multifonction pour simulateur de vol (MFD)" width="1024" height="652" srcset="https://ml9zfxsqktal.i.optimole.com/w:1024/h:652/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/carte_l.png 1024w, https://ml9zfxsqktal.i.optimole.com/w:300/h:191/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/carte_l.png 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:489/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/carte_l.png 768w, https://ml9zfxsqktal.i.optimole.com/w:1053/h:670/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/carte_l.png 1053w" sizes="(max-width: 1000px) 100vw, 1000px" /></a> <a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/carte_i.png"><img decoding="async" class="aligncenter size-full wp-image-1290" src="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/carte_i.png" alt="Écran multifonction pour simulateur de vol (MFD)" width="989" height="569" srcset="https://ml9zfxsqktal.i.optimole.com/w:989/h:569/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/carte_i.png 989w, https://ml9zfxsqktal.i.optimole.com/w:300/h:173/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/carte_i.png 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:442/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/carte_i.png 768w" sizes="(max-width: 989px) 100vw, 989px" /></a>​</p>
<p>&nbsp;</p>
<h3>La carte mère</h3>
<p>La carte mère du MFD se contente de faire le lien entre les différentes cartes filles (I2C) et le PC (USB). Le schéma est donc des plus simples, il reprend celui de la <a href="https://amaury-laurent.fr/boite-a-boutons-pour-simulateurs/" target="_blank" rel="noopener">boite à boutons</a> ou de <a href="https://amaury-laurent.fr/interface-usb-hid/" target="_blank" rel="noopener">l&rsquo;interface HID</a>, mais avec un composant différent :</p>
<p><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/schema_carte_mere.png"><img decoding="async" class="aligncenter wp-image-1289 size-large" src="https://ml9zfxsqktal.i.optimole.com/w:1024/h:437/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/schema_carte_mere.png" alt="Écran multifonction pour simulateur de vol (MFD)" width="1024" height="437" srcset="https://ml9zfxsqktal.i.optimole.com/w:1024/h:437/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/schema_carte_mere.png 1024w, https://ml9zfxsqktal.i.optimole.com/w:300/h:128/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/schema_carte_mere.png 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:328/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/schema_carte_mere.png 768w, https://ml9zfxsqktal.i.optimole.com/w:1536/h:655/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/schema_carte_mere.png 1536w, https://ml9zfxsqktal.i.optimole.com/w:1920/h:819/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/schema_carte_mere.png 2048w" sizes="(max-width: 1000px) 100vw, 1000px" /></a>​On retrouve une horloge, un circuit de reset, le connecteur USB, un connecteur pour l&rsquo;I2C et un connecteur de programmation. Pour changer mes habitudes, j&rsquo;ai réalisé mes cartes avec des composants à montage en surface (CMS) :<br />
<a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/pcb_carte_mere.png"><img decoding="async" class="aligncenter wp-image-1296 size-full" src="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/pcb_carte_mere.png" alt="Écran multifonction pour simulateur de vol (MFD)" width="755" height="465" srcset="https://ml9zfxsqktal.i.optimole.com/w:755/h:465/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/pcb_carte_mere.png 755w, https://ml9zfxsqktal.i.optimole.com/w:300/h:185/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/pcb_carte_mere.png 300w" sizes="(max-width: 755px) 100vw, 755px" /></a></p>
<h3>Les cartes filles</h3>
<p>Bien que 2 formes différentes soient nécessaires, elles ont toutes le même schéma (à la différence de l&rsquo;adresse). Il s&rsquo;agit d&rsquo;un multiplexeur 8 entrées tout ou rien vers I2C MCP23008. Les résistances de tirages sont intégrées dans la puce. Les cartes sont adressées par un pont à souder pour le bit de poids faible et câblé en dur à 1 pour les cartes en L (0 pour les cartes en I).</p>
<p><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/schema_carte_boutons.png"><img decoding="async" class="aligncenter wp-image-1297 size-large" src="https://ml9zfxsqktal.i.optimole.com/w:1024/h:280/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/schema_carte_boutons.png" alt="Écran multifonction pour simulateur de vol (MFD)" width="1024" height="280" srcset="https://ml9zfxsqktal.i.optimole.com/w:1024/h:280/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/schema_carte_boutons.png 1024w, https://ml9zfxsqktal.i.optimole.com/w:300/h:82/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/schema_carte_boutons.png 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:210/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/schema_carte_boutons.png 768w, https://ml9zfxsqktal.i.optimole.com/w:1536/h:419/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/schema_carte_boutons.png 1536w, https://ml9zfxsqktal.i.optimole.com/w:1920/h:524/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/schema_carte_boutons.png 2048w" sizes="(max-width: 1000px) 100vw, 1000px" /></a></p>
<p>Deux connecteurs I2C permettent de former une chaine avec les 4 cartes. Un troisième permet de relier la carte mère sur l&rsquo;une des cartes filles.</p>
<p>La configuration des boutons à bascules présents aux 4 coins du MFD oblige à avoir deux formes de cartes:</p>
<p><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/pcb_carte_l.png"><img decoding="async" class="aligncenter size-large wp-image-1295" src="https://ml9zfxsqktal.i.optimole.com/w:1024/h:299/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/pcb_carte_l.png" alt="Écran multifonction pour simulateur de vol (MFD)" width="1024" height="299" srcset="https://ml9zfxsqktal.i.optimole.com/w:1024/h:299/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/pcb_carte_l.png 1024w, https://ml9zfxsqktal.i.optimole.com/w:300/h:88/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/pcb_carte_l.png 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:224/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/pcb_carte_l.png 768w, https://ml9zfxsqktal.i.optimole.com/w:1536/h:448/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/pcb_carte_l.png 1536w, https://ml9zfxsqktal.i.optimole.com/w:1872/h:546/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/pcb_carte_l.png 1872w" sizes="(max-width: 1000px) 100vw, 1000px" /></a>​</p>
<p><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/pcb_carte_i.png"><img decoding="async" class="aligncenter size-large wp-image-1294" src="https://ml9zfxsqktal.i.optimole.com/w:1024/h:324/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/pcb_carte_i.png" alt="Écran multifonction pour simulateur de vol (MFD)" width="1024" height="324" srcset="https://ml9zfxsqktal.i.optimole.com/w:1024/h:324/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/pcb_carte_i.png 1024w, https://ml9zfxsqktal.i.optimole.com/w:300/h:95/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/pcb_carte_i.png 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:243/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/pcb_carte_i.png 768w, https://ml9zfxsqktal.i.optimole.com/w:1536/h:487/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/pcb_carte_i.png 1536w, https://ml9zfxsqktal.i.optimole.com/w:1638/h:519/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/pcb_carte_i.png 1638w" sizes="(max-width: 1000px) 100vw, 1000px" /></a>​</p>
<p>Les dimensions sont adaptées à la taille de l&rsquo;écran de 8 pouces et au boitier imprimé en 3D dessiné tout spécialement.</p>
<h3>Réalisation</h3>
<p>J&rsquo;ai sous-traité la fabrication des PCB (double couches) à <a href="https://www.nextpcb.com/" target="_blank" rel="noopener">NextPCB</a>.</p>
<p>Les soudures des composants CMS sont réalisées au fer à souder, avec une panne fine. Pour rendre cela possible, j&rsquo;ai choisi des boitiers SOIC (gros composants CMS, pas de 1.27mm) et des formats 0805 pour les résistances et condensateurs. Finalement, le composant le plus petit et le plus difficile à souder est la LED indiquant la mise sous tension.</p>
<p>NB : une bonne pince brucelles est nécessaire !</p>
<h2><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_105009-scaled.jpg"><img decoding="async" class="aligncenter wp-image-1276 size-large" src="https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_105009.jpg" alt="Écran multifonction pour simulateur de vol (MFD)" width="1024" height="576" srcset="https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_105009-scaled.jpg 1024w, https://ml9zfxsqktal.i.optimole.com/w:300/h:169/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_105009-scaled.jpg 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:432/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_105009-scaled.jpg 768w, https://ml9zfxsqktal.i.optimole.com/w:1536/h:864/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_105009-scaled.jpg 1536w, https://ml9zfxsqktal.i.optimole.com/w:1920/h:1080/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_105009-scaled.jpg 2048w" sizes="(max-width: 1000px) 100vw, 1000px" /></a> <a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_105102-scaled.jpg"><img decoding="async" class="aligncenter wp-image-1277 size-large" src="https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_105102.jpg" alt="Écran multifonction pour simulateur de vol (MFD)" width="1024" height="576" srcset="https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_105102-scaled.jpg 1024w, https://ml9zfxsqktal.i.optimole.com/w:300/h:169/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_105102-scaled.jpg 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:432/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_105102-scaled.jpg 768w, https://ml9zfxsqktal.i.optimole.com/w:1536/h:864/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_105102-scaled.jpg 1536w, https://ml9zfxsqktal.i.optimole.com/w:1920/h:1080/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_105102-scaled.jpg 2048w" sizes="(max-width: 1000px) 100vw, 1000px" /></a> <a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_185658-scaled.jpg"><img decoding="async" class="aligncenter wp-image-1287 size-large" src="https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_185658.jpg" alt="Écran multifonction pour simulateur de vol (MFD)" width="1024" height="576" srcset="https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_185658-scaled.jpg 1024w, https://ml9zfxsqktal.i.optimole.com/w:300/h:169/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_185658-scaled.jpg 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:432/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_185658-scaled.jpg 768w, https://ml9zfxsqktal.i.optimole.com/w:1536/h:864/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_185658-scaled.jpg 1536w, https://ml9zfxsqktal.i.optimole.com/w:1920/h:1080/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_185658-scaled.jpg 2048w" sizes="(max-width: 1000px) 100vw, 1000px" /></a> <a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_185704-scaled.jpg"><img decoding="async" class="aligncenter wp-image-1288 size-large" src="https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_185704.jpg" alt="Écran multifonction pour simulateur de vol (MFD)" width="1024" height="576" srcset="https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_185704-scaled.jpg 1024w, https://ml9zfxsqktal.i.optimole.com/w:300/h:169/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_185704-scaled.jpg 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:432/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_185704-scaled.jpg 768w, https://ml9zfxsqktal.i.optimole.com/w:1536/h:864/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_185704-scaled.jpg 1536w, https://ml9zfxsqktal.i.optimole.com/w:1920/h:1080/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_185704-scaled.jpg 2048w" sizes="(max-width: 1000px) 100vw, 1000px" /></a>Intégration mécanique</h2>
<p>J&rsquo;ai fait découper au LASER des tôles d&rsquo;inox pour réaliser les faces avant (<a href="https://www.metal-laser.com/" target="_blank" rel="noopener">https://www.metal-laser.com/</a>). Le boitier plastique qui accueille ​les cartes filles ainsi que les différentes touches sont imprimés en 3D. La conception mécanique et l&rsquo;intégration des cartes électroniques a été réalisée à l&rsquo;aide <a href="https://www.autodesk.fr/products/fusion-360/personal" target="_blank" rel="noopener">Fusion 360</a>. Cet outil permet de facilement faire converger les CAO électroniques et mécaniques.</p>
<p><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/montage.png"><img decoding="async" class="aligncenter wp-image-1293 size-full" src="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/montage.png" alt="Écran multifonction pour simulateur de vol (MFD)" width="949" height="627" srcset="https://ml9zfxsqktal.i.optimole.com/w:949/h:627/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/montage.png 949w, https://ml9zfxsqktal.i.optimole.com/w:300/h:198/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/montage.png 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:507/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/montage.png 768w" sizes="(max-width: 949px) 100vw, 949px" /></a></p>
<p>Il est important de pouvoir vérifier la profondeur du boitier plastique, notamment pour que les boutons poussoirs tombent en dessous des touches plastiques.<br />
<a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_181757-scaled.jpg"><img decoding="async" class="aligncenter wp-image-1279 size-large" src="https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_181757.jpg" alt="Écran multifonction pour simulateur de vol (MFD)" width="1024" height="576" srcset="https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_181757-scaled.jpg 1024w, https://ml9zfxsqktal.i.optimole.com/w:300/h:169/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_181757-scaled.jpg 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:432/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_181757-scaled.jpg 768w, https://ml9zfxsqktal.i.optimole.com/w:1536/h:864/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_181757-scaled.jpg 1536w, https://ml9zfxsqktal.i.optimole.com/w:1920/h:1080/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_181757-scaled.jpg 2048w" sizes="(max-width: 1000px) 100vw, 1000px" /></a> <a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_181811-scaled.jpg"><img decoding="async" class="aligncenter wp-image-1280 size-large" src="https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_181811.jpg" alt="Écran multifonction pour simulateur de vol (MFD)" width="1024" height="576" srcset="https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_181811-scaled.jpg 1024w, https://ml9zfxsqktal.i.optimole.com/w:300/h:169/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_181811-scaled.jpg 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:432/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_181811-scaled.jpg 768w, https://ml9zfxsqktal.i.optimole.com/w:1536/h:864/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_181811-scaled.jpg 1536w, https://ml9zfxsqktal.i.optimole.com/w:1920/h:1080/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20210802_181811-scaled.jpg 2048w" sizes="(max-width: 1000px) 100vw, 1000px" /></a>​</p>
<p>L&rsquo;écran LCD est fixé (scotché ou collé) à l&rsquo;arrière du cadre. La face avant est également collée au boitier plastique.</p>
<p><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_183955-scaled.jpg"><img decoding="async" class="aligncenter wp-image-1282 size-large" src="https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_183955.jpg" alt="Écran multifonction pour simulateur de vol (MFD)" width="1024" height="576" srcset="https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_183955-scaled.jpg 1024w, https://ml9zfxsqktal.i.optimole.com/w:300/h:169/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_183955-scaled.jpg 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:432/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_183955-scaled.jpg 768w, https://ml9zfxsqktal.i.optimole.com/w:1536/h:864/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_183955-scaled.jpg 1536w, https://ml9zfxsqktal.i.optimole.com/w:1920/h:1080/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_183955-scaled.jpg 2048w" sizes="(max-width: 1000px) 100vw, 1000px" /></a></p>
<h2>Le logiciel</h2>
<p>Une fois n&rsquo;est pas coutume, le code du microcontrôleur a été écrit en C à l&rsquo;aide de MikroC. Outre l&rsquo;initialisation de la puce et le driver des multiplexeurs, la boucle principale se contente de lire les 4 ports d&rsquo;entré sur l&rsquo;I2C et d&rsquo;envoyer le rapport USB HID.</p>
<p><div class="snippetcpt-wrap" id="snippet-1310" data-id="1310" data-edit="" data-copy="/tag/electronique/feed/?snippet=813ace0e85&#038;id=1310" data-fullscreen="https://amaury-laurent.fr/code-snippets/mfd-main/?full-screen=1">
				<pre class="prettyprint linenums lang-c_cpp" title="MFD Main">/**
* Version IO Expander MCP23018
**/

#include &quot;MCP23008.h&quot;

#define USB_BUFFER_LEN       4
#define NB_MCP               4

unsigned char readbuff[USB_BUFFER_LEN] absolute 0x500;
unsigned char writebuff[USB_BUFFER_LEN] absolute 0x540;

int reset_mcp23017 = 1;

void interrupt() {
    USB_Interrupt_Proc();        // USB servicing is done inside the interrupt
    USBIF_bit = 0;
}

// define callback function
void I2C1_TimeoutCallback(char errorCode) {
   if (errorCode == _I2C_TIMEOUT_RD) {
     //LED0 = 1;
     // do something if timeout is caused during read
   }

   if (errorCode == _I2C_TIMEOUT_WR) {
     //LED1 = 1;
     // do something if timeout is caused during write
   }

   if (errorCode == _I2C_TIMEOUT_START) {
     //LED0 = 1;
     // do something if timeout is caused during start
   }

   if (errorCode == _I2C_TIMEOUT_REPEATED_START) {
     //LED1 = 1;
     // do something if timeout is caused during repeated start
   }
   
   reset_mcp23017 = 1;
}
          
void main() {
    int i = 0;
    int cpt = 0;
    
    uint16_t temp;

    ANSELA = 0;
    ANSELB = 0;
    ANSELC = 0;
    SLRCON = 0;

    ADCON1 |= 0x0F;                         // Configure all ports with analog function as digital
    CM1CON0 |= 7;                           // Disable comparators

    TRISB = 0xff;
    TRISB.f2 = 0;
    LATB.f2 = 1;

    I2C1_Init(400000);         // initialize I2C communication
    
    // set timeout period and callback function
    I2C1_SetTimeoutCallback(40000, I2C1_TimeoutCallback);

    reset_mcp23017 = 1;

    FSEN_bit = 1;
    UPUEN_bit = 1;
    HID_Enable(&amp;readbuff,&amp;writebuff);
    
    // Enable USB device interrupt
    IPEN_bit = 1;
    USBIP_bit = 1;
    USBIE_bit = 1;
    GIEH_bit = 1;

    while (1) {
        if (reset_mcp23017) {
           LATB.f2 = 0;       //RESET MCP23017
           Delay_ms(250);
           LATB.f2 = 1;
           Delay_ms(250);

           for (i=0; i&lt;NB_MCP; i++) {
            MCPreset(i);
            Delay_ms(5);
           }
          reset_mcp23017 = 0;
        }

        memset(writebuff, 0x00, USB_BUFFER_LEN);
    
        for (i=0; i&lt;NB_MCP; i++) {
          temp = MCPread(i, GPIO);
          writebuff[i] = ~temp;
          Delay_ms(5);
          if(reset_mcp23017) break;
        }
        
        HID_Write(writebuff, USB_BUFFER_LEN);
        Delay_ms(5);
    }
}</pre>
			</div></p>
<p>&nbsp;</p>
<h2>Le premier test</h2>
<p>Un dock USB 3.1 peut servir pour gérer le HDMI et l&rsquo;USB simultanément, ce qui permet d&rsquo;avoir une unique prise USB occupée sur le PC. Si la configuration de DCS est correcte et que l&rsquo;écran est bien détecté, voici le résultat que l&rsquo;on peut obtenir :</p>
<p><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_184607-scaled.jpg"><img decoding="async" class="aligncenter wp-image-1283 size-large" src="https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_184607.jpg" alt="Écran multifonction pour simulateur de vol (MFD)" width="1024" height="576" srcset="https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_184607-scaled.jpg 1024w, https://ml9zfxsqktal.i.optimole.com/w:300/h:169/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_184607-scaled.jpg 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:432/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_184607-scaled.jpg 768w, https://ml9zfxsqktal.i.optimole.com/w:1536/h:864/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_184607-scaled.jpg 1536w, https://ml9zfxsqktal.i.optimole.com/w:1920/h:1080/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_184607-scaled.jpg 2048w" sizes="(max-width: 1000px) 100vw, 1000px" /></a> <a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_184704-scaled.jpg"><img decoding="async" class="aligncenter wp-image-1284 size-large" src="https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_184704.jpg" alt="Écran multifonction pour simulateur de vol (MFD)" width="1024" height="576" srcset="https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_184704-scaled.jpg 1024w, https://ml9zfxsqktal.i.optimole.com/w:300/h:169/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_184704-scaled.jpg 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:432/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_184704-scaled.jpg 768w, https://ml9zfxsqktal.i.optimole.com/w:1536/h:864/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_184704-scaled.jpg 1536w, https://ml9zfxsqktal.i.optimole.com/w:1920/h:1080/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_184704-scaled.jpg 2048w" sizes="(max-width: 1000px) 100vw, 1000px" /></a> <a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_184954-scaled.jpg"><img decoding="async" class="aligncenter wp-image-1286 size-large" src="https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_184954.jpg" alt="Écran multifonction pour simulateur de vol (MFD)" width="1024" height="576" srcset="https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_184954-scaled.jpg 1024w, https://ml9zfxsqktal.i.optimole.com/w:300/h:169/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_184954-scaled.jpg 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:432/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_184954-scaled.jpg 768w, https://ml9zfxsqktal.i.optimole.com/w:1536/h:864/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_184954-scaled.jpg 1536w, https://ml9zfxsqktal.i.optimole.com/w:1920/h:1080/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2021/10/20211002_184954-scaled.jpg 2048w" sizes="(max-width: 1000px) 100vw, 1000px" /></a></p>
<p>La même chose en vidéo :</p>
<p>&nbsp;</p>
<p><iframe title="Écran multifonction pour DCS World" width="500" height="281" src="https://www.youtube.com/embed/rAcCKd2z3Fs?feature=oembed&#038;enablejsapi=1" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></p>
<p>&nbsp;</p>
<h2>Conclusion</h2>
<p>Il me reste encore à imprimer des touches propres et à finir l&rsquo;état de surface de la face avant. Pour le reste, le rendu est vraiment sympa. Reste à tester réellement sur une session de pilotage plus longue.</p>
<aside class="ael-tools">
<p class="ael-tools-t">Outils en ligne associés</p>
<ul>
<li><a href="https://amaury-laurent.fr/assistant-descripteur-usb-hid/">Générateur de descripteur USB HID</a> : construire et vérifier un descripteur de rapport (joystick, boutons, composite) et ses structures C</li>
</ul>
</aside>
]]></content:encoded>
					
					<wfw:commentRss>https://amaury-laurent.fr/ecran-multifonction-pour-simulateur-de-vol-mfd/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Code couleur des résistances : calculateur</title>
		<link>https://amaury-laurent.fr/code-couleur-resistance/</link>
					<comments>https://amaury-laurent.fr/code-couleur-resistance/#respond</comments>
		
		<dc:creator><![CDATA[Amaury LAURENT]]></dc:creator>
		<pubDate>Tue, 27 Nov 2018 19:11:48 +0000</pubDate>
				<category><![CDATA[Outils]]></category>
		<category><![CDATA[Électronique]]></category>
		<guid isPermaLink="false">http://amaury-laurent.fr/?p=997</guid>

					<description><![CDATA[Valeur normalisée la plus proche, anneaux de couleur dessinés, tolérance en ohms et marquage CMS, pour les séries E3 à E192.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Saisissez la valeur dont vous avez besoin et la série de résistances dont vous disposez : l&rsquo;outil donne la valeur normalisée la plus proche, ses anneaux de couleur, la plage de tolérance en ohms et le marquage des résistances CMS.</p>



<div class="rcalc" id="rcalc">
<style>
.rcalc{--rc-border:#cfd8cc;--rc-bg:#fff;--rc-muted:#5d6862;border:1px solid var(--rc-border);border-radius:12px;background:var(--rc-bg);padding:1.25rem 1.25rem 1rem;margin:1.5rem 0;font-variant-numeric:tabular-nums}
.rcalc .rc-form{display:flex;flex-wrap:wrap;gap:.75rem 1rem;align-items:flex-end}
.rcalc label{display:flex;flex-direction:column;gap:.3rem;font-size:.85rem;font-weight:600;color:var(--rc-muted)}
.rcalc input,.rcalc select{font:inherit;font-size:1.05rem;padding:.5rem .65rem;border:1px solid var(--rc-border);border-radius:8px;background:#fff;color:#18211C;min-width:9rem}
.rcalc input:focus,.rcalc select:focus{outline:2px solid #2E7D12;outline-offset:1px}
.rcalc .rc-svg{display:block;width:100%;max-width:560px;height:auto;margin:1.25rem auto .5rem}
.rcalc .rc-out{display:grid;grid-template-columns:repeat(auto-fit,minmax(11rem,1fr));gap:.75rem;margin-top:.5rem}
.rcalc .rc-card{border:1px solid var(--rc-border);border-radius:10px;padding:.7rem .85rem}
.rcalc .rc-k{font-size:.78rem;text-transform:uppercase;letter-spacing:.05em;color:var(--rc-muted);margin:0 0 .25rem}
.rcalc .rc-v{font-size:1.25rem;font-weight:700;color:#18211C;margin:0}
.rcalc .rc-s{font-size:.85rem;color:var(--rc-muted);margin:.2rem 0 0}
.rcalc .rc-bands{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.9rem;padding:0;list-style:none}
.rcalc .rc-bands li{display:flex;align-items:center;gap:.4rem;font-size:.9rem;border:1px solid var(--rc-border);border-radius:999px;padding:.2rem .65rem .2rem .3rem}
.rcalc .rc-sw{width:1rem;height:1rem;border-radius:50%;border:1px solid rgba(0,0,0,.25);flex:none}
.rcalc .rc-err{color:#b3261e;font-weight:600;margin:.75rem 0 0}
</style>
<div class="rc-form">
<label>Valeur souhaitée<input id="rc-val" type="text" value="4k7" inputmode="decimal" autocomplete="off" spellcheck="false" aria-describedby="rc-help"></label>
<label>Série (tolérance)<select id="rc-ser">
<option value="E3">E3 (&gt; 20 %)</option>
<option value="E6">E6 (± 20 %)</option>
<option value="E12">E12 (± 10 %)</option>
<option value="E24" selected>E24 (± 5 %)</option>
<option value="E48">E48 (± 2 %)</option>
<option value="E96">E96 (± 1 %)</option>
<option value="E192">E192 (± 0,5 %)</option>
</select></label>
</div>
<p id="rc-help" class="rc-s">Formats acceptés : 4700, 4,7k, 4k7, 2M2, 0R47, R33, 1,5 MΩ…</p>
<svg class="rc-svg" id="rc-svg" viewBox="0 0 560 120" role="img" aria-labelledby="rc-svg-t"><title id="rc-svg-t">Résistance et ses anneaux de couleur</title></svg>
<div class="rc-out" aria-live="polite">
<div class="rc-card"><p class="rc-k">Valeur normalisée</p><p class="rc-v" id="rc-std">–</p><p class="rc-s" id="rc-dev"></p></div>
<div class="rc-card"><p class="rc-k">Tolérance</p><p class="rc-v" id="rc-tol">–</p><p class="rc-s" id="rc-rng"></p></div>
<div class="rc-card"><p class="rc-k">Marquage CMS</p><p class="rc-v" id="rc-smd">–</p><p class="rc-s" id="rc-smdn"></p></div>
</div>
<ul class="rc-bands" id="rc-bands"></ul>
<p class="rc-err" id="rc-err" hidden></p>
<script>
(function(){
  var root=document.getElementById('rcalc'); if(!root||root.dataset.ready) return; root.dataset.ready='1';
  var BASE={E3:[10,22,47],E6:[10,15,22,33,47,68],E12:[10,12,15,18,22,27,33,39,47,56,68,82],
    E24:[10,11,12,13,15,16,18,20,22,24,27,30,33,36,39,43,47,51,56,62,68,75,82,91]};
  ['E48','E96','E192'].forEach(function(s){var n=+s.slice(1),a=[];for(var i=0;i<n;i++){var v=Math.round(100*Math.pow(10,i/n));if(s==='E192'){if(v===919)v=920;}a.push(v);}BASE[s]=a;});
  var TOL={E3:20,E6:20,E12:10,E24:5,E48:2,E96:1,E192:0.5};
  var DIG=[['noir','#111111'],['marron','#7a4a1e'],['rouge','#d62828'],['orange','#f77f00'],['jaune','#ffd60a'],['vert','#2a9d3a'],['bleu','#1d4ed8'],['violet','#7b2cbf'],['gris','#8d8d8d'],['blanc','#ffffff']];
  var GOLD=['or','#c8a23a'],SILV=['argent','#c0c0c0'];
  var TOLC={10:SILV,5:GOLD,2:DIG[2],1:DIG[1],0.5:DIG[5]};
  var MULT={'-2':SILV,'-1':GOLD};
  function q(id){return document.getElementById(id);}
  function parse(s){
    s=String(s).trim().replace(/\s+/g,'').replace(/,/g,'.').replace(/(Ω|ohms?|Ohms?)$/,'');
    var m=s.match(/^(\d*)([RrKkMmGg])(\d+)$/);
    var mul={r:1,k:1e3,m:1e6,g:1e9};
    if(m){if(m[1]===''){if(m[2].toLowerCase()!=='r')return NaN;}return parseFloat((m[1]||'0')+'.'+m[3])*mul[m[2].toLowerCase()];}
    m=s.match(/^(\d+(?:\.\d+)?|\.\d+)([RrKkMmGg]?)$/);
    if(m){return parseFloat(m[1])*(m[2]?mul[m[2].toLowerCase()]:1);}
    return NaN;
  }
  function nearest(v,ser){
    var b=BASE[ser],d=Math.floor(Math.log10(v)),best=null;
    for(var k=d-2;k<=d+1;k++){for(var i=0;i<b.length;i++){var c=b[i]*Math.pow(10,k-(ser==='E48'||ser==='E96'||ser==='E192'?2:1));var e=Math.abs(Math.log(c/v));if(!best||e<best.e)best={c:c,e:e};}}
    return best.c;
  }
  function round(x){return parseFloat(x.toPrecision(12));}
  function fmt(x){
    x=round(x);var u=[[1e9,'G'],[1e6,'M'],[1e3,'k'],[1,'']],i;
    for(i=0;i<u.length;i++){if(x>=u[i][0]||u[i][0]===1){var y=round(x/u[i][0]);return String(parseFloat(y.toPrecision(4))).replace('.',',')+' '+u[i][1]+'Ω';}}
  }
  function rkm(x){
    x=round(x);var u=[[1e9,'G'],[1e6,'M'],[1e3,'k'],[1,'R']];
    for(var i=0;i<u.length;i++){if(x>=u[i][0]||u[i][1]==='R'){var y=String(round(x/u[i][0]));var p=y.split('.');return (p[0]==='0'?'':p[0])+u[i][1]+(p[1]||'');}}
  }
  function codeOf(x,nd){
    var e=Math.floor(Math.log10(x)+1e-9)-(nd-1),m=Math.round(x/Math.pow(10,e));
    if(m>=Math.pow(10,nd)){m=Math.round(m/10);e++;}
    if(e<-2||e>9)return null;
    var s=String(m),d=[];for(var i=0;i<nd;i++)d.push(+s[i]);
    return {d:d,e:e};
  }
  function smd(x,nd){
    var c=codeOf(x,nd);if(!c)return null;
    if(c.e<0){var s=round(x).toPrecision(nd);return s.replace(/^0\./,'R').replace('.','R');}
    return c.d.join('')+String(c.e);
  }
  function draw(bands){
    var svg=q('rc-svg'),NS='http://www.w3.org/2000/svg';
    while(svg.childNodes.length>1)svg.removeChild(svg.lastChild);
    function el(t,a){var e=document.createElementNS(NS,t);for(var k in a)e.setAttribute(k,a[k]);svg.appendChild(e);return e;}
    var defs=el('defs',{});defs.innerHTML='<linearGradient id="rc-body" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#f3e2bf"/><stop offset=".45" stop-color="#e2c48f"/><stop offset="1" stop-color="#b8956a"/></linearGradient><linearGradient id="rc-shade" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".45"/><stop offset=".5" stop-color="#fff" stop-opacity="0"/><stop offset="1" stop-color="#000" stop-opacity=".25"/></linearGradient><clipPath id="rc-clip"><rect x="120" y="30" width="320" height="60" rx="26"/></clipPath>';
    el('rect',{x:10,y:56,width:540,height:8,rx:4,fill:'#a7a9ac'});
    el('rect',{x:120,y:30,width:320,height:60,rx:26,fill:'url(#rc-body)',stroke:'#8a6d47','stroke-width':1.5});
    var g=el('g',{'clip-path':'url(#rc-clip)'});
    var n=bands.length,x0=160,step=n===5?42:52;
    bands.forEach(function(b,i){
      var x=b.tol?385:x0+i*step;
      var r=document.createElementNS(NS,'rect');r.setAttribute('x',x);r.setAttribute('y',30);r.setAttribute('width',22);r.setAttribute('height',60);r.setAttribute('fill',b.c[1]);
      if(b.c[0]==='blanc'){r.setAttribute('stroke','#bbb');r.setAttribute('stroke-width','1');}
      g.appendChild(r);
    });
    var sh=document.createElementNS(NS,'rect');sh.setAttribute('x',120);sh.setAttribute('y',30);sh.setAttribute('width',320);sh.setAttribute('height',60);sh.setAttribute('fill','url(#rc-shade)');g.appendChild(sh);
  }
  function run(){
    var raw=q('rc-val').value,ser=q('rc-ser').value,err=q('rc-err'),v=parse(raw);
    err.hidden=true;
    function fail(t){err.textContent=t;err.hidden=false;['rc-std','rc-dev','rc-tol','rc-rng','rc-smd','rc-smdn'].forEach(function(i){q(i).textContent=(i==='rc-std'||i==='rc-tol'||i==='rc-smd')?'–':'';});q('rc-bands').innerHTML='';draw([]);}
    if(!(v>0)){fail('Valeur non reconnue.');return;}
    if(v<0.1||v>1e10){fail('Valeur hors plage (0,1 Ω à 10 GΩ).');return;}
    var std=round(nearest(v,ser)),tol=TOL[ser],nd=(ser==='E48'||ser==='E96'||ser==='E192')?3:2;
    var c=codeOf(std,nd);
    if(!c){fail('Cette valeur ne peut pas être codée avec des anneaux.');return;}
    var bands=c.d.map(function(d){return {c:DIG[d]};});
    bands.push({c:c.e<0?MULT[String(c.e)]:DIG[c.e]});
    if(TOLC[tol])bands.push({c:TOLC[tol],tol:true});
    draw(bands);
    var dev=(std-v)/v*100;
    q('rc-std').textContent=fmt(std);
    q('rc-dev').textContent=(Math.abs(dev)<0.005?'valeur exacte de la série':'écart '+(dev>0?'+':'')+dev.toFixed(2).replace('.',',')+' % — code '+rkm(std));
    var dt=std*tol/100;
    q('rc-tol').textContent=(ser==='E3'?'> ':'')+'± '+fmt(dt);
    q('rc-rng').textContent=(ser==='E3'?'au moins de ':'de ')+fmt(std-dt)+' à '+fmt(std+dt);
    var s=smd(std,nd);q('rc-smd').textContent=s||'–';q('rc-smdn').textContent=s?(nd===3?'code à 4 caractères':'code à 3 caractères'):'';
    var lbl=['1er chiffre','2e chiffre','3e chiffre'];
    var names=bands.map(function(b,i){var role=b.tol?'tolérance':(i<nd?lbl[i]:'multiplicateur');return '<li><span class="rc-sw" style="background:'+b.c[1]+'"></span>'+b.c[0]+' <span class="rc-s" style="margin:0">('+role+')</span></li>';});
    if(!TOLC[tol])names.push('<li>pas d’anneau de tolérance</li>');
    q('rc-bands').innerHTML=names.join('');
  }
  q('rc-val').addEventListener('input',run);q('rc-ser').addEventListener('change',run);run();
})();
</script>
</div>



<h2 class="wp-block-heading">Les séries normalisées</h2>



<p class="wp-block-paragraph">Les résistances ne sont pas fabriquées dans toutes les valeurs, mais dans des séries normalisées (CEI 60063) : la série E<em>n</em> compte <em>n</em> valeurs par décade, espacées régulièrement en échelle logarithmique. Plus la tolérance est serrée, plus la série est fine, de sorte que les plages de tolérance de deux valeurs voisines se touchent. La valeur « la plus proche » est donc cherchée en écart relatif, pas en écart absolu.</p>



<figure class="wp-block-table is-style-stripes"><table class="has-fixed-layout"><thead><tr><th>Série</th><th>Valeurs par décade</th><th>Tolérance</th><th>Chiffres significatifs</th><th>Anneaux</th></tr></thead><tbody><tr><td>E3</td><td>3</td><td>> 20 %</td><td>2</td><td>3</td></tr><tr><td>E6</td><td>6</td><td>± 20 %</td><td>2</td><td>3</td></tr><tr><td>E12</td><td>12</td><td>± 10 %</td><td>2</td><td>4</td></tr><tr><td>E24</td><td>24</td><td>± 5 %</td><td>2</td><td>4</td></tr><tr><td>E48</td><td>48</td><td>± 2 %</td><td>3</td><td>5</td></tr><tr><td>E96</td><td>96</td><td>± 1 %</td><td>3</td><td>5</td></tr><tr><td>E192</td><td>192</td><td>± 0,5 % (et moins)</td><td>3</td><td>5</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">Lire le code couleur</h2>



<p class="wp-block-paragraph">Les premiers anneaux donnent les chiffres significatifs, le suivant le multiplicateur (puissance de dix), le dernier, un peu écarté, la tolérance. On lit la résistance avec l&rsquo;anneau de tolérance à droite.</p>



<figure class="wp-block-table is-style-stripes"><table class="has-fixed-layout"><thead><tr><th>Couleur</th><th>Chiffre</th><th>Multiplicateur</th><th>Tolérance</th></tr></thead><tbody><tr><td>Noir</td><td>0</td><td>× 1</td><td></td></tr><tr><td>Marron</td><td>1</td><td>× 10</td><td>± 1 %</td></tr><tr><td>Rouge</td><td>2</td><td>× 100</td><td>± 2 %</td></tr><tr><td>Orange</td><td>3</td><td>× 1 k</td><td></td></tr><tr><td>Jaune</td><td>4</td><td>× 10 k</td><td></td></tr><tr><td>Vert</td><td>5</td><td>× 100 k</td><td>± 0,5 %</td></tr><tr><td>Bleu</td><td>6</td><td>× 1 M</td><td>± 0,25 %</td></tr><tr><td>Violet</td><td>7</td><td>× 10 M</td><td>± 0,1 %</td></tr><tr><td>Gris</td><td>8</td><td>× 100 M</td><td></td></tr><tr><td>Blanc</td><td>9</td><td>× 1 G</td><td></td></tr><tr><td>Or</td><td></td><td>× 0,1</td><td>± 5 %</td></tr><tr><td>Argent</td><td></td><td>× 0,01</td><td>± 10 %</td></tr><tr><td>Aucun</td><td></td><td></td><td>± 20 %</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">Pour les résistances CMS, le marquage à trois caractères suit la même logique (deux chiffres puis l&rsquo;exposant : 472 = 4,7 kΩ), et à quatre caractères pour les séries de précision (4701 = 4,70 kΩ). La lettre R tient lieu de virgule : 4R7 = 4,7 Ω. Certaines résistances E96 utilisent un autre code (EIA-96, deux chiffres et une lettre) que l&rsquo;outil n&rsquo;affiche pas.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://amaury-laurent.fr/code-couleur-resistance/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Exporter un Circuit Imprimé depuis EAGLE vers GALAAD/PERCIVAL</title>
		<link>https://amaury-laurent.fr/exporter-un-circuit-imprime-depuis-eagle-vers-galaad-percival/</link>
					<comments>https://amaury-laurent.fr/exporter-un-circuit-imprime-depuis-eagle-vers-galaad-percival/#respond</comments>
		
		<dc:creator><![CDATA[Amaury LAURENT]]></dc:creator>
		<pubDate>Wed, 02 May 2018 18:11:53 +0000</pubDate>
				<category><![CDATA[Tutoriaux]]></category>
		<category><![CDATA[circuit imprimé]]></category>
		<category><![CDATA[CNC & FAO]]></category>
		<category><![CDATA[eagle]]></category>
		<category><![CDATA[Électronique]]></category>
		<category><![CDATA[galaad]]></category>
		<category><![CDATA[gerber]]></category>
		<category><![CDATA[gravure]]></category>
		<category><![CDATA[lancelot]]></category>
		<category><![CDATA[percival]]></category>
		<guid isPermaLink="false">http://amaury-laurent.fr/?p=881</guid>

					<description><![CDATA[Mise à jour d’octobre 2026 Autodesk a cessé de vendre et de prendre en charge EAGLE le 7 juin 2026 : la version gratuite ne fonctionne plus et ne se télécharge plus. Les projets et bibliothèques EAGLE s’ouvrent directement dans l’environnement électronique d’Autodesk Fusion (gratuit pour un usage personnel), et le logiciel libre KiCad sait [&#8230;]]]></description>
										<content:encoded><![CDATA[<aside class="ael-note">
<p class="ael-note-t">Mise à jour d’octobre 2026</p>
<p>Autodesk a cessé de vendre et de prendre en charge EAGLE le 7 juin 2026 : la version gratuite ne fonctionne plus et ne se télécharge plus. Les projets et bibliothèques EAGLE s’ouvrent directement dans l’environnement électronique d’<a href="https://www.autodesk.com/eagleannouncement">Autodesk Fusion</a> (gratuit pour un usage personnel), et le logiciel libre <a href="https://www.kicad.org/">KiCad</a> sait les importer. Les principes de conception décrits ici restent valables.</p>
</aside>
<p>Cet article a pour but d&rsquo;expliquer la procédure a suivre pour passer d&rsquo;une conception réalisée avec EAGLE Layout Editor à un circuit imprimé en chair et en os (ou plutôt en époxy et en cuivre) réalisé avec PERCIVAL. Cet article présuppose une bonne connaissance des outils <a href="https://amaury-laurent.fr/conception-dun-circuit-imprime-avec-eagle/" target="_blank" rel="noopener">EAGLE</a> et GALAAD/LANCELOT pour la CAO et l&rsquo;usinage.</p>
<h2>Introduction</h2>
<p>Rappelons rapidement le principe de fonctionnement d&rsquo;un circuit imprimé.</p>
<p>Un circuit électronique consiste en l&rsquo;interconnexion de différents <b>composants</b> (résistances, condensateurs, circuits intégrés, &#8230;). Ces connexions électriques doivent être réalisées avec un matériau conducteur d&rsquo;électricité; habituellement le cuivre. Sur un circuit imprimé, on appelle ces connexions des <b>pistes</b>. Pour tenir ces pistes, on fait appel à un substrat isolant: l&rsquo;époxy ou la bakélite (bien que d&rsquo;autres matériaux soient également utilisés). Chaque piste relie donc différents composants <i>via</i> leurs <b>broches</b>. Les broches des composants sont reliées aux pistes par des <b>pastilles</b> de cuivre: c&rsquo;est une zone plus large que la piste (afin de pouvoir y percer un trou) qui permet à l&rsquo;étain de <b>soudure</b> d&rsquo;adhérer et offre une meilleure résistance mécanique. Un circuit imprimé peut avoir une ou deux (voir plus) couches de cuivre afin d&rsquo;augmenter la complexité du circuit. Enfin, il est possible de conserver de grandes étendues de cuivre reliées à une masse d&rsquo;alimentation (ou à un autre potentiel); on parle alors de <b>plan de masse</b>. Ils ont plusieurs avantages, parmi lesquels une meilleure immunité du circuit au bruit électromagnétique, une meilleure dissipation thermique, &#8230;</p>
<p><figure id="attachment_882" aria-describedby="caption-attachment-882" style="width: 1024px" class="wp-caption aligncenter"><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/Principe_coupe.png"><img decoding="async" class="wp-image-882 size-large" src="https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/Principe_coupe.png" alt="Coupe d'un circuit imprimé" width="1024" height="576" srcset="https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/Principe_coupe.png 1024w, https://ml9zfxsqktal.i.optimole.com/w:300/h:169/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/Principe_coupe.png 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:432/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/Principe_coupe.png 768w, https://ml9zfxsqktal.i.optimole.com/w:1280/h:720/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/Principe_coupe.png 1280w" sizes="(max-width: 1000px) 100vw, 1000px" /></a><figcaption id="caption-attachment-882" class="wp-caption-text">Coupe d&rsquo;un circuit imprimé</figcaption></figure></p>
<p><figure id="attachment_883" aria-describedby="caption-attachment-883" style="width: 1024px" class="wp-caption aligncenter"><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/Principe_dessous.png"><img decoding="async" class="wp-image-883 size-large" src="https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/Principe_dessous.png" alt="Soudure d'une broche sur une pastille" width="1024" height="576" srcset="https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/Principe_dessous.png 1024w, https://ml9zfxsqktal.i.optimole.com/w:300/h:169/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/Principe_dessous.png 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:432/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/Principe_dessous.png 768w, https://ml9zfxsqktal.i.optimole.com/w:1280/h:720/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/Principe_dessous.png 1280w" sizes="(max-width: 1000px) 100vw, 1000px" /></a><figcaption id="caption-attachment-883" class="wp-caption-text">Soudure d&rsquo;une broche sur une pastille</figcaption></figure></p>
<p>La réalisation de circuits imprimés peut s&rsquo;appuyer sur deux principes différents, mais à la finalité identique : enlever le cuivre autour des pistes afin d&rsquo;isoler celles-ci les unes envers les autres. Je vais citer deux principes largement répandus:</p>
<ul>
<li>L&rsquo;attaque chimique</li>
<li>La gravure à l&rsquo;anglaise (ou gravure mécanique)</li>
</ul>
<h3>L&rsquo;attaque chimique</h3>
<p>Cette méthode ancienne et fiable repose sur l&rsquo;utilisation d&rsquo;un composé chimique capable d&rsquo;attaquer et dissoudre le cuivre.</p>
<p>On commence par prendre une plaque d&rsquo;époxy recouverte d&rsquo;une couche de cuivre et d&rsquo;une couche photosensible.</p>
<p>Pour éviter de ronger tout le cuivre du circuit imprimé, on imprime un typon (représentation physique des pistes imprimées en noir sur une feuille transparent). Ce typon est utilisé pour <a href="https://amaury-laurent.fr/banc-a-insoler/" target="_blank" rel="noopener">insoler</a> le vernis photosensible. Ensuite, comme pour la photographie argentique, il faut plonger la plaque dans un bain de révélateur. A ce moment, le dessin des pistes devrait apparaitre sur la plaque. On enlève les résidus de vernis photosensible et on plonge la plaque dans un bain d&rsquo;attaque chimique (perchlorure de fer ou acide chlorique + peroxyde d&rsquo;hydrogène).</p>
<p><b>ATTENTION </b>: ces produits sont agressifs (voir très agressifs) et très salissant pour le perchlorure de fer.</p>
<p>On enlève la plaque du bain d&rsquo;attaque dès que le cuivre est complètement dissout. Il ne reste alors plus qu&rsquo;à percer les trous dans les pastilles et souder les composants.</p>
<p>Cette méthode a fait ses preuves. Elle est relativement bon marché, nécessite un peu de matériel spécifique (<a href="https://amaury-laurent.fr/banc-a-insoler/" target="_blank" rel="noopener">banc à insoler</a> et bain de gravure) et de produits chimiques. Par contre, elle nécessiter une très bonne maitrise du temps (insolation, révélation, gravure) qui ne peut s&rsquo;obtenir qu&rsquo;après moult essais et échecs. En outre, elle est très salissante et s’accommode mal des espaces clos (dégagements gazeux).</p>
<h3>La gravure à l&rsquo;anglaise</h3>
<p>Cette méthode repose elle sur l&rsquo;utilisation d&rsquo;une fraiseuse pour usiner la couche de cuivre. En usinant les contours des pistes, on obtient un résultat similaire à la méthode chimique: les pistes sont isolées entre-elles. C&rsquo;est cette méthode que je vais détailler dans cet article.</p>
<h2>Du logiciel de CAO au module de FAO</h2>
<p>La Conception Assistée par Ordinateur (CAO) nous permet de concevoir un circuit électronique en toute quiétude. Le lien est fort entre le schéma et le circuit imprimé: les logiciels de CAO actuels sont capables de rendre bien des services : contrôle électriques, contrôles dimensionnels, auto-routage, &#8230;</p>
<p>Cependant, la concrétisation d&rsquo;une conception en un circuit imprimé fonctionnel reste encore une opération assez complexe. Voici ma chaine logicielle complète pour la réalisation de circuits imprimés:</p>
<p><figure id="attachment_885" aria-describedby="caption-attachment-885" style="width: 1024px" class="wp-caption aligncenter"><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/Processus.png"><img decoding="async" class="size-large wp-image-885" src="https://ml9zfxsqktal.i.optimole.com/w:1024/h:682/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/Processus.png" alt="Processus de réalisation" width="1024" height="682" srcset="https://ml9zfxsqktal.i.optimole.com/w:1024/h:682/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/Processus.png 1024w, https://ml9zfxsqktal.i.optimole.com/w:300/h:200/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/Processus.png 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:512/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/Processus.png 768w, https://ml9zfxsqktal.i.optimole.com/w:1334/h:889/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/Processus.png 1334w" sizes="(max-width: 1000px) 100vw, 1000px" /></a><figcaption id="caption-attachment-885" class="wp-caption-text">Processus de réalisation</figcaption></figure></p>
<p><b>NB</b> : PERCIVAL et LANCELOT font tous les deux partie de l&rsquo;environnement de FAO <a href="https://amaury-laurent.fr/fraiseuse-cnc-stepcraft-420-logiciel/" target="_blank" rel="noopener">GALAAD</a>.</p>
<p>On distingue trois grandes phases:</p>
<ol>
<li>La conception du circuit proprement dite avec un logiciel de CAO, dans mon cas, EAGLE</li>
<li>La préparation à l&rsquo;usinage avec PERCIVAL</li>
<li>L&rsquo;usinage avec LANCELOT</li>
</ol>
<p>Ces phases sont toujours reliées par un fichier descriptif du circuit imprimé : PERCIVAL attend un fichier Gerber en entrée et délivre un fichier PCB ou GCODE directement interprétable par le module d&rsquo;usinage (LANCELOT).</p>
<h3>Exportation du fichier Gerber avec EAGLE</h3>
<p><b>ASTUCES</b> :</p>
<ul>
<li>Il convient de ne pas définir de plan de masse dans EAGLE, la suite du processus en sera simplifiée. Le plan de masse sera géré par PERCIVAL.</li>
<li>L&rsquo;ajout de quatre repères en croix aux quatre coins du circuit va simplifier le réglage de la fraiseuse.</li>
</ul>
<p>EAGLE comporte un module appelé CAM (<i>Computer Aided Machining</i> &#8211; équivalent anglo-saxon de FAO). Il est accessible depuis la fenêtre d&rsquo;édition du circuit:</p>
<p><figure id="attachment_887" aria-describedby="caption-attachment-887" style="width: 565px" class="wp-caption aligncenter"><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/EAGLE_-_Module_CAM.png"><img decoding="async" class="wp-image-887 size-full" src="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/EAGLE_-_Module_CAM.png" alt="EAGLE - Module CAM" width="565" height="364" srcset="https://ml9zfxsqktal.i.optimole.com/w:565/h:364/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/EAGLE_-_Module_CAM.png 565w, https://ml9zfxsqktal.i.optimole.com/w:300/h:193/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/EAGLE_-_Module_CAM.png 300w" sizes="(max-width: 565px) 100vw, 565px" /></a><figcaption id="caption-attachment-887" class="wp-caption-text">EAGLE &#8211; Module CAM</figcaption></figure></p>
<p>Ce module permet d&rsquo;exporter différents types de fichiers d&rsquo;usinage. On peut symétriser le circuit imprimé, le faire tourner, &#8230; Il est également possible de choisir les couches à exporter. La configuration du module CAM est appelée un job. Il est possible d&rsquo;enregistrer ses jobs au format .cam pour les rappeler plus facilement et ne pas oublier d&rsquo;étape.</p>
<p><figure id="attachment_892" aria-describedby="caption-attachment-892" style="width: 602px" class="wp-caption aligncenter"><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/EAGLE_-_CAM_Processor.png"><img decoding="async" class="size-full wp-image-892" src="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/EAGLE_-_CAM_Processor.png" alt="EAGLE - CAM Processor" width="602" height="468" srcset="https://ml9zfxsqktal.i.optimole.com/w:602/h:468/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/EAGLE_-_CAM_Processor.png 602w, https://ml9zfxsqktal.i.optimole.com/w:300/h:233/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/EAGLE_-_CAM_Processor.png 300w" sizes="(max-width: 602px) 100vw, 602px" /></a><figcaption id="caption-attachment-892" class="wp-caption-text">EAGLE &#8211; CAM Processor</figcaption></figure></p>
<p>Voici les grandes lignes à respecter pour l&rsquo;export vers PERCIVAL d&rsquo;un circuit simple face:</p>
<ul>
<li>Device: GERBER_RS274X</li>
<li>Mirror</li>
<li>pos. Coord</li>
<li>Optimize</li>
<li>Layers 16, 17, 18:
<ul>
<li>Bottom</li>
<li>Pads</li>
<li>Vias</li>
</ul>
</li>
</ul>
<p>Par extension, voici les grandes lignes à respecter pour l&rsquo;export vers PERCIVAL de la face supérieure d&rsquo;un circuit double face:</p>
<ul>
<li>Device: GERBER_RS274X</li>
<li>pos. Coord</li>
<li>Optimize</li>
<li>Layers 1, 17, 18:
<ul>
<li>Top</li>
<li>Pads</li>
<li>Vias</li>
</ul>
</li>
</ul>
<p>Voici les deux fichiers .cam que j&rsquo;utilise:</p>
<ul>
<li><a href="https://amaury-laurent.fr/wp-content/uploads/2018/05/percival_bottom.cam" download="">percival_bottom.cam</a></li>
<li><a href="https://amaury-laurent.fr/wp-content/uploads/2018/05/percival_top.cam" download="">percival_top.cam</a></li>
</ul>
<p>Pour générer le fichier Gerber, cliquer simplement sur « Process Job » et le tour est joué.</p>
<h3>Importation du fichier Gerber dans PERCIVAL</h3>
<p>Pour importer le fichier Gerber dans PERCIVAL, il faut passer par le menu <i>Fichier</i> -&gt; <i>Ouvrir</i> -&gt;<i> Nouveau Circuit (Ctrl + O)</i>. Pointer ensuite sur le fichier .grb généré par EAGLE. Une incompatibilité du format Gerber généré par EAGLE va causer l&rsquo;apparition de ce message d&rsquo;erreur:</p>
<p><figure id="attachment_894" aria-describedby="caption-attachment-894" style="width: 412px" class="wp-caption aligncenter"><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_Error.png"><img decoding="async" class="size-full wp-image-894" src="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_Error.png" alt="PERCIVAL - Erreur d'importation" width="412" height="167" srcset="https://ml9zfxsqktal.i.optimole.com/w:412/h:167/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_Error.png 412w, https://ml9zfxsqktal.i.optimole.com/w:300/h:122/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_Error.png 300w" sizes="(max-width: 412px) 100vw, 412px" /></a><figcaption id="caption-attachment-894" class="wp-caption-text">PERCIVAL &#8211; Erreur d&rsquo;importation</figcaption></figure></p>
<p>Rien de grave cependant: PERCIVAL nous informe simplement que le fichier Gerber ne contient pas les définitions des pastilles. D&rsquo;une certaine façon, cela nous arrange puisque nous allons reconfigurer toutes les pastilles du circuit pour optimiser l&rsquo;usinage. Après validation du message, un assistant de configuration des pastilles s&rsquo;ouvre:</p>
<p><figure id="attachment_895" aria-describedby="caption-attachment-895" style="width: 1024px" class="wp-caption aligncenter"><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Configuration_des_pastilles.png"><img decoding="async" class="wp-image-895 size-large" src="https://ml9zfxsqktal.i.optimole.com/w:1024/h:269/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Configuration_des_pastilles.png" alt="PERCIVAL - Configuration des pastilles" width="1024" height="269" srcset="https://ml9zfxsqktal.i.optimole.com/w:1024/h:269/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Configuration_des_pastilles.png 1024w, https://ml9zfxsqktal.i.optimole.com/w:300/h:79/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Configuration_des_pastilles.png 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:202/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Configuration_des_pastilles.png 768w, https://ml9zfxsqktal.i.optimole.com/w:1105/h:290/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Configuration_des_pastilles.png 1105w" sizes="(max-width: 1000px) 100vw, 1000px" /></a><figcaption id="caption-attachment-895" class="wp-caption-text">PERCIVAL &#8211; Configuration des pastilles</figcaption></figure></p>
<p>Les pastilles concernées s&rsquo;allument en rouge sur le circuit. Il est alors possible de modifier leur forme, leurs dimensions, le diamètre de perçage, &#8230;</p>
<p>Il faut passer en revue toutes les pastilles de la carte (en navigant avec les boutons « <b>&lt;</b> » et « <b>&gt;</b>« ) pour définir tous ces paramètres. Il est facile de voir quelle taille de pastille va causer un court-circuit ou bien sera trop petite par rapport au diamètre de perçage.</p>
<p>Une fois cette tâche effectuée, on se rend compte que certaines pastilles n&rsquo;ont pas été traitées:</p>
<p><figure id="attachment_896" aria-describedby="caption-attachment-896" style="width: 1024px" class="wp-caption aligncenter"><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Pastilles_non_traitees.png"><img decoding="async" class="size-large wp-image-896" src="https://ml9zfxsqktal.i.optimole.com/w:1024/h:570/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Pastilles_non_traitees.png" alt="PERCIVAL - Pastilles non traitées" width="1024" height="570" srcset="https://ml9zfxsqktal.i.optimole.com/w:1024/h:570/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Pastilles_non_traitees.png 1024w, https://ml9zfxsqktal.i.optimole.com/w:300/h:167/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Pastilles_non_traitees.png 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:428/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Pastilles_non_traitees.png 768w, https://ml9zfxsqktal.i.optimole.com/w:1674/h:932/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Pastilles_non_traitees.png 1674w" sizes="(max-width: 1000px) 100vw, 1000px" /></a><figcaption id="caption-attachment-896" class="wp-caption-text">PERCIVAL &#8211; Pastilles non traitées</figcaption></figure></p>
<p>Le problème provient de la manière utilisée par EAGLE pour exporter les pastilles oblongues: elles sont définies comme des pistes dans le fichier. Pour convertir ces « pistes » en pastille, il faut simplement faire un clic droit sur l&rsquo;une d&rsquo;elle et choisir définir comme pastille. PERCIVAL propose alors gentiment de transformer toutes les autres pastilles équivalentes. A vous de voir si PERCIVAL ne fait pas un excès de zèle en convertissant en pastille des pistes bien réelles.</p>
<p>Une fois les torts rétablis et les fausses pistes transformées en pastilles, il convient de refaire l&rsquo;étape précédente en rouvrant l&rsquo;assistant de configuration de pastilles (<i>clic droit</i> sur la pastille a configurer -&gt; <i>Editer les pastilles identiques</i>).</p>
<h3>Gestion des plans de masse</h3>
<p>Avec la gravure à l&rsquo;anglaise, le plan de masse est quasiment intrinsèque. En effet, à moins de faire en sorte que la fraiseuse retire tout le cuivre inutile, celle-ci na va faire qu&rsquo;un simple détourage. Il va donc demeurer de grandes zones cuivrées autour des pistes. Il convient alors de les relier à la masse. Cette opération s&rsquo;effectue dans PERCIVAL et requiert un peu d&rsquo;attention. En effet, il faut identifier sur le circuit quelles sont les broches et pistes reliées à la masse. Ensuite, il faudra passer chaque piste une par une en faisant un <i>Clic droit</i> -&gt; <i>Définir comme plan-masse.</i> Les pistes appartenant au plan de masse sont symbolisées en marron.</p>
<p>Il est également possible de convertir les pastilles reliées au plan de masse en pastilles thermiques. Cela va grandement simplifier le repérage et la soudure desdites pastilles. Pour ce faire, activer l&rsquo;outil Pastille thermique (en choisissant l&rsquo;orientation de la pastille) et cliquer les pastilles à convertir.</p>
<p><figure id="attachment_899" aria-describedby="caption-attachment-899" style="width: 177px" class="wp-caption aligncenter"><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_Pastille_thermique.png"><img decoding="async" class="size-full wp-image-899" src="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_Pastille_thermique.png" alt="PERCIVAL - L'outil Pastille thermique" width="177" height="88" /></a><figcaption id="caption-attachment-899" class="wp-caption-text">PERCIVAL &#8211; L&rsquo;outil Pastille thermique</figcaption></figure></p>
<p>Cette fois-ci quand PERCIVAL propose de convertir les pastilles identiques, il est recommandé de ne pas le faire. Une croix apparait en légère surimpression sur les pastilles thermiques.</p>
<h3>Réglage de l&rsquo;origine du circuit</h3>
<p>Pour usiner le circuit imprimé, le module d&rsquo;usinage va nécessiter la prise d&rsquo;origine de la pièce. Cette origine sera d&rsquo;autant plus simple à régler si elle se situe sur le bord de la carte. Dans PERCIVAL, il est possible de positionner deux croix: une rouge et une bleue.</p>
<p><figure id="attachment_900" aria-describedby="caption-attachment-900" style="width: 223px" class="wp-caption aligncenter"><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Croix.png"><img decoding="async" class="size-full wp-image-900" src="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Croix.png" alt="PERCIVAL - Positionnement des Croix" width="223" height="89" /></a><figcaption id="caption-attachment-900" class="wp-caption-text">PERCIVAL &#8211; Positionnement des Croix</figcaption></figure></p>
<p>Ces croix pourront servir d&rsquo;origine pièce au module d&rsquo;usinage. Pour positionner précisément ces croix, il convient au préalable d&rsquo;avoir prévu des repères dans EAGLE (une petite croix dans chaque angle dessinée avec des pistes sur chacune des faces à usiner). Une fois l&rsquo;outil activé en mode « Pointage manuel », il suffit de cliquer sur l&rsquo;extrémité d&rsquo;une piste ou une pastille pour y positionner la croix.</p>
<p><figure id="attachment_901" aria-describedby="caption-attachment-901" style="width: 1024px" class="wp-caption aligncenter"><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Resultat_avant_detourage.png"><img decoding="async" class="wp-image-901 size-large" src="https://ml9zfxsqktal.i.optimole.com/w:1024/h:569/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Resultat_avant_detourage.png" alt="PERCIVAL - Résultat avant isolation" width="1024" height="569" srcset="https://ml9zfxsqktal.i.optimole.com/w:1024/h:569/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Resultat_avant_detourage.png 1024w, https://ml9zfxsqktal.i.optimole.com/w:300/h:167/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Resultat_avant_detourage.png 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:427/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Resultat_avant_detourage.png 768w, https://ml9zfxsqktal.i.optimole.com/w:1679/h:933/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Resultat_avant_detourage.png 1679w" sizes="(max-width: 1000px) 100vw, 1000px" /></a><figcaption id="caption-attachment-901" class="wp-caption-text">PERCIVAL &#8211; Résultat avant isolation</figcaption></figure></p>
<p>Le circuit est maintenant prêt pour le calcul des contours d&rsquo;isolation.</p>
<h3>Calcul des contours d&rsquo;isolation</h3>
<p>Les contours d&rsquo;isolation sont les chemins que suivra la fraise afin d&rsquo;isoler électriquement les pistes du circuit. Le calcul des contours dépend principalement de deux facteurs:</p>
<ul>
<li>La forme de l&rsquo;outil</li>
<li>La largeur d&rsquo;isolation entre la piste et le plan de masse</li>
</ul>
<p>Le premier facteur se règle dans le menu <i>Paramètres</i> -&gt; <i>Bibliothèque d&rsquo;outils</i>.</p>
<p><figure id="attachment_902" aria-describedby="caption-attachment-902" style="width: 907px" class="wp-caption aligncenter"><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Bibliotheque_d_outils.png"><img decoding="async" class="size-full wp-image-902" src="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Bibliotheque_d_outils.png" alt="PERCIVAL - Bibliothèque d'outils" width="907" height="394" srcset="https://ml9zfxsqktal.i.optimole.com/w:907/h:394/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Bibliotheque_d_outils.png 907w, https://ml9zfxsqktal.i.optimole.com/w:300/h:130/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Bibliotheque_d_outils.png 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:334/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Bibliotheque_d_outils.png 768w" sizes="(max-width: 907px) 100vw, 907px" /></a><figcaption id="caption-attachment-902" class="wp-caption-text">PERCIVAL &#8211; Bibliothèque d&rsquo;outils</figcaption></figure></p>
<p>Ce menu permet de déclarer les différents outils en votre disposition. Ainsi, PERCIVAL adapteras les calculs d&rsquo;isolation et de perçage à la forme et au diamètre des outils disponibles. En outre, le module d&rsquo;usinage sera à même de vous demander d&rsquo;installer le bon outil avant chaque phase de gravure ou de perçage.</p>
<p>J&rsquo;utilise personnellement ces outils:</p>
<ul>
<li>Un stylet conique à 60° pour l&rsquo;isolation (soie de 3.17mm)</li>
<li>Un foret de 0.8mm pour les perçages (soie de 3.17mm)</li>
<li>Une fraise à rainurer de 2mm pour le détourage</li>
</ul>
<p>Il est possible de remplir le nombre de dents et la vitesse de la broche pour chaque outil. PERCIVAL calcul ainsi les vitesses avance optimales pour l&rsquo;usinage.</p>
<p>Pour calculer les contours d&rsquo;isolation, il faut utiliser le menu <i>Usinage</i> -&gt; <i>Contours d&rsquo;isolation</i> -&gt; <i>Calculer les contours.</i> Il est possible de choisir le nombre de passes à réaliser autour des pistes et des pastilles. Plus ce nombre est élevé, plus large sera le contour d&rsquo;isolation, mais plus long sera l&rsquo;usinage. Pour ma part, je me contente de deux contours successifs et d&rsquo;un contour supplémentaire autour des pastilles. Quand le calcul est terminé, PERCIVAL affiche un rendu du résultat final. Les contours affichés en rouges sont ceux qui ont été « forcés » par le logiciel, les pastilles ou pistes adjacentes étant trop proches.</p>
<p><figure id="attachment_903" aria-describedby="caption-attachment-903" style="width: 1024px" class="wp-caption aligncenter"><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Isolation_terminee.png"><img decoding="async" class="size-large wp-image-903" src="https://ml9zfxsqktal.i.optimole.com/w:1024/h:569/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Isolation_terminee.png" alt="PERCIVAL - Isolation terminée" width="1024" height="569" srcset="https://ml9zfxsqktal.i.optimole.com/w:1024/h:569/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Isolation_terminee.png 1024w, https://ml9zfxsqktal.i.optimole.com/w:300/h:167/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Isolation_terminee.png 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:427/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Isolation_terminee.png 768w, https://ml9zfxsqktal.i.optimole.com/w:1676/h:931/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/PERCIVAL_-_Isolation_terminee.png 1676w" sizes="(max-width: 1000px) 100vw, 1000px" /></a><figcaption id="caption-attachment-903" class="wp-caption-text">PERCIVAL &#8211; Isolation terminée</figcaption></figure></p>
<p>Il est également possible de gérer le détourage de la carte (découpe du circuit à la fraise) en ajoutant ou non pontets de maintien.</p>
<h2>Usinage du circuit</h2>
<h3>Positionner la carte à usiner</h3>
<p>Pour fixer la carte à usiner sur la table de la fraiseuse, j&rsquo;utilise pour ma part du Scotch double faces transparent « extra-fort »:</p>
<p><a href="https://www.leroymerlin.fr/v3/p/produits/adhesif-scotch-fixation-double-face-interieur-exterieur-l1-5mxl19mm-transparent-e1400097015" target="_blank" rel="noopener">https://www.leroymerlin.fr/v3/p/produits/adhesif-scotch-fixation-double-face-interieur-exterieur-l1-5mxl19mm-transparent-e1400097015</a></p>
<p>Il présente l&rsquo;avantage d&rsquo;avoir une épaisseur suffisante pour ne pas usiner la table de la fraiseuse. Il est en outre assez simple à décoller.</p>
<p>Un petit carré d&rsquo;adhésif dans chaque coin et un au centre de la carte suffisent à maintenir le circuit en place pendant tout l&rsquo;usinage.</p>
<h3>Lancer l&rsquo;usinage</h3>
<p>L&rsquo;usinage du circuit n&rsquo;est alors plus qu&rsquo;une « simple » formalité. Il suffit de choisir le menu <i>Usinage</i> -&gt; <i>Fraisage</i>, et de choisir <i>Chainer automatiquement au module d&rsquo;usinage</i>. Le fichier GCODE est automatiquement généré et passé à LANCELOT pour la gravure.</p>
<p><b>ATTENTION</b> : Si le circuit a été inversé à la génération du fichier GERBER (mirror activé pour la face du dessous dans EAGLE), il convient de ne pas activer l&rsquo;inversion horizontale à ce moment du processus.</p>
<p>LANCELOT est lancé automatiquement.</p>
<p><figure id="attachment_904" aria-describedby="caption-attachment-904" style="width: 1024px" class="wp-caption aligncenter"><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/LANCELOT_-_Configuration.png"><img decoding="async" class="size-large wp-image-904" src="https://ml9zfxsqktal.i.optimole.com/w:1024/h:488/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/LANCELOT_-_Configuration.png" alt="LANCELOT - Configuration" width="1024" height="488" srcset="https://ml9zfxsqktal.i.optimole.com/w:1024/h:488/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/LANCELOT_-_Configuration.png 1024w, https://ml9zfxsqktal.i.optimole.com/w:300/h:143/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/LANCELOT_-_Configuration.png 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:366/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/LANCELOT_-_Configuration.png 768w, https://ml9zfxsqktal.i.optimole.com/w:1251/h:596/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/LANCELOT_-_Configuration.png 1251w" sizes="(max-width: 1000px) 100vw, 1000px" /></a><figcaption id="caption-attachment-904" class="wp-caption-text">LANCELOT &#8211; Configuration</figcaption></figure></p>
<p>La première page permet de configurer l&rsquo;usinage. Le tableau en haut à gauche récapitule les différentes phases de la réalisation. Il est possible de les activer (entouré en vert) ou de les désactiver (barré de rouge) à volonté. Chaque phase est associée à un outil et repérée par le numéro de l&rsquo;outil dans le magasin. Il est également possible de surcharger les paramètres d&rsquo;usinage (profondeur des passes, vitesse d&rsquo;avance, &#8230;). Enfin, il est possible de tourner ou symétriser le circuit, au cas où une erreur se serait glissé dans le processus précédent.</p>
<p><figure id="attachment_905" aria-describedby="caption-attachment-905" style="width: 1024px" class="wp-caption aligncenter"><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/LANCELOT_-_Pilotage.png"><img decoding="async" class="size-large wp-image-905" src="https://ml9zfxsqktal.i.optimole.com/w:1024/h:488/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/LANCELOT_-_Pilotage.png" alt="LANCELOT - Pilotage" width="1024" height="488" srcset="https://ml9zfxsqktal.i.optimole.com/w:1024/h:488/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/LANCELOT_-_Pilotage.png 1024w, https://ml9zfxsqktal.i.optimole.com/w:300/h:143/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/LANCELOT_-_Pilotage.png 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:366/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/LANCELOT_-_Pilotage.png 768w, https://ml9zfxsqktal.i.optimole.com/w:1251/h:596/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/LANCELOT_-_Pilotage.png 1251w" sizes="(max-width: 1000px) 100vw, 1000px" /></a><figcaption id="caption-attachment-905" class="wp-caption-text">LANCELOT &#8211; Pilotage</figcaption></figure></p>
<p>La deuxième page permet de positionner la carte sur la table d&rsquo;usinage. Il faut prendre l&rsquo;origine de la carte (croix rouge, croix bleue ou bien un coin du circuit) en X et Y. Pour le réglage de la hauteur d&rsquo;outil, deux méthodes sont disponibles:</p>
<ul>
<li>La machine est équipée d&rsquo;un capteur de hauteur d&rsquo;outil mobile</li>
<li>Le positionnement de l&rsquo;outil à fleur de la carte</li>
</ul>
<p>Pour la première méthode, il convient de se référer à la notice d&rsquo;utilisation du logiciel LANCELOT. Pour la seconde, je préconise une astuce à base d&rsquo;Ohmmètre. <b>ATTENTION</b> : toute cette manipulation devra être effectuée <b>broche hors tension</b>, vous allez entrer en contact avec l&rsquo;outil.</p>
<ul>
<li>Installer l&rsquo;outil dans la broche</li>
<li>Amener l&rsquo;outil à quelques millimètres de la surface de la carte</li>
<li>Passer le pilotage en mode 1mm ou 1/10mm selon la distance entre l&rsquo;outil et la carte</li>
<li>Mettre l&rsquo;Ohmmètre en mode continuité (bip quand les pointes de touche se touchent)</li>
<li>Mettre une pointe sur la carte (partie cuivrée) l&rsquo;autre sur le mandrin de la broche (ou directement l&rsquo;outil si le mandrin est en plastique)</li>
<li>Descendre l&rsquo;outil progressivement et doucement jusqu&rsquo;au bip de l&rsquo;Ohmmètre</li>
<li>Cliquer sur Z &#8211; ok</li>
</ul>
<p>ATTENTION : avec un foret de 0.8mm, cette manipulation peut s&rsquo;avérer destructrice pour l&rsquo;outil sir la vitesse de descente est trop élevée.</p>
<p>Une fois l&rsquo;origine réglée, il est alors possible de lancer l&rsquo;Usinage Automatique (ou de faire une simulation avant d&rsquo;ouvrir les hostilités).</p>
<p><figure id="attachment_906" aria-describedby="caption-attachment-906" style="width: 1024px" class="wp-caption aligncenter"><a href="https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/LANCELOT_-_Usonage_automatique.png"><img decoding="async" class="size-large wp-image-906" src="https://ml9zfxsqktal.i.optimole.com/w:1024/h:488/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/LANCELOT_-_Usonage_automatique.png" alt="LANCELOT - Usinage automatique" width="1024" height="488" srcset="https://ml9zfxsqktal.i.optimole.com/w:1024/h:488/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/LANCELOT_-_Usonage_automatique.png 1024w, https://ml9zfxsqktal.i.optimole.com/w:300/h:143/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/LANCELOT_-_Usonage_automatique.png 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:366/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/LANCELOT_-_Usonage_automatique.png 768w, https://ml9zfxsqktal.i.optimole.com/w:1251/h:596/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/LANCELOT_-_Usonage_automatique.png 1251w" sizes="(max-width: 1000px) 100vw, 1000px" /></a><figcaption id="caption-attachment-906" class="wp-caption-text">LANCELOT &#8211; Usinage automatique</figcaption></figure></p>
<p>Si tout fonctionne comme prévu, LANCELOT devrait aller au bout de la première phase avant de demander un changement d&rsquo;outil. Il convient alors de refaire la prise d&rsquo;origine en Z.</p>
<p>Voici le résultat pour un circuit simple face basé autour d&rsquo;un PIC18F4550 :</p>
<p>
<a href='https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/20180422_162133.jpg'><img decoding="async" width="300" height="169" src="https://ml9zfxsqktal.i.optimole.com/w:300/h:169/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/20180422_162133.jpg" class="attachment-medium size-medium" alt="Circuit imprimé - mise en situation" srcset="https://ml9zfxsqktal.i.optimole.com/w:1920/h:1080/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/20180422_162133.jpg 1920w, https://ml9zfxsqktal.i.optimole.com/w:300/h:169/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/20180422_162133.jpg 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:432/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/20180422_162133.jpg 768w, https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/20180422_162133.jpg 1024w, https://ml9zfxsqktal.i.optimole.com/w:700/h:394/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/20180422_162133.jpg 700w" sizes="(max-width: 300px) 100vw, 300px" /></a>
<a href='https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/20180422_162113.jpg'><img decoding="async" width="300" height="169" src="https://ml9zfxsqktal.i.optimole.com/w:300/h:169/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/20180422_162113.jpg" class="attachment-medium size-medium" alt="Circuit imprimé - côté composants" srcset="https://ml9zfxsqktal.i.optimole.com/w:1920/h:1080/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/20180422_162113.jpg 1920w, https://ml9zfxsqktal.i.optimole.com/w:300/h:169/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/20180422_162113.jpg 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:432/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/20180422_162113.jpg 768w, https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/20180422_162113.jpg 1024w, https://ml9zfxsqktal.i.optimole.com/w:700/h:394/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/20180422_162113.jpg 700w" sizes="(max-width: 300px) 100vw, 300px" /></a>
<a href='https://ml9zfxsqktal.i.optimole.com/w:auto/h:auto/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/20180422_162118.jpg'><img decoding="async" width="300" height="169" src="https://ml9zfxsqktal.i.optimole.com/w:300/h:169/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/20180422_162118.jpg" class="attachment-medium size-medium" alt="Circuit imprimé - côté soudure" srcset="https://ml9zfxsqktal.i.optimole.com/w:1920/h:1080/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/20180422_162118.jpg 1920w, https://ml9zfxsqktal.i.optimole.com/w:300/h:169/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/20180422_162118.jpg 300w, https://ml9zfxsqktal.i.optimole.com/w:768/h:432/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/20180422_162118.jpg 768w, https://ml9zfxsqktal.i.optimole.com/w:1024/h:576/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/20180422_162118.jpg 1024w, https://ml9zfxsqktal.i.optimole.com/w:700/h:394/q:mauto/f:best/https://amaury-laurent.fr/wp-content/uploads/2018/05/20180422_162118.jpg 700w" sizes="(max-width: 300px) 100vw, 300px" /></a>
</p>
<p>Voici deux petites vidéos de l&rsquo;outil en action (Attention, le volume sonore est un peu élevé&#8230;):</p>
<p><iframe title="Gravure circuit imprimé sur fraiseuse Stepcraft 420" width="500" height="281" src="https://www.youtube.com/embed/_bYgNou0XTc?feature=oembed&#038;enablejsapi=1" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></p>
<p><iframe title="Perçage d&amp;apos;un circuit imprimé sur fraiseuse Stepcraft 420" width="500" height="281" src="https://www.youtube.com/embed/rnrIA0OaIaI?feature=oembed&#038;enablejsapi=1" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></p>
<h2>Conclusion</h2>
<p>Avec le bon outillage, il est aisé de passer d&rsquo;une conception virtuelle à un circuit bien réel. Il est tout a fait normal d&rsquo;éprouver une certaine appréhension lors des premiers mouvement de la broche. J&rsquo;ai cassé quelques outils et gâché un certain nombre de cartes avant de pleinement prendre en main les différents modules logiciels du processus. Il est important d&rsquo;être méthodique de bout en bout. Le processus que je présente ici n&rsquo;est bien sûr pas parole d&rsquo;évangiles, cependant, il fonctionne à merveille chez moi.</p>
<p>Bonnes réalisations !</p>
<aside class="ael-tools ael-series">
<p class="ael-tools-t">Série : Conception de circuits imprimés avec Eagle</p>
<ol>
<li><a href="https://amaury-laurent.fr/conception-dun-circuit-imprime-avec-eagle/">Conception d&rsquo;un circuit imprimé avec Eagle</a></li>
<li><a href="https://amaury-laurent.fr/liste-des-commandes-eagle/">Liste des commandes Eagle</a></li>
<li><a href="https://amaury-laurent.fr/creation-de-design-blocks-avec-eagle-8/">Création de Design Blocks avec Eagle 8</a></li>
<li><strong>Exporter un Circuit Imprimé depuis EAGLE vers GALAAD/PERCIVAL</strong> (cet article)</li>
</ol>
</aside>
<aside class="ael-tools">
<p class="ael-tools-t">Outils en ligne associés</p>
<ul>
<li><a href="https://amaury-laurent.fr/outil-largeur-piste-pcb/">Largeur de piste de circuit imprimé</a> : dimensionner les pistes selon le courant et l’échauffement admissible</li>
</ul>
</aside>
]]></content:encoded>
					
					<wfw:commentRss>https://amaury-laurent.fr/exporter-un-circuit-imprime-depuis-eagle-vers-galaad-percival/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
