As a hint from someone who had access to a full datasheet with every value and formula for a different brand, don't think in full bytes, some values like temperatures can be odd bits long and can start at odd bits. So as an made up example, engine coolant temp is pid 123, starting at bit 8 and is 12 bits long with a formula like value/10-20.0 so a value of 0 is -20°C, a value of 1100 is 90°C. Also there are already lots of efforts to decode popular vehicles, maybe you are lucky and most of the values you look for are already found and in those databases. Once decoded you can do a lot of fun stuff with can-bus data. way more than the manufacturer intended. I had full logs of days of driving on a modern car with different drivers and such. Several gigabytes ;) Happy Christmas
In my digging over the last few days I've found a few resources where people have been doing the 350z, and it's confirmed that I'm correct on the speed and rpm I found, and has highlighted a couple more that people have flagged, but most of it isn't there yet. No worries, just means I can be the one to suss it and create the resource
I'm curious if the RPM being off in the dashboard is a miscalibration in the dash display and not the bus reporting, it seems most people don't realize that indicators aren't calibrated, the only reason I know is I have a pursuit vehicle which has a factory calibrated speedometer and it's noted on the display.
@@Iamdebugthat does appear to be the case. Using my car scanner shows the CANBus reports the RPM about 20% lower than the gauge display. It should be a simple 3x multiplier to get the true value.
@@Iamdebug I can only tell from my limited experience with a sample size of 1: on my car it's off and delayed (my newest car is almost 27 years old). it's a rough indicator, but nowhere near exact. But I'm not doing racing where I need to shift at exact points, so I don't mind. I assume, most cars have some of damping to avoid being twitchy.
@@Iamdebug it is quite well known that speed on dash is reported 10% more than the real one measured with GPS, that has been true for a lot of modern German vehicles, probably a "safety hack", because setting tire sizes (when it is possible) or using factory recommended sizes (when you can't set it in OBD) still results in speed being off by +10%, and it is true in range of 0-150, not an equation, but straight up *1.1 temperature gauge is a lot of German vehicles starts to show 100% warm (~90C) already starting at 65-70C for some reason, not sure the logic behind that, but CAN values match up to 50ish C, but then it just speeds up and stays at 100% warm when actual temp is 70-95C just thought about the speedometer, and that I haven't checked if the odometer is counting distance correctly and not adding 10% also, which would benefit people providing service for those vehicles 😁
@@garymetheringham4990 I bought one recently and it took just over a week to arrive but there was no further duty to pay and the tracking was pretty good.
I thought people were pretty much done with canbus youtube videos. I was looking the other day for something like this and realized I had watched all the good ones so thank you for this video. Very cool
This is so cool, keen to see more to come. For testing/debugging, it may be worth pre-recording a drive and serialising the data into a file that you can restream later on, save some petrol!
Someone else actually suggested that I make a web front end and it made me realise I can just dump all the data to a web endpoint and download at home. Extra advantage there that I can bundle the GPS data in with it which should make identifying things much easier if I can keep a log of what I do at which point of the drive.
Actually have a better idea. I'll just use a screen I have with an integrated microSD slot and create a simple data capture tool that self verifies and then stores all the data dump on a card. Simple.
ESP32 web pages and bluetooth are always something to remember. However, if problem is the range (especially with car plugs being often quite low and car metal shielding it), it won't give more distance. Cars are very difficult sometimes for radio link unless it antenna is near car windows (or external antenna on roof or whatever).
Damn, after me using numerous ODB2 readers and apps over the years, I didn't realise how fast the CANBus can send data. This is quite a revelation lol. I must admit, my coding experience is far south of what you're able to do here, and I'm in awe of this project. Great stuff man, great stuff!!
Yeah. Lots of the data points come in at 25ms, and some of the less time sensitive are at 100ms, so it's all really responsive. Plus an ESP32 can extract everything and broadcast it all on ESPNow with basically zero packet loss. It's really impressive. I actually noticed that my gauge responded to speed changes faster than the OEM one in the centre console. Guess that's down to 20 years of technological advances.
@@GarageTinkering I'm wondering if the reason my ODB2 readers/apps are so slow is just down to being economical with the amount of data coming in. I'm curious to see what my old Accord Type R would output if the receiver was faster than the ebay readers lol Excellent stuff man, this makes me rather excited to try something out next year. I did clock your Honda comment btw, and laughed :P
I’ve made a gauge with micropython code utilising a pico, waveshare 1.29” GC9A01 touch display and MCP2515 CAN board. It is programmed to read Haltech CAN bus using a neat CAN protocol file I made in TOML syntax. It could do with loads of improvements but it works, I have a multifunction gauge with good refresh rate. I should update my git repo and probably do a video on it.
Wow, I need this kind of tutorial video for Off-Grid Solar-Inverter/Charger Canbus sniffing. That was awesome how you were able to find the solutions. Great video!
It really isn't. It's just lots of data. Most of the time it's just 8 bytes on a certain id. But it comes in faster than you can read. Unless it's CAN FD. Then it's more bytes. Everyone on the bus can send, lower IDs get higher priority. Termination is a bit of a thing.
Great video. I have a few ESP32s but haven't got to actually use them yet (worked with electronic design decades ago and miss it). I have a Subie Foz XT and I'm "Aussiefying" it slightly for a bit of terrain adventure. For that I need good control of for instance CVT temp etc. I already have a plug and Car Scanner on my phone, but I am planning on converting an old tablet to Car computer with 360 cameras and such. Your channel seems to be a good spot to get inspiration fro. Cheers from Sweden!
This is wonderful! I'm starting the same project on my 2011 Subaru Forester XT. I have no knowledge and I found your explanation very educational. My idea is to use a larger, taller display, similar to 400x400px, to be able to display more information at the same time, such as oil temperature and oil pressure, which will come from external sensors. There's a guy who made a dash for an Infinity. You might want to take a look. If you want, I'll send you the channel. Thanks for the explanation, and I'll get to work soon!
this is literally the same project I've been working on lately. I have an esp32 with an external ADC for analog sensors, 2 can bus controllers for CAR ECU can bus and Transmission TCU can bus (8hp swap) and last a 433mhz receiver for aftermarket TPMS sensors since my can doesnt have it. This first ESP32 will send all the info I want to 2 other ESP32s with LCDs via ESPNOW
Sounds great. I think I'm going to incorporate a midpoint device at some point to take in all the sensors and the CAN before making it broadcast to the screens so the data only comes in from one serialised source.
Nice! There's that CANBus project you commented about on that spoiler LED light video 8 months ago 😃 I haven't even tried doing this on my car yet. A lot of great tips here, so maybe I'll give it a try in 2025 😅 Happy new year BTW 🎉
There is a serial plotter in Arduino IDE, if you have data with labels, like you do, just open the serial grapher thing in arduino and it will plot it for you. Sometimes you have to tweak the format of your serail log
Amazing video!! , i need that so much, I'm working on a DIY remote start for my Hyundai i40, implementing CANbus to detect lock, unlock, rpm, speed, gear position, break status and more .. so that will help me a lot , thanks man 🎉
@@GarageTinkering Oh wow, thanks for mentioning ESP Mesh! I didn't know about that before, but i have a MASSIVE use-case for this in a project of mine ♥ That didn't exist back in the day, so i used regular infrastructure, but this will be a game changer 😁
@@jangrewe FOR REAL. I stumbled across it last week and haven't had a chance to play with it yet, but the fact you can just add new nodes to the network and not have to inform your current ones that it exists I think is really interesting. Just going to be a case of seeing how fast it is, and how good the message filtering and data types are
Thank you for the great video! You've made more progress than I have and have really pointed me in the right direction. I plan to receive updates on things like whether the car is locked, if the lights are on, etc., sent to my phone via SMS. I often walk away from the car and wonder if I locked it.
Great idea. You could potentially add in writing messages to the CAN so it automatically puts up the windows and locks when you leave a certain proximity
@tonylamb3906 The problem is, CAN port always has power and you will drain car's battery if you don't disconnect the CAN reader interface. You have to add a high-side transistor to cut the power after car is off for let's say 5 minutes.
@aljaz55 the shield that I used in this video does exactly that and drops the power consumption to practically 0. There are tech specs on his linked website if you're interested
This was an amazing video so thanks for sharing, 99% of what you did was beyond my understanding but I enjoyed watching and will now have a look at your older videos to try and learn a bit more coding. I made a video a month or two ago about using an ESP32 with Savvycan to read the CANBUS so please have a look at that. My setup was way more simple than yours but I also have a spare gauge that I was playing with in the office, being able to play back CAN dumps in your office makes life a little easier/warmer.
Well done indeed. I was investigating whether to log parameters from my Volvo and I found that there are multiple accelerator and other parameters, quite confusing. It would be interesting to compare, but I have too little time.
Very cool! I’m working on a very interesting, yet similar, situation I’m working through. I own a 2004 Gillig Phantom bus that I converted to a mobile communication, office and sleeping platform. It communicates using j1708 and j1939 CANbus. The problem is that there’s no fuel gauge. There’s a module behind the driver seat that is connected to the CANbus and the radio system previously used by the bus company. I suspect the telemetry is transported via radio to alert the depot regarding problems and, potentially, fuel level to address maintenance issues. I picked up a package that allows me to talk to the CANbus properly, although I haven’t been able to locate the bodybuilder module to talk to the fuel tank sender. Your video provided an alternative method to address the issue - grabbing the raw data across the CANbus, manipulating the sender and watching for something that could be the fuel tank. Since I’m just looking to build a monitoring gauge, this may be the easiest approach. Much easier than trying to drive down the road with a laptop full of changing data when all I want is a small part of what’s being sent. Nicely done!
Sounds like a great project. And yeah when I get to that bit I'm going to let it run mostly empty, grab a snapshot, fill it up, and see what changes. Should give me an shortlist at least to then see what slowly depletes over time.
as someone who develops diagnostic tools for manufacturers, I appreciate you digging into vehicle diagnostics, its funny to watch :) best of luck with the project!
My first thought was to create a WiFi connector to connect through to your home WiFi and then just host the data on a web server on the ESP32 plugged into the car. That way, you could have the other ESP32 dial home to the one in the car or just dial into the web page hosted by the one in the car using a web browser.
It is sad that I don't have a car anymore to experiment on, but what you want to do is write a packet filter that throws away everything you flagged as known! That way you can relatively quickly cleanup the CAN messages you do not need to work on!
Given that GPS speed measurement is pretty reliable, perhaps loop in a GPS to obtain the actual speed, then use that as an off-set to correct the OBD numbers... Could run that loop a few times a min to get a continuous correction factor. Also, during your earlier test: I perhaps would have wired up that screen and placed it near the dashboard screen; filmed both then review at your leisure when reviewing the footage. Keeps plod happy too as you can focus entirely on driving rather than looking at screens...
"Like a little gemlin" made me laugh. Been there, done that 😁 All OEM speedometers are 'optimistic'. Apparently to avoid liability - "But my speedo said I was doing 30 officer!" Like the RPM, there's probably a 'magic' number (also used for various tyre/wheel sizes).
Speedometers are legally required to show within a certain band of the actual speed - with the actual speed being the lower limit. So if they aim to make it accurate there is no margin for errors, and simply overinflating your tires could make your car illegal.
I feel like some of that is built in at the CANBus level, as at around 30mph the OEM speedo and mine (which run off the same data) both report around 1mph over the GPS. Really though, speed of wheel cadence is a really outdated concept of measuring speed. I can see why things like GPS are becoming more the standard
Nice project. From the developer's point of view I'd rather limit the screen FPS to keep it in one place, rather than limit the transmission rate of every other sensor that you will want to add. Or during the handshake between screen and sensor, the screen can request specific data rate.
Fantastic video! At first this had me wondering if I could use this method to read out my fuel gauge. I have on 06 G35x, and the resistors on the cluster board that provide the proper voltage for my fuel gauge are likely the culprit behind my fuel gauge not reading properly, as I've verified that everything from the variable resistor inside the tank up to the back of my cluster is in working order... but the fact that the nav system is also unable to provide an MPG makes me think that those resistors are a component of preprocessing before providing the information under the designated canbus ID.
As far as I'm aware, that's something that should totally be doable without needing to attach any resistors or anything. It's something I'm going to be taking on in a couple of videos time so we'll have the answer soon enough.
@ Awesome. Look forward to it. The resistors are actually the components that cause the fuel gauge error… the solder on them cracks over time. I haven’t felt inclined to actually open my cluster up to verify it yet though.
might have missed it in the video, but its also possible to use both cores of the ESP32, so you could have one dedicated to a webserver, and the other to CAN and the screen, or even have one core dedicated to the CAN if you think its sending data at a fast enough rate to require an entire core.
Multicore microprocessors are the bomb! I use the second core on the RP2040 all the time. I can't wait until these things get advanced enough so that we can write true multi-threaded code (technically possible with single-board computers but those aren't small enough for these kinds of projects)
Simple and correct way to get RPM : RPM PID = HEX: 0x0C | DEC: 12 This PID returns 4 bytes of data (A B C D) To get the RPM from the DATA you do (256 * A + B)/4 and you will get the real RPM Value.
Correction: By flipping GPIO4 and 5 you did not flip the CAN H and CAN L pins. Those are always the same as per the OBD2 standard. You flipped which pins are connected to the Receive and Transmit pins of the CAN transceiver. The transceiver takes CAN H and CAN L signals and level-shifts them into the data you see and/or turns your data into CAN signal to be sent.
Excellent video. Something Im getting into. Suggestion for a video RSPB have spring Garden bird watch coming up, What about a video on collecting the data images times ID of the birds etc and sending it to the RSPB systems?
funny to see this; I had spent a month or so in 2024 to make a triple can shield for esp32 without using its builtin CAN controller, to connect to my Nissan Leaf (which has 3 CAN buses on the OBD2 port). Didn't get around to testing it in car, or writing code yet... so let's watch the whole thing :) @11:39 and that's exactly why I haven't tried it yet. Same fear.
I was intrigued by this video since I want to do some simple odb2 sniffing and I must say I was not disappointed, it took the me the complete video to realize it was an hour long video. Apart some small misinformations or misunderstanding about the hardware on your side, it was exactly what I was looking for. Thank you for the great content you provided.
this might be saving my projects, you drive a 350z and I've got a g35 so they should use the same nissan can id's, once I get my hands on a can sniffer I'd love to help contribute can message streams if it would help the decoding process, hopefully eventually we might be able to do it all.
@GarageTinkering that's awesome, I did some research on the canbus in our cars few years ago, but there seems to be a lot of progress made since I've last looked into it, I had people telling me it was a lost cause but now it seems doable, just bought me the shield so I'll be doing experiments once it comes in, I also found a monolithic github repo (iDoka/awesome-automotive-can-id) for reporting canbus IDs for as many manufacturers they can collect so ill also try to put my findings there
two thoughts: - speed is probably calculated by multiplying a frequency that is read off the axle by a supposed tire diameter. - that number at 42:15 is awfully close to Pi, and since your speedometer always reports a higher number, this pseudo-Pi is probably that
I was going to order this kit, but their website is bugging out. Decided to go with the arduino MKR and it's shield. It was a lot more expensive at about $85 USD for the both. Hoping to dig in on the G35 this weekend, so I can make my gauges and AC work with the LS swap.
Weird, looks find to me. You'll get much the same solution with your new kit though. I'm trying not to think about the LS swap. It's planned myself later this year, and I'm not ready!
@GarageTinkering I'm minimizing costs where I can, while spending money on valuable parts that I can't create. It's been an interesting journey so far. As soon as the weather here warms up, I'll be back to making content on it
I noticed a pattern on the RPM numbers, 2250, 3500 and I bet the 4700 is actually 4750. Essentially what you end up with is an extra 125 RPM for every 1000 RPM.
So spoiler alert for an upcoming video, but turns out the drivers gauge over reports compared to what the ECU is actually saying. I used a 3.4ish scaling ratio in the end, but it should have been 3.
I highly dought that the rpm multiplicator is as a randomly value. Usualy are whole values. On CAN bus you can have multiple signals that can be similar with the rpm one, but with a slight offest. For example throttle pedal, throttle valve an RPM will fluctuate mostly in the same time.
You're probably right. Over the next few weeks I need to do a full deep dive into the data and try and figure out what everything is, so I suspect if it's wrong I'll find the proper one amongst all the numbers.
Man i would love to have a small display in my car showing my engine temp as it doesnt have a gauge for that *sigh*.. I would also love to have a sign tell me that it has started the dpf regeneration process. Maybe i need to look into this.. would be really awsome!
I have a 2008 350Z and I recently got a BlueDriver Bluetooth Pro - which I don't really like, HOWEVER, one thing that device does give me that I haven't seen anywhere else, is it can tell me which tire pressure sensor has reported low air whereas on the dash, I just get one light without any indication of which tire is low. It would be nice if this project were able to report which tire pressure sensor has triggered. The single light on the dash is of course, useful, but not as useful as it could be.
@@GarageTinkering Well, this one MIGHT be more complicated than that ... maybe ... because the BlueDriver module can only tell me which tire sensor triggered after I ask it to do an interrogation report where it takes about a minute to do a bunch of stuff then it spits out a bunch of reports in pdf format. In those reports I can then find which tire triggered the dash light. My knowledge of CANBUS is limited to only what I've seen in this video so I have no idea if those specifics about the TPS are in the standard data stream or not. Isn't there a published list out there somewhere of the canbus codes pertaining to the 350Z that someone might have already figured out so that you don't need to do the graphing and fishing and all that?
We're doing the same thing at the same time and the algorithm has united us; quick question are you going to use OBD port, or splice straight into the Can wires?
In the old port you have one of the can networks of the e car. If you splice near the old port will be the same as plugin. For freeing the port there are passthrough obd plugs.
@@GarageTinkering be careful if a vehicle gets into an accident and it was deemed to be a communication failure potentially you could be criminally liable for the accident when otherwise your insurance could have paid out it’s happened before
Thanks, and I appreciate the concern, but she's fine. It's just a combination of the position of the key light and the shadow making it look inflamed, even though it isn't. She's all good.
rpm and any other data displayed on analog needles may not be the same as real engine rpm, etc. You should compare it to data received over obd (another obd scanner). Not that the difference will be that great, but worth to check anyway. (matter of adjusting the scaler value)
@@GarageTinkering I got this in a suggested video, as I was working on can sniffer, and injector. tried with arduino and can shield but could not get it to connect. CAN line swapping is what I will try to maybe get back on the track! thanks!
That is interesting. I have a custom display in my car and that gives me some ideas for DIY better. (Yes, I know it'll take a lot of time, be buggy and probably not even better than the one I have now like all projects :) I like to have some custom data like temperatures, my car only displays one data like temperature OR speed OR fuel level etc. But.. getting to code it myself gives me some new ideas that could be useful.
@@---nw9qu not really. A lot of popular vehicles people have figured out and you can find on repos or forums that list most of it with some googling, but it's generally a bit hit and miss.
Can you find the PID for "headlights on" and turn them on using the OBD port? There are companies like ultrabrightlightz that sell devices that plug into your OBD port and can flash your turn signal and headlights. I think they sell them to volunteer first responders that don't have access to emergency vehicles so they can get through traffic. Teslas also (at least used to) do this whole light show and play a song over the radio while they flashed their lights and opened the doors and what not. I'm sure they were using OBD commands. Vehicle speed and RPM is pretty neat but I was wondering how hard it'd be to do everything else. I think it'd be neat to show up to a car meet and hit a button on your phone and have your vehicle do something cool.
Yup. You can absolutely do this. Once I get around all the security concerns I'm going to design and integrate remote start and heat, as well as designing a plug and play voice control module and some other bits
@@GarageTinkering I sub'd. Looking forward to it. I didn't even think about remote start but that's a good use case. Might have to order the board next paycheck and start messing with it.
Good question. I don't know is the honest answer. I'm being suuuuper careful and doing prep before I write anything to the BUS. Don't want to brick the car
@@GarageTinkering The world of canbus is pretty extensive, on BMW's you can control AC, radio and other stuff, they don't run over the normal OBD2 canbus tho, the car as a couple of different BUS, K-CAN(Karosserie CAN) for interior lights, climate, steering wheel controls(you can even intercept the controls and do some cool stuff) as mentioned, and other stuff, and D-CAN(Diagnostics CAN), just like you are plugged in. Not sure how it goes in the Nissan world but really wouldn't be surprised if they have something similar ish.
The screen is connected to the ESP32 and that is just powered by the USB in to the cigarette lighter for testing. Then all the data is sent over ESPNow
Great video. Can you send can bus messages to the car to change the default behavior of the car? For example, we want to turn on a certain light when the door is open. If the car sends a door opened message, we can catch that and then if we figure out how to turn on a certain light, we can turn on a light when the door is opened, right?
@@GarageTinkering I think it is very hard or impossible but i want to know is there a way to stop the default behaviour. For example car sends a message to the light for turning on and we want to stop this message.
@@volkanozdemir2847 I'm not sure that you could stop it, but, you could listen out for the command that the car is sending when the action happens, and then send an opposing one. Like, if a door opening sets a certain bit from 0 to 1 which turns that light on, you send a command to set it back to zero. Would all happen within a fraction of a second so you'd probably never see the light come on
thats cool you an also get a cluster and if you play sim racing games send game signals convert them con canbus and have a actual cluster in your simrig if seen this done before for a bmw cluster i guess.. you know there are stand alone ecu's that will do tis stuff for you car and allow you to have these digital clusters and all the fail saves and stuff as seen in drifting a lot. not sure replacing a cluster and going wireless is a good idea but hey its a good project :) i personaly have played with drive by wire pedals what are basicly pod meters 2 way so its has redundancies build in. you can easly connect them to arduino :) for fun there not to expensive like a one from a scoda fabia or something for like 20/30 euro works fine :)
This is qhy AI is not a huge advancement in technology. Considering MSB and LSB the data is likely not thought of to be 3.463 timea the value received in a hexadecimal format.
You should use a short rolling-average, releasing display at every Nth interval of the internal tick. You can even flip-flop between RPM and SPD. NOTE: Most vehicle dash representations for speed, are purposely indicating a faster speed than you are actually traveling. Your tires, at max inflation, should be the closest to actual speed, as that is the MAX diameter, resulting in the correct RPM, relative to the expected traveled distance. A lower inflated tire should show as you going even faster, when you are going even slower, as 1 RPM is truly less distance, from the smaller diameter tire. To get true speed, you would need the estimation of GPS, or an "adjusted wheel RPM value", which takes into account, the distance of the axle from the ground. (That determines the wheels true "surface circumference", for each associated RPM of the drive axle. A flat tire vs a full one vs an over-inflated one vs an incorrectly sized tire.) The reason a car is normally displaying a "faster speed" than you are actually going, is for safety and removed liability. They would rather let you THINK you are going faster than you are, as opposed to letting you THINK you are going slower, when you are actually "speeding", without realizing you are speeding. Also, Speed displays tend to "ramp-up" to display fast and "fall-off", with a bit of a delay. Again, it makes you look like you are traveling faster than you are, and steadies "foot-drift" and short decay-dips from making the gauge jump around. RPM's have a similar, two-way "softening" or decay or rolling-average, to limit sporadic displays. Sometimes it is a physical part of the "mechanical clusters", and sometimes it is a simple data-buffer, in "digital clusters". (OBD2 should always be showing RAW data, unedited, unbuffered, etc.) Now you need to display the rough "efficiency" value. Based off of Speed vs RPM, for simplicity. You can actually obtain the "duty cycle" and "pressures" of the injectors, to get a real decent "MPG rating", which would need some tweaking, as you won't know the true volume of fuel dumped at those duty cycles and pressures. It is not hard to estimate the values by basic consumption of fuel, compared to the "logged data". (Drive a highway length, with high RPMs, and again with lower RPMs, doing the same relative speeds. Then get another set of data at idle. Then another set at a steady 35-45mph. All the while, compare to your fuel-levels that your car reports. You will eventually have a duty-cycle that closely matches your fuel-level consumption, when you have the correct values.) Contrary to popular belief, it is NOT just low RPMs and driving slower that gives better MPGs. Most cars are "tuned" for specific speeds, to get the best MPG at those speeds. All that really matters is if you are "riding the gas", vs "back-drifting to a settled speed". (To back-drift, you first go past your desired speed and then ease-off the gas, slowing to your true desired speed. Also, instead of speeding up to a stop, you drift to a stop instead, way in advance. People like to drive all the way up to stopped traffic and break at the last few seconds, sitting idle longer and burning through break-pads and being forced to hard-accelerate back up to speed. Everyone is in a rush to stop!)
Hello, thank you for your video. I have a question. Your Github does not have the same software version as in the video. FreeTOs is used in the video. I'm very interested in the combination of FreeTOS and LVGL. Thank you
@@hilfsbereit1437 Just check and tt looks like the code in the repo is the same as here. Are you definitely checking github.com/valentineautos/esp32-canbus-sniffer/blob/main/CANBus-Sniffer.ino
I just brought it in via the text file from the serial logs. I did similar things to you, doing patterns etc and then trying to find them. This was 2020 and after seeing your video I’ll be using Ai and giving savvy can another go. I want to do more things like lock and unlock a van from the inside, basically replicating some of the buttons which are already found within the car so finding those command are fairly easy. But I’d like to decode more, perhaps horn and flashing lights etc to simulate an alarm going off if needed. Thanks for the video it’s sparked my curiosity again
Regarding your RPM, isn't it counting pulses and there's a difference between a 4 and 6 cilinder? BTW: there's an engine light and you need to refuel 🤣
You're right. I emailed MrDIY and he said it was likely flipped as the sample code hadn't been updated with the newest (flipped) high and low values. He's updated the repo now so noone else should have that issue.
@ you replied before I finished the video 🙂 great car enthusiastic project, well done with the reverse engineering! As a foot note: the CAN ID might change by car brands, that’s why on a professional OBD tool a licence is needed for each car brand.
Researching it over the last couple of days I think it's because I'm getting the none-standard PIDs because I haven't sent a request to the CANBus. Hoping that sending a specific request for the PIDs will get me the standards ones. Going to try it after Xmas
@ wouldn’t recommend to do that. CAN bus is like a neural network in our bran, it transfer information between ECUs. CAN bus is event triggered as you mentioned, you are not using this feature, just listen in. If you drop a request too often to the bus then the bus capacity might be reached and you could face with issues on those ECUs on the car which don’t receive the data because the bus is overloaded. To stay on the safe side only listen in to a complete system (even cut the TX pin of transceiver in case of a SW bug :) ).
As a hint from someone who had access to a full datasheet with every value and formula for a different brand, don't think in full bytes, some values like temperatures can be odd bits long and can start at odd bits. So as an made up example, engine coolant temp is pid 123, starting at bit 8 and is 12 bits long with a formula like value/10-20.0 so a value of 0 is -20°C, a value of 1100 is 90°C. Also there are already lots of efforts to decode popular vehicles, maybe you are lucky and most of the values you look for are already found and in those databases. Once decoded you can do a lot of fun stuff with can-bus data. way more than the manufacturer intended. I had full logs of days of driving on a modern car with different drivers and such. Several gigabytes ;) Happy Christmas
In my digging over the last few days I've found a few resources where people have been doing the 350z, and it's confirmed that I'm correct on the speed and rpm I found, and has highlighted a couple more that people have flagged, but most of it isn't there yet. No worries, just means I can be the one to suss it and create the resource
I'm curious if the RPM being off in the dashboard is a miscalibration in the dash display and not the bus reporting, it seems most people don't realize that indicators aren't calibrated, the only reason I know is I have a pursuit vehicle which has a factory calibrated speedometer and it's noted on the display.
@@Iamdebugthat does appear to be the case. Using my car scanner shows the CANBus reports the RPM about 20% lower than the gauge display. It should be a simple 3x multiplier to get the true value.
@@Iamdebug I can only tell from my limited experience with a sample size of 1: on my car it's off and delayed (my newest car is almost 27 years old). it's a rough indicator, but nowhere near exact. But I'm not doing racing where I need to shift at exact points, so I don't mind. I assume, most cars have some of damping to avoid being twitchy.
@@Iamdebug it is quite well known that speed on dash is reported 10% more than the real one measured with GPS, that has been true for a lot of modern German vehicles, probably a "safety hack", because setting tire sizes (when it is possible) or using factory recommended sizes (when you can't set it in OBD) still results in speed being off by +10%, and it is true in range of 0-150, not an equation, but straight up *1.1
temperature gauge is a lot of German vehicles starts to show 100% warm (~90C) already starting at 65-70C for some reason, not sure the logic behind that, but CAN values match up to 50ish C, but then it just speeds up and stays at 100% warm when actual temp is 70-95C
just thought about the speedometer, and that I haven't checked if the odometer is counting distance correctly and not adding 10% also, which would benefit people providing service for those vehicles 😁
Thanks for sharing the code!
@GarageTinkering Did you get stung on import duty? Im reluctant to buy Things of value internationally since Brexit.
@@garymetheringham4990 I bought one recently and it took just over a week to arrive but there was no further duty to pay and the tracking was pretty good.
I thought people were pretty much done with canbus youtube videos. I was looking the other day for something like this and realized I had watched all the good ones so thank you for this video. Very cool
Appreciated. I've only just started scratching the surface of what I plan to do. So much good stuff coming
Can you recommend some of the other good ones pls?
Looking forward to the next episode on here as well! You sir got a new sub
@nissanv6tt got any recommendations for other good canbus videos?
Man this is the exact video what I looking for last 4 years.. you are great
This is so cool, keen to see more to come. For testing/debugging, it may be worth pre-recording a drive and serialising the data into a file that you can restream later on, save some petrol!
Someone else actually suggested that I make a web front end and it made me realise I can just dump all the data to a web endpoint and download at home. Extra advantage there that I can bundle the GPS data in with it which should make identifying things much easier if I can keep a log of what I do at which point of the drive.
@@GarageTinkering Did something very similar myself, but for simracing telemetry, would love to see how you get on with it!
Actually have a better idea. I'll just use a screen I have with an integrated microSD slot and create a simple data capture tool that self verifies and then stores all the data dump on a card. Simple.
You could create a little web server on the esp32. You could then navigate to it using your phone to live view data instead of the laptop.
I am absolutely PAINED that I didn't think of that. Guess I'll be doing that next
@@GarageTinkering a tutorial perhaps please?
On it
ESP32 web pages and bluetooth are always something to remember. However, if problem is the range (especially with car plugs being often quite low and car metal shielding it), it won't give more distance. Cars are very difficult sometimes for radio link unless it antenna is near car windows (or external antenna on roof or whatever).
Or maybe just a lcd would be fine
Damn, after me using numerous ODB2 readers and apps over the years, I didn't realise how fast the CANBus can send data. This is quite a revelation lol. I must admit, my coding experience is far south of what you're able to do here, and I'm in awe of this project.
Great stuff man, great stuff!!
Yeah. Lots of the data points come in at 25ms, and some of the less time sensitive are at 100ms, so it's all really responsive. Plus an ESP32 can extract everything and broadcast it all on ESPNow with basically zero packet loss. It's really impressive. I actually noticed that my gauge responded to speed changes faster than the OEM one in the centre console. Guess that's down to 20 years of technological advances.
@@GarageTinkering I'm wondering if the reason my ODB2 readers/apps are so slow is just down to being economical with the amount of data coming in. I'm curious to see what my old Accord Type R would output if the receiver was faster than the ebay readers lol
Excellent stuff man, this makes me rather excited to try something out next year.
I did clock your Honda comment btw, and laughed :P
@@StoobersI'm allowed to say that as I have a Civic lol
CANBUS can do 1Mbps and the newer CAN FD can do up to 8Mbps.
@@affieuk cool info, sadly my old car doesn't do CANBUS. Bugger :D
I’ve made a gauge with micropython code utilising a pico, waveshare 1.29” GC9A01 touch display and MCP2515 CAN board.
It is programmed to read Haltech CAN bus using a neat CAN protocol file I made in TOML syntax.
It could do with loads of improvements but it works, I have a multifunction gauge with good refresh rate.
I should update my git repo and probably do a video on it.
@@HAZZA24937 sounds like a great project! Post here if you do the video
Now this has got me thinking about making a Heads Up display for my car, could be used to display a lot of useful information
Nice work! I had in mind a project to extract rpm and throttle position to make my car sound like something absurd!
Wow, I need this kind of tutorial video for Off-Grid Solar-Inverter/Charger Canbus sniffing. That was awesome how you were able to find the solutions. Great video!
Greetings from Canada!
👆The guy that made it all possible, folks
Well done, didn't realise the can bus data was slightly complex
It really isn't. It's just lots of data. Most of the time it's just 8 bytes on a certain id. But it comes in faster than you can read. Unless it's CAN FD. Then it's more bytes. Everyone on the bus can send, lower IDs get higher priority. Termination is a bit of a thing.
love the project! the idea of own dials sounds super hard, but youre stepping closer to a really nice solution in every video.
Great video. I have a few ESP32s but haven't got to actually use them yet (worked with electronic design decades ago and miss it). I have a Subie Foz XT and I'm "Aussiefying" it slightly for a bit of terrain adventure. For that I need good control of for instance CVT temp etc. I already have a plug and Car Scanner on my phone, but I am planning on converting an old tablet to Car computer with 360 cameras and such. Your channel seems to be a good spot to get inspiration fro.
Cheers from Sweden!
This is wonderful! I'm starting the same project on my 2011 Subaru Forester XT. I have no knowledge and I found your explanation very educational. My idea is to use a larger, taller display, similar to 400x400px, to be able to display more information at the same time, such as oil temperature and oil pressure, which will come from external sensors. There's a guy who made a dash for an Infinity. You might want to take a look. If you want, I'll send you the channel.
Thanks for the explanation, and I'll get to work soon!
this is literally the same project I've been working on lately. I have an esp32 with an external ADC for analog sensors, 2 can bus controllers for CAR ECU can bus and Transmission TCU can bus (8hp swap) and last a 433mhz receiver for aftermarket TPMS sensors since my can doesnt have it. This first ESP32 will send all the info I want to 2 other ESP32s with LCDs via ESPNOW
Sounds great. I think I'm going to incorporate a midpoint device at some point to take in all the sensors and the CAN before making it broadcast to the screens so the data only comes in from one serialised source.
This was so good! I had this planning for my Golf 1 with a new engine but had no idea how to make this work.. But this really helps! So thank you!
So glad you found it useful!
Great job mate. Looks like a fun project. That's a lot of progress in 3 day.
Nice! There's that CANBus project you commented about on that spoiler LED light video 8 months ago 😃 I haven't even tried doing this on my car yet. A lot of great tips here, so maybe I'll give it a try in 2025 😅 Happy new year BTW 🎉
Dumping the raw data into excel with a few little formula's to do various data conversions is also great for a quick analysis!
There is a serial plotter in Arduino IDE, if you have data with labels, like you do, just open the serial grapher thing in arduino and it will plot it for you. Sometimes you have to tweak the format of your serail log
Great video, its like literally the exact type of video i have been looking for!
Wow a great 1st look, at Can Bus.
Amazing video!! , i need that so much, I'm working on a DIY remote start for my Hyundai i40, implementing CANbus to detect lock, unlock, rpm, speed, gear position, break status and more .. so that will help me a lot , thanks man 🎉
Glad it helped. I'm about to launch in to try and finding all that myself and I'm kind of not looking forward to it LOL.
Very cool project! Definitely like seeing the CAN sniffing stuff.
Finally a good real world use-case for ESPNow! Great video to follow along, with all those trials and tribulations - thanks! 🙂
Ironically might swap it out to ESP Mesh. I'm about to compare them, but yeah it's generally a nice use case.
@@GarageTinkering Oh wow, thanks for mentioning ESP Mesh! I didn't know about that before, but i have a MASSIVE use-case for this in a project of mine ♥
That didn't exist back in the day, so i used regular infrastructure, but this will be a game changer 😁
@@jangrewe FOR REAL. I stumbled across it last week and haven't had a chance to play with it yet, but the fact you can just add new nodes to the network and not have to inform your current ones that it exists I think is really interesting. Just going to be a case of seeing how fast it is, and how good the message filtering and data types are
ceer's man . nice vid . yeah can bus can be very nice to play with . back in 2014 was doing this kind of things
Thank you for the great video! You've made more progress than I have and have really pointed me in the right direction. I plan to receive updates on things like whether the car is locked, if the lights are on, etc., sent to my phone via SMS. I often walk away from the car and wonder if I locked it.
Great idea. You could potentially add in writing messages to the CAN so it automatically puts up the windows and locks when you leave a certain proximity
@tonylamb3906 The problem is, CAN port always has power and you will drain car's battery if you don't disconnect the CAN reader interface. You have to add a high-side transistor to cut the power after car is off for let's say 5 minutes.
@aljaz55 the shield that I used in this video does exactly that and drops the power consumption to practically 0. There are tech specs on his linked website if you're interested
It’s killing me seeing it as “ODB” and people copying that in the comments 😂 it’s “OBD” - On-Board Diagnostics
Ha yeah. Apparently I've been chopping and changing between the two with reckless abandon.
@ easy mistake to make to be fair 😂. Brilliant video mate. Merry Christmas to you and yours!
hey! Dirty!
@@AFishyExperience ol' Dirty Bastard. Rip
@@vadimm6432 same thought i had haha
This was an amazing video so thanks for sharing, 99% of what you did was beyond my understanding but I enjoyed watching and will now have a look at your older videos to try and learn a bit more coding. I made a video a month or two ago about using an ESP32 with Savvycan to read the CANBUS so please have a look at that. My setup was way more simple than yours but I also have a spare gauge that I was playing with in the office, being able to play back CAN dumps in your office makes life a little easier/warmer.
Wait until you see what I'm building for the next video lol
@@GarageTinkering Looking forward to it. Subbed. 🙂
This was so interesting to watch! Thanks for sharing. Can’t wait to try it one day
Well done indeed. I was investigating whether to log parameters from my Volvo and I found that there are multiple accelerator and other parameters, quite confusing. It would be interesting to compare, but I have too little time.
Very cool! I’m working on a very interesting, yet similar, situation I’m working through. I own a 2004 Gillig Phantom bus that I converted to a mobile communication, office and sleeping platform. It communicates using j1708 and j1939 CANbus. The problem is that there’s no fuel gauge. There’s a module behind the driver seat that is connected to the CANbus and the radio system previously used by the bus company. I suspect the telemetry is transported via radio to alert the depot regarding problems and, potentially, fuel level to address maintenance issues.
I picked up a package that allows me to talk to the CANbus properly, although I haven’t been able to locate the bodybuilder module to talk to the fuel tank sender.
Your video provided an alternative method to address the issue - grabbing the raw data across the CANbus, manipulating the sender and watching for something that could be the fuel tank. Since I’m just looking to build a monitoring gauge, this may be the easiest approach. Much easier than trying to drive down the road with a laptop full of changing data when all I want is a small part of what’s being sent.
Nicely done!
Sounds like a great project.
And yeah when I get to that bit I'm going to let it run mostly empty, grab a snapshot, fill it up, and see what changes. Should give me an shortlist at least to then see what slowly depletes over time.
Super cool. Also beautiful z33!
as someone who develops diagnostic tools for manufacturers, I appreciate you digging into vehicle diagnostics, its funny to watch :) best of luck with the project!
This looks a great channel,I will spend some time checking it out
My first thought was to create a WiFi connector to connect through to your home WiFi and then just host the data on a web server on the ESP32 plugged into the car.
That way, you could have the other ESP32 dial home to the one in the car or just dial into the web page hosted by the one in the car using a web browser.
It is sad that I don't have a car anymore to experiment on, but what you want to do is write a packet filter that throws away everything you flagged as known! That way you can relatively quickly cleanup the CAN messages you do not need to work on!
Good shout
You can simply use map() to assign a value to a range!
Given that GPS speed measurement is pretty reliable, perhaps loop in a GPS to obtain the actual speed, then use that as an off-set to correct the OBD numbers... Could run that loop a few times a min to get a continuous correction factor.
Also, during your earlier test: I perhaps would have wired up that screen and placed it near the dashboard screen; filmed both then review at your leisure when reviewing the footage. Keeps plod happy too as you can focus entirely on driving rather than looking at screens...
"Like a little gemlin" made me laugh. Been there, done that 😁
All OEM speedometers are 'optimistic'. Apparently to avoid liability - "But my speedo said I was doing 30 officer!" Like the RPM, there's probably a 'magic' number (also used for various tyre/wheel sizes).
🙈
@@GarageTinkering Sorry, added a bit! I doubt you'll need to send the CAN data more than a couple of times a second.
Yeah. I've just got so used to driving a couple of mph over on the speedo as I know it runs faster than true. Just wanted to have them true again.
Speedometers are legally required to show within a certain band of the actual speed - with the actual speed being the lower limit. So if they aim to make it accurate there is no margin for errors, and simply overinflating your tires could make your car illegal.
I feel like some of that is built in at the CANBus level, as at around 30mph the OEM speedo and mine (which run off the same data) both report around 1mph over the GPS.
Really though, speed of wheel cadence is a really outdated concept of measuring speed. I can see why things like GPS are becoming more the standard
With ESPNow, you could broadcast stuff to your home like your gas tank level or odometer value, which would make maintenance planning easier
You may have stumbled onto part of the reason I started this and where the series is going ;)
Nice project.
From the developer's point of view I'd rather limit the screen FPS to keep it in one place, rather than limit the transmission rate of every other sensor that you will want to add.
Or during the handshake between screen and sensor, the screen can request specific data rate.
Valid thought. I'll look into doing it that way
Fantastic video! At first this had me wondering if I could use this method to read out my fuel gauge. I have on 06 G35x, and the resistors on the cluster board that provide the proper voltage for my fuel gauge are likely the culprit behind my fuel gauge not reading properly, as I've verified that everything from the variable resistor inside the tank up to the back of my cluster is in working order... but the fact that the nav system is also unable to provide an MPG makes me think that those resistors are a component of preprocessing before providing the information under the designated canbus ID.
As far as I'm aware, that's something that should totally be doable without needing to attach any resistors or anything. It's something I'm going to be taking on in a couple of videos time so we'll have the answer soon enough.
@ Awesome. Look forward to it. The resistors are actually the components that cause the fuel gauge error… the solder on them cracks over time. I haven’t felt inclined to actually open my cluster up to verify it yet though.
The irony of the garage tinkerer not having a garage. 🤣🤣
Not on my house at least 😉
@ I only discovered your channel today and now I’m binge watching. Loving it.
Appreciated, and welcome
I misread the title of this video. This is not what I was expecting. 😂
I daren't ask
might have missed it in the video, but its also possible to use both cores of the ESP32, so you could have one dedicated to a webserver, and the other to CAN and the screen, or even have one core dedicated to the CAN if you think its sending data at a fast enough rate to require an entire core.
Multicore microprocessors are the bomb! I use the second core on the RP2040 all the time. I can't wait until these things get advanced enough so that we can write true multi-threaded code (technically possible with single-board computers but those aren't small enough for these kinds of projects)
Nice this has always been such a cool subject for me
Nice one mate, new subscriber ✌🏻
I'm doing this on my truck !!!!! I have lots of esp32 but never did obd2 I only want milage recording lol :)
Simple and correct way to get RPM :
RPM PID = HEX: 0x0C | DEC: 12
This PID returns 4 bytes of data (A B C D)
To get the RPM from the DATA you do (256 * A + B)/4 and you will get the real RPM Value.
Correction: By flipping GPIO4 and 5 you did not flip the CAN H and CAN L pins. Those are always the same as per the OBD2 standard. You flipped which pins are connected to the Receive and Transmit pins of the CAN transceiver. The transceiver takes CAN H and CAN L signals and level-shifts them into the data you see and/or turns your data into CAN signal to be sent.
I recently heared that Arduino UNO R4 has a CanBus interface builtin. It could make it simpler maybe.
Very cool!, subscribed
Excellent video. Something Im getting into.
Suggestion for a video
RSPB have spring Garden bird watch coming up, What about a video on collecting the data images times ID of the birds etc and sending it to the RSPB systems?
Sounds neat but I do automotive tinkering I'm afraid.
@GarageTinkering and they are very good videos. Thanks
dude ,is genuine.like it!
Great detailed video. Thanks for sharing this!
funny to see this; I had spent a month or so in 2024 to make a triple can shield for esp32 without using its builtin CAN controller, to connect to my Nissan Leaf (which has 3 CAN buses on the OBD2 port). Didn't get around to testing it in car, or writing code yet... so let's watch the whole thing :)
@11:39 and that's exactly why I haven't tried it yet. Same fear.
I was intrigued by this video since I want to do some simple odb2 sniffing and I must say I was not disappointed, it took the me the complete video to realize it was an hour long video. Apart some small misinformations or misunderstanding about the hardware on your side, it was exactly what I was looking for. Thank you for the great content you provided.
THIS IS THE ONE IVE BEEN WAITING FOR!!!
IT'S HERE!
this might be saving my projects, you drive a 350z and I've got a g35 so they should use the same nissan can id's, once I get my hands on a can sniffer I'd love to help contribute can message streams if it would help the decoding process, hopefully eventually we might be able to do it all.
The mod of the 350z Reddit is just starting a wiki about the car. Could be a good place to contribute all the findings. Let me reach out to him
@GarageTinkering that's awesome, I did some research on the canbus in our cars few years ago, but there seems to be a lot of progress made since I've last looked into it, I had people telling me it was a lost cause but now it seems doable, just bought me the shield so I'll be doing experiments once it comes in, I also found a monolithic github repo (iDoka/awesome-automotive-can-id) for reporting canbus IDs for as many manufacturers they can collect so ill also try to put my findings there
two thoughts:
- speed is probably calculated by multiplying a frequency that is read off the axle by a supposed tire diameter.
- that number at 42:15 is awfully close to Pi, and since your speedometer always reports a higher number, this pseudo-Pi is probably that
That PID was just the wrong one. I found the right one and it's a simple calculation in line with all Nissans.
I was going to order this kit, but their website is bugging out. Decided to go with the arduino MKR and it's shield. It was a lot more expensive at about $85 USD for the both. Hoping to dig in on the G35 this weekend, so I can make my gauges and AC work with the LS swap.
Weird, looks find to me. You'll get much the same solution with your new kit though.
I'm trying not to think about the LS swap. It's planned myself later this year, and I'm not ready!
@GarageTinkering I'm minimizing costs where I can, while spending money on valuable parts that I can't create.
It's been an interesting journey so far. As soon as the weather here warms up, I'll be back to making content on it
Great video. Thanks.
I love it
I noticed a pattern on the RPM numbers, 2250, 3500 and I bet the 4700 is actually 4750. Essentially what you end up with is an extra 125 RPM for every 1000 RPM.
So spoiler alert for an upcoming video, but turns out the drivers gauge over reports compared to what the ECU is actually saying. I used a 3.4ish scaling ratio in the end, but it should have been 3.
Sweet!
I highly dought that the rpm multiplicator is as a randomly value. Usualy are whole values. On CAN bus you can have multiple signals that can be similar with the rpm one, but with a slight offest. For example throttle pedal, throttle valve an RPM will fluctuate mostly in the same time.
You're probably right. Over the next few weeks I need to do a full deep dive into the data and try and figure out what everything is, so I suspect if it's wrong I'll find the proper one amongst all the numbers.
Man i would love to have a small display in my car showing my engine temp as it doesnt have a gauge for that *sigh*..
I would also love to have a sign tell me that it has started the dpf regeneration process.
Maybe i need to look into this.. would be really awsome!
I have a 2008 350Z and I recently got a BlueDriver Bluetooth Pro - which I don't really like, HOWEVER, one thing that device does give me that I haven't seen anywhere else, is it can tell me which tire pressure sensor has reported low air whereas on the dash, I just get one light without any indication of which tire is low. It would be nice if this project were able to report which tire pressure sensor has triggered. The single light on the dash is of course, useful, but not as useful as it could be.
Easy once you Isolate the individual signals. It's something we'll look at when we create the main drivers dash
@@GarageTinkering Well, this one MIGHT be more complicated than that ... maybe ... because the BlueDriver module can only tell me which tire sensor triggered after I ask it to do an interrogation report where it takes about a minute to do a bunch of stuff then it spits out a bunch of reports in pdf format. In those reports I can then find which tire triggered the dash light. My knowledge of CANBUS is limited to only what I've seen in this video so I have no idea if those specifics about the TPS are in the standard data stream or not.
Isn't there a published list out there somewhere of the canbus codes pertaining to the 350Z that someone might have already figured out so that you don't need to do the graphing and fishing and all that?
SUPER COOL!
We're doing the same thing at the same time and the algorithm has united us; quick question are you going to use OBD port, or splice straight into the Can wires?
Probably splicing. Could do with retaining the ODB2 access for error codes etc (damn sports cats)
In the old port you have one of the can networks of the e car. If you splice near the old port will be the same as plugin. For freeing the port there are passthrough obd plugs.
@@GarageTinkering be careful if a vehicle gets into an accident and it was deemed to be a communication failure potentially you could be criminally liable for the accident when otherwise your insurance could have paid out it’s happened before
I need to do this for my 240sx. Been looking for a way to do it.
This is awesome!
wow this is awesome!
It's better to solder all pads on odb plug to decrease mechanical loads and chances to bracket the soldering joint
Hey,
Thank you for your video!
Urgently!
Please, ask your partner/ assistant to do health check with an endocrinologist for her thyroid
Thanks, and I appreciate the concern, but she's fine. It's just a combination of the position of the key light and the shadow making it look inflamed, even though it isn't. She's all good.
rpm and any other data displayed on analog needles may not be the same as real engine rpm, etc. You should compare it to data received over obd (another obd scanner). Not that the difference will be that great, but worth to check anyway. (matter of adjusting the scaler value)
You're correct. I actually address this in a later video. RPM is out by about 20%
@@GarageTinkering I got this in a suggested video, as I was working on can sniffer, and injector. tried with arduino and can shield but could not get it to connect. CAN line swapping is what I will try to maybe get back on the track! thanks!
That is interesting. I have a custom display in my car and that gives me some ideas for DIY better. (Yes, I know it'll take a lot of time, be buggy and probably not even better than the one I have now like all projects :) I like to have some custom data like temperatures, my car only displays one data like temperature OR speed OR fuel level etc.
But.. getting to code it myself gives me some new ideas that could be useful.
Seems like you’re kinda reinventing the wheel. There exist wireless Bluetooth ELM327 modules is there a reason you didn’t want to use one of them?
Insufficient speed, wrong format and none-customisable to name just three.
Just found/watched your video. Very nice. Are there public databases of canbus values by vehicle make/model?
@@---nw9qu not really. A lot of popular vehicles people have figured out and you can find on repos or forums that list most of it with some googling, but it's generally a bit hit and miss.
Can you find the PID for "headlights on" and turn them on using the OBD port? There are companies like ultrabrightlightz that sell devices that plug into your OBD port and can flash your turn signal and headlights. I think they sell them to volunteer first responders that don't have access to emergency vehicles so they can get through traffic. Teslas also (at least used to) do this whole light show and play a song over the radio while they flashed their lights and opened the doors and what not. I'm sure they were using OBD commands. Vehicle speed and RPM is pretty neat but I was wondering how hard it'd be to do everything else. I think it'd be neat to show up to a car meet and hit a button on your phone and have your vehicle do something cool.
Yup. You can absolutely do this. Once I get around all the security concerns I'm going to design and integrate remote start and heat, as well as designing a plug and play voice control module and some other bits
@@GarageTinkering I sub'd. Looking forward to it. I didn't even think about remote start but that's a good use case. Might have to order the board next paycheck and start messing with it.
I would like to know, key on engine off, if you wrote those packets back to the bus, would the car gauges move?
Good question. I don't know is the honest answer. I'm being suuuuper careful and doing prep before I write anything to the BUS. Don't want to brick the car
@@GarageTinkering The world of canbus is pretty extensive, on BMW's you can control AC, radio and other stuff, they don't run over the normal OBD2 canbus tho, the car as a couple of different BUS, K-CAN(Karosserie CAN) for interior lights, climate, steering wheel controls(you can even intercept the controls and do some cool stuff) as mentioned, and other stuff, and D-CAN(Diagnostics CAN), just like you are plugged in.
Not sure how it goes in the Nissan world but really wouldn't be surprised if they have something similar ish.
@@GarageTinkering I really don't think you would brick the car, the most you could do is trigger a CEL.
hi please use an esphome setup..
Hello, I have a question at minute 45 the screen where is the cable connected not to the power and the esp are talking about WiFi
The screen is connected to the ESP32 and that is just powered by the USB in to the cigarette lighter for testing. Then all the data is sent over ESPNow
Is it possible you are looking at the throttle position or MAF instead of RPM?
In the follow up video to this I dig in a lot more to ranged data and talk about this
@@GarageTinkering I'll check it out thanks! Great content, keep crushing it
A better way is to use a dealer tool for Toyota, have a splitter attached, send commands to the vehicle and record the results.
Great video. Can you send can bus messages to the car to change the default behavior of the car? For example, we want to turn on a certain light when the door is open. If the car sends a door opened message, we can catch that and then if we figure out how to turn on a certain light, we can turn on a light when the door is opened, right?
Depends on the car, but for the most part yes. I'll be covering this in a video soon.
@@GarageTinkering I think it is very hard or impossible but i want to know is there a way to stop the default behaviour. For example car sends a message to the light for turning on and we want to stop this message.
@@volkanozdemir2847 I'm not sure that you could stop it, but, you could listen out for the command that the car is sending when the action happens, and then send an opposing one. Like, if a door opening sets a certain bit from 0 to 1 which turns that light on, you send a command to set it back to zero. Would all happen within a fraction of a second so you'd probably never see the light come on
@@GarageTinkering Yes you are right. Very clever. As soon as possible i want to try on my car. Thanks for your answers.
thats cool you an also get a cluster and if you play sim racing games send game signals convert them con canbus and have a actual cluster in your simrig if seen this done before for a bmw cluster i guess.. you know there are stand alone ecu's that will do tis stuff for you car and allow you to have these digital clusters and all the fail saves and stuff as seen in drifting a lot.
not sure replacing a cluster and going wireless is a good idea but hey its a good project :)
i personaly have played with drive by wire pedals what are basicly pod meters 2 way so its has redundancies build in. you can easly connect them to arduino :) for fun there not to expensive like a one from a scoda fabia or something for like 20/30 euro works fine :)
This is qhy AI is not a huge advancement in technology. Considering MSB and LSB the data is likely not thought of to be 3.463 timea the value received in a hexadecimal format.
You should use a short rolling-average, releasing display at every Nth interval of the internal tick. You can even flip-flop between RPM and SPD.
NOTE: Most vehicle dash representations for speed, are purposely indicating a faster speed than you are actually traveling. Your tires, at max inflation, should be the closest to actual speed, as that is the MAX diameter, resulting in the correct RPM, relative to the expected traveled distance. A lower inflated tire should show as you going even faster, when you are going even slower, as 1 RPM is truly less distance, from the smaller diameter tire.
To get true speed, you would need the estimation of GPS, or an "adjusted wheel RPM value", which takes into account, the distance of the axle from the ground. (That determines the wheels true "surface circumference", for each associated RPM of the drive axle. A flat tire vs a full one vs an over-inflated one vs an incorrectly sized tire.)
The reason a car is normally displaying a "faster speed" than you are actually going, is for safety and removed liability. They would rather let you THINK you are going faster than you are, as opposed to letting you THINK you are going slower, when you are actually "speeding", without realizing you are speeding.
Also, Speed displays tend to "ramp-up" to display fast and "fall-off", with a bit of a delay. Again, it makes you look like you are traveling faster than you are, and steadies "foot-drift" and short decay-dips from making the gauge jump around. RPM's have a similar, two-way "softening" or decay or rolling-average, to limit sporadic displays. Sometimes it is a physical part of the "mechanical clusters", and sometimes it is a simple data-buffer, in "digital clusters". (OBD2 should always be showing RAW data, unedited, unbuffered, etc.)
Now you need to display the rough "efficiency" value. Based off of Speed vs RPM, for simplicity. You can actually obtain the "duty cycle" and "pressures" of the injectors, to get a real decent "MPG rating", which would need some tweaking, as you won't know the true volume of fuel dumped at those duty cycles and pressures. It is not hard to estimate the values by basic consumption of fuel, compared to the "logged data". (Drive a highway length, with high RPMs, and again with lower RPMs, doing the same relative speeds. Then get another set of data at idle. Then another set at a steady 35-45mph. All the while, compare to your fuel-levels that your car reports. You will eventually have a duty-cycle that closely matches your fuel-level consumption, when you have the correct values.)
Contrary to popular belief, it is NOT just low RPMs and driving slower that gives better MPGs. Most cars are "tuned" for specific speeds, to get the best MPG at those speeds. All that really matters is if you are "riding the gas", vs "back-drifting to a settled speed". (To back-drift, you first go past your desired speed and then ease-off the gas, slowing to your true desired speed. Also, instead of speeding up to a stop, you drift to a stop instead, way in advance. People like to drive all the way up to stopped traffic and break at the last few seconds, sitting idle longer and burning through break-pads and being forced to hard-accelerate back up to speed. Everyone is in a rush to stop!)
Hello, thank you for your video. I have a question. Your Github does not have the same software version as in the video. FreeTOs is used in the video. I'm very interested in the combination of FreeTOS and LVGL. Thank you
Hmmm, I didn't think I changed it since making the video. Let me take a look and get back to you
46:46 taskhandler
@@hilfsbereit1437 Just check and tt looks like the code in the repo is the same as here. Are you definitely checking github.com/valentineautos/esp32-canbus-sniffer/blob/main/CANBus-Sniffer.ino
Engine light ✅
Low fuel light ✅
Lol yeah. Sports Cats but haven't tuned it yet
I used excel to sort out the data, and you can use it to filter each hex
Ant example of the format? I don't really use it
I just brought it in via the text file from the serial logs. I did similar things to you, doing patterns etc and then trying to find them. This was 2020 and after seeing your video I’ll be using Ai and giving savvy can another go. I want to do more things like lock and unlock a van from the inside, basically replicating some of the buttons which are already found within the car so finding those command are fairly easy. But I’d like to decode more, perhaps horn and flashing lights etc to simulate an alarm going off if needed. Thanks for the video it’s sparked my curiosity again
Regarding your RPM, isn't it counting pulses and there's a difference between a 4 and 6 cilinder? BTW: there's an engine light and you need to refuel 🤣
Engine light is due to the sports cats, and I haven't had it tuned out yet. It's coming :D
Throttle House, Middle Lane, Car Throttle, Salvage Nation, Shiny Nine, Redracing, Popcornbus
What you made is AWESOME!!!! but.... I was expecting oil and water temp and oil pressure. All more important than weather....
They're still to come on the third gauge
Use the find command and look for 0x0c and 0x0d?
They're not there
Your soldering iron tip is not fastened well
CAN high and low can’t change between cars, standardised for OBD interface
You're right. I emailed MrDIY and he said it was likely flipped as the sample code hadn't been updated with the newest (flipped) high and low values. He's updated the repo now so noone else should have that issue.
@ you replied before I finished the video 🙂 great car enthusiastic project, well done with the reverse engineering!
As a foot note: the CAN ID might change by car brands, that’s why on a professional OBD tool a licence is needed for each car brand.
Researching it over the last couple of days I think it's because I'm getting the none-standard PIDs because I haven't sent a request to the CANBus. Hoping that sending a specific request for the PIDs will get me the standards ones. Going to try it after Xmas
@ wouldn’t recommend to do that. CAN bus is like a neural network in our bran, it transfer information between ECUs. CAN bus is event triggered as you mentioned, you are not using this feature, just listen in. If you drop a request too often to the bus then the bus capacity might be reached and you could face with issues on those ECUs on the car which don’t receive the data because the bus is overloaded. To stay on the safe side only listen in to a complete system (even cut the TX pin of transceiver in case of a SW bug :) ).