Modded Mustang Forums banner

DIY Digital Gauges

44K views 72 replies 38 participants last post by  shaukat 
#1 · (Edited)
UPDATE: I have a working test version of the digital gauges, and I found a list of the Ford specific PIDs. See my later posts for pics of the experimental version.

ORIGINAL:
Hows it going everybody?

I'm currently working on replacing my instrument cluster with LCDs to display various engine parameters (I will post updates of my progress in this thread). The main reason I want to do this is because the stock gauges have absolutely no useful information on them other than "eh, looks about right..." The secondary reason is because I might try and stick a HUD in my dash, but thats another story. I am writing an Arduino program to communicate with an STN1110 chip which will pull data from the OBD-II port. This is basically the same thing as the MPGuino, but I will have multiple displays to show a bunch of stuff at once, which will completely replace the current instrument panel. And I'm not so worried about MPGs :D

Anyway, the thing is, most manufacturers (Ford included) only have a couple of standardized PIDs that you can get information from via OBD-II (speed, rpm, error codes, and a few others). For a list of standard PIDs, you can check out OBD-II PIDs - Wikipedia, the free encyclopedia, but I have read that most of these PIDs are not supported by Ford. Nearly everything about the car can be accessed via OBD-II, its just not standard across manufacturers, and the information about these non-standard PIDs is very hard to come by.

Which brings me to my point. I've not had much luck finding out anything about the Ford specific PIDs or how to access them (I'm searching for PIDs for my '03 mustang, so anything about the CAN interface does not apply). Without this info, I'm afraid the digital gauges will be restricted to very basic info. Can anybody help me out? It would be greatly appreciated!
 
See less See more
#5 ·
@Rabid Stang:

While not exactly what I'm looking for, that is helpful! Thanks! Now I know what should be possible to get out of the car.

The crucial piece of information missing from that site is the hex addresses of the PIDs (or did I miss it?). Sadly, the ECU doesn't allow you to request parameters in a textual format. You have to send a series of hex values, then the ECU responds with hex values. The problem is I don't know what hex values to send for all the various parameters. So if anyone knows the hex values for PIDs specific to Ford vehicles (odometer, fuel level, etc...), please let me know!

Due to popular demand (gofastralph), here is how you request info from OBD-II.

First, you need a chip that is able to communicate with the car's ECU over the OBD-II port. As far as I can tell, the two most popular chips for this are the ELM327 (about $35) and the STN1110 (about $10), with the STN1110 being generally regarded as faster and more stable. You build a circuit for this chip (circuit diagrams are on the datasheets for each chip) and plug it in to both the OBD-II port and either 1) a computer or 2) a microcontroller such as an Arduino. Then you send simple commands to the chip in hex format, it sends it to the ECU and gets the response, and the chip outputs hex values for the results you asked for. You can check out the wiki page I linked to in the first post for a list of general PIDs (many of which won't work). The list does not have the ford specific stuff, so in reality if you knew all the PIDs unique to ford you could get info about what gear you were in, whether or not your seatbelt was unbuckled, if the door was shut or not, and like Rabid Stang said you can do math using a combination of different values to calculate stuff such as MPG and instantaneous fuel comsumption. Noteworthy is the fact you could store all the different error codes and descriptions on a microcontroller, so when the check engine light went off you could throw the error code up onto an LCD along with the full description of what the problem is. There is so much that could be done, the only limit is your imagination.

Anyway, as an example, to request the speed of the vehicle you would send:
01 0D
01 is the mode, and 0D is the parameter you want for that particular mode. Again, see the wiki page for more examples of modes and parameters you can request. An example of the resulting output would be something like:
41 0D 78
41 is the ECU saying it is responding to a request, 0D is letting you know exactly what value it is responding to, and 78 is the actual value you wanted (in hex). 78 in hex = 120 in decimal, and the vehicle speed PID happens to be in km/h. You just convert 120 km/h to mph (unless youre weird and like metric :dunno) to get your value!

To do a full set of digital gauges, you just request a PID, convert the results into a useable format, throw it up on an LCD screen, and repeat over and over for each parameter.
 
#6 · (Edited)
Update time!

So, I got myself an Arduino Mega 2560 ($65), a 16X2 lcd screen ($15), an STN1110 ($10), and all the components to wire up the circuit for the STN1110 ($15).

The first breakthrough was that I found a list of the Ford PIDs on the internet! There was no verification that the list was correct when I found it. It was just a list on some random website. One of my friends who has access to a bunch of technical info about our cars was able to verify that many things on the list were correct. We didn't check everything, but it seems that the list I found is accurate. I will be getting a complete list of Ford specific PIDs from him soon, so that I can compare it to the list I found!

