<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Adc on Aaron Qian</title><link>https://aaronqian.com/tags/adc/</link><description>Recent content in Adc on Aaron Qian</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 27 Nov 2026 15:18:05 -0800</lastBuildDate><atom:link href="https://aaronqian.com/tags/adc/index.xml" rel="self" type="application/rss+xml"/><item><title>A warning on missing codes in cheap MCU ADCs, and a tip on compensating</title><link>https://aaronqian.com/log/2026-10-29-ch32v006-adc-quirks/</link><pubDate>Thu, 29 Oct 2026 00:00:00 +0000</pubDate><guid>https://aaronqian.com/log/2026-10-29-ch32v006-adc-quirks/</guid><description>&lt;p&gt;Over the last few weeks I&amp;rsquo;ve been grading my servo board&amp;rsquo;s measurement chain against a multimeter, one channel at a time. Every current, voltage and temperature the servo reads goes through the CH32V006&amp;rsquo;s ADC (analog-to-digital converter), so before trusting any of it I wanted to know what the converter itself does. The datasheet&amp;rsquo;s ADC table lists clock rates, sample times and supply ranges, and says nothing at all about linearity or offset. So I measured it.&lt;/p&gt;
&lt;p&gt;Most of it is fine. A few things surprised me though, and one of them is a calibration bit the manual calls reserved that makes every reading worse. This post collects the quirks I would want to know about if I was starting a project today.&lt;/p&gt;
&lt;p&gt;I measured all of this on a CH32V006, but most of it isn&amp;rsquo;t a WCH thing. The sawtooth, the reference that needs a long sample time, and the codes that go missing when the clock runs too fast all come from how a SAR (successive-approximation) converter works, and you&amp;rsquo;ll find the same kinds of errors on most microcontrollers. Only the hidden calibration bit is specific to this chip.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re new here, &lt;a
 href="https://github.com/OpenServoCore"
 
 target="_blank" rel="noopener"
&gt;OpenServoCore&lt;/a&gt; is my effort to turn cheap MG90S-class servos into networked smart actuators with sensor feedback, cascade control, and &lt;a
 href="https://aaronqian.com/log/2026-08-08-servo-protocol-stream-processing/"
 
 
&gt;its own single-wire bus protocol&lt;/a&gt;. The measurements below live in the stage 1 notebooks of the &lt;a
 href="https://github.com/OpenServoCore/notebooks/tree/main/stages/1-board"
 
 target="_blank" rel="noopener"
&gt;notebooks repo&lt;/a&gt;, and most of them ran on one rev 2A dev board, board D, which carries a CH32V006 (WCH&amp;rsquo;s sub-20-cent RISC-V microcontroller).&lt;/p&gt;</description></item></channel></rss>