On 20/10/13 10:24, Chris Green wrote:
I actually have a Pi and an Arduino and also something called Pokeys56E, none of them is anywhere near ideal. The difficulty is mostly in the nitty gritty hardware intefacing, getting voltages into the device in such a way that it's unlikely to kill it if/when spikes and noise come along.
That's always going to be the case really unless you move to PLC type systems that have hardened I/O...but then you have to use PLC type development languages and pay PLC type money for the interfaces :-) The little AT-Mega isn't bad really, at least all the inputs (other than pin 1) are ESD safe. It's certainly a bit tougher than the RPi GPIO.
Currently on the boat I have an ancient 7" eeePc with a 1-wire to USB interface and sensors on the 1-wire bus. 1-wire is good for various measurements but doesn't seem to have voltage sensors. In fact *nothing* seems to offer decent voltage measuring sensors, there's lots of things with "A2D inputs" but nothing that offers an 'outside world facing' capable one.
I guess you mean you want to measure something other than 0-5v ?
If you want to do something quick and dirty that doesn't need to provide millivolt accuracy like monitor a battery state then that's pretty straightforward, just have the voltage to be measured as the top of a potential divider with the ADC pin or whatever on the middle tap.
Then I'd add a fast acting 5.1v zener clamp and fuse the input to protect from overvoltage. In fact there are now prepackaged and cheap (thanks to USB) capable protection arrays that can do exactly that and save you from anything other than a direct lightning strike.