I built the circuit for the STN1110 over the course of about 2 weeks (I had to reorder parts I forgot), and many of the components are available in surface mount chips only. These chips are about the size of the presidents ear on a dime, and there are 5 connection points on some of the chips! Soldering wires directly to them is impossible, so I had to etch my own circuit boards using hydrochloric acid + hydrogen peroxide to use as an adpater for the chip so I could run wires to it. The tiny surface mount chips are soldered to the adapter board, and wires are then connected to the board so that it can be hooked in to the circuit. Its quite a pain, but it finally got finished.

Last night I was up until about 6:30 am with one of my friends coding the program for the Arduino. We gave up because it was just not working properly. When I woke up this...uh, afternoon, I realized what we were doing wrong. I forgot to tell the STN1110 to begin communicating with the car! I had originally started communication between the Arduino and the STN1110, but forgot to then tell the STN1110 to start talking with the car lol. So after that was fixed, I tested it out, and IT WORKED!!!

So now I have an lcd sticking out of this huge mess of circuits and wires over my cupholders, and it displays the RPMs and the vehicle speed in MPH. Its completely uselesss right now because the circuits go sliding around whenever I go around a corner, so the next step is to order more LCDs and make a custom instrument cluster with them.

Stay tuned, more to come as I make further progress.
 
#10 ·
I have a couple pics of the circuit and LCD and whatnot, but every time I try to upload them it says the upload failed...any ideas how to get it to work?

Anyway, yes, I will be removing the stock instrument cluster. The goal is to move everything forward so that there is room in the dash behind the gauges. What I will probably do is make a new trim piece (referring to the piece that goes around the recessed area for the gauges and behind the headlight knob) that doesnt have the cutout for the gauge cluster, and I will attach the lcds directly to the trim piece where the gauges used to be recessed. That should give me a fair amount of space back there. After this is successful, I am going to try to fit a heads up display in the newly created space (I have a very large experimental version of the HUD sitting on the kitchen counter, so I think I might actually be able to pull this off).
 
#14 · (Edited)
Thanks FortyThree!

Here is a pic of one of the super tiny chips I had to deal with. This one has 3 connections, some other ones that were the same size had 5 connections:


A pic of the SNT1110 circuit. Its in a breadboard and looks extremely messy. I will have to make a proper circuit board for it at some point:


Another pic of the STN1110 circuit:


A pic of the lcd displaying the RPMs at idle. MPH works too, but I was just sitting in my garage. It doesn't look nearly as green in real life, its more of a greenish yellow. Also, when under the sun or other bright light source the background becomes a very deep blue and the characters become very yellow.


And finally, a pic of the entire setup. The blue looking circuit board thing is the Arduino Mega 2560. To the right is (obviously) the STN1110 circuit. To the left partly hidden behind the LCD is another breadboard just for connecting the LCD to the arduino.


I have heard of people putting iPads in their cars, but I dont know of a way to interface them to anything. Its just an iPad that is permenantly attached to your car lol. A touchscreen is definitely possible though. They require using a lot of connection points to connect them to an arduino, so you would probably need a second arduino to handle the touchscreen display. Arduinos can be wired up to talk to eachother though, so you would be able to set them up to share data or have one controll the other.

And finally, I'm using a character lcd display in these pics, but I plan to order a graphic lcd or 2 to make a digital tach and speedo. I figured that it would be better to use character lcds for the numerical readouts because they are readable in direct sunlight, the font is fairly large, you can connect 40+ of these to a single arduino, and theyre about half the price of a graphic lcd.
 
#24 ·
Some odd questions-

With that stand alone, how do you program the Arduino? And are there programs available to run on a laptop? That would be an awesome troubleshooting tool, and you could probably write a C++ program to make a very user friendly interface.

Also, do you know if this is J1979 protocol only? It would nearly eliminate the need for a stand alone tuner with gauges in an HD pickup if it could read J1939 as well.
 
#27 · (Edited)
Progress update: I have a max ******* setup where I duct taped the circuits and lcd to the right side of the driver's footwell, and drove to work and back today. The setup performed perfectly during both 20 minute trips! I'd say I'm ready to order some more LCDs and build the actual instrument cluster.





Who woulda thought I could make digital gauges into a ******* mod haha? It's coming out of the car tonight. This was a one day only thing, just to make sure it worked before I spent more money on it.


Reseponses in order of who posted first:

