<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Component recommendations: Rotate a servo using signal from a linear encoder]]></title><description><![CDATA[<p dir="auto">Greetings all.  I'm looking for some help on what components to start with for a small project. Details below:</p>
<p dir="auto">( I've played around with Raspberry Pi, and am a proficient Python coder but a beginner a beginner on the M5Stack system. )</p>
<ol>
<li>
<p dir="auto">I read a signal from a vernier calliper in real time using a setup like this:<br />
<a href="https://www.instructables.com/Caliper-Data-Interface/" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.instructables.com/Caliper-Data-Interface/</a><br />
This signal represents a real time measurement of linear displacement of a machine component.</p>
</li>
<li>
<p dir="auto">The signal feed from the calliper is passed to a Python function (currently on a Raspberry Pi) to work out the displacement <code>D</code> in mm.</p>
</li>
<li>
<p dir="auto">A function <code>f</code> is and applied to <code>D</code> to return an angle <code>R</code>;  <code>R = f(D)</code>. This happens in the Python code (currently on a Raspberry Pi).</p>
</li>
<li>
<p dir="auto">Finally a small 9g micro-servo (~3V)  (in fact, a prism mounted on the servo) is rotated by the angle <code>R</code>.</p>
</li>
</ol>
<p dir="auto">The setup works on a Pi but is a mess of wires and breadboards. I'd like to use M5Stack to make a portable and field-usable device.</p>
<p dir="auto">Some requirements:</p>
<ol>
<li>System should have a screen and button interface to select different functions <code>f</code> and various modes (calibration, operation etc). Once of the cores, but not sure which one. Happy to go with the most powerful one.</li>
<li>System should have a battery module with enough to power the servo. System should be rechargable, and once charged, should not require external power in operation. Which battery module?</li>
<li>Do I need any other components to read the encoder signal or generate the servo signal?</li>
<li>What kind of wiring? Encoder has a 4 wire ribbon, and servo has a 3 wire ribbon.</li>
</ol>
<p dir="auto">Would appreciate your help to get me started.</p>
<p dir="auto">Many thanks,</p>
<p dir="auto">Zed Bee</p>
]]></description><link>https://community.m5stack.com/topic/6243/component-recommendations-rotate-a-servo-using-signal-from-a-linear-encoder</link><generator>RSS for Node</generator><lastBuildDate>Tue, 12 May 2026 18:49:51 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/6243.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 20 Mar 2024 21:30:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Component recommendations: Rotate a servo using signal from a linear encoder on Wed, 03 Apr 2024 08:58:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a> said in <a href="/post/24522">Component recommendations: Rotate a servo using signal from a linear encoder</a>:</p>
<blockquote>
<p dir="auto">For a Start M5Stack uses Micropython and so you already know how to program it</p>
<p dir="auto">What kind of Linear encoder are you thinking of</p>
</blockquote>
<p dir="auto">Many thanks <a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a>.</p>
<p dir="auto"><strong>Linear encoder:</strong> it'll be a set of digital vernier calipers with a 4-pin data output - very similar this post by Martin Thalheimer: <a href="https://shorturl.at/anNRU" target="_blank" rel="noopener noreferrer nofollow ugc">https://shorturl.at/anNRU</a></p>
<p dir="auto"><strong>Level shifting:</strong> Same as in Martin's post, my encoder outputs a 1.5V signal, while microcontrollers typically require a higher voltage input 5V(?). Ideally, I'd like an M5Stack component to handle the level shifting, rather than making another circuit board dangling between the devices .</p>
<p dir="auto"><strong>Updated question</strong></p>
<ul>
<li>Have a linear encoder with a 1.5v signal output similar to  <a href="https://shorturl.at/anNRU" target="_blank" rel="noopener noreferrer nofollow ugc">https://shorturl.at/anNRU</a></li>
<li>Have a 5v micro servo</li>
<li>Need to read the displacement <code>d</code> on the encoder, and rotate the servo by an angle <code>a = f(d)</code></li>
<li>Need help selecting the correct M5Stack components that:<br />
-- includes a microcontroller, screen &amp; buttons interface, and rechargeable battery (one of the cores. Which one?)<br />
-- reads the 1.5v signal from the encoder and handles the level shifting internally (or doesn't need level shifting?)<br />
-- runs a Python script that applies the transformation <code>a = f(d)</code> (the core)<br />
-- rotates servo by angle <code>a</code> (servo controller).</li>
</ul>
]]></description><link>https://community.m5stack.com/post/24658</link><guid isPermaLink="true">https://community.m5stack.com/post/24658</guid><dc:creator><![CDATA[zedbee]]></dc:creator><pubDate>Wed, 03 Apr 2024 08:58:46 GMT</pubDate></item><item><title><![CDATA[Reply to Component recommendations: Rotate a servo using signal from a linear encoder on Fri, 22 Mar 2024 06:38:14 GMT]]></title><description><![CDATA[<p dir="auto">For a Start M5Stack uses Micropython and so you already know how to program it</p>
<p dir="auto">What kind of Linear encoder are you thinking of</p>
]]></description><link>https://community.m5stack.com/post/24522</link><guid isPermaLink="true">https://community.m5stack.com/post/24522</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Fri, 22 Mar 2024 06:38:14 GMT</pubDate></item></channel></rss>