Forum

1 Wire Sensor Issue
 
Notifications
Clear all

1 Wire Sensor Issue

6 Posts
2 Users
0 Likes
7,621 Views
(@furynut)
Active Member
Joined: 7 years ago
Posts: 11
Topic starter  

Hello Everyone,

I am attempting to setup BruControl for a fermentation temp controller and having some hardware issues (I think).

The setup so far is very simple:

Arduino Mega w/W5100 Eth Shield and 1 x DS18B20 Sensor

I flashed the Ethernet firmware (E) and wired everything up as shown in this picture:

https://www.amazon.com/clouddrive/share/JlNbysmuSzJ0XWscSOcW7M5sGxqkI6EUnV88UdZyAZ3

I think I got everything in place according to the schematic. I can connect to the interface in BruControl just fine. Unfortunately when I add the sensor it never displays a temperature. It is my understanding that if I use one sensor it should be assigned Port 200 and Index 0. I also tested all my wiring and connections using a multimeter and all looks well. I read on here that someone had a bad resistor so I tried swapping mine out with no change. I tried a second temp sensor as well as removing the eth shield and reflashing to USB firmware (to eliminate the possibility of a bad connection between the shield and mega).

Any ideas?


   
Quote
(@pbruno3)
Reputable Member Admin
Joined: 7 years ago
Posts: 343
 

Hi. From the picture, the hardware looks correct. The 1-wire sensor should be tied (sensor:MEGA) ground:ground, +5V:+5V, and data:PIN 5. The resistor should be between data and +5V. I can't tell the value of the resistor from the picture. Measure it with a meter (if you have one) to make sure it's in the range of 4.7 k-ohm. (4700 ohm). 

You have the software set-up right. Please note that the sensors are indexed at MEGA start-up. They won't be found if wired after reset. So reset the board after wired correctly. 

One way to debug this is use the same terminal used to set up the network parameters (via the firmware installation). This will not work with the USB version of course, just the network version. You can just run the terminal directly without the install part. When the board boots (it will reset when terminal connects), enter setup, say Y to debug text, then N to network confit so it will load stored. Then once it starts it shours report 1W Sensors: 1. If it reports 0, it is not seeing it. 

 

Report back and let us know. Email info@brucontrol.com if you prefer 1:1 assistance. Thanks!


   
ReplyQuote
(@furynut)
Active Member
Joined: 7 years ago
Posts: 11
Topic starter  

Sorry for the delayed response, I got busy with work.

Thanks for the response and troubleshooting tips BrunDog.

Before I got the chance to see this, I decided to load a basic 1 wire sketch that shows the sensor address ( https://www.hacktronics.com/Tutorials/arduino-1-wire-address-finder.html). It seems like it is not picking up any of the 5 sensors I ordered. I guess this has nothing to do with the Brucontrol software.

I'm starting to think I got sensors from a bad batch or they were wired incorrectly. Instead of risking burning something out, I ordered bare Dallas DS18B20 sensors. I will make sure they work correctly with the hardware then solder in my own wires (Maybe cannibalize the non-working sensors).

I will keep the thread up to date.

 


   
ReplyQuote
(@pbruno3)
Reputable Member Admin
Joined: 7 years ago
Posts: 343
 

It seems odd that 5 of 5 sensors are not working. My guess is something is still not correct with the wiring. Please check your connections using a volt-ohm meter. Most important, remember that that sketch uses PIN 3 to read 1-wire data, not PIN 5 that BruControl uses. So make sure you switch the data line to PIN 3 for this test. Also, you should check for +5V on both sensor pins 2 & 3, and 0.0V on sensor pin 1. Make sure your resistor measures ~4,700 ohms (out of the circuit) as well.

Thank you for posting the link to the software above. This gives me a good ides to make a quick test firmware to perform a similar function for those who do not have Arduino software or know how to use it / program. As noted above, you can run the debug option to see the 1-wire devices found on the bus, but those connecting via USB cannot do this and perhaps a more comprehensive tester is in order.

Keep us informed!


   
ReplyQuote
(@furynut)
Active Member
Joined: 7 years ago
Posts: 11
Topic starter  

Ok, as is usually the case with these things the problem was user error.

I was using the wrong kind of resistor. After replacing all the wiring, sensors, and getting a new MEGA, the only thing left to replace were the resistors. I noticed everyone on online forums were using a different type than the one I had. Unfortunately I'm not really familiar with electronics and cannot find the original eBay posting for the resistors I initially purchased. All I remember is they were 1/2W 4.7K but the colors were different from what I saw everyone else using. 

I went on Amazon and bought some 4.7K Ohm, 1/4 Watt, 5%, Carbon Film Resistors. The colors are Yellow, Purple, Red and Gold. I got them today and tested them with my setup imagining it wasn't going to work but lo and behold I have temps!

Now I have an additional MEGA for future expansion.

Thanks BrunDog for the help. Now it's time for more configuration.


   
ReplyQuote
(@pbruno3)
Reputable Member Admin
Joined: 7 years ago
Posts: 343
 

Great to hear! Glad you resolved the problem. 

That said, I try to learn something from every user, and realize that we should add more information about the resistor in the documentation. I will do that to the schematic and order list for future users who are not familiar with resistor color codes. 

 

Let us us know how else we can help anytime!


   
ReplyQuote
Share: