Temperature Sensing using DS18B20 Digital Sensors
Moderator: Bob
- the1andonly
- Tribal Elder
- Posts: 772
- Joined: Sat Nov 10, 2012 8:17 pm
- Location: Northampton
Temperature Sensing using DS18B20 Digital Sensors
I know some people have used these with an arduino to measure temperatures around the Bongo.
My system has been in use since oct 14. I have 5 sensors sourced from china/ ebay ( water proof? sealed stainless tubes)
Recently 4 have taken to intermittantly show the 85 error signal but only with engine running (diesel 4wd) engine off all sweetness and light.
I am running the arduino via USB and a usb convertor to 12V (LB)
is it a sensor issue as 1 is totaly happy and 3 have recently started playing up (only with engine running)
or a Voltage issue
(LB is solar charged) and split relay charger.
Cheap USB /12V device
or something else
My system has been in use since oct 14. I have 5 sensors sourced from china/ ebay ( water proof? sealed stainless tubes)
Recently 4 have taken to intermittantly show the 85 error signal but only with engine running (diesel 4wd) engine off all sweetness and light.
I am running the arduino via USB and a usb convertor to 12V (LB)
is it a sensor issue as 1 is totaly happy and 3 have recently started playing up (only with engine running)
or a Voltage issue
(LB is solar charged) and split relay charger.
Cheap USB /12V device
or something else
- mikeonb4c
- Supreme Being
- Posts: 22875
- Joined: Sun Nov 05, 2006 10:49 pm
- Location: Living with Mango Bongo in the North West but with a tendency to roam
- Contact:
Re: Temperature Sensing using DS18B20 Digital Sensors
Are the sensors suitable for the environment they are operating in (vibration, for example). Were they cheap to buy. Could the answer lie somewhere in this area?the1andonly wrote:I know some people have used these with an arduino to measure temperatures around the Bongo.
My system has been in use since oct 14. I have 5 sensors sourced from china/ ebay ( water proof? sealed stainless tubes)
Recently 4 have taken to intermittantly show the 85 error signal but only with engine running (diesel 4wd) engine off all sweetness and light.
I am running the arduino via USB and a usb convertor to 12V (LB)
is it a sensor issue as 1 is totaly happy and 3 have recently started playing up (only with engine running)
or a Voltage issue
(LB is solar charged) and split relay charger.
Cheap USB /12V device
or something else
- g8dhe
- Supreme Being
- Posts: 10221
- Joined: Sun Apr 13, 2008 10:06 pm
- Location: Worthing, West Sussex.
- Contact:
Re: Temperature Sensing using DS18B20 Digital Sensors
Can you move the sensor around the other inputs and see if there is anything common? The other thing is if the wiring is running parallel with any other internal looms you might be getting induction into them which can be quite significant voltages when relays and solenoids start operating, the devices aren't rated for automotive use so its always a concern, likewise if you relying on on the chassis for return.
- the1andonly
- Tribal Elder
- Posts: 772
- Joined: Sat Nov 10, 2012 8:17 pm
- Location: Northampton
Re: Temperature Sensing using DS18B20 Digital Sensors
I was /am concerned about the quality of the supply spiking etc but parts have been in same position for almost a year.g8dhe wrote:Can you move the sensor around the other inputs and see if there is anything common? The other thing is if the wiring is running parallel with any other internal looms you might be getting induction into them which can be quite significant voltages when relays and solenoids start operating, the devices aren't rated for automotive use so its always a concern, likewise if you relying on on the chassis for return.
all sensor parts have a a common earth via the arduino (3 wire mode)
The 5V to the sensors is via the regulated arduino supply, though supply to arduino is more suspect.
All 4 engine sensors are combined in 1 position in engine compartment and then joined to rad monitor outside (ie in the cab ) before going to arduino.
I see something to check (ie what is common about the problem devices)
the connection
the temperature of sensor
the rad (works) has a separate connection and is lowest temperature.
cheap? same component (not assembly)mikeonb4c wrote:Are the sensors suitable for the environment they are operating in (vibration, for example). Were they cheap to buy. Could the answer lie somewhere in this area?the1andonly wrote:I know some people have used these with an arduino to measure temperatures around the Bongo.
My system has been in use since oct 14. I have 5 sensors sourced from china/ ebay ( water proof? sealed stainless tubes)
Recently 4 have taken to intermittantly show the 85 error signal but only with engine running (diesel 4wd) engine off all sweetness and light.
I am running the arduino via USB and a usb convertor to 12V (LB)
is it a sensor issue as 1 is totaly happy and 3 have recently started playing up (only with engine running)
or a Voltage issue
(LB is solar charged) and split relay charger.
Cheap USB /12V device
or something else
£6 for 5 from china
or £5 for 1 from UK
the same part, same silicon?
The temperature excursions are within spec
vibration?
the system works much better (poss no probs when engine off)
- g8dhe
- Supreme Being
- Posts: 10221
- Joined: Sun Apr 13, 2008 10:06 pm
- Location: Worthing, West Sussex.
- Contact:
Re: Temperature Sensing using DS18B20 Digital Sensors
Not uncommon to have something fail after its been stressed several times, the spikes can sometimes be horrific to watch on a fast scope, you'll never see them on a meter at all.
If its working when the engine isn't running then there is a big clue!
If its working when the engine isn't running then there is a big clue!
Re: Temperature Sensing using DS18B20 Digital Sensors
voltage spike. try changing from pin 2 to pin 3 and altering the sketch, you may have fried a track.
can you not reach the plug to debug on a laptop?
can you not reach the plug to debug on a laptop?
- the1andonly
- Tribal Elder
- Posts: 772
- Joined: Sat Nov 10, 2012 8:17 pm
- Location: Northampton
Re: Temperature Sensing using DS18B20 Digital Sensors
Yes i can debug using a laptop in vannovocaine wrote:voltage spike. try changing from pin 2 to pin 3 and altering the sketch, you may have fried a track.
can you not reach the plug to debug on a laptop?
which Pin 2 ,3 on DS18 or Arduino? thinking about it you must mean Arduino (you may have fried a track.
Re: Temperature Sensing using DS18B20 Digital Sensors
Also I believe they use a single wire bus (i.e. all sensors send their readings over a single shared common wire). If one goes faulty and does not share the bus properly it could affect the readings of the others. You could try disconnecting one at a time to see if it helps
- the1andonly
- Tribal Elder
- Posts: 772
- Joined: Sat Nov 10, 2012 8:17 pm
- Location: Northampton
Re: Temperature Sensing using DS18B20 Digital Sensors
All sorted
just soldered all fresh connections and heat shrink. one wire may have been able to short to cars earth.
Thanks all
just soldered all fresh connections and heat shrink. one wire may have been able to short to cars earth.
Thanks all
Re: Temperature Sensing using DS18B20 Digital Sensors
I'm tempted to make something like this.the1andonly wrote:I know some people have used these with an arduino to measure temperatures around the Bongo.
My system has been in use since oct 14. I have 5 sensors sourced from china/ ebay ( water proof? sealed stainless tubes)
Recently 4 have taken to intermittantly show the 85 error signal but only with engine running (diesel 4wd) engine off all sweetness and light.
I am running the arduino via USB and a usb convertor to 12V (LB)
is it a sensor issue as 1 is totaly happy and 3 have recently started playing up (only with engine running)
or a Voltage issue
(LB is solar charged) and split relay charger.
Cheap USB /12V device
or something else
What are you using to display the temperatures? Have you got it rigged to a buzzer if they get too hot etc? How did you attach the sensors? Any chance you could post up your code?
Thanks
- the1andonly
- Tribal Elder
- Posts: 772
- Joined: Sat Nov 10, 2012 8:17 pm
- Location: Northampton
Re: Temperature Sensing using DS18B20 Digital Sensors
sotal
pragmatic rather than pretty.
The Led is a tricolour
blue normal
red alarm
there are 6 sensor (the inside sensor does not display but all values saved to sd card)
if value exceeds limit the sensor number on top line changes to alm and led is red. a buzzer can also be triggered.
sensor positions:
bottom hose, Next to scav fan sensor, front stub on head to rad, rear of head, autobox.
Held in place by jubilee clips, bolts or cable ties
will Pm code
pragmatic rather than pretty.
The Led is a tricolour
blue normal
red alarm
there are 6 sensor (the inside sensor does not display but all values saved to sd card)
if value exceeds limit the sensor number on top line changes to alm and led is red. a buzzer can also be triggered.
sensor positions:
bottom hose, Next to scav fan sensor, front stub on head to rad, rear of head, autobox.
Held in place by jubilee clips, bolts or cable ties
will Pm code
Re: Temperature Sensing using DS18B20 Digital Sensors
Thanks
I've got a few of the cheap clone boards and have used them for a few things so should be able to set this up but any code/diagrams would be much appreciated.
Sensors look cheap enough on ebay.
I've got a few of the cheap clone boards and have used them for a few things so should be able to set this up but any code/diagrams would be much appreciated.
Sensors look cheap enough on ebay.