Has anyone interface ODB-II to a zbasic cpu ?
It ought to be quite straightforward using an interfade cable to serial, just a case of understanding the protocol in a bit more depth.
I have yet to find detailed command and response examples and if wondered if nayone had a woring code to get me started ?
thanks
Has anyone interface ODB-II to zbasic
Has anyone interface ODB-II to zbasic
Ah, that devil in the details. For a number of years I made a product, the DataCam2, that read operating data from the OBDII port and overlayed it on a video feed which was then recorded for later viewing.
The interface is not a simple serial connection. First, the ZX24 family has a TTL interface and the OBDII port uses one of a number of protocols that are not compatible with the TTL or RS232 interface. The OBD protocol timing is precise enough to make it nearly impossible for the ZX24 to keep up.
I used a couple of different chips that are readily available rather than try to do the interface with the ZX24. The most commonly used chip is from Elm Electronics, the ELM327. I suggest you investigate this page:
http://elmelectronics.com/obdic.html#ELM329
BTW, what are you trying to do?
P
The interface is not a simple serial connection. First, the ZX24 family has a TTL interface and the OBDII port uses one of a number of protocols that are not compatible with the TTL or RS232 interface. The OBD protocol timing is precise enough to make it nearly impossible for the ZX24 to keep up.
I used a couple of different chips that are readily available rather than try to do the interface with the ZX24. The most commonly used chip is from Elm Electronics, the ELM327. I suggest you investigate this page:
http://elmelectronics.com/obdic.html#ELM329
BTW, what are you trying to do?
P
thanks for the info - after the post I found the elm site and this does seem like the way to go. i found various bits of sample code also.
first step to make sure the elm based product talks to the vehicle in question.
i have some testing etc to.
in terms of what i'm trying to do, i have another post about developing a cruise control for my van. i have still not decided whether the control of speed will come rpm (from obd) or from speed obtained via gps.
just toying with ideas at the moment
first step to make sure the elm based product talks to the vehicle in question.
i have some testing etc to.
in terms of what i'm trying to do, i have another post about developing a cruise control for my van. i have still not decided whether the control of speed will come rpm (from obd) or from speed obtained via gps.
just toying with ideas at the moment
Has anyone interface ODB-II to zbasic
If the vehicle is in the US and has an OBD connector, you can go to any of the chain Auto Parts stores and ask them to do a scan. They will be able to tell you what protocol the vehicle uses.
You can google the vehicle's VIN number to find it's origin. If the vehicle is an automobile or light truck, it will have an accessible OBDII system.
If you use the rpm data, you'll need to know what gear the vehicle is in and that data may not be accessible through the OBDII system. I would guess that the best/easiest data to get is the OBD vehicle speed.
You'll easily get 4 updates per second using the Elm327. GPS, on the other hand, unless you use a fairly sophisticated GPS receiver, you be limited to one update per second (and have the usual GPS reception issues ie. tunnels, trees, building canyons, etc.)
Good Luck,
P
You can google the vehicle's VIN number to find it's origin. If the vehicle is an automobile or light truck, it will have an accessible OBDII system.
If you use the rpm data, you'll need to know what gear the vehicle is in and that data may not be accessible through the OBDII system. I would guess that the best/easiest data to get is the OBD vehicle speed.
You'll easily get 4 updates per second using the Elm327. GPS, on the other hand, unless you use a fairly sophisticated GPS receiver, you be limited to one update per second (and have the usual GPS reception issues ie. tunnels, trees, building canyons, etc.)
Good Luck,
P
Something elm based and a 328 would be just the job,
just check the elm reads your car. not all supposedly obd compliant stuff reads, diesels had a later incept date and my ford requires one of the rarer protocols that my elm won't read.
you can get an elm device with a serial (as opposed to usb) connector ifyou look around.
just check the elm reads your car. not all supposedly obd compliant stuff reads, diesels had a later incept date and my ford requires one of the rarer protocols that my elm won't read.
you can get an elm device with a serial (as opposed to usb) connector ifyou look around.