# Measuring voltage from micro - Page 2

#### Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

•  Subject
• Author
• Posted on
Re: Measuring voltage from micro

"Poxy"  wrote

You'd need to implement a 1-wire bus,

***** Earth return of course!!!DC or AC?

Brian Goldsmith

Re: Measuring voltage from micro

Prehaps I should have said "1-Wire Bus TM" - a well known and well-defined
product with a wealth of information available for those who'd prefer to
learn and understand. I'd kindly suggest you follow the link I provided if
you're interested in that "learning and understanding" thing I mentioned.

Re: Measuring voltage from micro

I've ordered this one from futurlec. As I'm already using I2C with 2 chips
I've already got working code. Hopefully it will just be a matter of
plugging it in :-)

http://www.futurlec.com.au/Philips/PCF8591P.jsp

Michael

Re: Measuring voltage from micro

The 1-wire bus is a *dog* of a thing to implement and places timing restrictions
on
your system. If you need up to 8 sensors or so I suggest a more popular I2C
sensor
rather than 1-wire.

I2C master code is very simple and not timing sensitive.

-Andrew M

Re: Measuring voltage from micro

Not really.  "when relay on, add 5C to reading, plus the 2C hysteresis"

Re: Measuring voltage from micro

Doesn't sound like the ideal solution to me.

Michael

Re: Measuring voltage from micro

I ordered an I2C ADC a couple of weeks ago, received it yesterday and
soldered it into my prototype tonight. The code I'd written for the eeprom
worked with it straight off. Now I've just go to work out how to convert a
resistance that varies from 40ohm to 1k into a voltage from 0 to 2.5 and
keep enough accuracy at the 40 ohm end of the scale.

I'll see how I go with noise, if it's a problem I'll see what I can do. I'm

I plan to have the circuit inside the cabin as it's not water proof and has
an overtemp buzzer.

Michael

Re: Measuring voltage from micro

Use a 5.1 (or 4.7v) zener diode on the pin to keep it in the safe range.
or a resistive divider before the timing resistor.

if the output is short circuit protected by design and the cap has 5V
or less  in it it won't do any damage,

Bye.
Jasen