Joined
·
1 Posts
How to Make a OBDII Data Logger Interface
Someone from DSMTuners asked me to post this here... so here it is!
Background:
I’ve been searching around for dataloggers for quite a while now, and each time I think I find a good solution, it ends up not working out.
Here are the problems I have with current loggers on the market. First, I can’t really justify spending more than $100 for a Pocketlogger or DSM Logger. Second, many of the available loggers stay continuously connected to the OBD port, but they are so bulky, I was afraid of it getting in my way.
I decided to put my electronics skills to the test and make a logger of my own. My goals for this project were to have a functional, yet compact logger interface for under $50.
Well, the $50 limit didn’t work out for me, but that’s because I spent too much in development. Still, that shouldn’t mean anyone reading this can’t do it for under about $50.
What goes into a logging interface:
After doing some research, I found an OBDII interface requires two features, voltage regulation and some sort of protocol translation. Most cars run on 12V circuits while computers use TTL or CMOS level circuits (5V), hence the voltage regulation. If this feature is skipped over, the car’s OBD port has the potential to fry whatever computer you’re using to datalog. Also, OBD code comes in on two bus lines (the K and L lines) using the OBD protocol, whereas a basic RS232 DB9 serial port on many computers runs off of a single bus, using the standard serial protocol. If any of this is over your head, don’t worry, you won’t be tested on it.
I found that the ELM323 chip was the most accessible and easiest to implement. The 323 version uses the ISO OBD protocol which works for many OBDII compliant cars including 2G DSMs. Some people have complained of its sampling rate (2-5 times/second) compared to a Pocketlogger (15-30 times/second). This is inherent to the architecture of the chip and cannot be changed. I found that in most cases this rate is more than sufficient, though; unless you’re building an absolute beast for the drag strip, when every nanosecond counts.
How I did it all (Abstract):
Here’s the basic run down of my process. I put in the time to properly design and engineer this circuit and circuit board in hopes that none of you will have to. After I had the circuit board designed, I used the laser printer/transfer method with ferric chloride to etch my circuit boards. I then used a Dremel with carbide jeweler’s bits to drill the holes. The proper components were soldered in place and the whole thing was connected to the car using basic copper wire and spade-type connectors.
Skills required:
Circuit board fabrication
Small electronics soldering
Basic direction following
Electronics schematic reading (optional, but useful nonetheless)
Parts required:
Circuit board –
Blank copper clad printed circuit board (PCB)
Ferric chloride etching solution
Photo Basic Gloss paper from Staples
Acetone
Lacquer Thinner
—OR—
Get your hands on a pre-made board (PM me about this)
Circuit-
2 x 510ohm resistors
2 x 2.2kohm resistors
2 x 4.7kohm resistor
3 x 10kohm resistor
1 x 47kohm resistor
1 x 100kohm resistor
1 x 0.01uF capacitor
2 x 0.1uF capacitor
2 x 22-30*pF
2 x 1N4148 diodes
2 x 2N3904 transistors
2 x 2N3906 transistors
1 x 78L05 voltage regulator
1 x 14 pin DIP Socket
1 x 3.579545MHz crystal
1 x ELM323 OBD translator chip
1 x PC Mount DB9M connector
*The capacitor value here varies depending on the crystal you use. Read the packaging material included with the crystal for more details. In most cases though, a 22-30pF capacitor should work.
Connectors-
22 gauge multi-stranded copper wire
Several spade connectors or interconnects
A null modem cable (if connecting to your laptop)
A HotSync cable (if connecting to your PDA)
Tools Required:
Circuit Board-
Clothes iron
ScotchBrite scrubbing pad
Dremel or similar rotary tool
Drill press attachment for Dremel (Amazon.com)
0.0295” carbide drill bit with 1/8” shaft for Dremel (eBay)
0.0350” carbide drill bit with 1/8” shaft for Dremel (eBay)
Circuit-
Soldering iron
Electronic solder
Wire snips/Multi-purpose wire stripping tool
Small needle nose pliers (not an absolute necessity, but they help)
Each of the parts can be found at your local Radio Shack. Granted, some are harder to find than others. If you’re stuck, you can always PM me; I have many of these parts lying around. I have also included where I got the drill bits and drill press from in parentheses next to those items.
Procedure:
Making the board…
If you have a pre-made board, obviously, skip this step and go to the next.
If you’re making your own – here is the basic protocol. I won’t go into much detail because this isn’t a method I personally developed and more comprehensive instructions can be found elsewhere on the web.
Search for "Easy PCB" with Google if you’re stuck or you want more explanation behind the process.
To begin with, scrub the blank PCB with the ScotchBrite pad. Do this step well, it helps with the transferring of the board design later. Once you’ve scrubbed it, wash it thoroughly with an acetone soaked rag/paper towel. Keep washing it until the rag you’re using doesn’t pick up any more copper residue.
You can either cut the board down to size using a Dremel and cut-off wheel now, or after the etching.
Now, print out this circuit board layout on that special paper you bought from Staples to scale! Also, make sure you print it on a laser printer! I can’t stress that enough. The toner from a laser printer resists etchant quite well, whereas ink from an inkjet does not. Make sure the printer is on its darkest setting (none of that “econo-mode” stuff).
It is also crucial that it is printed to scale; otherwise the components won’t match up to the holes. If you’re in doubt, the final size of the pattern should be 1.9 inches by 1.5 inches. After it’s printed, cut the pattern to size leaving a ¼” border. Be careful not to touch the surface of the paper with your bare hands; latex/nitrile gloves are a good idea.
Now that all of that is in order, set your iron to its hottest setting (no steam) and pre-heat your circuit board by letting the iron rest on the surface. After a few minutes, carefully position the pattern over the board. Re-apply the iron, and push down with a little force. Make sure you heat the whole thing evenly for about 30 – 60 seconds. Now move the iron around, as if you were ironing clothes. The longer the better – you want a good transfer.
After you’ve heated it, soak the board (careful, it’s hot!) in hot water. After about two minutes, while keeping the board in the water, start removing the paper. If you transferred everything right, it shouldn’t come off too easily. You’ll need to use an old washcloth or toothbrush to remove some of the paper between traces. It’s ok to have paper over the traces, but nowhere else.
Soak it longer if you’re having trouble here. Don’t be afraid to use a little force either, the toner is now fully transferred.
At this point, if you’ve screwed up the transfer, you can remove the toner with lacquer thinner, scrub it again, and start over. Look over the board a few times; if there are any broken traces you might have to start over. If there are only a very few thin spots or broken traces, you can actually touch up the toner with a fine tip Sharpie.
Now you’re ready to etch. Pour the ferric chloride into a small plastic container (gloves are highly recommended); it should be big enough to hold the circuit board and fairly shallow. You want enough to cover the board to a depth of about ½”. Be careful not to get etchant on anything made of metal!
Stick the board in the container. While etching, it helps if you do two things, agitate the etchant and apply heat. I slowly rocked the container back and forth by hand while holding it under a halogen lamp. The whole process should take at least 20 minutes. Check the board, and if there’s still unwanted copper, let it etch more. Once it’s done, rinse it with water in your bathroom sink.
If you’re done with the etchant, you can flush it down the toilet.
If you haven’t cut the board down to size already, do so now.
Now all that is left is the drilling. Using the Dremel (at its highest RPM setting), drill press, and 0.0295” bit, start drilling each of the holes on the board. Use the 0.0390” bit for the holes that will eventually accept the DB9 connector, as well as the holes labeled “+,” “-,” and “L.”
Finally, use some lacquer thinner to remove the toner from the traces and you’re done with this part.
Putting the circuit together…
Start soldering each part to the board, using the component diagram and the list of components. I decided to use ceramic disk capacitors in my design for several reasons, but one of them is that there’s no polarity to worry about. Most all of the components actually do not have any specific polarity besides the diodes and transistors. Look at the picture to figure out their orientation or reference the schematic if you know what you’re looking at. As for the diodes, I know they’re hard to see in the pictures; so, the stripe on D6 faces towards the side of the board with the crystal while the stripe on D7 faces away from the crystal.
R2, R4 = 510ohm
R3, R7 = 2.2kohm
R11, R12 = 4.7kohm
R8, R9, R10 = 10kohm
R13 = 47kohm
R14 = 100kohm
C1 = 0.01uF
C2, C5 = 0.1uF
C3, C4 = 27pF
D6, D7 = 1N4148
T1, T2 = 2N3904
T3, T4 = 2N3906
Q1 = 3.579545MHz Crystal
I do have a few tips and reminders as to how to put all of this together. First, in case you didn’t know, all of the components go on the opposite side of the board (i.e. where there are no traces). The leads go through the holes and are soldered to the traces like that.
When soldering, apply heat to the very end of the lead and once it heats up, start applying solder to the base. If the solder touches the iron, the solder will get sucked onto the tip and away from your lead.
If there are any thin spots on your traces that you’re worried about, you can lay down a few layers of solder over it to thicken it.
Make sure you get a good connection between the components and the trace.
I recommend soldering the components in this order…
IC socket
Diodes
Resistors
Crystal
Transistors
Capacitors
DB9 Connector
I chose this order because the resistors, diodes, and crystal are very low profile, so you can have your circuit board rest on your work surface without it shifting too much. When you get to the higher profile components, make some sort of a jig to hold the board by its edges. I just rested mine between the two sections of the handle of some large pliers. This lifted the board enough of the table surface to let me insert everything while still having a level, stable board to solder.
Also, you may want to remove or bend the actual “PC mounts” on the DB9 connector. I didn’t have the right sized drill bit on hand, and the solder will hold the thing in place just fine.
Finally, take it easy every now and then. If you’re competent at soldering, you might want to use a heat sink. Some of these components don’t like heat too much (especially the silicon based ones…).
One last thing; the original circuit board has R4 sharing a hole with D6. Don’t do this, the two leads won’t fit. Instead, thread one of the leads through the hole labeled “K,” which is right next to the original hole. Also, don’t clip the lead that goes through the “K” hole. Solder it and leave it there.
Once everything is soldered in, insert the ELM323 chip into the socket. Pin 1 (on the side with the half-moon notch in it) faces the side of the board with the crystal on it.
Making the connections…
Once you have all of the components in place, you’ll want to start working on the connections. Thread a short length (6” should be fine) of multi-strand copper wire through the holes on the board labeled “+,” “-,” and “L.” Solder them to the board and solder another section of wire to the unclipped lead from R4.
If you have any heat shrink tubing on hand, protecting the connections with it is a good idea so they don’t corrode or short anything out on the board.
On the other end of the wires connect the spade connectors or interconnects.
Using this diagram, connect each of the spade connectors to their corresponding pins in the OBD port. If you chose to use the interconnects, connect them to the proper wires that feed those pins. Either method is fine, but if you use the interconnects you leave your OBD port free for other scanners/loggers.
You can use a few zip ties to keep the thing up out of the way.
Finally, plug your HotSync or serial cable into the DB9 port on the finished interface. Now turn your car on and run your favorite logging software.
Final Thoughts:
In order to prevent corrosion of the solder or traces, you may want to spray paint the back of the board.
Here is a list of programs available for use with this interface. Some work with PDAs, some work with laptops, and some work with both. All are free except for Digimoto (which is unfortunate because I like that one the most).
Easy OBD
http://www.easyobdii.com/
OBD Gauge
http://www.qcontinuum.org/obdgauge/
OBD Logger
http://pages.infinit.net/jsenk/obd.htm
OBD2 Scantool
http://www.fiero-gt.com/obd2.html
pyOBD (for Macs and Linux)
http://www.cs.unm.edu/~donour/cars/pyobd/
Real Scan
http://techworld.dyndns.org/obd/index.htm
ScanTest (Pocket PC)
http://www.geocities.com/a_ser_files/
wOBD
http://www.werner-digital.com/obd/software.html
Digimoto (the best one in my opinion)
http://www.digimoto.com/
If you want to modify any part of the circuit and you have the EasyPCB CAD program, here is the file.
ELM-ISO PCB Layout
If you run into any problems, feel free to PM me of course. If you’re having trouble finding parts or you just want a pre-made interface, PM me for that too. I’ll do me best to help you out in any situation.
Someone from DSMTuners asked me to post this here... so here it is!
Background:
I’ve been searching around for dataloggers for quite a while now, and each time I think I find a good solution, it ends up not working out.
Here are the problems I have with current loggers on the market. First, I can’t really justify spending more than $100 for a Pocketlogger or DSM Logger. Second, many of the available loggers stay continuously connected to the OBD port, but they are so bulky, I was afraid of it getting in my way.
I decided to put my electronics skills to the test and make a logger of my own. My goals for this project were to have a functional, yet compact logger interface for under $50.
Well, the $50 limit didn’t work out for me, but that’s because I spent too much in development. Still, that shouldn’t mean anyone reading this can’t do it for under about $50.
What goes into a logging interface:
After doing some research, I found an OBDII interface requires two features, voltage regulation and some sort of protocol translation. Most cars run on 12V circuits while computers use TTL or CMOS level circuits (5V), hence the voltage regulation. If this feature is skipped over, the car’s OBD port has the potential to fry whatever computer you’re using to datalog. Also, OBD code comes in on two bus lines (the K and L lines) using the OBD protocol, whereas a basic RS232 DB9 serial port on many computers runs off of a single bus, using the standard serial protocol. If any of this is over your head, don’t worry, you won’t be tested on it.
I found that the ELM323 chip was the most accessible and easiest to implement. The 323 version uses the ISO OBD protocol which works for many OBDII compliant cars including 2G DSMs. Some people have complained of its sampling rate (2-5 times/second) compared to a Pocketlogger (15-30 times/second). This is inherent to the architecture of the chip and cannot be changed. I found that in most cases this rate is more than sufficient, though; unless you’re building an absolute beast for the drag strip, when every nanosecond counts.
How I did it all (Abstract):
Here’s the basic run down of my process. I put in the time to properly design and engineer this circuit and circuit board in hopes that none of you will have to. After I had the circuit board designed, I used the laser printer/transfer method with ferric chloride to etch my circuit boards. I then used a Dremel with carbide jeweler’s bits to drill the holes. The proper components were soldered in place and the whole thing was connected to the car using basic copper wire and spade-type connectors.
Skills required:
Circuit board fabrication
Small electronics soldering
Basic direction following
Electronics schematic reading (optional, but useful nonetheless)
Parts required:
Circuit board –
Blank copper clad printed circuit board (PCB)
Ferric chloride etching solution
Photo Basic Gloss paper from Staples
Acetone
Lacquer Thinner
—OR—
Get your hands on a pre-made board (PM me about this)
Circuit-
2 x 510ohm resistors
2 x 2.2kohm resistors
2 x 4.7kohm resistor
3 x 10kohm resistor
1 x 47kohm resistor
1 x 100kohm resistor
1 x 0.01uF capacitor
2 x 0.1uF capacitor
2 x 22-30*pF
2 x 1N4148 diodes
2 x 2N3904 transistors
2 x 2N3906 transistors
1 x 78L05 voltage regulator
1 x 14 pin DIP Socket
1 x 3.579545MHz crystal
1 x ELM323 OBD translator chip
1 x PC Mount DB9M connector
*The capacitor value here varies depending on the crystal you use. Read the packaging material included with the crystal for more details. In most cases though, a 22-30pF capacitor should work.
Connectors-
22 gauge multi-stranded copper wire
Several spade connectors or interconnects
A null modem cable (if connecting to your laptop)
A HotSync cable (if connecting to your PDA)
Tools Required:
Circuit Board-
Clothes iron
ScotchBrite scrubbing pad
Dremel or similar rotary tool
Drill press attachment for Dremel (Amazon.com)
0.0295” carbide drill bit with 1/8” shaft for Dremel (eBay)
0.0350” carbide drill bit with 1/8” shaft for Dremel (eBay)
Circuit-
Soldering iron
Electronic solder
Wire snips/Multi-purpose wire stripping tool
Small needle nose pliers (not an absolute necessity, but they help)
Each of the parts can be found at your local Radio Shack. Granted, some are harder to find than others. If you’re stuck, you can always PM me; I have many of these parts lying around. I have also included where I got the drill bits and drill press from in parentheses next to those items.
Procedure:
Making the board…
If you have a pre-made board, obviously, skip this step and go to the next.
If you’re making your own – here is the basic protocol. I won’t go into much detail because this isn’t a method I personally developed and more comprehensive instructions can be found elsewhere on the web.
Search for "Easy PCB" with Google if you’re stuck or you want more explanation behind the process.
To begin with, scrub the blank PCB with the ScotchBrite pad. Do this step well, it helps with the transferring of the board design later. Once you’ve scrubbed it, wash it thoroughly with an acetone soaked rag/paper towel. Keep washing it until the rag you’re using doesn’t pick up any more copper residue.
You can either cut the board down to size using a Dremel and cut-off wheel now, or after the etching.
Now, print out this circuit board layout on that special paper you bought from Staples to scale! Also, make sure you print it on a laser printer! I can’t stress that enough. The toner from a laser printer resists etchant quite well, whereas ink from an inkjet does not. Make sure the printer is on its darkest setting (none of that “econo-mode” stuff).
It is also crucial that it is printed to scale; otherwise the components won’t match up to the holes. If you’re in doubt, the final size of the pattern should be 1.9 inches by 1.5 inches. After it’s printed, cut the pattern to size leaving a ¼” border. Be careful not to touch the surface of the paper with your bare hands; latex/nitrile gloves are a good idea.

