Computing stuff tied to the physical world

Analog on the cheap

In Book on Apr 8, 2015 at 00:01

Digital chips can’t do analog directly – you need an A/D converter for that, right?

Not so fast. Just as pulse-width modulation (PWM) can be used to turn a purely digital signal into a varying analog voltage, there are tricks to measure analog values as well.

All you need is the proper software, a simple analog comparator, and these components:

DSC 5014  Version 2

This week’s episode examines delta-sigma modulation and shows you how it’s done:

There’s in fact a little gem hidden inside those LPC8xx chips which allows implementing this without bogging down the ┬ÁC. Just one interrupt whenever a measurement is ready. But the basic idea is applicable to any microcontroller with a built-in analog comparator.

(For comments, visit the forum area)