DPRG
DPRG List  



[DPRG] Processor Communication via ADC

Subject: [DPRG] Processor Communication via ADC
From: Kipton Moravec kip at kdream.com
Date: Thu Feb 14 11:05:07 CST 2008

I am doing on up to two sensors that must be isolated from the power
supply because they measure conductivity. And you can't have a common
ground (or common anything else). So in this case I could use a TI
ISO124 (at $12 each, ouch) which I did on the first version, or I could
replace the ADC with a capture and an opto-isolator for less than $1. My
processor had both and so I decided to switch to the cheaper option.

Frequency upper limit is what you can sample at. Say you are running
your AVR at 8 MHz, then I would clock the sender PWM frequency at that
speed 8 MHz and Sample at 8 MHz for the receiver. That way you can also
read multiple samples and average to get a cleaner answer. Integrating
over time also takes into account clock differences.

It is always a trade-off. Time division multiplexing is more complicated
than I2C. A better option is to have the master have a select line, or
address lines when your number is on you put on your PWM on the shared
line, otherwise tri-state your output. But after about 2 or 4 lines that
starts getting more complicated than any serial protocol.

RS-485 is really good as you can have multiple drops and long distance.

Still I2C is not bad if the data rate works for you. Which in this case
seems to be the best general answer.


On Thu, 2008-02-14 at 11:17 -0500, DeltaGraph at aol.com wrote:
> Kip, / Eric
>  
> Was just wondering how he might deal with many sources of PWM from
> many processors / sensors.. with limited number of input capture
> resources?
>  
> Certainly one processor could time division multiplex (if that is the
> correct term-- or serialize) PWM stream, but with many processors
> maybe there would be a way to request a signal so as not to have
> redundant data missed by receiving processor that is using a
> multiplexer tied to input capture pin.
>  
> Interesting a friend uses components designed for an automotive
> throttle control that is exactly compatible with RC servo pulse 1.0 to
> 2.0 ms. (If I did not mention)
>  
> Wonder what would be a practical frequency upper-limit for Eric's
> application?
>  
> One thing that does scare me about using more complex forms of
> communication such as I2C...
> is you have to make sure you have carefully covered the bases to avoid
> states that might hang up a system whereas with PWM or analog
> performance might suffer if implementation is not perfect (free from
> noise...), but at least typically you won't experience a crash.   Just
> me talking.
>  
> Ron
>  
>  
>  
> 
> 
> 
> 
> ______________________________________________________________________
> The year's hottest artists on the red carpet at the Grammy Awards. AOL
> Music takes you there.
-- 
Kipton Moravec KE5NGX
"Always do right; this will gratify some people and astonish the rest."
--Mark Twain


More information about the DPRG mailing list

Copyright © 1984 - 2006 Dallas Personal Robotics Group. All rights reserved.
Website Design by NCC

For the latest robot news visit robots.net