CK5
Register an account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members.

Truckputer? - Initial Schematic and PCB design - Post 28

Jagged

1 ton status
Joined
Apr 25, 2005
Posts
11,462
Reaction score
27
Location
The Swamp
I've been thinking about building up my own truckputer.

Not your typical video/mp3-playing machine, but a diagnostic system.


Here's the general idea:

I've essentially got a W/T package truck, and the only real gauges I have are fuel and water temp (I added a tach). I would like to have some type of diagnostic data available other than seat-of-my-pants and "the exhaust smells funny." For the on-engine sensors I would just use standard automotive parts.

When I get some free time I'm going to look into the output from electrical sending units, and figure out a way to use a couple microcontrollers to turn the analog output into some digital data. From there I can store the data on some SSD (Writing to an SD Card, for example).

Storing a 100 byte data word of sensor data every second onto a 512 MB SD Card would yield 1,491 hours of logging.

Right now I'm thinking of capturing the following data:
Outside Air Temp
Outside Air Pressure
Vehicle Speed
Engine RPM
Manifold Pressure
Water Temperature
Oil Pressure

Some 'would be nice' data:
GPS Data
Fuel Flow Rate
A/F mixture (although, my truck has no O2 sensor...)
Oil Temp
Transmission Temp
Diff Temp
3-Axis accelerometer (in a 1-second peak force loop)

Other stuff that would take some head scratching:
Strain gauges (at key points on the frame and axle tubes)
Total timing
 
Last edited:
Unless you want to do it for fun, be careful not to do too much reinvention of the wheel.
For instance, there is this.
http://www.floscan.com/html/blue/seriesdetail.php?sid=13

Way too much money, but it does do a lot of what you want to do.
You also need to look into NENA 0183 and NMEA 2000 data streams. They are established standards, and carry a lot of the type of data you are looking at.

Check out the home page of Floscan. They sell flowmeters that will hook into your gas line and give you an output you can use.
And some of their heads will handle return lines too.

You might check with......ryorken?? I think he is the boat guy. He might be able to get you some second hand stuff off of boats that have been scrapped or upgraded.

Most of the rest of the stuff is easily collected, but integrating it is going to need some thinking.

I am thinking automationdirect.com


 
The way I see it, most of the stock automotive sensors will be relatively easy to integrate. Most of them are some type of variable resistor load. Run that to an ADC and do some math with a microcontroller, and it's good to go.

The fuel flowmeter is one of the "would be nice" categories... and definately wouldn't be something I would try to reinvent.

Pressure and temperature sensors for other stuff is relatively easy to adapt.

I already know how to use microcontrollers to use integrated ADCs, and can either use SPI/USART/I2C serial, or design a bit-bang interface for other serial protocols, and PWM and PCM input/output.

The sensor-microcontroller interface wouldn't really be that hard.. It's just figuring the microcontroller output format, and the physical interconnects.

Once I get the microcontroller reading all the sensors I want, it's trivial to write to SD Cards or EEPROM... or even transmit wirelessly.


For the cost of that floscan system I could design something so bad-ass it would scratch my back before I knew I had an itch. I appreciate the info on the datastreams. If I can get a proof-of-concept working I might try to make this into some type of standardized output. I can see some potential applications for this type of system, especially if I can make certain telemetry options jumper-configurable for different sensor types (e.g. different range temperature/pressure senders)
 
I almost forgot, I assume that you are familiar with this outfit.
http://www.omega.com

If not, you have been missing out. Their stuff is top of the line. Sometimes I can what I need cheaper somewhere else, but often they are the best.
If you might buy or not, by all means grab their handbooks.
http://www.omega.com/literature/domestic.html

Do not wait. Order the top four or five under handbooks.
Not only do they have what they sell in them, but they are darn near a graduate course in the fields they cover.

Want to do the strain stuff, grab their strain handbook. Shows everything they sell and how to use them.

I have never figured out exactly how they stay in business. It may be different now, but the last ones I got were quality paper hardback books with tons of information in them.

For free.

I just realized that my copies are several years old, so I am placing an order as soon as I post this.