Now that all of that is in order, set your iron to its hottest setting (no steam) and pre-heat your circuit board by letting the iron rest on the surface. After a few minutes, carefully position the pattern over the board. Re-apply the iron, and push down with a little force. Make sure you heat the whole thing evenly for about 30 – 60 seconds. Now move the iron around, as if you were ironing clothes. The longer the better – you want a good transfer.
After you’ve heated it, soak the board (careful, it’s hot!) in hot water. After about two minutes, while keeping the board in the water, start removing the paper. If you transferred everything right, it shouldn’t come off too easily. You’ll need to use an old washcloth or toothbrush to remove some of the paper between traces. It’s ok to have paper over the traces, but nowhere else.
Soak it longer if you’re having trouble here. Don’t be afraid to use a little force either, the toner is now fully transferred.
At this point, if you’ve screwed up the transfer, you can remove the toner with lacquer thinner, scrub it again, and start over. Look over the board a few times; if there are any broken traces you might have to start over. If there are only a very few thin spots or broken traces, you can actually touch up the toner with a fine tip Sharpie.
Now you’re ready to etch. Pour the ferric chloride into a small plastic container (gloves are highly recommended); it should be big enough to hold the circuit board and fairly shallow. You want enough to cover the board to a depth of about ½”. Be careful not to get etchant on anything made of metal!
Stick the board in the container. While etching, it helps if you do two things, agitate the etchant and apply heat. I slowly rocked the container back and forth by hand while holding it under a halogen lamp. The whole process should take at least 20 minutes. Check the board, and if there’s still unwanted copper, let it etch more. Once it’s done, rinse it with water in your bathroom sink.

