Temp sensor limits; ST_Anything

I have a Mega 256 with a 5100 shield. I have been using St_Anything for a couple of months. I already have 5 DS18 sensors that are working. I want to add another ds18 . I changed the script to give me 6 sensors. I get a new sensor that is created it ST with a temp of -196.6f. No matter what I do I cannot get that last sensor to behave. It is about 25 feet away from the Mega and the wiring is over cat5. I am using a 9v power supply to power the Arduino. All the sensors are of the same make and model, brand new. I am using the power from the Mega to power the sensors. I also have two 8 port relay cards that are also powered by the Mega. Now so far the most relays that are active is 4 at any given time. Could I be running into a low voltage issue? I can setup a separate power supply for the sensors and the relays. Any ideas are much appreciated. I need to get this last sensor working since it is in our bedroom and it needs to work a relay to turn on the heat. I live in Michigan so it will be important in the near future to get this working :))

Thanks

Tagging @ogiewon

1 Like

Are you daisy chaining all of the DS18B20 sensors together on a single pin? Or using a pin per temperature sensor?

As for the relays, yes you need to power the coils of the relay with a direct feed from a power supply. The Arduino cannot supply enough current at 5v for all of those relays.

This site has a decent explanation.

1 Like

Thanks Dan,

I am using a single pin for the sensors. So it is possible to use a pin for each sensor then? Thanks for the link to the powering the relays. I will separate power supplies this weekend then

Yes, you can use a pin per sensor, but it adds to the wiring. Perhaps you’ve reached the limit for a single pin and the distances you’re using? Just a guess. You could use 3 on one pin and three on another pin. If you try this, make sure the second group uses a name like “temperature0” as that will cause the three temp sensors in ST to be named “temperature01”, “temperature02”, and “temperature03” to keep them unique from the first group.

Got another question for you Dan…the only risk with leaving the jumper in place is frying your microcontroller if you get a short between neutral and common on the high voltage side of the relay, correct? Are there other risks to leaving the jumper in place and switching it that way? I’ve definitely done that before without a problem. Some of the relay “shield” boards for the Feather and D1 mini don’t even give you the option of powering it from a separate supply and they are rated for mains voltage.

IMHO, the jumper between Vcc and JDVcc should definitely be removed when using an external power supply for the relay board. You could be using two separate power supplies, and even if they are both rated for 5Vdc, one will be higher than the other causing current to flow from the higher voltage supply into the lower voltage supply. Not a good idea.

If you’re using one 5Vdc power supply to power the Arduino and the relay board, then you really don’t need to worry… but most people power an Arduino via the barrel connector which needs ~9Vdc to allow the 5Vdc voltage regulator chip to step down the voltage and account for losses in form of heat. It is the Arduino’s 5Vdc voltage regulator chip that is the limiting factor for maximum current. Thus, the need for an external power supply for current hungry devices like 16 relays!

I thought I did my due diligence when I started setting this allup, as far as power goes. But apparently not. I just got the 9v ps you suggested in another thread Dan. So that is going in and I think I have a 5vdc power supply I can use to power the relays and the sensors.

The DS18B20’s can easily be powered from the Arduino’s 5vdc pin. It is only the coil of the relays that need external power.

What specific model number are your relay boards? Can you post a link to the product page? I am wondering what voltage range the coils support. Never know, you might get lucky… If not, a simple 9Vdc to 5Vdc step down voltage regulator may be all you need.

here’s the link to the boards I am using

Gotcha! Thanks…I appreciate you taking the time to explain.

I separated the power supplied for the relays and the Mega. Adding the next temp sensor still shows no input. I tried to log into groovy to look at the log, but I can’t login and the password reset isn’t working. Maybe I should bag it for today… Dan you asked how I had the sensors wired. I have 4 sensors, on two different wires. two sensors on separate wires.