SparkFun According to Pete #56 - How OBD2 Works

Ғылым және технология

Greetings and welcome to May! In this episode of ATP, I’m going to cover everything that I would consider to be required information about OBD2 to enable you to start poking around at the innards of your car’s data bus. We’ll do a brief history about why it exists at all, talk about the assorted busses and pinout of that oh-so-famous connector, cover the command structure, present examples, and wrap up with an evaluation of how you might want to proceed (including some gear choices) and point you towards more info to take you further.
Stuff you should read:
Charlie Miller and Chris Valasek’s site all about car hacking (illmatics.com/carhacking.html)
On-Board Diagnostics (en.wikipedia.org/wiki/On-boar...)
OBD2 PID’s (en.wikipedia.org/wiki/OBD-II_...)
ISO 15765-2 (en.wikipedia.org/wiki/ISO_157...)
Gear that I talk about:
Analog Discovery 2 (www.sparkfun.com/products/13929)
SparkFun OBD2 UART (www.sparkfun.com/products/9555)
OBD2-DB9 Cable (www.sparkfun.com/products/10087)
FTDI Basic 3.3V Breakout (www.sparkfun.com/products/9873)
SparkFun AST-CAN485 Dev Board (www.sparkfun.com/products/14483)
OBD2 Connector (www.sparkfun.com/products/9911)