Going to try the transactions ones too. Never saw them before.
 
Neat... just ordered the transactions and a bunch of their sensor stuff.

One can never have too many reference books on their shelves!

Fordum, if you're ever up here in VA I'll have to show you my "office"... I think you would approve:

4U worth of rackmount servers, HP 6267 power supply, HP 1220A scope, astron RS-20A power supply, velleman pcsgu250 scope, hf/vhf/uhf radios, avr and pic microcontrollers, full compliment of inductors/chokes, electrolytic/ceramic caps, resistors, RF & audio connectors, disassembled amplifiers, truck parts, and a reloading press :D
 
Nah, I wouldn't approve......I'd just move in:D

I used to have a lot of that kind of stuff. But I went through about 15 years of doing other things, and most of it got given away or lost.
Never had a scope for many years. I had friends who had scopes and free access to their setups.

When you are hanging around helping out TV and radio chief engineers, making suggestions to folks doing top secret stuff for the navy and air force "under the table" so to speak, you tend to not need all that much equipment yourself.

The first scope I ever owned myself was a 200mhz Fluke Scopemeter. Still got it, and it still does me a good job when I pull it out.

I tried to find my old Aston 20 the other day, and realized I gave it to my friend who later died.
No telling where it is now.
I was going to use it to replace the several 12 volt power supplies that were running my video cameras. They each had a cheap little switching wall wart, which would start getting flaky after a while.

Got smart, bought a PC Power and Cooling Silencer 700 and used the 12v off of it.

Put a 5V load on it, and it will give me 50 amps of nice clean 12V. Way cheaper than an Aston.

Still got my old Icom-R7000. Fired it up the other day to find out what was interfering with some telemetry. ( Have you seen the R9500??)

My Avcom spectrum analyzer found it, but I had to listen with the Icom to tell what it was.

Let me know what you think about those books. They used to be amazing.
I hope they are still good.
 
I've been thinking about building up my own truckputer.

Not your typical video/mp3-playing machine, but a diagnostic system.


Here's the general idea:

I've essentially got a W/T package truck, and the only real gauges I have are fuel and water temp (I added a tach). I would like to have some type of diagnostic data available other than seat-of-my-pants and "the exhaust smells funny." For the on-engine sensors I would just use standard automotive parts.

When I get some free time I'm going to look into the output from electrical sending units, and figure out a way to use a couple microcontrollers to turn the analog output into some digital data. From there I can store the data on some SSD (Writing to an SD Card, for example).

Storing a 100 byte data word of sensor data every second onto a 512 MB SD Card would yield 1,491 hours of logging.

Right now I'm thinking of capturing the following data:
Outside Air Temp
Outside Air Pressure
Vehicle Speed
Engine RPM
Manifold Pressure
Water Temperature
Oil Pressure

Some 'would be nice' data:
GPS Data
Fuel Flow Rate
A/F mixture (although, my truck has no O2 sensor...)
Oil Temp
Transmission Temp
Diff Temp
3-Axis accelerometer (in a 1-second peak force loop)

Other stuff that would take some head scratching:
Strain gauges (at key points on the frame and axle tubes)
Total timing



subscribed..... different than me running the PC with Megasquirt, but I'll be watching this...


and yeah, I've installed dozens of floscan systems..... you can pick up just the flow sender for about $150... but i have no idea what signal they put out.... i'm sure it would be doable....

obviously i'm doing GPS.... and i'll have EGT in addition to ign control, o2, etc...


the Fusion Brain is very similar to what your talking about.. input and output signals... has some interesting sensors.. temps, light, camera's, 3 axis accelerometer, distance, etc... here's what they say about the new one....

"We have a new Fusion Brain coming out, Version 6. This new FB is improved in almost every way. Here are some highlights:

31 Digital Outputs: Each output can sink 500mA, and has a status LED to show state

15 Analogue Inputs: Each input is now a 3.3v 10bit sensor port. Giving accuracy of 0.0032v accuracy versus the current 0.0049v accuracy.

