Web Controlled All-in-One Temp Controller

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
thanks to the help of some of the guys in the chat I realized I'm an idiot, it had grabbed a dhcp address.
 
Does distance effect the readings on the temp sensors?
If so how much, and can it be compensated for in the firmware?
 
Distance doesn't affect the reading itself. The DS18B20 is a digital thermometer, so the temp reading is completely handled in the device, and it sends a digital reading back to the controller. The issue I had with distance had to do with the signaling to and from the device from the controller, and the operating mode I was trying to use the device in. Normally the DS18B20 requires a +5V power line separate from the signal line (i.e. it requires 3 wires). There's an operating mode that only uses 2 wires, called 'parasite' mode, where the device takes power from the signal line. I was trying to use parasite mode, and ran into trouble with pushing enough power over the signal line when running long distances (over 50 feet) thanks to the added resistance in the longer wire. I was able to overcome that by lowering the pull-up resistor value. Once I got the signal stable it was correct at all times.
 
Update: I am able to read as many as 4 DS18B20 sensors in powered mode with this board. (I only have 4 to test with so I can't say if all 8 that are claimed by CAI will work.) Two of these are at the end of 100' of 6 wire telephone cable I bought at Walmart, the wires of which are solid core and appear to be 24 AWG. I am powering the sensors with a separate 5V supply rather than using the 5V on the humidity sensor connection.

I tried to use the 50' headphone extension cords I mentioned before but for whatever reason, every time I introduce them into the mix it quits working. I verified the pinout on the cable. At this point I'm giving up on them in favor of using RJ-style plugs and jacks.
 
Could one of you using this please post a screenshot of the interface. I am going to start thinking about computer control when my rig is finished.....I will be lost with no project to do when my rig is complete, so I figure this could give me something to do for the winter.

I am thinking about Aurdino, and I looked at the 1-wire posts too. Just trying to decide which way to go. Thanks
 
Ok, so the first one is of the main screen and the second one is of a page to set rules for one of the outputs.

webcontrol.png


and number 2

webcontrol1.png


There. Just couldn't get them to be very readable smaller.
 
<<snip>> Normally the DS18B20 requires a +5V power line separate from the signal line (i.e. it requires 3 wires). There's an operating mode that only uses 2 wires, called 'parasite' mode, where the device takes power from the signal line. I was trying to use parasite mode, and ran into trouble with pushing enough power over the signal line when running long distances (over 50 feet) thanks to the added resistance in the longer wire. I was able to overcome that by lowering the pull-up resistor value. Once I got the signal stable it was correct at all times.


Hey "Maddog", could you explain what a "pull-up" resistor is?

Also, are you using twisted wire? I've been told that it can make a big difference in the performance when not using the 5 Vdc.

I have one system that's running about 35 ft at the longest distance, 4 sensors branching from the tree about 20 ft into it (probably 60ft of cable total), all via the passive, single circuit method, using regular cat 5 twisted cable. Have never had a problem, but I'm only reading between 'bout -10F to 100F temps. Guess I should also note that I'm using DS18S20 instead of the B version everyone is talking about here. The output from this system can be seen in real time (updated every 10 minutes) here:

Cellar Monitor

Another difference is that I'm going directly from a PC using the DS9097U adapter.

One last note, I read somewhere that the 5 Vdc wire was needed if measuring temps in the higher range. But in my initial testing, they seem to read just fine using straight phone line, and distances of about 10 ft. (no tree built yet).

 

Hey "Maddog", could you explain what a "pull-up" resistor is?

It's a resistor you use to pull the line high when there's no load. They are used in circuits where you want the line high at all times unless somebody actvely wants to pull it down to 0. In the case of the DS18B20 in parasite mode, you want the DQ line to be high when the controller isn't trying to talk on the OneWire bus, because the DQ line charges a capacitor internal to the DS18B20 to provide it power to do its measuring and communicating. The controller and thermometer signal by modulating DQ.


Also, are you using twisted wire? I've been told that it can make a big difference in the performance when not using the 5 Vdc.

I assume you mean twisted-pair like an Ethernet cable. At present I am not, but I think you may be right in its affect on signal quality. I will do some more experimenting.


Very cool! I'm an old Perl guy myself. I will have to check out the code.


One last note, I read somewhere that the 5 Vdc wire was needed if measuring temps in the higher range. But in my initial testing, they seem to read just fine using straight phone line, and distances of about 10 ft. (no tree built yet).

Maxim has some white papers that show how to set up OneWire bus topologies way longer than the 100' I am able to verify, even using parasite mode.
 
I don't believe that twisted pair will help at all here, but it certainly wouldn't hurt. I'd still use it. Here's my reasoning. I could be wrong...

Twisted pairs are usually used for differential pair signals such as Ethernet, RS485/RS422/ USB, LVDS. Your 1-wire protocol is not a diff pair; it is a single-ended signal referenced to gnd. FYI, the wires are twisted to ensure any induced electrical noise is nearly equal on both wires of the pair, and thus the common-mode rejection at the receiver can completely "cancel out" the noise.
 
Thanks for that explanation MD. I'll have to play around with that, as I'm looking at expanding my current layout to include more sensors.

As par with my usual setups, I pushed the limits on the worse type of topology by using the star layout. Relative to the distances that they describe, I'm probably on the short side.

The twisted pair is probably most helpful with preventing interference, but I have heard others talk about it helping to make a long topology reliable. I have no idea whether this is true or not, or even if I got that tidbit straight, for that matter. Not unlike me to twist things up a bit in my mind ;) The mailing list for the automation software I use (Misterhouse) has had quite a bit of discussion over the years about using twisted pair with their 1-wire. These guys can get quite elaborate with their setups.

As a final note, here's the white paper on "Reliable Long Line 1-Wire® Networks" which only mentions twisted wire once, and even then doesn't explain why they use it.
 
Back
Top