Multiple temperature sensors (Arduino)

Technical questions and answers about the Mazda Bongo

Moderators: Doone, westonwarrior

User avatar
Driver+Passengers
Supreme Being
Posts: 2019
Joined: Mon Mar 14, 2011 1:56 pm
Location: Fife

Multiple temperature sensors (Arduino)

Post by Driver+Passengers » Thu Sep 08, 2011 10:18 pm

The temperature sensors jaylee found on eBay look great (see viewtopic.php?f=3&t=50699). I've already got a couple of these cheap button-cell LCD sensors in my van and I wouldn't be without them now - one jubilee clipped to the hose stub (what are folk talking about "difficult to install"??! :lol: :lol: ) and one in the engine bay. I thought of buying a couple of the 12V LED ones, but wanted to dabble a bit myself... :roll:

I lucked out and got 20x DS18B20 sensors on eBay for around 18p each - they're normally over a quid each. These are Dallas 1-wire digital sensors (probably just a thermocouple internally), with the advantage being that I should be able to hook up as many as I like without using up all my ADC pins - just one digital pin for the lot. They also have a built-in alarm function with upper and lower thresholds which, while not necessary, make the coding easier.

Here's my setup (note: only 1 wire to read them all)...

Image

Image

Yes - I've lost one already! #-o

Sample rate is probably <1 second for the lot. The idea is to cable them up, epoxy the ICs into small lengths of s/steel tubes and run them around the van - the normal hose locations, as well as internal/external ambient, air duct, blah blah. Basically, no restrictions other than routing them to the right places. They're not supposed to be deployed in a star topology as performance may degrade due to signal reflections, etc... but that's easily solved by running one or more busses (use a couple more pins... whatever!)

Lots more plans for the 'duino, but temperature sensing is first. (Mod: feel free to move this thread to "Pimp my Bongo" if it starts getting out of hand ;))
Image Image
What she doesn't know won't hurt me.
User avatar
Driver+Passengers
Supreme Being
Posts: 2019
Joined: Mon Mar 14, 2011 1:56 pm
Location: Fife

Re: Multiple temerature sensors (Arduino)

Post by Driver+Passengers » Thu Sep 08, 2011 11:20 pm

Driver+Passengers wrote:... probably just a thermocouple internally
I meant thermistor. Not forgetting the power circuitry, RAM, logic, ADC, etc...
Image Image
What she doesn't know won't hurt me.
tallbongo
Bongolier
Posts: 396
Joined: Sat Jul 31, 2010 5:40 pm
Location: Central Scotland

Re: Multiple temerature sensors (Arduino)

Post by tallbongo » Fri Sep 09, 2011 12:27 am

Driver+Passengers wrote:The temperature sensors jaylee found on eBay look great (see viewtopic.php?f=3&t=50699). I've already got a couple of these cheap button-cell LCD sensors in my van and I wouldn't be without them now - one jubilee clipped to the hose stub (what are folk talking about "difficult to install"??! :lol: :lol: ) and one in the engine bay. I thought of buying a couple of the 12V LED ones, but wanted to dabble a bit myself... :roll:

I lucked out and got 20x DS18B20 sensors on eBay for around 18p each - they're normally over a quid each. These are Dallas 1-wire digital sensors (probably just a thermocouple internally), with the advantage being that I should be able to hook up as many as I like without using up all my ADC pins - just one digital pin for the lot. They also have a built-in alarm function with upper and lower thresholds which, while not necessary, make the coding easier.

Here's my setup (note: only 1 wire to read them all)...

Image

Image

Yes - I've lost one already! #-o

Sample rate is probably <1 second for the lot. The idea is to cable them up, epoxy the ICs into small lengths of s/steel tubes and run them around the van - the normal hose locations, as well as internal/external ambient, air duct, blah blah. Basically, no restrictions other than routing them to the right places. They're not supposed to be deployed in a star topology as performance may degrade due to signal reflections, etc... but that's easily solved by running one or more busses (use a couple more pins... whatever!)

Lots more plans for the 'duino, but temperature sensing is first. (Mod: feel free to move this thread to "Pimp my Bongo" if it starts getting out of hand ;))
You didn't half luck out. I've just had a quick look at the data sheet and that is incredible functionality for 18p a pop. Datasheet is here http://www.rev-ed.co.uk/docs/ds18b20.pdf for anybody who is interested.

What have you connected these to? Are you intending to install them with some programmable interface (cheap uC) or just some analogue circuitry once you have set the alarms? You could have a really good monitoring system with backup sensors etc with those!