If you’re done with the etchant, you can flush it down the toilet.
If you haven’t cut the board down to size already, do so now.

Now all that is left is the drilling. Using the Dremel (at its highest RPM setting), drill press, and 0.0295” bit, start drilling each of the holes on the board. Use the 0.0390” bit for the holes that will eventually accept the DB9 connector, as well as the holes labeled “+,” “-,” and “L.”

Finally, use some lacquer thinner to remove the toner from the traces and you’re done with this part.
Putting the circuit together…
Start soldering each part to the board, using the component diagram and the list of components. I decided to use ceramic disk capacitors in my design for several reasons, but one of them is that there’s no polarity to worry about. Most all of the components actually do not have any specific polarity besides the diodes and transistors. Look at the picture to figure out their orientation or reference the schematic if you know what you’re looking at. As for the diodes, I know they’re hard to see in the pictures; so, the stripe on D6 faces towards the side of the board with the crystal while the stripe on D7 faces away from the crystal.


R2, R4 = 510ohm
R3, R7 = 2.2kohm
R11, R12 = 4.7kohm
R8, R9, R10 = 10kohm
R13 = 47kohm
R14 = 100kohm
C1 = 0.01uF
C2, C5 = 0.1uF
C3, C4 = 27pF
D6, D7 = 1N4148
T1, T2 = 2N3904
T3, T4 = 2N3906
Q1 = 3.579545MHz Crystal

