1. Attachments are working again! Check out this thread for more details and to report any other bugs.

Is anyone datalogging OBDII/CAN data? Any recommendations?

Discussion in 'Gen 3 Prius Technical Discussion' started by jcsweeney, Mar 9, 2010.

  1. jcsweeney

    jcsweeney New Member

    Joined:
    Feb 7, 2010
    11
    0
    0
    Location:
    MA
    Vehicle:
    2010 Prius
    Model:
    IV
    I've searched the other threads, and the scanguage thread was the closest, but not exactly what I was looking for.

    The scanguage work is great, and I was thinking of extending it by not only displaying it as the scanguage does, but also data-logging. The data-logging could be to an old laptop in the car, or to a specific HW datalogger.

    If the data was logged, and a spurious event occurred, then there would be the possibility of looking back over the data to gather more information on the event.

    I'm 1st off interested in the watching the regen/friction brakes/ABS operation pre ECU update vs. post ECU update. It appears that the data to characterize this scenario is almost completely available via the OBDII/CAN bus.

    Other events may be interesting as well, but this scenario will be my 1st.

    Anyway...a bunch of questions:
    - Is anyone data-logging the OBDII/CAN data
    - If so, what's your HW setup (what OBDII <--> serial/USB product are you using)
    - What are the data rates of OBDII, i.e. what sample rate can I expect when gathering 10-15 parameters per sample (or more or less parameters)
    - What SW are you using?
    -- To capture the data, and/or to analyze the data

    Thanks in advance, John
     
  2. linuxpenguin

    linuxpenguin Active Member

    Joined:
    Mar 6, 2007
    352
    182
    4
    Vehicle:
    2005 Prius


    You can do datalogging with a simple CANBUS to USB adapter.

    I use the CANdapter (Ewert Energy Systems) to do data logging. It comes with a few applications to log messages from the CANBUS for later analysis. You can also write programs to display the vehicle-specific data in real-time for like a display or graph.

    The trick is, you have to know what is what in the messages since this information isn't published. You can, however, use the CANdapter to request known values from the vehicle (see other threads regarding OBDII and Scangauge, they just send CANBUS messages and wait to receive responses from the various ECUs in the car).

    Andrew

     
  3. epboyd

    epboyd New Member

    Joined:
    Nov 17, 2009
    7
    1
    0
    Location:
    Ottawa
    Vehicle:
    2010 Prius
    Model:
    V
    I also highly recommend the CANdapter as well. Is presents itself as a virtual serial device, so one can just call open(), read(), write() and close() in C.

    As for analyzing data, I imagine you would want to do something pretty close to this:

    The new 2004 Toyota Prius : My CAN Project

    Note that the passive CAN codes he specifies:

    http://www.vassfamily.net/ToyotaPrius/CAN/PriusCodes.xls

    Only pertain to the Gen2 Prius. The Gen3 codes are extremely different, and do not have hybrid battery aspects (one has to request them, by write()ing a very specific CAN frame, say "t7E2802218A0000000000\015" for amps, then waiting for a CAN frame on address 7EA (7E2 + 8), and extracting it).

    For active and passive codes, I'd suggest contacting the users "frenchie" and "adrianblack" on this forum.

    EDIT:

    To clarify, this:

    http://www.obd2cables.com/products/.../cable-j1962m-right-angle-to-db9f-4-3-ft.html

    is used to convert from OBD-II to CAN DB9, then the CANdapter is used to convert to USB.
     
    1 person likes this.
  4. frenchie

    frenchie Member

    Joined:
    Oct 19, 2004
    150
    48
    0
    Location:
    France, not far from PARIS
    Vehicle:
    Other Hybrid
    Model:
    N/A
    Bonjour,
    1) I do some data-grabbing & logging.

    2) HW : I started with a canusb device from lawicel (much better than elm327 for this purpose) and now I use a tactrix op2.

    3a)I get around 1000 passive frames / sec
    3b) I can use 20 sollicited frames / sec ,
    (but in a frame, you get sometimes many different parameters)

    4a) I use windows XP on a laptop and a vb6 program to capture the data using the J2534 dll and the CAN protocol;
    I was told it would be easier and more efficient to use the ISO15765 protocol instead of CAN , but I have no example to start with...

    4b
    ) another pgm to show the data in real time,

    4c
    ) and excel to explore the logs.

    here, a short example of a filtered log:
    (0AA contains the speed of each wheel and is broadcasted with a high frequency)
     
    schwiz and jcsweeney like this.
  5. PaJa

    PaJa Senior member

    Joined:
    Sep 3, 2009
    678
    113
    92
    Location:
    Czech republic
    Vehicle:
    2017 Prius
    Model:
    N/A
    I use tactrix op2 as frenchie, but I didnt find some ready to use datalogger/additional gauges appl. for Prius 2010 yet. I wanted to use the PCMscan, but their demo version doesnt reproduce the rpm values stably. So, I don't belive the full version would be better and i'm not ready to pay next $100 for the licence.
     
    1 person likes this.
  6. jcsweeney

    jcsweeney New Member

    Joined:
    Feb 7, 2010
    11
    0
    0
    Location:
    MA
    Vehicle:
    2010 Prius
    Model:
    IV
    Thanks everyone, it does look like the tactrix open port 2 is a great device, s it can log both across the USB, as well as to a uSD flash card.

    With the flash uSD card, I think I could log data for many trip, then analyze it later.

    It does appear that the SW ecosystem is not quite there yet, so I may have to write some.

    Should be interesting.

    Thanks again, John
     
  7. frenchie

    frenchie Member

    Joined:
    Oct 19, 2004
    150
    48
    0
    Location:
    France, not far from PARIS
    Vehicle:
    Other Hybrid
    Model:
    N/A
    Bonjour John

    With the tactrix op2, today, you cannot log on a uSD card the can traffic from prii (whatever gen).

    You should contact Colby, the op2's developper, and maybe, if there is enough demand, he will adapt the product for the prius.....

    and what would be smart : use the small jack port to connect a GPS and adapt the product to put in the log as well the gps info : time , real speed, altitude , lat & long...
     
  8. jcsweeney

    jcsweeney New Member

    Joined:
    Feb 7, 2010
    11
    0
    0
    Location:
    MA
    Vehicle:
    2010 Prius
    Model:
    IV
    Can you contact me in a private message and put me in contact with Colby. I think there may be significant value in enabling data logging for Toyota vehicles at the present time.

    Merci beaucoup, John
     
  9. PriusCruzer

    PriusCruzer Junior Member

    Joined:
    Oct 20, 2009
    15
    2
    0
    Location:
    Hollister, CA
    Vehicle:
    2005 Prius
    Model:
    N/A

    I have looked around the internet to see how I can get CAN data from my 2005 Prius.

    A couple of weeks ago I purchased an OBDLink OBDII device from ScanTool.net along with the ScanXL software. It is pretty interesting but I wanted to view and log the High Voltage Battery voltage and current flow out of and into the battery.

    Looking around some more on the internet, I found several threads about using devices like CANUSB.com's CANUSB device to interface with the CAN data stream in the Prius. I purchased the CANUSB device so now I have the OBDLink and CANUSB devices.

    Looking around PriusChat it looks like the PriusChat member “Ken1784” was able to help a lot of people out to be able to get CAN data from their Priuses. As well as giving people great advice, he was able to send them some software to use. Does anyone know how I can contact him to see if I can get the software?

    Dale
    PriusCruzer
     
  10. frenchie

    frenchie Member

    Joined:
    Oct 19, 2004
    150
    48
    0
    Location:
    France, not far from PARIS
    Vehicle:
    Other Hybrid
    Model:
    N/A
    Bonjour,
    If you know vb6, I can send you the source of this program:
    you should adapt from metric to whatever you prefer,
    and from french to whatever you like.

    (this program can run on eeePc)
     
  11. 2k1Toaster

    2k1Toaster Brand New Prius Batteries

    Joined:
    Feb 14, 2010
    6,035
    3,855
    0
    Location:
    Rocky Mountains
    Vehicle:
    2006 Prius
    Model:
    Three
    I will be datalogging, right now I am just sniffing. Being the cheap bastard I am, I built my own CAN reader on a breadboard. Works great. :) Now I am just writing some drivers for it and laying out a PCB so it is a bit more professional.

    The Prius bus is 500kbps which really is too high to do real time interfacing with the PC over standard connections and standard low end hardware. If you had an ARM Cortex MCU you could do it, but that seems like overkill for just measuring some messages! :)
     
  12. PriusCruzer

    PriusCruzer Junior Member

    Joined:
    Oct 20, 2009
    15
    2
    0
    Location:
    Hollister, CA
    Vehicle:
    2005 Prius
    Model:
    N/A
    Hello Frenchie,

    Thanks for the reply. Your Front Panel graphics are very nice! I do not know French but I can easily figure out what everything is.

    What do you use for your hardware interface? CANUSB or some other? If you use CANUSB what Virtual Comm Port (VCP) drivers do you use?

    Do you use the eeePc in your car? What model of eeePc do you use? Has it worked out to be robust for an in-vehicle application?

    Yes, I have vb6 so please send me a copy of the development files and I will take a look at them.

    Do you know how I could get a hold of the program that Ken 1784 built? Do you know how I could get a hold of him?

    Thanks for your help!

    Dale
    Prius Cruzer
     
  13. frenchie

    frenchie Member

    Joined:
    Oct 19, 2004
    150
    48
    0
    Location:
    France, not far from PARIS
    Vehicle:
    Other Hybrid
    Model:
    N/A
    Bonjour Dale
    the canmonitor program above uses as welll a canusb or an elm327 (the port recognition is automatic).
    eeePC works fine (all models) , there are between 8 & 10 operating in french prii.
    I will pm you.
    regarding the original program transmitted by ken1784, I will check if I have a copy....
     
  14. Tigre72

    Tigre72 Junior Member

    Joined:
    Nov 10, 2009
    1
    0
    0
    Location:
    Italy
    Vehicle:
    2010 Prius
    Model:
    V
    Hi Frenchie I have my own vb6 program that works fine with basic commands like 0101 etc.. but I'm not able to send correctly the Prius ones. I know I will ask you too much but if you will send me your vb6 code or some suggestion is a great thing! Luca
     
  15. PriusCruzer

    PriusCruzer Junior Member

    Joined:
    Oct 20, 2009
    15
    2
    0
    Location:
    Hollister, CA
    Vehicle:
    2005 Prius
    Model:
    N/A
    Hello Frenchie,

    Thanks for your help thus far. In your reply dated March 17, 2010, 01:36AM, are you saying that I could use your software with my OBDLink ScanTool because it uses a chipset that is ELM 327 compatible? Here is a link to the webpage that says that it is compatible with the ELN 327. www-dot-scantool-dot-net/obdlink-dot-html
    Also, what model of the eeePC are you using for your setup in your Prius? It looks like it is a good size.

    Please let me know what you think.

    Thanks,

    Dale
     
  16. planetaire

    planetaire Plug in 20 kWh 85 km/h or > 208km range

    Joined:
    Aug 11, 2009
    190
    139
    15
    Location:
    France
    Vehicle:
    2007 Prius
    Model:
    II
    Now we use Elm327-Usb, CanUsb and Tactrix Op2 at 500kb.
    On your link they say 9600b To 2Mb. Then it must be ok.
    You just have to configure Elm permanently at 500kb.

    Elm327-Usb is ok when receiving passives frames. No frame is lost at 500kb. We use it during several years.

    But Now, for Prius II and 2010 we begin using solicited frames.
    Elm327 is not good for this job because it is enable to emit and receive at the same time. Only CanUsb and Tactrix Op2 do this.
    So with elm you have dead moments. We don't like at all.:eek:

    An other french Prius Driver.
     
  17. planetaire

    planetaire Plug in 20 kWh 85 km/h or > 208km range

    Joined:
    Aug 11, 2009
    190
    139
    15
    Location:
    France
    Vehicle:
    2007 Prius
    Model:
    II
    One exemple in a Gen II

    Q1.jpg

    800x480 pixels.
     
  18. PriusCruzer

    PriusCruzer Junior Member

    Joined:
    Oct 20, 2009
    15
    2
    0
    Location:
    Hollister, CA
    Vehicle:
    2005 Prius
    Model:
    N/A
    Hello Planetaire,

    Thanks for your replies.

    It is interesting what you say about solicited frames.

    I would like to use the best method to get data from the Prius and it sounds like using solicited frames is the best. So, I would like to use my CANUSB device for my Prius.

    Now, the question would be, "Can I have the Virtual Comm Port (VCP) drivers for the OBDLink and CANUSB on the same computer?"

    I like your computer. What manufacture and model is it?

    Thanks,

    Dale
     
  19. PriusCruzer

    PriusCruzer Junior Member

    Joined:
    Oct 20, 2009
    15
    2
    0
    Location:
    Hollister, CA
    Vehicle:
    2005 Prius
    Model:
    N/A
    Hello Planetaire,

    Here are a couple of clarifications to my earlier post.

    Do you think because the OBDLink device is ELM 327 compliant, I could use the OBDLink device and its drivers to work with Frenchie's software?

    Are solicited frames used on the Frenchie's software? If it does use solicited frames I would probably want use the CANUSB device and drivers instead of the OBDLink. If Frenchie's software does not use solicited frames I would think that I could use the OBDLink device along with the drivers that are already installed on my computer. Does this sound correct?

    I guess the main question is if I need to use the CANUSB device and thus inistall the CANUSB drivers, do I need to remove the OBDLink drivers?

    I would rather not remove the OBDLink drivers if I do not need to because the software (ScanXL) that works with the OBDLink device is quite good for aquiring, displaying and logging OBDII data from vehicles.

    Any help would be appreciated.

    Thanks,

    Dale
     
  20. planetaire

    planetaire Plug in 20 kWh 85 km/h or > 208km range

    Joined:
    Aug 11, 2009
    190
    139
    15
    Location:
    France
    Vehicle:
    2007 Prius
    Model:
    II
    The computer is a Samsung Q1 (Celeron 900Mhz 512Mo+Hdd)

    Frenchies's soft work actually with Elm327 or Canusb. Both have virtual com port. I don't use Canusb but i believe the drivers are différents and that Windows load the good dll when necessary. I believe that if you install both, you will have two com port. One for Elm and one other for canusb. Probably it will be the same for your Obdlink. (Elm use ftdi drivers.)
    Our program use optionnaly a gps and in this case this is an other com port.

    Tactrix is différent. It doesn't use com port. But it is also able to run (a registreted copy of) toy techstream on prius Gen II or Gen III.

    Solicitated frames are interesting because some information are only available by this way. But Passive frames are sometimes received at a high rate (for exemple brakes, Nimh amperage...). Until recently we use only passives.