Have you had a chance yet to evaluate their performance above 70 deg C. The errors seem to be increasing exponentially, but I doubt they'd be more than a few degrees out at 100 deg C - pretty typical of a thermistor but I won't go into that again!
95 N Reg 4WD Manual AFT Bongo

Image Image
User avatar
Driver+Passengers
Supreme Being
Posts: 2019
Joined: Mon Mar 14, 2011 1:56 pm
Location: Fife

Re: Multiple temerature sensors (Arduino)

Post by Driver+Passengers » Fri Sep 09, 2011 10:20 am

tallbongo wrote:You didn't half luck out. I've just had a quick look at the data sheet and that is incredible functionality for 18p a pop. Datasheet is here http://www.rev-ed.co.uk/docs/ds18b20.pdf for anybody who is interested.

What have you connected these to? Are you intending to install them with some programmable interface (cheap uC) or just some analogue circuitry once you have set the alarms? You could have a really good monitoring system with backup sensors etc with those!

Have you had a chance yet to evaluate their performance above 70 deg C. The errors seem to be increasing exponentially, but I doubt they'd be more than a few degrees out at 100 deg C - pretty typical of a thermistor but I won't go into that again!
Because they are 1-wire, you need a master device to control them (request sampling to begin, read back, scan for alarm status, etc...) The Arduino is probably a cheap enough board for this - depending what else I add to it, I may replace the one I'm using now with a smaller/cheaper unit but the ease of use of the Arduino puts it at the top my list. (I used to code PICs in assembler - never again!)

The datasheet quotes a temperature range of -55°C to +125°C and is accurate to ±0.5°C over the range of -10°C to +85°C. I've configured them to 9bit resolution (0.5) - no point in going any higher. My hose stub has never gone above 82 while driving and 86 stopped (so far). Once I get a couple sealed then I'll pop 'em in water.
Image Image
What she doesn't know won't hurt me.
User avatar
mikeonb4c
Supreme Being
Posts: 22877
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: Multiple temperature sensors (Arduino)

Post by mikeonb4c » Fri Sep 09, 2011 11:38 am

Wow - I wish I had a brain like wot u have got, cos this all sounds like great fun. The expression 'too much information' comes to mind, mind you. How might all this data be bundled up so as to present to a driver (whose eyes and focus needs to be on the road) as a heads-up warning when and only when (s)he needs it? Or are you thinking of all this only in terms of data gathering, logging and analysis? My biggest concern in relation to the latter is the problem of obtaining comparable data across a good test population of Bongos. In that respect, I wish more effort went in to encouraging standard fitting position for the TM2 alarm, and the subsequent gathering and collation of data (using a simple web based form where users can enter figures for themselves), so that normal and abnormal temp patterns could be established and publicised. Speaking as an ex-marketeer, I feel that doing that should ultimately help promote sales of the product, not to mention greatly improving its value but......hey :roll:
User avatar
Driver+Passengers
Supreme Being
Posts: 2019
Joined: Mon Mar 14, 2011 1:56 pm
Location: Fife

Re: Multiple temperature sensors (Arduino)

Post by Driver+Passengers » Fri Sep 09, 2011 12:09 pm

mikeonb4c wrote:Wow - I wish I had a brain like wot u have got, cos this all sounds like great fun. The expression 'too much information' comes to mind, mind you. How might all this data be bundled up so as to present to a driver (whose eyes and focus needs to be on the road) as a heads-up warning when and only when (s)he needs it? Or are you thinking of all this only in terms of data gathering, logging and analysis? My biggest concern in relation to the latter is the problem of obtaining comparable data across a good test population of Bongos. In that respect, I wish more effort went in to encouraging standard fitting position for the TM2 alarm, and the subsequent gathering and collation of data (using a simple web based form where users can enter figures for themselves), so that normal and abnormal temp patterns could be established and publicised. Speaking as an ex-marketeer, I feel that doing that should ultimately help promote sales of the product, not to mention greatly improving its value but......hey :roll:
No such thing as 'too much information' - only inadequate analysis. :wink:

Deciding what to do re: datalogging vs in-vehicle display is an important consideration. Obviously, I'm going to want a couple of numerical temp displays, couple of LEDs and a buzzer in car (Benny Hill in beeps when the temp goes critical??) I don't know. Perhaps a wireframe bongo with heatmap overlay? 3d rotatable, multi-touch zoom. #-o [-X #-o This is where I get carried away by men in white coats.

Various thoughts, regarding logging, but something like rrdtool could be used to store/display the data. It is a project which lacks focus other than mucking around with electronics as well as the vehicle. Add a 3-axis accelerometer, GPS, remote control... ;)

