Troubleshooting temperature sensors

Here is a checklist when a temperature sensor is not detected or regularly disconnecting:

  • Double check all connections on the OneWire bus. Check that no wires/strands are touching and that you don’t have isolation screwed in with the wires. Pull on each wire to check that it is not loose. In 90% of the cases I helped debug, the wiring was at fault.
  • Uninstall all temperature sensors by setting their function to ‘None’ and clicking apply. All connected sensors should only show up under ‘detected devices’.
  • Try the sensors one by one. Refresh device manager. Next, refresh with ‘Read values’ checked. Check that each sensor is detected and returns a value.
  • If you can detect a sensor, but it disconnects when you try to read values, the 5V line is disconnected.
  • If you have used the sensor in beer without a thermowell, and you got the cheap shrink wrapped ones instead of the silicone sensors we sell, this can be under the metal cap as well. If water/beer got in there somehow, the
    leads could have rusted.
  • A bad power supply can cause sensors to fail. Cheap phone chargers are usually not good enough to power the Raspberry Pi. Cheap USB cable have a too high resistance and therefore a too high voltage drop: use a quality USB cable. If the voltage on the Raspberry is too low, and you are powering the Arduino from the pi, this could cause issues with the temperature sensors.
  • A faulty sensor can cause a too high current draw that messes up the bus.
  • Swapping any wire with V+ on the sensor fries it. The sensor will get hot and from now on cause instability. Again, try them one by one. One sensor might mess it up for the rest.
1 Like

My sensors don’t work anymore. It’s weird. I’m able to see them (OneWire address displays) but it reads null value. All 3 of them.
As mentioned above it could be a power supply issue since I’m powering everything through the RPi. However, all was working well before…what changed is that my wifi dongle, while plugged to the RPi, was not connecting to the network, I finally managed to get it to talk to the router. Could it be that now it’s connected, it’s drawing more current thus causing this mess ?

This could be caused by:

  • 5V line to sensors disconnected
  • 5V is not actually 5V but lower, which in turn could be caused by:
    • Cheap phone charger for the Pi
    • Cheap thin USB cable causes a voltage drop

Temp sensor reads null value, device slot 0. Temp sensor has value for device slot 1. Switching sensor connections has no effect, null value always read for device slot 0 only. I reprogrammed the Arduino and the tail end of the log is posted below. Of interest is the message indicating that the temperature sensor disconnected pin for device assigned to slot 0. All wires seem to be properly connected, I have separate power supplies for Arduino and Rpi.

Also, when powered up and mode is off, status reported as Idle yet fridge is running!!!

=========================stderr======================================
Apr 06 2015 16:27:36 Found BrewPi v0.2.4, running commit 2a6f7f05 build 40, on an Arduino standard with a revC shield on port /dev/ttyACM0

Apr 06 2015 16:28:03 Installed devices received: []
Apr 06 2015 16:28:03 Available devices received: [{‘a’: ‘28A1EE3F0600000E’, ‘c’: 1, ‘b’: 0, ‘d’: 0, ‘f’: 0, ‘i’: -1, ‘h’: 2, ‘j’: 0.0, ‘p’: 18, ‘t’: 0}, {‘a’: ‘28B79D3F060000C4’, ‘c’: 1, ‘b’: 0, ‘d’: 0, ‘f’: 0, ‘i’: -1, ‘h’: 2, ‘j’: 0.0, ‘p’: 18, ‘t’: 0}, {‘c’: 1, ‘b’: 0, ‘d’: 0, ‘f’: 0, ‘i’: -1, ‘h’: 1, ‘p’: 2, ‘t’: 0, ‘x’: 1}, {‘c’: 1, ‘b’: 0, ‘d’: 0, ‘f’: 0, ‘i’: -1, ‘h’: 1, ‘p’: 5, ‘t’: 0, ‘x’: 1}, {‘c’: 1, ‘b’: 0, ‘d’: 0, ‘f’: 0, ‘i’: -1, ‘h’: 1, ‘p’: 6, ‘t’: 0, ‘x’: 1}, {‘c’: 1, ‘b’: 0, ‘d’: 0, ‘f’: 0, ‘i’: -1, ‘h’: 1, ‘p’: 19, ‘t’: 0, ‘x’: 1}, {‘c’: 1, ‘b’: 0, ‘d’: 0, ‘f’: 0, ‘i’: -1, ‘h’: 1, ‘p’: 4, ‘t’: 0, ‘x’: 1}]
Apr 06 2015 16:28:24 Arduino debug message: WARNING 2: Temperature sensor disconnected pin 18, address 28A1EE3F0600000E
Apr 06 2015 16:28:24 Device updated to: {“i”:0,“t”:1,“c”:1,“b”:1,“f”:9,“h”:2,“d”:0,“p”:18,“a”:“28A1EE3F0600000E”,“j”: 0.000}

