I have though up a circuit which will help me on a project i am working on. The basic outline is as follows:
I have 5 ports into which i can plug in up to 5 DS18*20 temperature sensors. The ports are numbered 1 - 5.
The problem i came accross in the early stages was, how do i know in my code which sensor ROM code is for which sensor (without having to force a higher temp and read all of them to see which code is higher.)
Say i had sensor in port 1 monitoring a power supply internal temp, Sensor in port 2 monitoring water temperature somewhere. And a sensor in port 3 monitoring another temperature somewhere else.
How could i pair the locations of the sensors (port or physical) to the rom codes?
This is where i thought of the attached circuit(It may be overkill, and may be missing some componenets such as resistors etc. But that is what this thread is for).
The idea is, each sensor port has an address of its own. On initialization, the shift register is fed the relevant bits to turn on one DS1820 at a time and read the ROM code then assign that rom code to that port name.
After all 5 ports have been individually turned on, and ROM codes discovered/not found, the shift register is fed all 1's to turn all DS1820's on.
So the question:
1. What transistor should i use to switch the DS1820's on/off (or maybe even a trasistor array? i was looking at this)
2. Am i missing any resistors (maybe on the transistors or something) if so what values would you suggest.
3. Can you think of a better way to do this, other that plugging each individual sensor in to its own digital IO port on the Netduino?
4. Can you offer any modifications to make this more effecient etc...
Thanks for your help on this, Constructive critisism is appreciated and any suggestions welcome.