Re: sensor placement - I know there are and have been many discussion on the subject. I plan to use them all!!! :lol: :lol: :lol:
Image Image
What she doesn't know won't hurt me.
User avatar
haydn callow
Supreme Being
Posts: 5777
Joined: Mon Jan 08, 2007 9:50 pm
Location: Somerset
Contact:

Re: Multiple temperature sensors (Arduino)

Post by haydn callow » Fri Sep 09, 2011 12:20 pm

I wish more effort went in to encouraging standard fitting position for the TM2 alarm,

I have been telling every person who has bought a TM-2 over the past couple of years (and providing a photo of fitment area) exactly where to put the sensor ...A position where any DIY'er can fit it.......this was done to do exactly what you are suggesting.....giving us a level field to take data from......90% have been fitted in this way....however the guys on here who are a bit more inquisative have experimented with "other" positions and these of course have been the ones reported on hrer..

No problem there but it does muddy the data...

I can only suggest where to place the sensor...others will decide where they want to put 'em.

My argument is....it must be a DIY job...we are trying to save cylinder heads....so measure the cylinder head temp and if it goes above normal running temps.....let the alarm tell you.
http://www.coolantalarm.co.uk
Developer of the Mazda Bongo Coolant loss Alarm
Also BMW Clocks
User avatar
Driver+Passengers
Supreme Being
Posts: 2019
Joined: Mon Mar 14, 2011 1:56 pm
Location: Fife

Re: Multiple temperature sensors (Arduino)

Post by Driver+Passengers » Fri Sep 09, 2011 12:39 pm

haydn callow wrote:I wish more effort went in to encouraging standard fitting position for the TM2 alarm,

I have been telling every person who has bought a TM-2 over the past couple of years (and providing a photo of fitment area) exactly where to put the sensor ...A position where any DIY'er can fit it.......this was done to do exactly what you are suggesting.....giving us a level field to take data from......90% have been fitted in this way....however the guys on here who are a bit more inquisative have experimented with "other" positions and these of course have been the ones reported on hrer..

No problem there but it does muddy the data...

I can only suggest where to place the sensor...others will decide where they want to put 'em.

My argument is....it must be a DIY job...we are trying to save cylinder heads....so measure the cylinder head temp and if it goes above normal running temps.....let the alarm tell you.
True. I'll be putting one there, too. :wink: I'm sure it's on the forum already - can you restate precisely where you advise?
Image Image
What she doesn't know won't hurt me.
User avatar
mikeonb4c
Supreme Being
Posts: 22877
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: Multiple temperature sensors (Arduino)

Post by mikeonb4c » Fri Sep 09, 2011 1:08 pm

Driver+Passengers wrote:
mikeonb4c wrote:Wow - I wish I had a brain like wot u have got, cos this all sounds like great fun. The expression 'too much information' comes to mind, mind you. How might all this data be bundled up so as to present to a driver (whose eyes and focus needs to be on the road) as a heads-up warning when and only when (s)he needs it? Or are you thinking of all this only in terms of data gathering, logging and analysis? My biggest concern in relation to the latter is the problem of obtaining comparable data across a good test population of Bongos. In that respect, I wish more effort went in to encouraging standard fitting position for the TM2 alarm, and the subsequent gathering and collation of data (using a simple web based form where users can enter figures for themselves), so that normal and abnormal temp patterns could be established and publicised. Speaking as an ex-marketeer, I feel that doing that should ultimately help promote sales of the product, not to mention greatly improving its value but......hey :roll:
No such thing as 'too much information' - only inadequate analysis. :wink:

Deciding what to do re: datalogging vs in-vehicle display is an important consideration. Obviously, I'm going to want a couple of numerical temp displays, couple of LEDs and a buzzer in car (Benny Hill in beeps when the temp goes critical??) I don't know. Perhaps a wireframe bongo with heatmap overlay? 3d rotatable, multi-touch zoom. #-o [-X #-o This is where I get carried away by men in white coats.

Various thoughts, regarding logging, but something like rrdtool could be used to store/display the data. It is a project which lacks focus other than mucking around with electronics as well as the vehicle. Add a 3-axis accelerometer, GPS, remote control... ;)

Re: sensor placement - I know there are and have been many discussion on the subject. I plan to use them all!!! :lol: :lol: :lol:
But, as one pilot to another, there is a risk when the analysis has to be done in real time by a human brain operating in a condition of stress. Googling 'too much information caused crash' brought up a lot of returns. This article:

http://www.au.af.mil/au/awc/awcgate/readings/human.htm

...has an interesting section on too little/too much/incorrect information.