32bit Processor running at 80MHz (80 Million Instructions Per Second/MIPS): This is a brand new cream of the crop microcontroller. Internal CPU speed has increased by 500%. The current microcontroller's base was designed in 1975 whereas this new one was designed in 2007. It uses less power, is more accurate, is faster, and is jus plain awesome.

1.88in x 2.9in / 47.75mm x 73.5mm Form Factor: Less than 3mm wider, and 4mm longer than the Fusion Brain Version 4 gains us x2 the amount of outputs and 2 additional sensor ports.

Available Case: With the new design comes a new option! The availability of a case to put your shiny new Fusion Brain into. This makes it a complete design with an extra level of professionalism.

92% efficient Switched Mode Power Supply Design, < 1% accuracy: The current Fusion Brain, all Fusion Brain's before it, and all competitors use a linear regulator for power. It is cheap and easy, but the output varies with temperature and load, and will skew sensor readings depending on just how hot or how much stuff you have being powered. Not to mention that they are about 11% efficient on a good day, and get really hot. The new FBv6 uses a SMPS where the output will stay constant and accurate to less than 1% of nominal no matter the temperature or load. This will make all sensor readings more accurate, draw less power from the system, and it wont get nearly as hot.

Much improved signal routing: The new efficient layout is more professional and more tuned to avoid interference than previous versions"


http://store.mp3car.com/Fusion_Brain_Accessories_s/41.htm
 
I took a quick glance at the fuel flow sender, it uses a pulse train of about 32000 pulses per gallon. Very similar in the way new speedometers work. Just gotta have your microcontroller count pulses per unit time, do some math, and spit it out (or use a frequency to voltage converter, then read an ADC channel).

Thanks for pointing out the "FusionBrain." The 4.0 appears to use the Microchip 18F4550 microcontroller, I'm curious what their new version 6.0 uses. 80 MHz is nearing ARM processor speeds.

I'm downloading their firmware-creator sofware. I want to check out the capabilities they have before I make the venture on writing my own stuff.

I'm still leaning toward designing my own stuff (more of a test of my abilities and a learning experience). Right now I'm envisioning a modular design:

A central microcontroller (mcu) will be a data bus master controller, and on poweron will probe the databus for available sensors. Each sensor will have a small mcu associated with them to handle databus reporting. The sensing mcu is responsible for taking the sensor output and formatting it into a text string to pass to the master mcu.

Example, the outside air temp mcu would format it's sensors output to a string like "OAT1-18.7" for outside air temp sensor #1, 18.7 degrees C. The master mcu is responsible for taking these text strings and combining them into one data sentence. E.G. "RPM-2340|MAP-14.2|FF-3.45|OAT1-18.7|OAP-29.92|VSS-43.8." For running at 2340 RPMs at 43.8 MPH with about 16 inches of vaccuum and using 3.45 gallons per hour.

These output strings are for example only. I'll probably try to adopt some type of accepted standardized output. As mentioned before, NMEA can handle all sorts of data.

The master mcu will have a continuous output on a serial port, allowing for a computer to connect and read the data at any time. The same output can also be written to and SD Card, or beamed wirelessly. Using the continuous data output allows me to develop a custom display later down the road without having to modify the master mcu firmware.

The way I see it, using an approach like this allows me to dynamically expand the number and type of sensors used, and create whatever output method suits me. Keeping everything modular, while requiring some extra microcontrollers (that cost about $1 each), allows for each "part" to have its own unique function. Almost Unix-like in nature (The mantra for Unix programs is "Do one thing, and do it well"). This also allows for isolation of components. I can use optical isolators on the databus lines to prevent damaged sensor from frying the rest of the system.

I'm curious if a system like this (especially one capable of transmitting wireless info) would be of any use to circle track people (or drag/autox with non-OBD vehicles).
 
wow, there's some tech! :eek1: :D

I'm in the middle of the "research the data in/out" capabilites and mods that can be done with megasquirt... and how that's gonna function with the pc...

right now I'm looking to run the GPIO board for my megasquirt




gpio-k_med.jpg




it'll give me 5 general purpose inputs, trans control, egt, vss, etc....

