OBDII and data logging for $30 - Torque and ELM327 Bluetooth adapter

sac02

Member
:
2013 Mazda5 Sport 6MT
I figured this was worth $30 as an experiment to see what it was capable of.

https://www.amazon.com/dp/ (commissions earned)
Torque Pro on Google Play - $5

The OBDII adapter is a cheap china clone. It gives me average speeds of about 25 PIDs per second. That means I could one parameter 25 times per second, or 3 parameters ~8 times per second, or 25 parameters once per second, ...you get the idea. As a reference, with the more expensive ($100) OBDlink MX I've seen people report 70 PID/sec, and wired connections above 160+ PID/sec. So 25/sec isn't that fast, but it is noticeably faster than my scangaugeII which had a refresh rate of about once per second when monitoring 4 functions. I'm currently logging about 12 PID's at a rate of 0.5sec. If I really needed more resolution I could be more selective about what channels to log, or step up to a faster adapter. But I have a laptop-based software and wired connection on the way, so for just messing around, this is fine.

The torque app does a lot of stuff, I won't try to describe it all - (I'm assuming you can read the description on the Google Play link if you are interested in the full list of capabilities). It can do a lot of stuff (and plug-ins give it more capability), but for me, the meat of it is:
* read OBD trouble codes
* reset OBD trouble codes
* monitor a range of parameters (OBD and custom ECU PIDs)
* datalog a range of parameters (OBD and custom ECU PIDs)

It is worth noting that the OBD standard is just that - a standard, and that the Mazda ECU monitors many channels of data that aren't part of the OBD standard. Torque reads some of these Mazda codes, but not all. Additionally, other ECUs like Airbag for example, are not read by Torque.

I got the adapter in the mail a couple days ago, and just set up the Torque app quickly yesterday. Hence, the "dashboard" I threw together doesn't really convey the most relevant data, or look that fancy. Sue me. Here's some screenshots:

.

.

It also work works in landscape mode:


The actual data logging goes on in the background (invisible and behind the data shown on the dashboard). You can set the app up to automatically log, or start only when you tell it to. It records a .csv file that you can upload to the torque server (haven't played with this), or email. I email them to myself and reduce the data using MS Excel. My ~30min drive to work results in a file of ~1mb.

Here is a screenshot of my first data log. I've hidden some columns, formatted the data, and plotted some graphs:
(note that the graphs shown are for only 1 minute of the 30 minute drive)




If you were really on a tight budget, you could probably make this work as a tuning tool by being very careful about how you log, and very patient with your MS Excel data. The Torque/Excel option falls well short of what a proper data logging program will do, especially in ease of use, but something is definitely better than nothing.
 
I ran this setup in my old vehicle, but the older obd2 port only sent data once a second rendering it completely useless. Is the afr reading accurate at all?
 
AFR seems accurate, I have no reason to doubt it. Right now I am logging a bunch of different stuff "just because", so it is only refreshing twice per second. But as I mentioned, that's due to 1) Inexpensive OBDII adapter transmission speeds, and 2) the number of channels I'm logging. If I need more resolution, Torque can log up to 10Hz (10x per second) if your adapter supports that transmission speed.

Here is yesterday's data from my drive home. This is turning a corner (times (X axis) are in minutes )(@11.8), 2nd gear acceleration (@11.9), getting stuck behind a slow car on the on-ramp (@12.05) and 3rd gear accel (@12.3).

AFR generally looks like what you would expect from a healthy car. Probably a little richer than it needs to be, but maybe that's part of the conservative nature of OEM tuning I guess? Overall the refresh rate of 2Hz isn't great, but it isn't awful for this level of investigation, and by logging less channels or buying a more expensive adapter you could speed that up substantially.

DataLogdrivehomeJan24.png~original
 
Last edited:
Here's some data that I logged yesterday at an auto-x. I tried to log 8 parameters at 4Hz (every 0.25 seconds), but the cheap bluetooth setup couldn't quite keep up with that rate. As you can see in the graphs below where there is some portions of the graph that are smoother and some that are more discontinuous (when Tourque doesn't receive a fresh value from the vehicle ECU, it just repeats the previous value in the data log, hence the graphs look like stair steps instead of curves).

I wasn't really sure what I was doing when I chose what to log, so I wound up with some data that isn't useful (Intake Manifold Pressure), and missing some data I wish I had (throttle pedal position).

Anyways, here is a comparison of my first (slowest) and 4th (fastest) runs. I only plotted the first half of each run to make it a bit more readable.

Some of the things I'm seeing (notes on charts):
1. Maximum acceleration in 1st gear is about 0.4g (sounds about right)
2. On my first run I shifted into 2nd gear early, and my acceleration through this element was very slow. Compare the slope of the line in Run1 vs Run4.
3. There was no threshold braking on this course, max deceleration was about 0.6g.
4a. note how much quicker I approach the limit of lateral acceleration in Run4 going into the left hand turn. In Run1 I approach the limit much more slowly (give me a break, I've never raced this car before! :P )
4b. (course map) Note the modified line through the same left hander - continuously going deeper and harder into this corner as I got to know the car.
5. I think the GPS data is a little suspect, or at least has some drift to it; my line couldn't vary quite this much due to the course layout (i.e. I would be hitting cones).
6. (not circled) Sustained lateral accelerations at and above 1.0g, on street tires, on a moderately slick asphalt surface - pretty impressive.


Run1:



Run4:


Here is the course:




Oh, here's the second part of the graph, so you can see the legend of how to read the graph:
 
Last edited:
I have this setup, though I haven't paid for Pro as of yet. What kind of readings are you getting for Air/Fuel percentage?
 
Swenny,

You can kind of see the AFR in a couple of the graphs above. In post #1 I plotted one minute worth of AFR data from driving to work, and in post#4, the gray line is AFR data from an auto-x run.

The ECU seems to keep the AFR dead-on 14.7 in most cases normal cases. Just driving around leisurely, the AFR is either 14.7 or 29.4 (29.4 corresponds to coasting in gear, basically no engine fueling). That's a bit of an exaggeration that AFR is either 14.7 or 29.4, but not much, the ECU seems to try really hard to keep that 14.7 value, and succeeds when the pedal inputs aren't dramatic. During more enthusiastic driving like the auto-x run, you can see more variability in the AFR as there is more rapid and drastic changes in engine load.

Here is a simplified graph of AFR and engine load. AFR is the red line and is plotted on the primary y-axis (values on the left). Engine load is the slightly transparent tan color line and it is plotted on the secondary y-axis scale (values on the right). You can see that with harder driving, the AFR has much more variation - and is almost always pretty safely in the "rich" region. On this auto-x course the richest AFR I recorded was 10.7:1. The lowest I've seen on some 3rd gear WOT pulls is ~10.4:1, IIRC.

 
5. I think the GPS data is a little suspect, or at least has some drift to it; my line couldn't vary quite this much due to the course layout (i.e. I would be hitting cones).
Here is the course:
Were you using your phone's GPS to plot the track? Cell phone GPS antenna are passive and not very accurate. Nonetheless, that's pretty cool!
 
Yes, it was phone GPS. My previous phone had that option to use phone accelerometers to 'improve" GpS accuracy, which I'm not so sure would help or hurt GPS accuracy on something like an Auto-x course where the accelerations are relatively large. Anyway, my new phone doesn't seem to have that option to fiddle with anyways.

I do have a https://www.amazon.com/dp/ (commissions earned), but the power jack is messed up and it won't charge. It broke literally one week after the 12-month warranty ended. :(
 
I need to just throw down the $5 for Torque Pro. The OBD2 bluetooth adapters I bought a year or so ago have both died, so I need to pick up a few more...
 
Is the AF Ratio widget only available in the Pro version? I don't see that on the Free version anywhere
 
Last edited:
Buy a cheapo $50 MetroPCS or T-Mobile Android phone and permanently mount it into your car. :)
Agreed. Get on Craigslist and find someone who's offloading a tablet for cheap because it's a couple years old, or the battery died (you'll keep it wired in the car) or whatever. This can replace what used to be a real installation headache (custom gauge pods in the center stack) and/or ricer eyesore (A-pillar pods) of discrete gauges that used to be needed to keep tabs on things. That's my plan.

The one thing it can't do (b/c the vehicle doesn't have the sensor) is oil temp/pressure. I may have to suck it up and install a gauge for that.
 
Hey sac02,

Do you get data for O2 bank 1 sensor 1 or do we assume that is what the air/fuel widget stats are?
 
So I did some more experimenting with the data logging setup last week, and I also ran another Auto-x yesterday. Some interesting notes:

1. The mazdaEdit software with Tactrix 2.0 cable records much, MUCH faster than Torque and the BT OBDII dongle. I had about a dozen PIDs recording at 0.10sec intervals, and it didn't miss a beat. (But it also costs several hundred dollars, compared to $30)

2. I bought an https://www.amazon.com/dp/ (commissions earned) off of Amazon. I wanted to see if I could run two data systems at one time.

So I currently have the following equipment:
  • OBD splitter cable
  • Samsung Galaxy S4 + Torque app
  • Scangauge II
  • Qstarz 10Hz GPS bluetooth receiver/transmitter (I "fixed" it, to where it will at least run on AC power, but not battery)
  • Laptop with mazdaEdit software

3. On Friday morning I tried using the splitter cable to run Torque and the Scangauge. I don't know exactly how the Scangauge works, but it 1) refreshes slowly when used by itself, about 1Hz, and 2) severely slowed down the data capture rate of Torque when used with the splitter cable.
Very slow refresh of RPM as I accelerate:
SlowrefreshwithYcableandScangauge.png



4. I disconnected the scangauge and just ran Torque, recording engine RPM only, at 10Hz (0.10 second) logging rate. THEORETICALLY Torque and the bluetooth adapter should be able to do this, as the adapter supports 25 PIDs/second. However, I found that this was not true. I'm not sure if it is Torque, or the BT adapter, but even when only recording 1 PID, there are some repeated data cells.
Note the RPM refresh is faster, but not truly 10Hz, with the scangauge disconnected: (Also, note the refresh rate of the phone's internal GPS):
RefreshwithScangaugedisconnected.png




5. I ran an Auto-X on Sunday.
5a. I tried to use the splitter cable to run Torque and the mazdaEdit software on my laptop. The intent was to use Torque to record GPS and accelerator pedal position only. The purpose for recording the accel pedal position in Torque was only so that I could sync the two files later. I quickly learned that the mazdaEdit software did not work well with this setup, it would lose connection with the ECU about one second after connection. I think that somehow the BT adapter was at fault, because when I removed it the mazdaEdit software stayed connected.
5b. I used my 10Hz GPS receiver instead of the phone's internal GPS. This provided MUCH better results. The refresh rate of the GPS data in the Torque log file is much higher, and you can visually see the difference in the latitude/longitude data when I plot out the course profile.

Note the much higher resolution of the 10Hz GPS receiver, compared to the image above in item #4:
RefreshwithQstarz10HzGPS.png


Note the much higher resolution course map, compared to the image in post #4 from Jan 27:
Courseat10Hz.png



That's all for today.
 
OK, I lied. One more image.

Here is a screenshot of the data recorded by mazdaEdit software during the autocross.

MazdaEditAuto-Xnumber2.png
 

New Threads

Back