Home  |  Contents 
Microcontroller and PC projects
  Forum Index : Microcontroller and PC projects         Section
Subject Topic: Auto CAN Bus Interface via MM? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Andrew_G
Regular Member
Regular Member


Joined: 18 October 2016
Location: Australia
Online Status: Offline
Posts: 90
Posted: 14 September 2017 at 5:34am | IP Logged Quote Andrew_G

Hi, I (and my mechanics) have spent months tracking a problem with my beloved car, "the beast" (a 1997 VS Holden Statesman V8 - 250k, barely run in). It would have been easier to diagnose with on-board access to the fault codes via the CAN bus (I think it uses OBD1 but I'm not yet sure).
Are any of you aware of MM and MMBasic projects that would enable me to access the codes (and potentially other data) off the bus?
(there are lot of expensive products for mechanics and workshops (which my mechanics have) but I am more interested in a DIY approach - if possible).

Thanks, Andrew

Edited by Andrew_G on 14 September 2017 at 5:46am



Back to Top View Andrew_G's Profile Search for other posts by Andrew_G
 
lew247
Guru
Guru
Avatar

Joined: 23 December 2015
Location: United Kingdom
Online Status: Offline
Posts: 711
Posted: 14 September 2017 at 7:43am | IP Logged Quote lew247

ODB2 dignostic tester (click this)
IT's a lot cheaper than anything you can build, works great and you can get software for your android phone that interfaces with it and not only tells you the code problems and other information but you can also clear the faults from the ecu
Works with all OBD-II compliant vehicles I've had one for a few years and it's great

EDIT:
Quote:
I've just done some research and the Holden Statesman was OBD-II complient from 1995 onwards so this WILL work with yours

and its great for anything OBD-II

EDIT 2:
IF you use the car make/model search on the page it says "This item does not fit Holden Statesman 1997 VS [1995-1999] Saloon"
However it will and does work as confirmed HERE

Edited by lew247 on 14 September 2017 at 7:51am
Back to Top View lew247's Profile Search for other posts by lew247
 
CaptainBoing
Guru
Guru
Avatar

Joined: 07 September 2016
Location: United Kingdom
Online Status: Offline
Posts: 300
Posted: 14 September 2017 at 7:56am | IP Logged Quote CaptainBoing

lew247 wrote:
ODB2 dignostic tester (click this)
IT's a lot cheaper than anything you can build, works great and you can get software for your android phone that interfaces with it and not only tells you the code problems and other information but you can also clear the faults from the ecu


+1

Bluetooth to your moby is the way to go. Search your favourite App store for "Torque Lite" (free version) will show the codes etc on the run and gives basic performance graphs etc. there are other options including paid that will give enhanced data but I have never needed anything more. It does allow you to selectively clear fault codes too.

There was a version of MMBasic that supported CAN (V4.something? maybe see here as a thing to get you going? : http://www.thebackshed.com/forum/forum_posts.asp?TID=4702
I think it was for MaxiMite) and you can get CANBUS interface modules cheaply on ebay so if you still want to go down that route it is do-able. I wouldn't recommend using an old version of the language but CAN can be programmed reasonably easily... maybe someone on here has CFunctions for it


Edited by CaptainBoing on 14 September 2017 at 8:03am


__________________

all you need is duct tape and WD40 (if it moves and shouldn't, use duct tape; if it doesn't move and should, use WD40)
Back to Top View CaptainBoing's Profile Search for other posts by CaptainBoing
 
lew247
Guru
Guru
Avatar

Joined: 23 December 2015
Location: United Kingdom
Online Status: Offline
Posts: 711
Posted: 14 September 2017 at 8:04am | IP Logged Quote lew247

You can also get the full version of Torque off certain sites - and it works great - does everything you'll ever need
The only thing it doesn't do is tell you what the fault codes mean, but you can look that up on google, you'll have your phone with you anyway to run the app
Back to Top View lew247's Profile Search for other posts by lew247
 
JohnS
Guru
Guru


Joined: 18 November 2011
Location: United Kingdom
Online Status: Offline
Posts: 1525
Posted: 14 September 2017 at 9:37am | IP Logged Quote JohnS

+1 on an elm327

You can get BT, WiFi & USB versions - pick which suits you.

If you need help with codes etc post 'em...

Don't just clear them as you'll lose data and may cause further trouble.

Even if / when no codes, at least check fuel trims (LTFTs) parked with a hot engine. Should be near zero.

John
Back to Top View JohnS's Profile Search for other posts by JohnS
 
CaptainBoing
Guru
Guru
Avatar

Joined: 07 September 2016
Location: United Kingdom
Online Status: Offline
Posts: 300
Posted: 14 September 2017 at 11:39am | IP Logged Quote CaptainBoing

OBDII generic fault codes
2017-09-14_113945_OBDII_Generic.zip

you'll probably still end up googling to find more info but this is a quick get-you-going list

Edited by CaptainBoing on 14 September 2017 at 11:41am


__________________

all you need is duct tape and WD40 (if it moves and shouldn't, use duct tape; if it doesn't move and should, use WD40)
Back to Top View CaptainBoing's Profile Search for other posts by CaptainBoing
 
Andrew_G
Regular Member
Regular Member


Joined: 18 October 2016
Location: Australia
Online Status: Offline
Posts: 90
Posted: 16 September 2017 at 3:12am | IP Logged Quote Andrew_G

Many thanks for your replies. Yes the ELM327 looks interesting. Do any of you know if the USB version sends out a usable (eg serial?) data stream?

You helped me change my search to "CANBUS", rather than "CAN BUS", which yielded much more useful results.
The material on here looks a little dated and more complicated than I had hoped eg there is reference to "CANVIEW.BAS" but I couldn't see any BASIC code (but plenty of C - ugh).

Cheers, Andrew

(PS "the beast" is running well now with a new crankshaft position sensor (new distributor) at no charge from the service people (JustService - in Moorrabbin, Melbourne))
Back to Top View Andrew_G's Profile Search for other posts by Andrew_G
 
JohnS
Guru
Guru


Joined: 18 November 2011
Location: United Kingdom
Online Status: Offline
Posts: 1525
Posted: 16 September 2017 at 6:08am | IP Logged Quote JohnS

The common USB elm327 has the DLC (OBD connector) on one end and a USB A on the other. You can plug it into a PC and fire up either specific OBD software or a terminal emulator (e.g. Windows HyperTerminal, Linux minicom or screen or ...) and talk straight to it. (It's what some call a virtual COM port.)

A typical car now has several OBD-style interfaces at the DLC, on the defined and often on the reserved pins. It really helps to have the car's electrical diagrams. E.g. a car I had a while back had ISO-9141 K-line (pin 7), Ford's SCP (pins 2 & 10) and CAN (6 & 14). An elm327 can talk to the standard ones but only one at a time (you can switch between them should you wish to).

Note: you typically need the car's ignition on (or engine on) to power the DLC and thus the elm.

There are excellent data sheets on the elm site Elm Electronics

It's a bit like the modems of old, with AT... commands.

The USB version (elm327) is basically a serial-USB chip connected to the elm chip. You can get the basic elm chip from elm (choice of protocols) or take apart a USB elm327 if you just want direct access to the serial data.

The elm site even has Gerbers (or links to them), schematics, etc.

John

Edited by JohnS on 16 September 2017 at 6:14am
Back to Top View JohnS's Profile Search for other posts by JohnS
 
Andrew_G
Regular Member
Regular Member


Joined: 18 October 2016
Location: Australia
Online Status: Offline
Posts: 90
Posted: 16 September 2017 at 7:39am | IP Logged Quote Andrew_G

John, thanks. That's just what I wanted to hear.
I want to be able to download the fault codes via the ELM327 device (on the rare occasion there is a fault) OR capture and display other data.
The main data I am looking to capture is the speed - I have made a nifty little display of digital speed via a GPS. A button press shows the current and average speed since the last button press. We have several "Point to Point" speed detection sites that measure your average speed over x km - x varies from 2 to 50+ km. They read your number plate and send the fine in the mail (the allowance is only 2kph). The GPS is good except I go through a couple of tunnels and it all drops out. By capturing the vehicle speedometer it adds another check. (I might even go back to Traffic Engineering 101 and look at Space Mean Speed vs Time Mean Speed).

Thanks again, Andrew.
Back to Top View Andrew_G's Profile Search for other posts by Andrew_G
 
JohnS
Guru
Guru


Joined: 18 November 2011
Location: United Kingdom
Online Status: Offline
Posts: 1525
Posted: 16 September 2017 at 8:27am | IP Logged Quote JohnS

Speed is easy. It may well read a bit different to the dash (speedo) as usually those over-read.

Speed is PID 0D (hex) e.g. see OBD PIDs

(That page refers to modes but that's not their official name.)

Any OBD app will typically show it but it's quite easy by hand / by own program.

GPS and OBD speeds may differ not least due to GPS issues but also your wheel (tyre) size varies with wear, pressure etc. Not usually a big issue...

John
Back to Top View JohnS's Profile Search for other posts by JohnS
 


If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Search the forums using Google.
In the news...
 
Post ReplyPost New Topic
Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

Powered by Web Wiz Forums version 7.8
Copyright ©2001-2004 Web Wiz Guide

This page was generated in 0.0771 seconds.
Privacy Policy     Process times : 0, 0, 0, 0.08