Apr 06 2015 16:28:38 Device updated to: {“i”:1,“t”:1,“c”:1,“b”:1,“f”:5,“h”:2,“d”:0,“p”:18,“a”:“28B79D3F060000C4”,“j”: 0.000}

Apr 06 2015 16:28:55 Device updated to: {“i”:2,“t”:3,“c”:1,“b”:0,“f”:2,“h”:1,“d”:0,“p”:2,“x”:1}

Apr 06 2015 16:29:06 Device updated to: {“i”:3,“t”:3,“c”:1,“b”:0,“f”:3,“h”:1,“d”:0,“p”:5,“x”:1}

Apr 06 2015 16:29:17 Installed devices received: [{‘a’: ‘28A1EE3F0600000E’, ‘c’: 1, ‘b’: 1, ‘d’: 0, ‘f’: 9, ‘i’: 0, ‘h’: 2, ‘j’: 0.0, ‘p’: 18, ‘t’: 1}, {‘a’: ‘28B79D3F060000C4’, ‘c’: 1, ‘b’: 1, ‘d’: 0, ‘f’: 5, ‘i’: 1, ‘h’: 2, ‘j’: 0.0, ‘p’: 18, ‘t’: 1}, {‘c’: 1, ‘b’: 0, ‘d’: 0, ‘f’: 2, ‘i’: 2, ‘h’: 1, ‘p’: 2, ‘t’: 3, ‘x’: 1}, {‘c’: 1, ‘b’: 0, ‘d’: 0, ‘f’: 3, ‘i’: 3, ‘h’: 1, ‘p’: 5, ‘t’: 3, ‘x’: 1}]
Apr 06 2015 16:29:17 Available devices received: [{‘c’: 1, ‘b’: 0, ‘d’: 0, ‘f’: 0, ‘i’: -1, ‘h’: 1, ‘p’: 6, ‘t’: 0, ‘x’: 1}, {‘c’: 1, ‘b’: 0, ‘d’: 0, ‘f’: 0, ‘i’: -1, ‘h’: 1, ‘p’: 19, ‘t’: 0, ‘x’: 1}, {‘c’: 1, ‘b’: 0, ‘d’: 0, ‘f’: 0, ‘i’: -1, ‘h’: 1, ‘p’: 4, ‘t’: 0, ‘x’: 1}]
Apr 06 2015 16:29:28 Installed devices received: [{‘a’: ‘28A1EE3F0600000E’, ‘c’: 1, ‘b’: 1, ‘d’: 0, ‘f’: 9, ‘i’: 0, ‘h’: 2, ‘j’: 0.0, ‘p’: 18, ‘t’: 1, ‘v’: None}, {‘a’: ‘28B79D3F060000C4’, ‘c’: 1, ‘b’: 1, ‘d’: 0, ‘f’: 5, ‘i’: 1, ‘h’: 2, ‘j’: 0.0, ‘p’: 18, ‘t’: 1, ‘v’: 13.813}, {‘c’: 1, ‘b’: 0, ‘d’: 0, ‘f’: 2, ‘i’: 2, ‘h’: 1, ‘p’: 2, ‘t’: 3, ‘v’: 0, ‘x’: 1}, {‘c’: 1, ‘b’: 0, ‘d’: 0, ‘f’: 3, ‘i’: 3, ‘h’: 1, ‘p’: 5, ‘t’: 3, ‘v’: 0, ‘x’: 1}]
Apr 06 2015 16:29:28 Available devices received: [{‘c’: 1, ‘b’: 0, ‘d’: 0, ‘f’: 0, ‘i’: -1, ‘h’: 1, ‘p’: 6, ‘t’: 0, ‘x’: 1}, {‘c’: 1, ‘b’: 0, ‘d’: 0, ‘f’: 0, ‘i’: -1, ‘h’: 1, ‘p’: 19, ‘t’: 0, ‘x’: 1}, {‘c’: 1, ‘b’: 0, ‘d’: 0, ‘f’: 0, ‘i’: -1, ‘h’: 1, ‘p’: 4, ‘t’: 0, ‘x’: 1}]

