I've installed a few DS18B20s (the waterproof kind with the pre attached cables) in my DC to AC inverter, but when switched on they sometimes fail to give a reading (the usual -127 degrees thing).
Is there some way I can prevent this, or does anyone know of a better sensor to use for this?
It's not consistently one sensor that gives false readings, it seems to vary between all of them
I have tried changing the standard 4.7k resistor between +V and Data to a 3.3k or a 2.7k as suggested elsewhere but it doesn't seem to make much if any difference to it.
Will I just need to build some kind of system into my sketch to ignore these readings? since my plan is to flip a contactor if the temps are too high.
missdrew:
If the reading only fails every now and then, I would ignore it if it reads the -127.
Unfortunatly I think the problem extends to it making some sensors think that they're reading higher temps than they actually are, not just completely disconnecting.
Otherwise I'd probably just go with that solution.
JCA34F:
Where are the sensors located in relation to the inverter?
There's one on the main transformer, two on the mosfets and one externally to measure room air temp.
All of them are acting flakey but work fine when inverter is switched off.
Another thing I forgot to add is that the temp sensors are not detected properly at arduino startup when the inverter is switched on, which is a bigger problem for me but could just be my bad code.