Пікірлер: 50

  • @lhxperimental
    @lhxperimental5 жыл бұрын

    Thanks Pete. I watched video 55 and 56. It gave me a good head start on my project. Subscribed.

  • @osamaa.h.altameemi5592
    @osamaa.h.altameemi55925 жыл бұрын

    Awesome video, neat presentation style, down to earth personality, thx a ton

  • @QBelly
    @QBelly5 жыл бұрын

    That was awesome. Great teaching technique and strategy.

  • @BigMac2222
    @BigMac22225 жыл бұрын

    Interesting from an auto tech pov. Few of us use labscopes but it is an absolute necessity on any modern vehicle imo. I'm more involved in diagnosing CAN faults than interpreting them as far as this video goes. I would say it's safe to say nobody is ever going to decode the entirety of the data transmitted over the network simply by viewing it on a screen. You'd have to have more than an expertise at all the various functions of the engine and the intermodule commands/requests. The "whats" may be decoded, but the "whys" will go over the head of most. On a GM you may be left scratching your head why the EBCM would request speed info from the RCM any time your touch the steering wheel in any gear at speed. Or why the park assist module would receive a cease and desist message from the gateway when you're backing up causing it to not alert you to nearby objects, the answer is because you were traveling at greater than 20 mph in reverse, but without having that information beforehand what would you make of it?

  • @supersat
    @supersat6 жыл бұрын

    Dealing directly with CAN isn't all that difficult. It's basically the same OBD2 commands sent and received from well-known IDs (0x7E0 and 0x7E8), and as long as the command and response are 7 bytes or less, the first byte is simply the payload length in bytes. (It gets a little more complicated when you split commands across CAN packet boundaries, but it's relatively straight-forward.) We used the AVR-CAN board (DEV-08279, but alas, it has been long retired) and custom firmware we wrote to translate between UART and CAN. There is also a newer standard called Unified Diagnostic Services which provides additional functionality over this same CAN interface. The big advantage of dealing with the CAN bus directly is that there is often many non-diagnostic messages that also get passed between ECUs on this bus. For example, you might see a packet sent when the "unlock" button is pressed on the key fob. You can usually replay and tweak these packets for interesting results.

  • @dragosmakovei

    @dragosmakovei

    5 жыл бұрын

    it seems very interesting what u have wrote but please be more detailed

  • @lhxperimental

    @lhxperimental

    5 жыл бұрын

    Wish there was a way to bookmark comments.

  • @lb10445

    @lb10445

    5 жыл бұрын

    I think you need to be the one doing this video instead of this kooky guy.

  • @ronaldbrenneman5684
    @ronaldbrenneman56842 жыл бұрын

    Extremely informative very easy to understand

  • @RepairRenovateRenew
    @RepairRenovateRenew Жыл бұрын

    mode 5 and mode 6 on my hyundai describe different diagnostic data parameters about the oxygen sensors. mode 5 using 9141-2 describes the oxygen sensor wave forms (switching times, voltage ratios) and the mode 6 using CAN describes the voltages & current and heater operation.

  • @superdog1227
    @superdog12276 жыл бұрын

    Love your videos man! Could you do a video on buffers - what they are exactly and when you would want to use them?

  • @IgorKaratayev
    @IgorKaratayev5 ай бұрын

    ISO-15763-4 EU was always obsessed with connectors. Now the force usb-c.

  • @DanielToebe
    @DanielToebe4 жыл бұрын

    Great information... But I have to say, you are just plain fun to watch.

  • @sbanta22
    @sbanta224 жыл бұрын

    Good stuff man.

  • @te0m0
    @te0m06 жыл бұрын

    Love the show! But can you please change the order of the playlist(According to Pete!) to go from oldest to newest :)

  • @veyor
    @veyor4 жыл бұрын

    Super helpful!

  • @Afrotechmods
    @Afrotechmods6 жыл бұрын

    Good overview thank you

  • @alphaprokiller7438
    @alphaprokiller74386 жыл бұрын

    Thanks... I was looking for it

  • @glennharrold2392
    @glennharrold23925 жыл бұрын

    Love your Video on OBD and Can-Bus simplifies things greatly. What do you know about Mitsubishi MUT Protocol. Now that's a different protocol thats sits somewhere between OBD and Can/K-line.

  • @Alex-je6od
    @Alex-je6od4 жыл бұрын

    Example of a hidden bus on OBD2. If you place a 510 ohm resistor on pins 8+16 on BMW cars, a Ethernet interface becomes available on the OBD2 connector :-|

  • @squirlmy
    @squirlmy6 жыл бұрын

    This is great. I've had an ODB2 reader for a while and have been too lazy to figure out how to use it. My dad sold me a great car for "tuning," but I've always been too clutzy and afraid of speed to be much of a gearhead. By the way, that logo face, while it does look like you, seems eerily familiar, maybe subversive even. ;) Plus, I love the intro music. It is completely appropriate, being electronic and complex and free. I've seen other Sparkfun videos where a philistine complained about it, but they're the same type who complain how dry the video would sound without music. I'm going off on tangents, I need to switch to decaf (why don't they just come up with caffeine free coffee? Is it really that difficult?)

  • @SymphonyOnAsphalt
    @SymphonyOnAsphalt7 күн бұрын

    Great video!!! Good job!!! I've recently bought the SparkFun OBD-II-UART and I'm trying to parse data from a k-line ISO 14230-4 , KWP2000 Fast init. My point is that I need to request data from the OBD at the maximum possible frequency. I'm developing a set of interruptions based on a microcontroller timer to do a good "timing" job. What is the maximum AT command per second the board can handle without overflowing? Thanks!

  • @johannespralle6831
    @johannespralle68314 жыл бұрын

    Thank you Sir.

  • @johnburgess2084
    @johnburgess2084 Жыл бұрын

    Thanks for the tutorial! Nice TEK scope on your desk (I worked at TEK for 28+ years). Given that CAN Bus is "*Controller* Area Network", I assume that bus is used to control the car's operation. Do cars have a single CAN bus, of which the OBD connector is a part, or several independent ones? For example, when you open the car door or window, can you pick up a message that the door or window announces the event? Or, if you activate the turn signal or 4-way flashers, can you see repetitive messages destined for the tail lights telling them to turn on and off?

  • @scottb4029
    @scottb40293 жыл бұрын

    03 pid is intake air temperature I think. Thanks for a great video. I have aa 2010 jetta sportwagen. I maybe asking some more questions.

  • @PocketBrain
    @PocketBrain6 жыл бұрын

    I just want to know the scan code I need to use to check if my ashtrays are full.

  • @hadireg
    @hadireg3 жыл бұрын

    👍👍Thanks!

  • @AbnormalWrench
    @AbnormalWrench6 жыл бұрын

    27:00 You don't need to worry about techs digging into the data that far. About the only data I look at when looking at code data that may be incriminating is vehicle speed. Many codes will offer freeze frame data, and every now and then you get an impressive vehicle speed PID. However, you have to be careful with that data, because some faults will cause false data, such as a shorted wheel speed sensor defaults at 158mph. A speed not possible for most cars.

  • @AbnormalWrench

    @AbnormalWrench

    6 жыл бұрын

    If you hit the speed limiter on some cars, it will set a code. Saw that just the other day on a newer Ford Taurus. Had a "overspeed" code, freeze frame showed 108+ mph in the freeze frame. Was a rental car, shockingly.

  • @clarenceroller7897
    @clarenceroller7897 Жыл бұрын

    All this is fourteen shades of Greek to me. All that I want to do is find out if there is an OBDII HUD that can display some information like(I have a 22 hybrid Maverick) condition of both batteries and if the "charging" system is working, oil pressure and temperature, coolant temp and other stuff that I don't even know what yet. Just an old guy that drives by the seat of my pants and can do without idiot gauges!

  • @alphaprokiller7438
    @alphaprokiller74386 жыл бұрын

    Do you got some practical stuff

  • @EricFossum
    @EricFossum Жыл бұрын

    Just an FYI. If anyone wants your VIN they just need to look at your windshield.

  • @nishagupta5003
    @nishagupta50036 жыл бұрын

    It's nice

  • @pielumax3301
    @pielumax3301 Жыл бұрын

    Thanks for your tutorial, now I am working on my own car that uses ISO 14230 (KWP 2000) protocol, somehow, after I turn the ignition on, and sent 01 00 for available PIDs, I got data back with following hex numbers: 41 00 80 00 00 00, Is that means 80 is the only supported PID? I just feel it might be something wrong, for other data like: 01 0C(RPM), etc I always got the same feed back with 7F 01 12, seems like not valid. I checked the Protocol detection data back from the SparkFun OBD-II UART, it says ISO 14230-4 FAST init which is the right one I choose. Do you have any idea whats the problem could be?

  • @RepairRenovateRenew

    @RepairRenovateRenew

    Жыл бұрын

    There is more data available from other protocols, since kwp2000 is rather slow, it is used more for commands & control, not live data. Try the same 01 00 request with different protocols and you will get different pids. you need the engine running to see operational pids, bi directional control of sensors needs key on engine off. there is also more pid available requests, you are only looking at the first 20, there are up to 80 i believe.

  • @RepairRenovateRenew

    @RepairRenovateRenew

    Жыл бұрын

    oh and you may need to program diagnostic start/stop commands into your program of choice, or use a kwp with a different flavor of init (speed of data transmission). CAN is where i have the most learning regarding all this, and kwp is quite a bit different, i only learned last night that my car uses both and possibly others. cheers good luck

  • @RepairRenovateRenew

    @RepairRenovateRenew

    Жыл бұрын

    oh and finally you need to decode that hex code for the 01 00 request. look on the wikipedia obd2 page for how to decode that 00 00 80 response message. it is called a bitwise encoded message & is different than the normal pid data.

  • @pielumax3301

    @pielumax3301

    Жыл бұрын

    @@RepairRenovateRenew Thanks for the reply, I did check the Wiki for the bitwise encoded message, the only 0x80 available for me is standard for 1 0 0 0 in binary, means.....01 01 is the only available one LoL. Actually I have checked other similar protocols, ISO9141, etc or even different Baud rate setting, the only one works for me to do the initializiation is the KWP with Fast init.all other protocols are failed in initializiation....also I tried it both when engine run and off..i am going to give another try since todays not too cold....As I did a research for the car I have(Japan Imported 2003 Subaru Legacy gt) it use an OEM Subaru SSMII OBD2 diagnose tool(modified version of K-Line) with a different set of pins to read ECU data(might be the only way)...which are pin 12, 13. but my DB9 adapter doesn't have those......Interestingly, ISO14230 (KWP FAST) is the only one I can do the init on Sparkfun OBDII UART....so I stucked here.

  • @amtpdb1
    @amtpdb16 жыл бұрын

    Way over my head. Would have liked seeing you make an input and watched the actual return and look up for what was read. As I said way over my head but that would have been interesting for those of us that don't understand but would like to. Thanks for the video.

  • @GaryBritton336

    @GaryBritton336

    3 жыл бұрын

    I thought the same thing... there's constant traffic on the bus, I wondered if all that was visible on terra term, or if only the packets that originated from the dev board were because of the ID part of the packet... sorta like Ethernet

  • @electron-1979
    @electron-19796 жыл бұрын

    I've never seen an OEM oil temp sensor. Maybe on newer vehicles?

  • @DiegoGarcia-nl7im

    @DiegoGarcia-nl7im

    5 жыл бұрын

    All BMWs since the beginning of times more or less

  • @godspeed2145
    @godspeed21454 жыл бұрын

    You look like Tony Stark, just makes you look even smarter :D

  • @danny117hd
    @danny117hd3 жыл бұрын

    Sorta yep I know chevette had odb in 1980 ish.

  • @bobthecannibal1
    @bobthecannibal16 жыл бұрын

    Title's misspelled in a pretty major way.

  • @snakeoilification

    @snakeoilification

    6 жыл бұрын

    Gad- I'll say. Let's just fix that up...

  • @zardow365
    @zardow3656 ай бұрын

    just a waste of time !

Келесі