You have set up your heater/cooler as inverted. Do you have a RevC shield? In that case that is correct. Otherwise, you might want to set it to non inverted, so the pin is low in IDLE.

A big update will come out in a few days for Arduino as well. Many improvements are included for OneWire reliability.
If it reads as null, your 5V line might be disconnected for the sensor. If you did not buy your sensors from our store, this could happen under the stainless steel probe as well on the cheap ones.

Thanks for the quick reply, I’ve tried a few tests, one of them was to switch the temp sensors, no change same result which I interpret as both sensors are functional as the first slot always reads null and the second slot reads a value. There is only 1 5V wire shared by both sensors so I don’t think it can be disconnected if one of the sensors always returns a value, no voltage would affect both sensors, would it not?

Do I have a RevC shield? I don’t know, I’ve had the Arduino for about 3 years or so. The Arduino is wired directly, I’ve been meaning to get a protoshield so I could solder all the connections, but haven’t yet. It doesn’t appear to harm anything as this is the version of the hex file I loaded into the Arduino. Would this make a difference? Would running these past few months this way slowly degrade some components on the Arduino? I will try flashing a different file and see what that does.

I have restarted everything and when I switch it back on, the fridge relay engages and the fridge runs although the system mode is Off and the Status in Idling. Using the one good sensor for Chamber Temp, I set the Fridge Constant temp below room temperature, the status says Cooling, yet the fridge is not running and the relay is open. Everything just seems really f****’d up and I’m wondering if the fault isn’t within the Arduino itself.

I’m ready to give up on this if I can’t resolve it reasonably soon. When your update is ready, is there some documentation somewhere which would tell me how to apply it? Thanks, your assistance is greatly appreciated, I really love this thing and I want to keep it going.

Ok, today I tried to troubleshoot this problem again. On the Maintenance Panel Device Configuration page, I have two Temp Sensor devices, one at Device Slot 0 which has a null value, and one at Device Slot 1 which has a temperature value, let’s say it’s 68.0 degrees. On the gui, I swapped the Device Slot assignments and refreshed the device list and read new values. Now, Device Slot 0 has 68.0 and Device Slot 1 is null. Does this mean I have a bad temp sensor?

Don’t just swap the slots, uninstall the sensor by setting the function to none, then click apply, then refresh.
Uninstall all of them first, until you have no installed devices. See which sensors show up in detected devices afterwards.

P.S. update will come out tomorrow.

Ok, thanks. I did as u suggested and still one of the sensors reports null. I uninstalled all the devices in preparation for replacing both temp sensors. I replaced one sensor at a time and now they both are reporting values. But now I have a new problem. It seems that the relays are not getting tripped. I will have to isolate the relay panel to further diagnose the situation. Any suggestions would be very much appreciated.