@WickedSnake00 (responses to both your posts in here):
There is hardware out there to read PIDs and whatnot. From what I can tell, there are 3 potential options: 1) ELM327 2) SNT1110 3) Half assed **** from china. It seems everything is derived from one of those three.

The SNT1110 is newer, has updatable firmware, is faster, and is less than 1/3 the price of the ELM327 ($10 vs $32). There is really no reason to get the ELM327 instead of the STN1110. I guess the only reason to go with the ELM327 is that they have better documentation of the commands. The STN1110 accepts every command for the ELM327, so the STN1110 documentation literally tells you to go look at the ELM327 documentation lol.

Please refer to the “AT Commands” section of the ELM327 datasheet for
the complete description of the AT command set.
DO get either one of those chips over the china garbage. They claim they are ELM327 chips, but they are really a different chip with cracked ELM327 firmware, and supposedly most of them dont work right. Basically everything you see on ebay is chinashit.

The ELM327 and the STN1110 both have circuit diagrams in the datasheets, so you just order the main chip and get all the other parts from somewhere like digikey (cost me about $15 for all these other components) and put it all together. The only issue is the surface mount chips, and the fact that 2 of the transistors are discontinued from the STN1110 datasheet. I guess I might as well put it here, transistor 3640 only exists as MMBT3640, which is a tiny surface mount. Transistor 3646 is discontinued and has no official replacement. I found that some guys fixing ancient casio calculators were using a 2N4401 instead, so thats what I used and it works fine. To deal with surface mount chips, you can buy a completely copper coated circuit board from radioshack, draw where you want the copper paths to be on the board with a sharpie, and throw it in a bucket of hydrochloric acid + hydrogen peroxide. The acid will eat all the exposed copper and the sharpie will protect the copper that you want to keep. You can then solder the surface mount chip to the copper traces you created, and then solder wires to the other ends of the traces.

The arduino is programmed via USB. It has its own free software where you can write the code, upload it to the arduino, and test the serial connection (which is how it talks to the STN1110/ELM327/chinashit). I programmed it with my desktop, tested the code with the software's built in serial monitor until everything worked as expected, then stuck it in the car to test it. After some minor tweaks and the realization that I needed to turn echo off for the STN1110 (the command for that is AT E0), everything worked without too much fuss. The arduino saves the last program uploaded to it and runs it automatically as soon as it gets power, so if you program everything the way you want it, you never have to take it out of the car again. As far as car troubleshooting, you dont even need the arduino. You could just disconnect the arduino from the STN1110/ELM327 and connect your computer to the STN1110/ELM327 instead. You would probably need a serial-to-usb adapter unless you have an old ass laptop. If you get that hooked up, you can send commands straight to the car using a terminal emulator program (I seem to recall reading Hyperterm as an example). You could pull error codes, check coolant temperature, see if the engine is running in open/closed loop or limp-home mode, reset the check engine light, and I think you can get all the engine parameters at the exact moment the check engine light came on (the computer saves this data until the next time the light comes on). Basically, if the computer has it, this chip can read it (provided you know how to request the data!).

As for modes, I think most (maybe all?) Fords use the J1850 PWM protocol. I only built my STN1110 circuit to work with J1850 PWM because thats what our cars use. The website for the STN1110 says that it works with J1939 too (and nearly every other protocol for that matter). About the only thing I heard it doesnt work with is some of the semi trucks.


@everyone with compliments:
Thanks! I'm probably not as smart as you think. I have absolutely no prior experience with PIDs or programmable microcontrollers (the arduino). I have released the magic blue smoke from more circuit components than I care to admit haha :dunce:. I just started reading about all this stuff a month or so ago. All it takes is motivation. So to help you all along, I will be going around and hitting everyone's gauge cluster with a hammer :banana

@laoutlaw01:
Don't worry, it is impossible to offend me. Give me your best shot! :cool:

I'm not gonna lie, I was a bit ashamed having to ask how to post pics lol. In my defense, I saw this attachment button that is supposed to let me upload a pic directly to the moddedmustangs website. I tried everything (resizing the picture to make the filesize smaller, resizing it to make the dimensions smaller, resizing it to be really really tiny, etc...) but it just wouldn't upload. I don't know why I didnt think of photobucket. Probably because I didnt have an account. But still, thats sad on my part haha. Also, with regards to me being smart, thank you.

@cschoening09:
I will try to record and post a video of the experimental HUD setup to youtube. I would take a pic, but it just looks like an image reflecting off a piece of acrylic. Not very exciting to see a pic lol. I actually have the image somewhat collimated, so the image appears to be far away. That way your eyes dont have to shift focus from the road (far) to the uncollimated image (near) and back.