I do have a few tips and reminders as to how to put all of this together. First, in case you didn’t know, all of the components go on the opposite side of the board (i.e. where there are no traces). The leads go through the holes and are soldered to the traces like that.
When soldering, apply heat to the very end of the lead and once it heats up, start applying solder to the base. If the solder touches the iron, the solder will get sucked onto the tip and away from your lead.
If there are any thin spots on your traces that you’re worried about, you can lay down a few layers of solder over it to thicken it.
Make sure you get a good connection between the components and the trace.
I recommend soldering the components in this order…
IC socket
Diodes
Resistors
Crystal
Transistors
Capacitors
DB9 Connector
I chose this order because the resistors, diodes, and crystal are very low profile, so you can have your circuit board rest on your work surface without it shifting too much. When you get to the higher profile components, make some sort of a jig to hold the board by its edges. I just rested mine between the two sections of the handle of some large pliers. This lifted the board enough of the table surface to let me insert everything while still having a level, stable board to solder.

Also, you may want to remove or bend the actual “PC mounts” on the DB9 connector. I didn’t have the right sized drill bit on hand, and the solder will hold the thing in place just fine.
Finally, take it easy every now and then. If you’re competent at soldering, you might want to use a heat sink. Some of these components don’t like heat too much (especially the silicon based ones…).
One last thing; the original circuit board has R4 sharing a hole with D6. Don’t do this, the two leads won’t fit. Instead, thread one of the leads through the hole labeled “K,” which is right next to the original hole. Also, don’t clip the lead that goes through the “K” hole. Solder it and leave it there.
Once everything is soldered in, insert the ELM323 chip into the socket. Pin 1 (on the side with the half-moon notch in it) faces the side of the board with the crystal on it.
Making the connections…
Once you have all of the components in place, you’ll want to start working on the connections. Thread a short length (6” should be fine) of multi-strand copper wire through the holes on the board labeled “+,” “-,” and “L.” Solder them to the board and solder another section of wire to the unclipped lead from R4.
If you have any heat shrink tubing on hand, protecting the connections with it is a good idea so they don’t corrode or short anything out on the board.
On the other end of the wires connect the spade connectors or interconnects.