Haydn - my apologies if my remark appeared aimed at you. It wasn't. I know you have been trying hard to promote a standard mounting position for TM2s, and I'm guessing you must by now be getting comparative data which might allow the rudimentary establishment of norms. This goal, once achieved, will enhance the appeal of purchasing and fitting a TM2. And lets face it, the exercise could be scaled up for a range of vehicles whose owners would find the TM2 even more attractive if it came with this data for their model of car. A self-serve webform would remove the admin hassle for the supplier in having to collate this data, though whether the returns would justify the effort I would have to leave to the web-geeks to give a view on.
User avatar
haydn callow
Supreme Being
Posts: 5777
Joined: Mon Jan 08, 2007 9:50 pm
Location: Somerset
Contact:

Re: Multiple temperature sensors (Arduino)

Post by haydn callow » Fri Sep 09, 2011 1:29 pm

quote]
True. I'll be putting one there, too. :wink: I'm sure it's on the forum already - can you restate precisely where you advise?[/quote]


Go behind the front seats.....remove the carpet from the back of the "engine" hump.
....remove the metal cover.....you will see a couple of threaded holes in the back of the cylinder head....go for the lower of the 2 holes
http://www.coolantalarm.co.uk
Developer of the Mazda Bongo Coolant loss Alarm
Also BMW Clocks
User avatar
Driver+Passengers
Supreme Being
Posts: 2019
Joined: Mon Mar 14, 2011 1:56 pm
Location: Fife

Re: Multiple temperature sensors (Arduino)

Post by Driver+Passengers » Fri Sep 09, 2011 3:55 pm

Cheers, Haydn.

Mike - while driving, you're absolutely right. Doesn't put me off mucking around though.
Image Image
What she doesn't know won't hurt me.
User avatar
mikeonb4c
Supreme Being
Posts: 22877
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: Multiple temperature sensors (Arduino)

Post by mikeonb4c » Fri Sep 09, 2011 4:38 pm

Driver+Passengers wrote:Cheers, Haydn.

Mike - while driving, you're absolutely right. Doesn't put me off mucking around though.
Absolutely - from an r&d perspective, the more data the better. And it would be fun to think on how the various figures could be presented for easy assimilation by a busy driver (I have an image of a Bongo engine shaped icon, with colour shading from green through orange to red for different bits of it, depending on which bits were happy, temp stressed, or going critical) :P
User avatar
Driver+Passengers
Supreme Being
Posts: 2019
Joined: Mon Mar 14, 2011 1:56 pm
Location: Fife

Re: Multiple temperature sensors (Arduino)

Post by Driver+Passengers » Fri Sep 09, 2011 4:59 pm

mikeonb4c wrote:
Driver+Passengers wrote:Cheers, Haydn.

Mike - while driving, you're absolutely right. Doesn't put me off mucking around though.
Absolutely - from an r&d perspective, the more data the better. And it would be fun to think on how the various figures could be presented for easy assimilation by a busy driver (I have an image of a Bongo engine shaped icon, with colour shading from green through orange to red for different bits of it, depending on which bits were happy, temp stressed, or going critical) :P
widdowson...?
Image Image
What she doesn't know won't hurt me.
User avatar
mikeonb4c
Supreme Being
Posts: 22877
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: Multiple temperature sensors (Arduino)

Post by mikeonb4c » Fri Sep 09, 2011 5:07 pm

Driver+Passengers wrote:
mikeonb4c wrote:
Driver+Passengers wrote:Cheers, Haydn.

Mike - while driving, you're absolutely right. Doesn't put me off mucking around though.
Absolutely - from an r&d perspective, the more data the better. And it would be fun to think on how the various figures could be presented for easy assimilation by a busy driver (I have an image of a Bongo engine shaped icon, with colour shading from green through orange to red for different bits of it, depending on which bits were happy, temp stressed, or going critical) :P
widdowson...?
:lol: :lol: :lol: you worked it out, but can his drawings be turned into backlit LCD devices capable of mounting in a Bongo and outputting in response to multiple sensor input :?

Say yes Steve [-o<
User avatar
Rhinoman
Bongolier
Posts: 330
Joined: Mon Jan 11, 2010 7:45 pm
Location: Brinkworth, Wilts
Contact:

Re: Multiple temperature sensors (Arduino)

Post by Rhinoman » Fri Sep 09, 2011 11:03 pm

I've used the Maxim one-wire interface for a number of projects. To test the devices we used one of these:
http://www.homechip.com/catalog/product ... ucts_id=30
with the software from the Maxim dev. kit.
1995 Ford Freda, 2.5TD, auto, AFT, side conversion.
Locked

Return to “Techie Stuff”