Arduino-based Sensor Cluster - Defender Source
Defender Source  

Go Back   Defender Source > Defender & Series Technical Discussions > Defender Technical Discussions


Reply
 
Thread Tools
  #1  
Old February 17th, 2015, 02:28 PM
Azarur
Status: Offline
AZ
LR 1984 110
Member
 
Join Date: Mar 2014
Location: California
Posts: 292
Arduino-based Sensor Cluster

I decided to document the efforts to instrument the 1984 110 separately from the main truck build thread so as to allow people who are just interested in the instrumentation portion of the build to contribute to the effort.

The original specifications for the sensor cluster were:
Sensors:
- Temperature
- Engine coolant
- Exhaust gases
- Ambient
- Cabin

- Navigation
- Compass
- Altitude/Barometer
- XYZ Tilt angle

- Performance
- Speed
- RPM
- Fuel consumption
- Chronometer
- Trip Odometer x 2

- Warnings
- Open door sensors
- Tire pressure

- Maintenance
- Oil life

Displays:
- 4 inch TFT display
- 16x4 LCD

Microprocessor Boards:
- Arduino DUE
- Arduino Mega
- Arduino UNO
- Adafruit Datalogger


Progress:

At this point the system has been breadborded and each module has been tested separately. Full integration has not yet occurred. At a high level there are two "sensor" boards (Arduino DUE and Arduino Mega) and one display and datalogging board (Arduino UNO). The Arduino DUE handles all "digital" signals (interrupts), while the mega board handles all analog inputs. Both then communicate with the Arduino UNO board, which is connected to the TFT, LCD displays and the Adafruit datalogger.

The interrupts handled by the Arduino DUE are:
- Pulses from a GPS-based speedometer. This can easily be replaced with a Hall-effect sensor speedometer. GPS speedometer gives a 12 V square wave with 16,000 pulses per mile.
- Pulses from the tachometer, which gives a 12 V pulse function with 4 pulses per revolution
- Pulses from two separate fuel flow meters (feed and return) which give a 5 V pulse function with 1 pulse per mililiter
- Open circuit 12 V signal from each door upon a door open event
Given that the Arduino DUE can only handle 3.3 V signals, a custom PCB was built with a series of voltage dividers to drop the 12 V and 5 V signals, respectively, to <3.3 V.
Interrupts are counted over 100 ms locally on the DUE and physical measurements are thus calculated. These measurements (speed, RPM, fuel consumption, mileage driven, warning signals) are then available to transfer serially to the arduino UNO for display and storage.

The analog signals handled by the Arduino Mega are:
- K-type Thermocouples measuring ambient, cabin and engine coolant temperatures
- J-type thermocouple measuring exhaust gas temperature. This one has yet to be installed in the actual engine.
- Atmospheric pressure signal from a Seeeduino Altimeter/barometer
- XYZ angle from a Seeeduino 3-axis accelerometer
- Bearing from a Seeeduino gyroscope
Similarly to the processing done by the Arduino DUE, the Arduino Mega carries out all the math operations locally and makes the relevant variables available for the UNO. These include temperatures, tilt angles, altitude and compass.

Two measurements were dropped due to complexity: Tire pressure and oil life. I may include those in the future if I can find an easy way to implement.