Using this diagram, connect each of the spade connectors to their corresponding pins in the OBD port. If you chose to use the interconnects, connect them to the proper wires that feed those pins. Either method is fine, but if you use the interconnects you leave your OBD port free for other scanners/loggers.

You can use a few zip ties to keep the thing up out of the way.
Finally, plug your HotSync or serial cable into the DB9 port on the finished interface. Now turn your car on and run your favorite logging software.
Final Thoughts:
In order to prevent corrosion of the solder or traces, you may want to spray paint the back of the board.
Here is a list of programs available for use with this interface. Some work with PDAs, some work with laptops, and some work with both. All are free except for Digimoto (which is unfortunate because I like that one the most).
Easy OBD
http://www.easyobdii.com/
OBD Gauge
http://www.qcontinuum.org/obdgauge/
OBD Logger
http://pages.infinit.net/jsenk/obd.htm
OBD2 Scantool
http://www.fiero-gt.com/obd2.html
pyOBD (for Macs and Linux)
http://www.cs.unm.edu/~donour/cars/pyobd/
Real Scan
http://techworld.dyndns.org/obd/index.htm
ScanTest (Pocket PC)
http://www.geocities.com/a_ser_files/
wOBD
http://www.werner-digital.com/obd/software.html
Digimoto (the best one in my opinion)
http://www.digimoto.com/
If you want to modify any part of the circuit and you have the EasyPCB CAD program, here is the file.
ELM-ISO PCB Layout
If you run into any problems, feel free to PM me of course. If you’re having trouble finding parts or you just want a pre-made interface, PM me for that too. I’ll do me best to help you out in any situation.