Hello all
I am having a problem with my temperature sensors and I was just checking that I wasn’t missing anything obvious. I replied to this old thread since I think it falls in line with this discussion.

I have a self-made arduino UNO-based system. I have checked and re-checked my wiring, both visually, manually (giving it a tug, shaking, moving, etc.), and using a meter, everything checks out.

The system randomly dies with the below error message. It can go sometimes for 10 days perfecly, and then die 3 times in a day. The system does not die only when the fridge cuts in, so I do not suspect my mechanical relays. Also, it sometimes dies at like, 3am, and I am in a house, so interference is less likely a cause.

Here is the debug output:

Jan 02 2016 23:05:28 controller debug message: WARNING 2: Temperature sensor disconnected pin 18, address 2855A53A060000B8
Jan 02 2016 23:05:28 controller debug message: WARNING 2: Temperature sensor disconnected pin 18, address 283379DC060000F6
Jan 02 2016 23:05:28 controller debug message: WARNING 2: Temperature sensor disconnected pin 18, address 288693DD060000F2

Unlike all the other exmaples I am finding here, there is no attempt to re-connect, and no more logging. The only way I have found to fix it is to power cycle the arduino. One time, I had to re-flash the binary onto the arduino since it was corrupted.

I simplified the graph to show this happening:

The spikes started happening after I wired in a low-pass filter on the beer temp sensor - when it wakes up I get high temps immediately.

The other piece of information is - when I found it has crashed, two of my sensors get warm to the touch.

Does this fit any prototype common problem people have had?
a) does it seem like bad wiring
b) could bad sensors cause this?

I checked the arduino spec and unfortunately I can’t direclty re-set the sensors in software (i.e., drop the 5v line to remove power), which would fix my problem. I may look at the source to see if I can put more logging info in, although I worry it may be a lot of work to get the build environment up…

Any input would be greatly appreciated!!

Edit - Yes I have tried everything I have found online, including removing and re-adding my devices in the brewpi software/

If your sensors are getting warm, they:

  • Will be unreliable now. One warm (broken) sensor can take down the entire bus. Replace any sensor that was warm.
  • Could be caused by bad wiring
  • If you have ‘waterproof’ sensors from eBay, the kind with shrink wrap, they could be leaking and corroding inside the sensor. Do not thrust these sensors to be waterproof. Peal away the shrink wrap from the bad warm sensors and investigate. The sensors in our shop have much better water proofing. I stopped selling the shrink wrapped version about 2 years ago for obvious reasons.

Thanks Elco for your quick reply.

After posting this entry, while eating breakfast I realized there was one place I did not check - I have wiring routed through the walls of my freezer. I’ll tear that apart and check everything inside there as well.

I think I will order new sensors. While I would love to support your operation, being in Canada, unfortunately your store seems a little pricey for me and finances are a concern. When the new ones come, I’ll add some waterproofing around the shrink wraps in case condensation is getting in there… Maybe some glue and extra shrink wrap. I am using a thermowell in the beer but condensation is still a concern.

I’ll try the above and keep the thread posted. Thanks for your help.

I was sitting next to the fridge all day and it seems that it does crash when the fridge kicks in. I missed this earlier apparently because I was not zooming far enough into the interface:

So, in addition to the sensors being possibly broken, my mechanical relays are suspect yet again. I will order one FOTEK SSR from Amazon for the fridge, as the mechanical seems to be okay for my 100W light bulb heater.

Three questions for anyone experienced

  • my mechanical relays are currently mounted right next to the arduino. I assumed this was okay, but moving it may improve my situation?
  • the fridge has its own relay in-line, which is built into a thermostat that is set to “always on”. Would bypassing this completely impact the inrush? assumption: no
  • I’m using a sainsmart arduino knock off… any experience with these being flakey?

Thanks again…