The Arduino UNO requests information from the two sensor boards periodically (every 500 ms to avoid interference with interrupts). The TFT has 5 selectable displays: Speed and RPM; Fuel economy (instantaneous, average, best); Environmental (temperatures, altitude); Off-road (Tilt angles, heading, altitude); Settings, where units are selected, measurement averages are reset, altitude is calibrated, speed alarms, etc. The LCD displays warnings, such as open doors, elevated exhaust or coolant temperatures, excessive tilt angles, excessive speed (on a 110 with a diesel engine! Good luck with that!!!!). IN addition, the UNO logs into an SD card all the history (MPG averages, speed averages, RPM profiles, etc.) . The data is read during system initialization but can also be accessed by a PC and downloaded to excel for bragging (v.g. "Look, my 110 can do 70 mph!!!!).

Thus far, I've spend roughly $500 in boards, sensors, resistors, wire. Spent probably 200 hours researching, learning to write arduino code, and planning layouts. Probably another 100 hours to go for integration.

I'll be uploading the breadboard layouts and the resulting PCBs as they are delivered. I'll also try to create a repository for the code in case anyone else is interested...

------ Follow up post added February 17th, 2015 02:32 PM ------

BTW, Main truck re-build thread found here:
http://www.defendersource.com/forum/...717#post610717
Reply With Quote
Sponsored Links
Advertisement
 
  #2  
Old February 17th, 2015, 08:59 PM
sonoronos's Avatar
sonoronos
Status: Offline
Ed
None
Member
 
Join Date: May 2010
Location: Arlington, VA
Posts: 5,537
Registry
I'm interested in seeing what you implement! Arduinos are super hot with the neuroscience crowd here at Janelia - really versatile, and easy to homebrew some impressive stuff.
Reply With Quote
  #3  
Old February 17th, 2015, 09:54 PM
cgalpin's Avatar
cgalpin
Status: Offline
Charles Galpin
'94 D90 ST, '63 SeriesIIA
Site Team
 
Join Date: Jan 2004
Location: South Riding, VA
Posts: 11,625
Registry
I'm also putting an arduino or two in my 109 build, so interested in seeing what you come up with. Great to see you getting the family involved too.
__________________
Quote:
Originally Posted by pendy
I'm here for the D's
Reply With Quote
Sponsored Links
Advertisement
 
  #4  
Old February 18th, 2015, 06:30 AM
Azarur
Status: Offline
AZ
LR 1984 110
Member
 
Join Date: Mar 2014
Location: California
Posts: 292
Absolutely let me know what you have in mind. It will be great to share the frustration and (hopefully) accomplishments.
Reply With Quote
  #5  
Old February 18th, 2015, 04:57 PM
chris snell's Avatar
chris snell
Status: Offline
Chris Snell
87 Ex-MOD 110
Member
 
Join Date: Aug 2005
Location: Kansas
Posts: 2,439
Interesting project. I've had in mind something similar: I dream about a console in the cubby box of my truck that uses a military-grade touch screen for interaction. The screen I dream about would be about 4" diagonal (must be small) with four mil-spec push buttons on the right and four more on the bottom, a la a Yaesu 2-way radio.

I write most of my software in Go so my device would be powered by a BeagleBone Black and Go. I've thought about using a simple Matrix Orbital VFD but an actual LCD would be more useful for doing things like a reverse camera. I think I could build a text UI that ran on the LCD that approximated the characters-only look. I've written a Go library for building text-based UIs (think 1990s DOS apps) and I would run it full screen with amber-colored text so that it would fit the 1990s military look-and-feel of the truck. It would do basic sensor collection and when the truck was in range of my home network, it would push the gathered metrics up to a datastore running on one of my servers, where I could view graphs and other diagnostics offline.

For the vehicle speed sensing, I would keep it simple and use GPS. Since the BBB is a real linux system, you can easily run gpsd on it. gpsd takes care of the hardware management and is resilient to hardware failure and supports hot-plugged devices. It provides a JSON interface to the data and I wrote a Go library for that.

The software is definitely the easy part. Finding a display and control devices (buttons, touchscreen, etc) is the tough part, especially if you want to build something that looks like it might have come with the truck.
__________________
1987 Ex-MOD 110 Tithonus LHD
2013 LR4


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
/
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
/
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
/
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
/
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Reply With Quote
  #6  
Old February 18th, 2015, 05:00 PM
leastonce's Avatar
leastonce
Status: Offline
Jason England
D-90 White 95 SW #65
Site Team
 
Join Date: Jul 2009
Location: NYC
Posts: 6,078
Registry
If we could get a port of libcomm 14cux running on arduino we could have an intelligent CEL and test tool for ODB1 trucks.
__________________
Quote:
Soapy water / KY jelly, etc. is is basically a must. Yes, good idea to remove trim panels - only takes 5 more minutes to do so.
Car Camping Collective founding member and Chief Executive Officer
Cat Camping Collective founding member and Chief Executive Officer
Reply With Quote
  #7  
Old February 18th, 2015, 05:09 PM
chris snell's Avatar
chris snell
Status: Offline
Chris Snell
87 Ex-MOD 110
Member
 
Join Date: Aug 2005
Location: Kansas
Posts: 2,439
Quote:
Originally Posted by leastonce View Post
If we could get a port of libcomm 14cux running on arduino we could have an intelligent CEL and test tool for ODB1 trucks.
Wow, I'd never seen this before. Did someone here write that? That's another argument for using an actual Linux SBC like BBB or RasPi instead of Arduino.
__________________
1987 Ex-MOD 110 Tithonus LHD
2013 LR4


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
/
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
/
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
/
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
/
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Reply With Quote
  #8  
Old February 18th, 2015, 05:25 PM
leastonce's Avatar
leastonce
Status: Offline
Jason England
D-90 White 95 SW #65
Site Team
 
Join Date: Jul 2009
Location: NYC
Posts: 6,078
Registry
I only said arduino as I have one on my desk looking for a project ... Raspberry PI would be fine ...

I have an ECUMate but would prefer and installed option ...
__________________
Quote:
Soapy water / KY jelly, etc. is is basically a must. Yes, good idea to remove trim panels - only takes 5 more minutes to do so.
Car Camping Collective founding member and Chief Executive Officer
Cat Camping Collective founding member and Chief Executive Officer
Reply With Quote
  #9  
Old February 18th, 2015, 07:53 PM
cgalpin's Avatar
cgalpin
Status: Offline
Charles Galpin
'94 D90 ST, '63 SeriesIIA
Site Team
 
Join Date: Jan 2004
Location: South Riding, VA
Posts: 11,625
Registry
Quote:
Originally Posted by chris snell View Post
Wow, I'd never seen this before. Did someone here write that? That's another argument for using an actual Linux SBC like BBB or RasPi instead of Arduino.
Not sure how you missed this - Colin (who wrote it as well as a front end called rovergauge) is a member here.
__________________
Quote:
Originally Posted by pendy
I'm here for the D's
Reply With Quote
  #10  
Old February 19th, 2015, 05:37 AM
Azarur
Status: Offline
AZ
LR 1984 110
Member
 
Join Date: Mar 2014
Location: California
Posts: 292
There's a company in HK that makes some of the most beautiful and resilient touch screens along with shields for RbPi, BBB, Arduino. They only have an eBay store. I will dig the name out today and send the link around.

I spent months messing around with a RbPi and a BBB plus a 7" touch screen with a DIN format. In the end sensor integration was much more important for me than interface and thus the decision to go arduino. I did look - not too hard - into collecting data with the DUE and sending it to a Raspberry or a BBB for display and storage. Most examples out there use Bluetooth, which I'm not crazy about. Any ideas here would be well appreciated.
Reply With Quote
  #11  
Old February 19th, 2015, 06:34 AM
Rocky's Avatar
Rocky
Status: Offline
Chris
72 + D1 drivetrain
Member
 
Join Date: Sep 2006
Location: Colonies Aka Boston
Posts: 8,781
Arduino sounds like a good name for a liquor.

Just saying....
__________________
A friend of mine runs a land rover / range rover specialty repair shop. Based on his experience, they are capable of stopping anywhere, anytime, at any cost.

I don't know about the brakes, only their unreliability.
Reply With Quote
  #12  
Old February 19th, 2015, 07:07 AM
corrumpu
Status: Offline
chris b
1995/RRC SWB
Member
 
Join Date: Nov 2009
Location: fort walton beach, florida, usa
Posts: 191
Registry
Cool project btw.. wish I had a project truck to use this on.


Both raspberry pi and bbb have plenty of IO so sensors should not be an issue. Arduino is just easier if you're not already a programmer. We use BBB @ work for test rigs and use a 7" touch screen cape. It's a nice platform.

Azarur - What are you trying to collect on the DUE that you can't get via bbb or pi?
Reply With Quote
  #13  
Old February 19th, 2015, 07:40 AM
Jonesy's Avatar
Jonesy
Status: Offline
Craig
87 D110 (Ruby)
Member
 
Join Date: Dec 2011
Location: Leesburg, VA
Posts: 4,447
Registry
I have no freaking clue what this thread, or you geeks are talking about!! Love the fact my trucks don't have ECU's...I thought not having electricgimmickery in them was a good thing
__________________
"The difference between stupidity and genius, is that genius has its limits." - Albert Einstein
Reply With Quote
  #14  
Old February 19th, 2015, 08:58 AM
leastonce's Avatar
leastonce
Status: Offline
Jason England
D-90 White 95 SW #65
Site Team
 
Join Date: Jul 2009
Location: NYC
Posts: 6,078
Registry
Quote:
Originally Posted by Jonesy View Post
I have no freaking clue what this thread, or you geeks are talking about!! Love the fact my trucks don't have ECU's...I thought not having electricgimmickery in them was a good thing
Some of us are cursed with an ECU and are looking to have some tools to figure out its voodoo.
__________________
Quote:
Soapy water / KY jelly, etc. is is basically a must. Yes, good idea to remove trim panels - only takes 5 more minutes to do so.
Car Camping Collective founding member and Chief Executive Officer
Cat Camping Collective founding member and Chief Executive Officer
Reply With Quote
  #15  
Old February 19th, 2015, 09:10 AM
o2batsea's Avatar
o2batsea
Status: Offline
Bill Adams
66 109 sw 94 lwb
Member
 
Join Date: Jul 2009
Location: kensington md
Posts: 6,503
Registry
Yer all a little behind the curve. Just go out and get a Navnet and add all the sensors you want.....well, maybe not radar....
http://www.navnet.com/tzt2/en/product/
__________________
Bill Adams

1966 109 5 door wagon 300Tdi "spermaceti fueled"
1994 RRC LeWiB "ruining the air behind me"
1968 2A 88

All my troubles are Rover
Reply With Quote
  #16  
Old February 19th, 2015, 09:28 AM
sonoronos's Avatar
sonoronos
Status: Offline
Ed
None
Member
 
Join Date: May 2010
Location: Arlington, VA
Posts: 5,537
Registry
Quote:
Originally Posted by o2batsea View Post
Yer all a little behind the curve. Just go out and get a Navnet and add all the sensors you want.....well, maybe not radar....
http://www.navnet.com/tzt2/en/product/
Yeah, boats have great stuff...too bad they cost mega $$$
Reply With Quote
  #17  
Old February 19th, 2015, 10:11 AM
leastonce's Avatar
leastonce
Status: Offline
Jason England
D-90 White 95 SW #65
Site Team
 
Join Date: Jul 2009
Location: NYC
Posts: 6,078
Registry
Quote:
Originally Posted by sonoronos View Post
Yeah, boats have great stuff...too bad they cost mega $$$
And are useless for decoding the 14CUX ...
__________________
Quote:
Soapy water / KY jelly, etc. is is basically a must. Yes, good idea to remove trim panels - only takes 5 more minutes to do so.
Car Camping Collective founding member and Chief Executive Officer
Cat Camping Collective founding member and Chief Executive Officer
Reply With Quote
  #18  
Old February 19th, 2015, 10:53 AM
o2batsea's Avatar
o2batsea
Status: Offline
Bill Adams
66 109 sw 94 lwb
Member
 
Join Date: Jul 2009
Location: kensington md
Posts: 6,503
Registry
Quote:
Originally Posted by sonoronos View Post
Yeah, boats have great stuff...too bad they cost mega $$$
Quote:
Thus far, I've spend roughly $500 in boards, sensors, resistors, wire. Spent probably 200 hours researching, learning to write arduino code, and planning layouts. Probably another 100 hours to go for integration.
He's already spent in time and parts what it woulda cost to just buy something. Just sayin. Cool project tho...
__________________
Bill Adams

1966 109 5 door wagon 300Tdi "spermaceti fueled"
1994 RRC LeWiB "ruining the air behind me"
1968 2A 88

All my troubles are Rover
Reply With Quote
  #19  
Old February 19th, 2015, 11:09 AM
Azarur
Status: Offline
AZ
LR 1984 110
Member
 
Join Date: Mar 2014
Location: California
Posts: 292
Quote:
Originally Posted by o2batsea View Post
He's already spent in time and parts what it woulda cost to just buy something. Just sayin. Cool project tho...
Of course Bill, but this thing was all about working with my kids to produce something unique, and not so much about buying stuff off the shelf. Totally agree that there are other "ready-made" solutions out there that would be much cheaper, but having a 10 and 12 year old figure out the wiring of sensors and the coding has been truly priceless... And once it's done, people will be able to build an identical system for very little...

------ Follow up post added February 19th, 2015 11:14 AM ------

Quote:
Originally Posted by corrumpu View Post
Azarur - What are you trying to collect on the DUE that you can't get via bbb or pi?
In one word: Interrupts. The DUE can collect virtually unlimited interrupts without messing up, and we have multiple interrupts that we need to measure:
- Speed pulses
- Alternator pulses (for RPM)
- Fuel supply and fuel return pulses (for fuel consumption)
- Open door signals x 5 (we want to indicate WHICH door is open, not just an open door signal)

On the BBB or pi you would have to poll all these ports, which would make the code a mess and you would lose pulses every time a routine happens as a result of a trigger...

I think the DUE is uniquely suitable for measuring multiple interrupts...

Now, the display side of things... what a pain! The Arduino based TFTs are slow as heck!

------ Follow up post added February 19th, 2015 11:15 AM ------

Quote:
Originally Posted by Rocky View Post
Arduino sounds like a good name for a liquor.

Just saying....
At times it does require quite a bit of drinking to get over the frustration. But I take bourbon or scotch
Reply With Quote
  #20  
Old February 19th, 2015, 11:23 AM
Azarur
Status: Offline
AZ
LR 1984 110
Member
 
Join Date: Mar 2014
Location: California
Posts: 292
Quote:
Originally Posted by Jonesy View Post
I have no freaking clue what this thread, or you geeks are talking about!! Love the fact my trucks don't have ECU's...I thought not having electricgimmickery in them was a good thing
My truck doesn't have an ECU either! That's what's beautiful about this setup. The sensors and signals do not interfere or in any way affect or depend on the core functions of the truck.

A more important question is: Are these sensors really needed???

A few are very important for me: Exhaust temperature, fuel consumption, open doors.
Here's why:
- Exhaust temperature: Our engine had to be rebuilt and a new turbo added. Need to keep an eye on performance to avoid blowing another gasket. Planning to keep this baby for a long time.
- Fuel consumption: The whole point of this project was to trade in our disgusting gas guzzler (9 MPG) for a functional vehicle with good fuel economy (20+ mpg). This is very important for my kids and I
- Door open sensors. I have three young children. This is critical for my piece of mind.

The other sensors: Tilt, bearing, altitude, outside temperature, etc. are just nice to have. But constructing a system to do the ones that were really important basically gave us a free platform to do the rest... so why not?

------ Follow up post added February 19th, 2015 11:24 AM ------

Quote:
Originally Posted by Jonesy View Post
I have no freaking clue what this thread, or you geeks...
PS. BTW, at my house, geek is a compliment
Reply With Quote
Reply

Lower Navigation
Go Back   Defender Source > Defender & Series Technical Discussions > Defender Technical Discussions

Tags
sensor

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
UK Based Team Gigglepin, at King of the Hammers 2013 Willo Trips, Trails and Events 81 February 21st, 2013 12:56 PM
Fire and Ice Edition based on a 1985 LHD Defender 90 rivermike For Sale - Vehicles 9 May 5th, 2012 03:21 PM
Rough / X-tec Edition based on a 1985 LHD 90 rivermike For Sale - Vehicles 2 September 9th, 2011 04:35 AM
Bowler Wild Cat based on Land Rover rolaro Misc. Chit-Chat 2 December 18th, 2004 09:56 AM
Ford going after another LR based company chrisvonc Misc. Chit-Chat 14 July 29th, 2004 04:19 AM


All times are GMT -5. The time now is 12:06 AM.


Copyright