should give me a killer base to integrate with the PC... my tuning software will have any tuning data it wants....

as to any other "extracuricular data" I may want for software apps with the PC, I'll be watching you! :whistle: maybe I'll get a version 9 fusion Brain in a couple years.... :haha:

I'm really, really anxious to do the PC.... but the megasquirt's gotta come first... and as usual, I wanna set it up full blown bells and whistles off the bat... pre-emptive upgrades that I'd end up doing anyway... :wink1:
 
I think the hardest part for what I want to do is deciphering and calibrating the output from automotive sending units.

For example:
Most autometer temperature and pressure sending units have a single-wire hookup. If I had to make a guess, I'd bet the sensor is resistive in nature: as pressure or temperature varies, so does resistance. This resistance is most likely used in a voltage divider circuit inside the gauge, so the gauge is really just a d'Arsonval-type meter.

Maybe if I write autometer a nice email they'll fill me in on how to calibrate my stuff for their sending units.
 
yeah, basically it's a variable grd signal... or a switched grd in the case of low oil pressure cutout.. that's one i've never seen on a car, but i play with daily on boats, would be a high temp alarm... be simple enough to do....

thats where a decked out megasquirt will give me a huge advantage..... it'll basically be a software issue for me, the data's all in the ECM......
 
I would really like to see this go somewhere. I mean personally I dont have much of a use beyond the typical gauges. Wideband o2s are sweet but are $300....
 
here's the wideband I'm gonna run... $250

wb-lcg5-3822_med.jpg



"Innovate Standalone Gauge Kit w LC-1 & G5 Analog Gauge

Use an Innovate G5 gauge to display your air-fuel readings. This is a retro-style black face gauge with a chrome bezel. It may look like a G3 in the photos, but it's a bit more old fashioned looking if you see it in person. It's 2 1/16" (52 mm) in diameter and fits standard gauge pods. It uses a precision stepper motor to give it a wide sweep. It's illuminated for easy viewing at night.The Innovate “Standalone Gauge Kit” comes complete with the patented award-winning LC-1 Wideband Controller, G5 analog gauge, Bosch 5-wire Wideband 02 Sensor, Bung/Plug Kit, LogWorks Software CD, and quick start guide.



The controller has a programable analog output for connecting to Megasquirt or other aftermarket ECUs. The analog output can emulate a narrow band sensor for connecting to the stock ECU, too. Like the regular LC-1, it has a digital output you can connect to a laptop for data logging with LogWorks software, or daisy-chain the LC1 to other Innovate data acquisition systems."



obviously I'l paint the trimring copper... :wink1:
 
I would really like to see this go somewhere. I mean personally I dont have much of a use beyond the typical gauges. Wideband o2s are sweet but are $300....


That's kind of where I'm at right now. Not counting the tach I added my truck has a speedo, fuel gauge, water temp, and warning lights. The Ford low oil pressure light is more of a "hey focktard, good job!" light.

I thought about adding some gauges, but I really don't need more than speedo/tach/water temp with most of my driving. But it would be nice to have the capability to hook up an LCD display for when I want more info.

Most of the sensors I want are for diagnostic stuff. Especially the accelerometer and strain gauges. I would be able to see some hard data relating engine rpm, load, and vehicle speed to vibrations.

Also it would be neat to draw a correlation between vehicle speed, manifold pressure, and fuel flow rate.


The neat thing about strain gagues, you can put them just about anywhere. If I wanted to, I could install a couple strain gauges on my coils and spring packs and record suspension flex.
 
what would be neat is to use what we put in the boats... a gyroscope for the automatic trimtab systems... it's small... take the input signals from that and run a cool graphic app showing the trucks angle, side to side, front to back, etc....

like a fancy oldschool Yota tiltmeter... :pimp:

have the program running on my lcd with a graphic of some sort of the truck tilting, etc... same paint scheme, the cage, etc..

hehe, that'd be psycho.... :saweet::screwy: :haha:
 
