One -wire....
What is it? what does it do? why would I like it?
Firstly a couple of things to know.
Accurate Measurement of a physical parameter is hard to do. Just trying to measure a voltage across a room involves wires which unless carefully designed will mean that the voltage at one end of those cables will be different from the voltage at the other. Add in a change of temperature and what those long wires might pick up from the mains wiring on your house and you can see that when someone says it's exactly 12 Volts that really can mean almost nothing.
Once you realise that then if you think of the traditional Powerstation control room that may exist on sites that are the size of several fields then it is easy to see that the monitoring of such an enterprise is probably a fair bit more involved than just running wires which initself is a fairly involved task.
So what's different?
Well it's your Digital ain't it?
If I measure 12 Volts with my recently calibrated good old fashion AVO meter with it's carefully prepared mirrored scale I might well read 12.7 Volts and given the quality of the meter then you probably can say that you have 12.7 volts. If I shout that reading down a telephone line to the control room then the accuracy of that is very high. It only starts to fail when the telephone line gets so noisy that you can't hear anything. And that is what digital has done. You can get a small integrated circuit ( a square black plastic beastie with 8 connections about the size of small shirt button ) that can measure voltage accurately, because that is what it's designed to do. It will have compensation on it for changes in temperature, and it will read 12.7 volts as accurately as the AVOmeter. So it can be placed almost exactly at the point where the measurement is made. So how is this displayed ? well the AVOmeter has a fine clcokwork like mechansim and a finely defined scale with a mirror behind it so you can be sure your looking squarely at the meter to get the correct reading and in this case the thin hair like needle will sit over the top of it's own image in the mirror and also over the scal reading that corresponds to 12.7 volts. So that's how you know it's passing enough electrons to be 12.7 volts.
With the chip things are a little different. It has a set of patches of memory some of which are full of electrons and some of which aren't. The design of the chip means that the accurate electrical circuit has made those patches correspond to 12.7 expressed in a rather complicated layout that suits the computer world (it's binary) rather than a base ten number that suits it. BUT because we know that the patches are laid out in a specific way and that way is consistant then we can translate those on's and off's into 12.7 Volts.
So we need something to do that translation for us. But the lovely thing about that is that unlike the AVOmeter we do not need to have the reading mechanism at the same point as the measurement bit, as long as as well as laying out the memory patches in a specific way we transfer the result to the measuring mechanism in a standard way.
That's great cos we can easily store those digital results and we could deal with several measuring devices using only one monitor bit. So that's what One-Wire is in principal. IT a range of measuring devices that can all speak the same language down a wire that will be accurate if it's intelligible, to a system that understands that language and can then display the correct result.
The chips can measure most things
http://www.maxim-ic.com/products/1-wire/ and address ( sic) a couple of other aspects that might not be instantly obvious. firstly how do we know which device is which? Well so solve this one the chips have a characteristic that is fairly rare in moderm electronic devices. They are all slightly different. They have another set of electric patches that rather than being changeable have a unique number burnt into them, and the manufacturer garentees that they are unique. It means that moving down the wires holding this all together you have values and addresses, but since that's all part of the design it' no problem. But a wire is a pretty dumb thing, and in relative terms electricity can only flow one way or another but not at the same time. Well once again the design of the system comes to the rescue. When the controller device which will nearly always be connected to a computer of some kind shouts a particular message, then all the connected device EXCEPT the one that is being addressed shut up for a bit and let the one device that is being addressed shout back. Very clever that bit cos when it's combined with the unique ID's you have a system that can use only one wire to transfer all this data, and rather than an individual wire going to each device you can connect all the devices to the same bit of wire and they all behave properly cos they are designed to do so. Hence ONE-WIRE !!
Actually you can't have just one wire. Because a voltage has to be relative to something and the two devices that wish to communicate have to be relative to each other. Think of a battery. When you measure the voltage you use two wires and it tells you there is 1.5 volts across the battery. If you only connect one wire to the battery then the meter won't do a thing.
So to get our One-wire measuring thingy's to actually do things there has to be the signal wire and a connection ( it doesn't nccasserily mean it has to be a wire , but its good practice to make it one) that way the electrons can flow round the loop properly and all the magic described above can happen. So it's not One Wire it's really two wire, and we haven't actually supplied one other characteristics that the little chip devices need. Power. Now One-wire can pull a clever little trick here where the device can suck enough power out of the signal wire
to satisfy it's rather minimal demands, so it can run across two wires but althou' it works fairly well with a couple of devices it doesn't work much above that and it's also fairly dodgy in the presence of hum from mains and such like... so in this correspondents view you need a third wire to power the devices.
So that's it really you can connect many ( it can be hundreds ) of little sensors onto three wires that interconnect the whole rig and it works over 20 or so metres back to a computer that can read all these values in a system that is probably more accurate than the sort of stuff that used to keep powerstations running properly. And it's cheap. The sensros cost a couple of quid and the interface bit ( which is a USB plug in device nowadays) will cost you about 30 pounds and if you can do the wiring and the soldering you can monitor all kinds of things in all kinds of places. Quite what is used to display all this stuff is a different problem, but funnily enough there might well be a community solution to that quite soon.
Oh before we move on there are a couple of other observations,
Firstly. DO NOT CONNECT ONE-WIRE EQUIPMENT DIRECTLY TO THE MAIN IN ANY WAY SHAPE OR FORM. KEEP THEM COMPLETELY SEPARATE.
That doesn't mean it can't be used to measure mains devices but the design of such devices required quarenteed seperation and unless you know what your doing here stay well away. A computer with all it's metal elements at mains voltage is perfectly possible to do this way and that will kill people. So Don't do it.
ONe-wire is proprietary, it's a published format but it's really only made by one manufacturer Dallas/Maxim and they reserve the right to alter things. It could all disappear tomorrow and leave only bleating. It's not an open format like 12C or such like. So that is a bit of a pain.
But other than that if you want accurate measurement of temperature or humidity or voltage or light levels or rotational speeds or , or , or then one wire is probably the way to go in the domestic environment.
Look at the link above if you are more interested and certainly hobbyboards
http://www.hobby-boards.com have supplied my bits and pieces, and they genuinely do work.
If anyone wants any further information then stick it on this thread and I'll attempt to give my personal view of the issue.
Chris@wyleu