[Ovmsdev] Sparkfun OBDII UART Board
Tom Saxton
tom at idleloop.com
Sun Feb 23 14:55:14 HKT 2014
Here's the latest update on my CAN bus tinkering...
I picked up the Sparkfun board which is an STN1110 chip on a board with the
support parts, a DB9 for connecting to an OBDII port and UART pinouts. I am
using their FTDI UART-to-USB breakout board to talk to the STN1110 over USB.
OBDII UART board: https://www.sparkfun.com/products/9555
FTDI Basic Breakout: https://www.sparkfun.com/products/9716
OBDII to DB9 cable: https://www.sparkfun.com/products/10087
Before using the OBD board, I updated the firmware to version 3.2.0, which
requires running a program on a Windows machine.
Except for doing the firmware update, I'm using a MacBook Air running
10.8.5. I did have to track down and install the FTDI drivers.
The STN1110 claims to have a superior auto detect function to detect what
protocol a vehicle is using on the OBD port, but it fails on the Leaf and
the Roadster. I know the Leaf isn't a standard OBD protocol, and I'll bet
the same is true of the Roadster. The Leaf won't respond to a 01 00 message,
which I believe the STN1110 uses to detect the protocol. The $12 Bluetooth
ELM327 clone works just fine at detecting the Leaf's CAN bus settings, but
fails on the Roadster because it doesn't support CAN bus speeds above 500
kbps.
For the Leaf, I can manually set the STN1110 to talk to the 11-bit 500 kbps
CAR-CAN bus (AT SP 6) and set the UART speed to 921600 baud (ST BR 921600).
With that setup, I can send a monitor all command (AT MA) and read/record
20,000 CAN messages in 11.813 seconds. My usual terminal program won't let
me set the baud rate that high, but I'm using a custom program to talk to
the device and add timestamps, and I can set the baud rate that high
programmatically. I'm happy to share the source code if anyone wants it.
As near as I can tell, there's no way to manually set the CAN bus parameters
on the STN1110 nor does the data sheet give any hint at what maximum CAN
speed the STN1110 supports. It says the UART supports up to 20 megabits per
second. What's the point of that it only supports CAN up to 500 kbps? I've
sent an email the the manufacturer, but haven't heard anything back.
So the Sparkfun board is great for the Leaf, but the jury is still out for
using it on the Roadster.
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20140222/e4a7d40c/attachment.htm>
More information about the OvmsDev
mailing list