Wednesday, July 16, 2008

1Wire Installation Completed

I put in the final four sensors Monday night and started trying to integrate things into the system. I decided to have the temps dumped into mySQL and all other applications can get the temps for there. For now, I've modified the GetTemps.js jscript sample from the 1Wire SDK to poll the sensors, update their values in mySQL and then sleep for 5 minutes.

My next step is getting the temps into the TimeCommander+ since it controls HVAC. The TC+ previously relied on the LM34 sensors connected directly to its analog inputs, so it directly knew the temperatures around the house. With 1Wire, I had to create variables in the TC+ for the temperatures it needs and have starCOMUltra periodically update them.

Finally, I had to update my RRD scripts for graphing temps. Since the 1Wire temps are digital values, there's no need to do any smoothing or error checking that I occasionally had to do with the analog LM34s. Once I had the RRD scripts up and running, I was able to see how nice 0.1 degree accuracy looks. I happened to have 2 DS18B20s, while the others were different flavors of DS18S20s. The rooms with the more accurate DS18B20s had much smoother curves compared to the DS18S20s with their 0.5 degree accuracy. I discovered, though, that you can calculate more accurate values using extra data bits stored in the device. I just added that code to my script and set it off running.

No comments:

Post a Comment