@StockD15b:
Yes, this is exactly like a scangauge but better! A scangauge has only 1 lcd to display stuff on. The arduino could have....40 some? I dont wanna count all the pins on the arduino lol. Anyway, I can connect A LOT of lcds and show all kinds of info. I can also read error codes and reset the check engine light with this (scangauge cant). I can also program the arduino to use all the different values the computer gives us to calculate stuff, like instant MPG, average MPG, instant fuel consumption, etc. Also, since the arduino can be connected to a bunch of other cool things, a smart person could for example attach an accelerometer, a gps chip, and a flash memory card to datalog engine parameters, speed, mpg, cornering/acceleration/braking forces, and gps location, and then put all that info onto a map of a city or racetrack or whatever. I'm not smart enough to do that so don't get your hopes up lol. I'm just saying, it is technically possible.

@everyone:
I'm not sure if anyone really cares for an explanation, but if you want I can try to explain what all is going on in extremely simple terms. The basics are (surprisingly) not very complex.
 
#32 ·
@WickedSnake00 (responses to both your posts in here):
There is hardware out there to read PIDs and whatnot. From what I can tell, there are 3 potential options: 1) ELM327 2) SNT1110 3) Half assed **** from china. It seems everything is derived from one of those three.

The SNT1110 is newer, has updatable firmware, is faster, and is less than 1/3 the price of the ELM327 ($10 vs $32). There is really no reason to get the ELM327 instead of the STN1110. I guess the only reason to go with the ELM327 is that they have better documentation of the commands. The STN1110 accepts every command for the ELM327, so the STN1110 documentation literally tells you to go look at the ELM327 documentation lol.

The ELM327 and the STN1110 both have circuit diagrams in the datasheets, so you just order the main chip and get all the other parts from somewhere like digikey (cost me about $15 for all these other components) and put it all together. The only issue is the surface mount chips, and the fact that 2 of the transistors are discontinued from the STN1110 datasheet. I guess I might as well put it here, transistor 3640 only exists as MMBT3640, which is a tiny surface mount. Transistor 3646 is discontinued and has no official replacement. I found that some guys fixing ancient casio calculators were using a 2N4001 instead, so thats what I used and it works fine. To deal with surface mount chips, you can buy a completely copper coated circuit board from radioshack, draw where you want the copper paths to be on the board with a sharpie, and throw it in a bucket of hydrochloric acid + hydrogen peroxide. The acid will eat all the exposed copper and the sharpie will protect the copper that you want to keep. You can then solder the surface mount chip to the copper traces you created, and then solder wires to the other ends of the traces.

The arduino is programmed via USB. It has its own free software where you can write the code, upload it to the arduino, and test the serial connection (which is how it talks to the STN1110/ELM327/chinashit). I programmed it with my desktop, tested the code with the software's built in serial monitor until everything worked as expected, then stuck it in the car to test it. After some minor tweaks and the realization that I needed to turn echo off for the STN1110 (the command for that is AT E0), everything worked without too much fuss. The arduino saves the last program uploaded to it and runs it automatically as soon as it gets power, so if you program everything the way you want it, you never have to take it out of the car again. As far as car troubleshooting, you dont even need the arduino. You could just disconnect the arduino from the STN1110/ELM327 and connect your computer to the STN1110/ELM327 instead. You would probably need a serial-to-usb adapter unless you have an old ass laptop. If you get that hooked up, you can send commands straight to the car using a terminal emulator program (I seem to recall reading Hyperterm as an example). You could pull error codes, check coolant temperature, see if the engine is running in open/closed loop or limp-home mode, reset the check engine light, and I think you can get all the engine parameters at the exact moment the check engine light came on (the computer saves this data until the next time the light comes on). Basically, if the computer has it, this chip can read it (provided you know how to request the data!).

As for modes, I think most (maybe all?) Fords use the J1850 PWM protocol. I only built my STN1110 circuit to work with J1850 PWM because thats what our cars use. The website for the STN1110 says that it works with J1939 too (and nearly every other protocol for that matter). About the only thing I heard it doesnt work with is some of the semi trucks.
That is awesome.

Got any helpful links for where to buy components and wiring diagrams?
This is all taking me back to my C++ programming and digital electronics classes.

Plus I like the fact it can use J1939. That means I can make my own scantool/gauges for my new truck since I know all of the SPN's for the J1939 public parameters on the ISB 6.7. :potstir
 
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top