Re: reading analog signals on a MCU with only digital I/O

 comp.robotics.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Re: reading analog signals on a MCU with only digital I/O Gordon McComb 03-09-2007
Posted by Gordon McComb on March 9, 2007, 5:16 pm
Please log in for more thread options
Joe Strout wrote:
>
> I've been working with the ARMexpress microcontrollers, which has only
> digital I/O. Apart from the lack of A/D inputs, I love it. So I'm
> looking for some way to work around that limitation.
>
> It seems to me that you could use a PIC or Atmel chip for this. These
> could be programmed to respond to a simple serial protocol, where the
> input indicates the pin number of interest, and the response is the A/D
> level on that pin. Is this a reasonable approach? Which specific chip
> would be a good choice for this?
>
> Also, is there an off-the-shelf solution that does the same thing,
> without requiring an AVR/PIC programmer? Something set up to speak I2C,
> 1-Wire, SPI, or serial? (Any of those should be easy to talk to from
> the ARMexpress.)

The venerable ADC0831 is only a couple bucks, but it is only 8-bit. A
decent 10- or 12-bit version shouldn't be that much more. These basic
chips use simple serial to keep things cheap.

You can also do it with an input capture timer, a resistor, and a
capacitor. It's not as accurate, but it works for simple tasks. Another
way is to use a 555. There are a number of ways to implement this.
Search the Web and you'll find examples. This is basically how the PC
gameport works. Here is just one page of many that discusses it:

http://english.cxem.net/comp/comp184.php

Take a look at the following PDF on the Parallax site for some ideas:

http://www.parallax.com/dl/docs/books/edu/baad.pdf

They provide the book with an A2D kit they sell. The kit is intended for
the BASIC Stamp, but the concepts are the same.

-- Gordon

Posted by Gordon McComb on March 10, 2007, 1:46 am
Please log in for more thread options
Joe Strout wrote:
> So the BASIC Stamp doesn't have analog inputs either? That surprises
> me. But if so, it puts the ARMexpress in good company, and means I
> should find lots of other people who have already solved this problem.

Since the ARMexpress is something of a BASIC Stamp "compatible" device
you may want to read up on the documentation for the chip before
spending much more time on this. I think you'll find that like the BASIC
Stamp it supports an RCTIME statement that does exactly what the BASIC
Stamp does with the resistor/capacitor (hence "RC") measurement.

There's not a lot of accuracy with this approach, but it's not bad for
many tasks. For most anything else there are plenty of ADC chips out
there. This is a well-travelled road.

-- Gordon

Similar ThreadsPosted
Re: reading analog signals on a MCU with only digital I/O March 9, 2007, 5:02 pm
analog inputs into a digital controller? November 21, 2006, 1:47 pm
Digital frames in RAM to Analog output, Please help ! March 5, 2008, 1:08 pm
The possible voting rarely returns Eve, it signals Sadam instead. December 24, 2007, 12:34 am
any publishers reading this? July 1, 2005, 1:01 pm
Reading 802.11b/g signal strength (SNR) August 4, 2005, 12:14 pm
Reading USB camera data from a microcontroller August 29, 2005, 6:11 am
Reading barcodes using a laser scanner October 18, 2006, 1:58 pm
tell Moustapha it's isolated reading in the light of a opening August 14, 2007, 4:35 am
Reading from different memory banks on an Acquisition control register November 16, 2006, 2:43 am

The site map in XML format XML site map
other useful resources:
Official Robosapien Website
Lego Mindstorms Website

Contact Us | Privacy Policy