what would be neat is to use what we put in the boats... a gyroscope for the automatic trimtab systems... it's small... take the inputs from that and run a cool graphic app showing the trucks angle, side to side, front to back, etc....

like a fancy oldschool Yota tiltmeter... :pimp:

have the program running on my lcd with a graphic of some sort of the truck tilting, etc... same paint scheme, the cage, etc..

hehe, that'd be psycho.... :saweet::screwy: :haha:


I posted a thread about a year and a half ago inquiring if people would find such a thing useful. The general concensus was it would jut be some eye candy, and not necessarily useful.

http://coloradok5.com/forums/showthread.php?t=254809


But in other news, I should have a block diagram for this thing drawn out this evening. On the plus side, with the modularity I plan on incorporating, adding a 3-axis gyro to the system won't be much of an issue.
 
I think the hardest part for what I want to do is deciphering and calibrating the output from automotive sending units.

For example:
Most autometer temperature and pressure sending units have a single-wire hookup. If I had to make a guess, I'd bet the sensor is resistive in nature: as pressure or temperature varies, so does resistance. This resistance is most likely used in a voltage divider circuit inside the gauge, so the gauge is really just a d'Arsonval-type meter.

Maybe if I write autometer a nice email they'll fill me in on how to calibrate my stuff for their sending units.
I'm sure I'm not telling you anything, but what the heck, I'm bored.........

All the sending units I have cut apart on American cars have pretty much been the same.
Its been a while, so they may have changed.
The oil pressure ones used to be a flat phenolic board wrapped with much fine high resistance wire. A spring loaded wiper pushed by a rubber diaphragm swept across the coils.
The temp sending units worked the same, except that it used a bimetallic strip that bent according to temp.

A lot of the units nowadays are a lot smaller, so they may use some kind of strain gauge/thermistor tech now.

As far as I know, NONE of the older American built cars ever used d'Arsonval movements.
Of course, I did not take all of them apart, but I never came across one in any that I did.
Most of the European ones did. I remember riding with a friend in an early Saab, and seeing the gas gauge change when we went around corners or hills.

Fords and Jeeps all used heat strips and voltage regulators as far as I know.
Bimetallic strip wound with heater wire. As the current increased, the strip bent and moved the needle.

A lot of the regulators worked the same way. except that the heater wire was attached to power through a set of contacts that also supplied power to the gauges.

As the strip bent, it broke contact, letting the strip cool. As it cooled, it made contact again.
The higher the voltage, the shorter the duty cycle. This was fine for the slow acting heat strip gauges, a d'Arsonval movement would have been bouncing back and forth.

I do not know how the old GMs worked. They were unique in that they did not move when power was turned off.
I never worried all that much about it, I drove Fords and Jeeps.
But, when my latest Ford gauges stayed still when off, I got curious.

The gauges in Fords now, and maybe the older GMs, need no voltage regulator. They are dampened and have a small permanent magnet on the shaft. The voltage in, goes to two coils at right angles.
One coil goes to ground, probably through a resistor.
The other coil is fed by the same power source, and goes to ground through the sensor.
The magnet responds to the difference in strengths of the two coils. It does not matter what voltage comes in, since its the ratio that determines the way the pointer points.

Of course, this has a huge flaw that, from what I can tell, no car maker has addressed.
If a piece of something came off the road, severed an oil line and severed the power to the gauges at the same time, they would simply freeze in place and never indicate that you had lost oil pressure.

On the old CJ5s, the voltage regulater was part of the gas gauge. If the gauge cluster did not have a good ground on the dash, the voltage regulator would not have a ground reference, and would let full 12 volts through.

When this happened, both temp and gas gauges would swing violently hard over, hang there for a second, then slowly swing back while a small amount of smoke drifted behind the glass.

Since the gas tank was in the cab with you, under the driver's seat, if you listened real close, you could hear the hissing sound as melted resistance wire dropped into the gas. And if you reached out and took the cap off right away, you would see white whiffs of gas vapor drift out........

Oh, and you will love this one. In my '89 Ford, I guess they had a problem with the engines having lower oil pressure than usual, and people kept coming in worried.
So, they fixed the problem.
They left the gauges in place, but replaced the sending unit with a switch and a resistor which was the amount to indicate about mid-range.