In fact, I think I will risk a double 5A SSR since they are reasonably priced here.

  • my heat source is 100W @ 120v
  • my freezer is rated at 1.30 amps based on the plate, so even with inrush I think 5A will be sufficient…

any words of caution?

Based on my own experience and stories of others, I would avoid fotek. There might be good ones and the bad ones might be counterfeit, but I would just avoid the brand.

The main benefit of an SSR is that it switches on a zero crossing of the AC current. It is not the mechanical relay that is causing the interference, it is the possibility of switching when the AC is at its peak. The motor and start capacitor have very low resistance at this point and a high inrush current will result. When an SSR switches on a zero crossing of the AC voltage, the current will slowly ramp up with the AC sinus.

Bypassing the internal relay in the thermostat is a good idea.

Sainsmart is decent, I have sold them in the past.

5A is probably enough, but don’t take my word on it. The SSRs should have a small heatsink.

We ship to Canada for about 14 euro.

Thanks Elco,
I think I will buy a dual Sainsmart 5A SSR. I can get these including delivery for $20 CAD even, which is about the same as shipping from your store unfortunately. I do appreciate the help and hope I can contribute in some way, as I have benefited greatly from your help and work.

I also see the point about the in-line mechanical SSR at the fridge needing to be bypassed, as even if I put the SSR that switches at the zero crossing, there may be a delay before the mechanical relay triggers, causing an in-rush.

Thanks again

UPDATE, possibly fixed.

TL;DR, my GND was connected to my fridge’s household earth connection, and disconnecting this seems to have fixed this problem and all my other interference problems.

The things that come to you while laying in bed trying to sleep… I was thinking about my wiring, and I realized that through wiring my sensors through the wall of my fridge, my GND gets linked with the house-hold earth line.

The frame of my fridge (including cover) is grounded well to earth. I drilled a hole to put my sensor connector chassis-mounted on the wall of the fridge, which has a screw-and-nut style mounting. At this point, the chasis of the sensor plug makes contact with the fridge chassis, thus connecting the two.

Again, not an electronics person here. I assume that the GND / EARTH coupling would not generally be a problem, but I can also see how this would propagate EMI into my system much more easily.

All my EMI and typical crashes seem to be fixed by bypassing that wiring temporarily. I will take that out, isolate it from the frame, and put it back.

Hope this helps someone!

Quick update - this indeed fixed my problem. I have received the SSRs but will wait until this lager is ready before swapping it out. The whole setup has been rock solid without even a hint of interference or lockup now for nearly 2 weeks.

Unable to detect temp sensors via Maintenance panel, yes probably something I’m missing but I have scoured the internet and not found the answer.
Script is running
BrewPi v0.2.10 build unknown, running on an Arduino Uno with a revC shield on port /dev/chamber1
I have measured voltage at sensor side of connector and get 4.99 volts
4.7K resistor between positive and data wire
Data wire plugged into A4
I have swapped UNO boards and sensors without success
Here’s the log stderr.txt
Installed devices received: []
Available devices received: [{“c”: 1, “b”: 0, “d”: 0, “f”: 0, “i”: -1, “h”: 1, “p”: 2, “t”: 0, “x”: 1}, {“c”: 1, “b”: 0, “d”: 0, “f”: 0, “i”: -1, “h”: 1, “p”: 5, “t”: 0, “x”: 1}, {“c”: 1, “b”: 0, “d”: 0, “f”: 0, “i”: -1, “h”: 1, “p”: 6, “t”: 0, “x”: 1}, {“c”: 1, “b”: 0, “d”: 0, “f”: 0, “i”: -1, “h”: 1, “p”: 19, “t”: 0, “x”: 1}, {“c”: 1, “b”: 0, “d”: 0, “f”: 0, “i”: -1, “h”: 1, “p”: 4, “t”: 0, “x”: 1}]
Any help greatly appreciated…

Please see here: