Live data from Hacker News

How bad can a $2.97 ADC be?

excamera.substack.com

121–130 of 141 posts

Re: How bad can a $2.97 ADC be?

#121
post #109

Earlier quoted context omitted.

I recalled a few years ago there were shockingly inexpensive MCUs at LCSC and similar far east vendors, but they were never heard before names, so I just checked again out of curiosity and here's a $0.05 one by Cypress. https://www.lcsc.com/product-detail/C2954567.html

That's out of stock, though. Here are my other shockingly inexpensive MCUs at LCSC that were in stock at the time: links from 02025-03-16: https://www.lcsc.com/product-detail/Microcontrollers-MCU-MPU... #LCSC #pricing for 16-pin #CH32V003 #microcontrollers #electronics #hardware: 14.21¢ in quantity 500. Not the cheapest, but it’s a RISC-V with IIRC an on-board op-amp, though the linked datasheet only covers the CPU r…

The Padauk and Nyquest are barely useable. They are highly specialized devices (often ROM-only).

Cheapest "general purpose" microcontrollers that have enough features for good developer experience are Puya and WCH.

If you are a seasoned STM32 developer you will get used to them within a day.

Examples:

https://download.py32.org/Datasheet/en/PY32F071_Datasheet_Re...

https://arvidtek.com/wp-content/uploads/2025/06/CH32V006DS0-...

Re: How bad can a $2.97 ADC be?

#122
post #43
post #42

Earlier quoted context omitted.

I have done this a bunch of different times, mostly to resolve sourcing disputes. Dissolving in boiling sulphuric acid/nitric acid will make quick work of most epoxy packaging IMO, I have mostly seen mislabeling, rebinning, and passing off obvious QC rejects. example from many years ago: https://www.youtube.com/watch?v=e6DfBuPwAAA

> Dissolving in boiling sulphuric acid/nitric acid will make quick work of most epoxy packaging That's the better method of course (results wise), but it's not nearly as accessible, hence my recent evangelism of the virtues of 2000 grit sandpaper.

I appreciate the effort, but the bar is already very high when you recommend a SEM in the same breath.

Re: How bad can a $2.97 ADC be?

#123
> These are cheap, relatively fast, and not particularly good. While they sport impressive-sounding 12- and 16-bit readouts, the effective number of bits (ENOB) is usually around 8 or 9.

The edge case of the 1-bit conversion scheme used in SACD format is compelling from a few perspectives. The idea is to run the sampling rate in the megahertz region. SACD achieves 120dB of dynamic range with an extended frequency response up to ~100kHz. CD audio only achieves 96dB of range up to 20kHz with its 16-bit PCM scheme. From the analog hardware complexity standpoint, a bitstream converter is much simpler than a multi-bit converter. The 16-bit ADC might be cheaper due to the insane manufacturing volumes.

Trading bit depth for sample rate is a very compelling offer in many cases. The 3d graphics version of this is SSAA where you sample more pixels than your monitor needs in order to resolve higher frequency information.

https://en.wikipedia.org/wiki/1-bit_DAC

https://en.wikipedia.org/wiki/Direct_Stream_Digital

Re: How bad can a $2.97 ADC be?

#124

> These are cheap, relatively fast, and not particularly good. While they sport impressive-sounding 12- and 16-bit readouts, the effective number of bits (ENOB) is usually around 8 or 9. I don't think that's quite accurate for reasonably modern MCUs. You can typically shake 10+ bits out of them, but you need to take a lot of precautions, such as providing very stable external reference voltage and shutting down unnee…

Hey, you can also arrange 2 GPIO pins in 1st order sigma delta topology with two external resistors, a capacitor and disabled hysteresis.

With RP2040 (and an LDO for supply), using two such channels for pseudo differential measurement (the second one just tracks threshold noise) I typically obtain 16 ENOB at 1 kHz, more at DC.

It is critical to avoid any periodic activity on the chip, though. Putting cores to sleep and then waking them up again causes huge spurs. One has to e.g. sleep for random intervals to spread them around. Same with flash. USB can be used, it's noise doesn't normally exceed -100 dB for me.

Fun stuff!

PS: I have not tested DC accuracy. One would likely use a channel with reference and hope that GPIOs are well matched. Could be used to e.g. sense CC lines on USB or analog joysticks and other non-critical, low accuracy stuff.

Re: How bad can a $2.97 ADC be?

#125

Earlier quoted context omitted.

You can buy ADCs at over 100 GS/s (keysight, teledyne and tektronix make oscilloscopes using them), however typical ENOBs are more around 5 bits for these. For people interested in this stuff, I there is a video of someone taking apart one of the high speed keysight scopes (I think signal path is the YouTube channel?).

An oscilloscope is IMO just a user interface for an ADC. The adc is where the hard engineering lies, and the bit which should command 90% of the cost. Unfortunately this isn't the case - the company designing the plastic case and buttons gets the lions share of the money.

You would be wrong, then.

What is the challenge in scope design is that you need to protect the ADC and often user's life!

So the scope has 1Mohm || 15pF input impedance. You need to buffer it. So you first have to attenuate the signal by tapping this input impedance e.g. at 1/10, attenuating the signal. Then you selectively boost it back up for the ADC.

Or you selectively tap it at different ratios.

In any case, you have to protect whatever there is after the tap(s) by diodes that inherently bring parasitic capacitance.

Some scopes avoid expensive buffer ICs and go with split DC path (with gain) using opamp and then AC path (with gain) using e.g. JFET and BJT RF amps and combine those later.

The whole path from input to ADC must have flat frequency response in both magnitude and phase on all gain settings. This is non-trivial, especially with split DC/AC paths.

Sure, HMCAD ADC series help immensely nowadays with their builtin gain, but you still have to give them something flat to digitize as they output 8b streams and thus you won't be able to "fix it up digitally".

And then you also have to be able to inject bias to move the signal up/down.

And some scopes now can toggle between this and just 50 ohm impedance.

So, yeah, it's kinda non-trivial to condition signal somewhere between millivolts and mains to get to the ADC safely.

Re: How bad can a $2.97 ADC be?

#126

Earlier quoted context omitted.

You may as well start off with one of these then: https://phillipscorp.com/india/phillipsgrinding/phillips-sur... All you need is a serial port and some G-codes.

Surface grinders generally don’t use CNC, they are a simple machine.

This is a fun playlist of a conversion of a manual machine to CNC:

https://www.youtube.com/playlist?list=PLDlWKv7KIIr9rlCwZ9K43...

Re: How bad can a $2.97 ADC be?

#127
post #28

ADC = Analog to digital converter Takes an analog signal from something like light or sound and convert it into a digital signal. Acronyms introduced in an article should be spelled out at least once please.

For regular readers of this blog, that would be like defining USB for a general tech audience. Other articles by this author expect the reader to also know terms like I2C and SPI.

Re: How bad can a $2.97 ADC be?

#128

Earlier quoted context omitted.

Well, if you're trying to measure DC extremely accurately the old stuff is still golden. Multi-slope is the gold standard and no one will sell you one. Delta-sigma get most of the way there. https://youtu.be/upTgM_S5rAQ And if you want to see CERN's multimeter, check this out. https://youtu.be/D28uSzCs7-k Marco Reps is a treasure.

>Multi-slope is the gold standard and no one will sell you one. Why not?

The delta-sigma is conceptually very similar and gets you most of the way there for DC performance, but can be used for sample rates in excess of 100 kSamp/s. Multi-slopes also need large passive values that make an integrated solution impossible. Keysight will still sell you their 3458A.

Also, the AD7177-2 exists. That might be evidence enough for delta-sigma's victory.

Re: How bad can a $2.97 ADC be?

#129
post #124

> These are cheap, relatively fast, and not particularly good. While they sport impressive-sounding 12- and 16-bit readouts, the effective number of bits (ENOB) is usually around 8 or 9. I don't think that's quite accurate for reasonably modern MCUs. You can typically shake 10+ bits out of them, but you need to take a lot of precautions, such as providing very stable external reference voltage and shutting down unnee…

Hey, you can also arrange 2 GPIO pins in 1st order sigma delta topology with two external resistors, a capacitor and disabled hysteresis. With RP2040 (and an LDO for supply), using two such channels for pseudo differential measurement (the second one just tracks threshold noise) I typically obtain 16 ENOB at 1 kHz, more at DC. It is critical to avoid any periodic activity on the chip, though. Putting cores to sleep a…

Can you post any resources for understanding this? I have basic understanding of circuits.

Is this essentially trading time resolution for voltage resolution? Would just doing an exponentially weighted moving average in firmware achieve the same results?

Re: How bad can a $2.97 ADC be?

#130
post #29

I'd like to know more about the world of ADCs. I've used the ADS1115 with success but only at very slow speeds. On the current project we started with an MCP3208 via SPI. It did the job but only has 8 channels and it's slow (100K samples per sec). To get something faster we switched to ADS7953. It has 16 channels and runs 10 times faster. It's somewhat more complex to code, and you can only get the highest sample rat…

Hah, damn. We live in different worlds - in mine, 100K samples/sec is blazingly fast!

I'm currently working on a PLC program, replacing the PLC's basic cyclic input sampling (max 2K samples/sec) with a harder-to-use mechanism that lets you access the raw data off its 12-bit ADC at 10K samples/sec, which we consider unusually speedy.

Post reply on HN