So, now, when the oil pressure gets high enough to close the switch, the gauge goes to half scale and stays there unless you lose all oil pressure.
 
Now that you mention it, d'Arsonval movements wouldn't make too much sense. Every little bump would send the gauge needle moving.

I'm willing to bet there really isn't much accuracy in most of the consumer-grade electric sending units.

If I can't get any data on the resistance curves from the manufacturer, I can always establish empirical data. I've got some thermocouples that I could attach to a temperature sending unit and stick in an oven. The downside to that approach is I would really need 4-7 sending units to do a proper statistical analysis on the data.

Pressure senders shouldn't be too difficult, either. I can use a vacuum/pressure pump with the sender and a calibrated pressure sensor.


I need to find data like in this thread for the sending units:

http://www.sr20forum.com/general-sr20/180309-coolant-temperature-sensor-resistance.html

It's trivial to do some logarithms with a microcontroller (especially if that's its sole purpose like in my modular approach). Even with respect to that car/sensor configuration it looks like a +/- 5 degree deviation is 'acceptable'.
 
Actually most of that data is available. At the minimum you can get the upper and lower points.
Most factory shop manuals have them. Often you can get curves. The trouble is, the sensors are not going to be reliable.
They will for the most part be repeatable, but most of the time no two will be all that close.

Any two will not be better than about 5% of each other.
Mainly because that is more than good enough for their use.
When your gauge reads "low" then a span, and then "high" you don't need .025% accuracy.
GM kinda raised the bar with actual numbers on the gauges, but I suspect it was more of an advertising gimmick than precision.

I don't know the price of sensors for K5s, but I suspect you could buy a couple of new ones, temp and oil, and then run a calibration on them. Afterwords you could install them and be fairly accurate.

Don't know what aging would do though.

But, I am afraid that you are going to hit a point of diminishing returns real quick. You will find yourself measuring a process with sensors that are more precise than the process its self.
Oil pressure is going to be constantly changing. First during the warm-up, then according to the engine oil temp, not the water temp. And that is going to be versus rpm.

And all that is just going to be the short term changes. As the oil ages, all the numbers will change.
I suppose you could make a 3D graph.......

Its still a good project, and can give some useful data, just be careful not to get bogged down in the tiny details.

Ultimately, the best way to go is to replace the sending units. There are plenty of temp and pressure transducers out there that are much better than what you find on your truck.

And you can pick and choose your output to match your data collector.

One useful piece of data is pressure drop across the oil filter. Most if not all filters have a spring inside that lets the oil bypass when it gets clogged. Not only does this prevent oil starvation, but keeps the filter from exploding in worse case.

Tell you what would be cool.
Oil Flow sensor.
A clogged oil gallery would let you have plenty of pressure, but still let bearings starve.

A flow sensor would let you know if low pressure was due to excessive bearing wear or a weak oil pump spring.
Low pressure, low flow, put in a new pump. Low pressure, high flow, start saving up for a rebuild.
 
eah, I realized the point of diminishing returns. Given a couple graphs I can do some linear approximation (in the case of this temperature sendor using a semilog scale). The funny thing when you think about it is all the variables in a transducer. A temperature sensor's output varies based on temperature, and the amount of that variance depends on the temperature :D

Anywho, my desire to use automotive sensors for the engine stuff was just for adaptability, because industrial oil pressure sensors rated for the proper temperature range would be $$$$ whereas I can just use a $20 automotive sender and not have to worry about adapting fittings and whatnot.

With regards to differential pressure, yeah that would be neat... but how would you plumb for such a thing? I guess that's where a remote oil filter mount may come in handy :D

To be honest, I think the neatest thing that I'll be able to do is the strain gauge and accelerometer.

The first rendition of this project is going to be the three easiest sensors to build and integrate: outside air temp, ambient air pressure, and manifold pressure.

I got my 3rd project done for my artificial intelligence class, so I have some time this evening to draw up a block diagram for this thing.
 
Top Bottom