All the tires are on their own individual paths. When you do anything but go ABSOLUTELY straight (even then it's slightly different), plus the size of the front vs rears could also be different. When you steer more and more, all the tires follow their own arcs of various radii, so the speeds vary.
Thanks man, that topic is fascinating! You understand that we are riding computers on wheels! Complexity is just an accumulation of simple things! Thanks again for the introduction to can bus diagnosis can't wait for the 2nd video! See you soon! Cheers!
SO AWESOME! I've had a specific idea for months of an arduino project I want to implement in my new car which will need inputs and outputs to/from the CAN BUS network, and inputs/outputs to other electronics. This makes it way more achievable. You've probably saved me a good 8 hours of trying to figure out what it is I don't know in order to start this.
@@ezzaldeena.alribi8603 I haven't yet, but I'm planning on having it completed before the end of December 2021. I'll probably post some stuff on github and or instructables when I'm done, and I'll try to link it here. I might forget to put it here though so, comment on this thread if a few months go by and nothing happens
Hi, just a note, most modern cars from like 2-3 years have firewall to ensure only data readable with sae 1979 is available. This is to avoid hacker attacks. Great work on the aurdino!
I am guessing the Firewall is on the ODBII port (as that is the common access), If you had the can wires in your hand I cant see a Firewall getting in the way - unless I have got the point wrong I guess!
@@SouthWestEVUKNot sure I follow, but here is some more info on the design I've done at an OEM, as far as I understand this is the common practise as well. the design is usally that you have a controlunit connected directly to the OBD2 port, notging else is connected. the other control units on propulsion CAN is connected to a separate CAN controller in said control unit. With Autosar configuration the only frames recognised are the ones in 1979. So the firewall is by SW design in Autosar.
@@SouthWestEVUK Wouldn't that be the left command? Here in the southern hemisphere it's recommended to drain a bathtub of water in the car first and check the direction the water spirals down the plug hole, a drain pipe to the outside of the car is of course likewise, recommended.
On Board Diagnostics Or the OBD II or two, refers to post 1996-'97 production American made where a data stream accompany access to the engine, transmission, body controller, and other mudules. Modern OBD II includes access to programmable parameters such as tire and wheel size.
Just wanted to say thanks for helping me to get my head around what CANBUS is all about. I watched videos of Damien Maguire driving forwards, backwards turning left and right etc collecting data but hadn't a clue what he was doing. THANK YOU! It really is not as complicated as I thought. Only issue with the CANBUS device you listed is they only sell them in kits of 10 so they cost over £200. I think I'll look into buying the CANBUS shield and suitable Arduino separately but thanks again for the best video I've ever seen on CANBUS.
Hay - It is worth contacting Hobbytronics - they used to sell 1's but moved warehouses and thats when they became kit only in 10's. Last time I spoke with them they did me 3 (as I blew one up, oops!) so worth a shout.
Would you know what would need to be changed in the code to run your sketch on a standard Arduino Uno with a CANBUS shield plugged in. I tried it as is but all I get is the following 20:50:05.824 -> Enter setting mode fail 20:50:05.824 -> Can Init Failed 20:50:05.824 -> I will wait here forever...I will wait here forever..I will etc. Thanks
OK I have it working in my Mercedes C220 and here is how I bought a genuine Arduino Uno but any clone should work I bought a CANBUS Shield V1.2 cheap off ebay. I connected the CAN high and CAN low on the shield to a pair of CAN signal wires in the boot of the car. I changed your code to CS10 from CS17 (For the Shield I'm using) and Speed 125Kbs from 500Kbs I used the "CAN_BUS_Shield-master" library from Seeed studio I had several issues before due to not understanding Arduino. I had multiple libraries in the folder causing conflicts and I wasn't using the correct baud rate for my car. Thanks again and good luck with the project.
Great tutorial! the tricky bit of is to make sense to all collected data and see what is what.... Just a clarification regarding CAN, every device will send data to the bus this is correct, but also this device will expect to see an acknowledge bit at the end of the transmission otherwise it will re-transmit the data again, and an error frame (normally form error) will be published on the bus that can cause issues. So every single device on the bus has to acknowledge all packages sent by the others or send an error in case the message format/bit/timing is wrong.
Yeah, you are right. Data does not have a recipient, It is just broadcast - and if you want what is being said then good - if not, move on! That I guess is more why I like to call it the shouty protocol, even ack's are sent by everything on the bus - shout your command and everyone shout back OK!
Yes, it's a busy fast protocol. If it has "noise" normally caused by EFI on the 2 wire bus, then that's a shielding problem. Maybe the terms in the UK are differant than NA. Can be confusing to some.
Great Video, thank you for sharing, I am working with a Mustang and im hoping to get an motor to run at a certain speed and run the other way at a lower speed. This could be some of the answers to get started with this process.
Hi Dave or anybody that may be able to help Again... Thanks Dave for pointing toward the libraries not be include or something missing or a name change etc... and that does appear to be what it is. I have rephrased this question back on the root of the comments instead of buried in the replies for perhaps better visibility. So I had mentioned that sure enough there is a .cpp file missing etc. So I went back tried following very slowly the steps again and I think I found a big clue! When Dave says click on the Library Manager, type in 'canbus' and pick the one at the top ... It shows to be picking 'CAN-BUS SHIELD' and it is described as 'Arduino library to control CAN-BUS Shield'. Now in 2022 (Im guessing perhaps things have changed) When I search for 'canbus' the pick at the top is 'CAN_BUS_SHIELD' and it is described as 'Seeed Arduino library to control CAN BUS and CAN BUS FD.' Anybody have any guidance on how I can resolve this? I would like to have the same library that Dave used but I dont see it in the list or under several other searches. Maybe Seeed is the replacement but its missing stuff. Thanks, Dan...
Brilliant video, could listen to you all day! Different speeds at the wheels - different rotational speed as the car is unlikely to be traveling in a straight line? And the outer wheel has to travel further?
Good work. Each wheel is a different diameter due to its physical shape, tire pressure and loading, hence different rpm for each wheel at a constant speed. I would submit it's an rpm input for differential processing for brake control. Speed is a by product if you will.
Wow wow; thank you for the detailed info on how to read the CAN bus and insight into how to work with the sniffed info. BTW, it's _OBD2_ (On-board Diagnostics 2), not "ODB2". Also, _kilometre_ is pronounced like "nanometre", not like "thermometer", because it's a unit of measurement and not a measuring device.
11:34 ... The answer: That wheel speed difference happens when the car makes a turn, the inside tyre has to travel a shorter distance than the outside tyre.
traction conditions, air presure, bumps on the road, all are different on every wheel when driving plus steering, all that causes different speed on every wheel
How many CANs does the Mazda Rx8 have? Most modern cars have several CANs (Drive, Body, etc.) which are linked by a Gateway-ECU. The gateway also separates the Diagnostic-CAN from these CAN busses. So generally the OBDII Port lets you only access diagnostic messages (eg UDS) on the diagnostic CAN without having access to the full CAN Network.
Hi, The RX8 has two Can Buses - a High Speed and a Low Speed, your right in that I believe the OBDII port only gives access to the High Speed bus, youd need to reference the wiring diagram for the car to see where the physical wires are for the other Bus if you want to access it. The Nissan Leaf has several Buses also.
Thank you for the video. Any information on how can I use the data realtime. For example if I want to take the data do some post-process and display it. Thanks in advance
You can output to a standard output - so if using a PC to compile the code you can output in real time to the console - same on the web interface (arduino.cc).
Hey Dave, I have watched your videos multiple times and want to thank you for the hard work you have done!!! While watching the videos I didn't see the point where you actually send info to the tachometer. I'm working on an rx8 engine swap and need to send signals from my aftermarket ECU to the stock tachometer like rpm, coolant temperature, speed, oil pressure, etc. My aftermarket ECU provides all this info, how do I tell Arduino to communicate my external ecu's data to the stock cluster. Thank you in advance
So you will need to bridge the canbus output of your ECU with the canbus input of the cluster. With code in the middle to translate what the new ECU is sending into what the cluster wants.
You might wanna think about changing your title from "any car" to "any OBD-II car". Clicked here looking for some OBD-I help. Aside from that great video.
Hmm, I am not totally sure, but as the latest version is over 3 years old and I wrote this within that timeframe - I would expect the latest version (1.5?)
Hello, I have a rare electric car from China, a SUDA SA01, where I have problems with the tire pressure sensor. I would like to see what is being said on the OBD2 connector via the CAN bus. Question: Is the speed of the CAN bus crucial as to whether you can read something? This is what the tire pressure sensors and the receiving device look like, which then transmits the data via CAN bus, 4 x temperature and 4 x tire pressure. The tire pressure sensors: 3636200XSA01BA HW29112-SD01 C-Code:116AT 195200 ID:FDFED14F And on the receiving device that then outputs the data via the CAN bus: AA2012116ATKCV3226 3636100XSA01BA C-Code:116AT DATE:195200 Do you have any idea what “C-Code:116AT” and “DATE:195200” mean?
Cool vid, thx, but, I'm still unclear about usefullness of this. Once I get the ID of something, say 1234, like accelerater pedal, what can I do with that data? How to program other peripherals to interact with it? Say I want a Hand throttle for a boat to be in my car instead of foot pedal. How to map that device to the foot pedal? Do I have to program the peripheral to mimick that? And then where is that code saved? in the Hand Throttle device? or some itermediary box?
You would have to do two things with your throttle example. 1) stop the original throttle working and 2) make your new hand throttle output the right commands. the throttle itself is unlikely to be programmable, you would need something like an Arduino that you can program with inputs and outputs to the desired results.
you should use can-pi you can do a lot more in can-bus network, you can ignore reapeated pacets and just show only new codes appearing, candump cansniff, way better mate ;) nice video anyway
Thanks mate, excellent video. Just trying to program an Aventador cluster for my own EV project, so far I can just turn it on. I’ve ordered the Arduino you use and hope to use your code to get me started. Thanks again. Scott.
Hi, love the videos... got a big question... how do you charge your vehicle? Do you need a CANbus emulator to use the OEM leaf charging system? Or are you using a third party charger? Any help would be greatly appreciated 🙌
@@SouthWestEVUK great work- keep it going! And consider selling pre-programmed Arduinos and CAN shields??? Would massively help us lot I reckon. Then anyone could take a Leaf and use it as a Donor car for a classic EV build. 👍🏼
Thank you for your efforts But I have a question how can I control the inputs and outputs of the CANBUS I hope you will help me because I dream of learning these things and I do not know where I should start
Thank you for this nice video, I really enjoyed it. From where do you know which heder ID is for what? Do you have any source from where you know lets say the ID 1201 or ID 129? Thanks.
It is very much trial and error, piece by piece working out what each code does. Start by finding out what all the different ID's you have - log what their data is. Do something in the car (brake, throttle etc), and see which ones change. Its a long process but as you get your head into it and see the same codes over and over, you soon learn whats going on... Good luck!
I have a problem with the arduino code, in this line "if (CAN0.begin(CAN_500KBPS) == CAN_OK) {" because in the program says that CAN0 might be and int, please I need your help.
Excellent video, I'm looking to do something very similar with CANBUS myself because the Front ACC cruise control radar on my MK7 Golf appears to be malfunctioning and I want to find out why. I've got Various Arduino's and also a CANBUS interface which uses the same IC's as what your CAN Shield uses. Do you know which SPI pins on the Canbus interface units connect to which pins on the Arduino if not using that particular shield? Thanks!
Ohhh, theres a good question! I guess the reason I bought this board was the fact that it does away with any internal communication issues between the Arduino and CanBus - they are hardwired.
I have two help requests related to your CAN Bus hack: 1) You mention needing the ECU codes for my make of car in order to understand the decoded data. Where would I find these? I searched every on the net and can't find a reference list anywhere for a 2014 Nissan JUKE TEKNA CVT, Petrol 5 DOOR HATCHBACK? How would we adjust your code to support other cars? 2) I DON'T want to send any data packets or messages to the CAN Bus. I don't want to affect the car's operation in any way, I only want to read the data, safely. Does your solution support that. How can I ensure my solution only reads data and doesn't send data to the CAN Bus? Thanks in advance.
You will not find your can codes on the internet, you have to discover them yourself. Not sending and only receiving depends on the code you write - its pretty straight forward to not send anything and just listen.
Hi, Thanks for this video.. I am looking to make something similar but to show to a small lcd some of my sensors. I have a bmw diesel m57 and I would like to read acc pedal position, boost temp, boost pressure.. and so on.. how can identity all CAN codes for some of the sensors that I need? is there a list of all BMW diesel can bus codes that represent each sensor? Thanks.
Does this work on Mercedes as well? I have seen ads for interfaces that say they work on all cars except Mercedes. What is special about their messaging?
Awesome! Finally I can hack my car 😂 so is that little arduino just an uno or something with a ftdi chip for serial comms? Like I could potentially just build one and hack up my old kcan adapter for it's connector?
amazing video. thank you for sharing your knowledge! I would like to create my application so i can personalise the way it show the data to me. How is it possible to read bluetooth data from a device and also i would like to make a version for computer. So i would like to read data with usb to TTL , serial communicaton.
Problem with that is you would need to replicate every sensors output, which would mean recording all the sensors on a working car to figure out if they are voltage based, resistance based, communications based - bit of a headache! Yes you could replicate them all, but just not worth it.
Dave: This is great. We are working on an EV conversion project with a Porsche 996 C4S. We plan to circumvent the DME (ECU) exactly like you did with the Rx-8. Would love some insights/learnings. Is it possible to connect with you directly on specifics - Cheers!
So I accessed the high speed can in the RX8, and those signals are not on it. I believe there is a low speed can also that has this information on it, and the ability to adjust the radio message display etc...
So if you wanted to play around with the cam bus protocols could you just buy a scraped ECU, hook it up to a 12V battery, wire up an OBD-1 connector, and plug it into the Arduino?
It depends on the vehicle, for instance the RX8 sends fuel information as a resistive value (not canbus). The odometer is likely stored by the dashboard in most cars, again you might be able to query it - but unlikely to be able to change it.
H Dave, what is the purpose of reading my Can Bus? I take it the Diagnostic tool I have decodes it for me and enable me to read "Live Data" of countless sensors. What else can it do?
Yes, there are some standards that your tool will be picking up and you are reading. For me, in this project I have replaced the ECU - so send data such as car speed and rpm to the display over the canbus.
Great video opening the covers of what's otherwise a rather closed subject. As a small improvement you could create a lookup table In Excel and translate the codes I to something more readable, e.g. wheel speed rather than a code
Have been working on some CAN bus shield development - particularly with the ESP32 for wireless CAN bus debugging. Was also planning on looking to develop some software to improve the analysis of CAN signals for hacking purposes. Did you come across anything similar?
Hi is it possible to clear fault codes? If so how? I think it's fantastic what your doing and I'm going to do an interesting project later this year with can bus I'll let you know how it goes if your interested
So I can clear the fault codes in terms of them not lighting up a dashboard light. But I cannot clear codes on the ECU - well ive not tried to be honest as I dont need to.
Its not really an adapter, it depends on so many things - is the stereo on the can? is the g4x? are those cans linked together? Are they designed to work together?
how can i isolated like: rpm, speed, gas level etc ? btw i really like ur stuff and the fact you help people thanks let say i want to build an arduino tachymeter with all these value and maybe also to diagnose in the same screen would be helpful
If the car you are using sends this information out on the canbus then Yes. Take the RX8 - RPM, SPEED are on the canbus, however the gas level is not - that is a resistive value.
@@SouthWestEVUK When I click the check mark on the top left menu bar or the check on the sketch of Arduino IDE. Wish I could attach a screen shot. ^~~~~~~ uint Compilation error: no matching function for call to 'loop()::MCP_CAN::MCP_CAN(int)' void setup() { // put your setup code here, to run once: } void loop() { // put your main code here, to run repeatedly: #include #include #include #define CANint 2 #define LED2 8 #define LED3 7 unsigned char len = 0; unsigned char buf[8]; unsigned long ID = 0; unsigned long line = 0; MCP_CAN CAN0(17); // Set CS to pin 17 unsigned long time; void setup() { Serial.begin(115200);
while (!Serial) { Serial.print("I will wait here forever..."); delay(1000); };
And if I remove the 1st 10 or so setup lines and compile, I get this error...... Compilation error: 'MCP_CAN' does not name a type; did you mean 'DST_CAN'?
HEllo Dave, I am about to have a try if my c-zero can run the heating while charging - as factory setting it cannot. My question: if I figure out the ID and bits, can I use the same arduino to design a code? I understand that it is just highs and lows, but do I have in the library the info on how many milliseconds one high needs to be and how long intervals need to be between two signals?
Hi, so not sure what you mean by highs and lows, but you don't need to go that deep. The can library will handle all hand shaking, CRC, bits and conflicts. You just send the data you want and it will (most of the time) get to where it needs to go. Most CanBus's I have seen like to have repeats of the data, so for instance might want the RPM sent once every 50ms. Hope that helps.
I'm an automotive electrician/electronic tech, i am familiar with can, and other protocols my question is first this interests me alot where should i start to learn this stuff heads up i am not familiar with arduino, yet i can clone pcms/ iclusters do immo off etc but this part is exciting can you please lead me in right direction if not to make money maybe to solve a tough one and make customer happy. thanks in advance
@@SouthWestEVUK the entire process I have no education on Arduino and how it works my question is where do I start accomplish what you're able to do it's impressive and it seems useful for my shop
Guess I started some 30 years ago, and learnt to code! went to college and learnt electronics, uni for software engineering, 20 years taking stuff apart!
@@SouthWestEVUK So can you help me about how to sync with elevator canbus or properly setup a system for that using arduino. That would be very helpfull
I've now got the source building correctly and with the ODBII cable which I received today, pin outs checked and verified against SparkFun table. With the serial monitor I can see: 15:10:17.617 -> CAN init: 15:10:17.617 -> Can Init Success 15:10:17.617 -> Good to go! Do I need to do anything else, car ignition is on, tried various things like indicators, but I'm not seeing anything? Any suggestions?
After an email transaction with www.hobbytronics.co.uk, I got an email instructing me to solder the points on the back of the board for mid to right, for CANH, CANL and GND. However, having done this I still get no communication from the car.
Simon, we have been emailing back and forth, why have you messaged on here again? Stick to emails bud - you need to do a continuity test to verify what pins you need to use, I keep saying that - have you done it?
All the tires are on their own individual paths. When you do anything but go ABSOLUTELY straight (even then it's slightly different), plus the size of the front vs rears could also be different. When you steer more and more, all the tires follow their own arcs of various radii, so the speeds vary.
These are all very true points! Cheers
Thanks man, that topic is fascinating! You understand that we are riding computers on wheels! Complexity is just an accumulation of simple things! Thanks again for the introduction to can bus diagnosis can't wait for the 2nd video! See you soon! Cheers!
Cheers bud.
SO AWESOME! I've had a specific idea for months of an arduino project I want to implement in my new car which will need inputs and outputs to/from the CAN BUS network, and inputs/outputs to other electronics. This makes it way more achievable. You've probably saved me a good 8 hours of trying to figure out what it is I don't know in order to start this.
Im so glad I have helped, good luck with the project...
@Dave Lovell if you acheived anything in your project, could you please share it with us?
@@ezzaldeena.alribi8603 I haven't yet, but I'm planning on having it completed before the end of December 2021. I'll probably post some stuff on github and or instructables when I'm done, and I'll try to link it here. I might forget to put it here though so, comment on this thread if a few months go by and nothing happens
@@davelovell8631 Pinging you. :) I, too, find this stuff fascinating. Who knew learning Unix decades ago would find its way into cars and handhelds?
Hi, just a note, most modern cars from like 2-3 years have firewall to ensure only data readable with sae 1979 is available. This is to avoid hacker attacks. Great work on the aurdino!
I am guessing the Firewall is on the ODBII port (as that is the common access), If you had the can wires in your hand I cant see a Firewall getting in the way - unless I have got the point wrong I guess!
@@SouthWestEVUKNot sure I follow, but here is some more info on the design I've done at an OEM, as far as I understand this is the common practise as well. the design is usally that you have a controlunit connected directly to the OBD2 port, notging else is connected. the other control units on propulsion CAN is connected to a separate CAN controller in said control unit. With Autosar configuration the only frames recognised are the ones in 1979. So the firewall is by SW design in Autosar.
Error 999: Steering wheel on wrong side ...
If you send the right CanBus command, it will switch the wheel to the other side. That is how they make cars for both sides of the road ;o)
@@SouthWestEVUK Wouldn't that be the left command? Here in the southern hemisphere it's recommended to drain a bathtub of water in the car first and check the direction the water spirals down the plug hole, a drain pipe to the outside of the car is of course likewise, recommended.
I wonder how you’d reach the pedals if the steering wheel was on the other side ...
@@lawrencedoliveiro9104 under rated comment
..its actualy on right side... :p
On
Board
Diagnostics
Or the OBD II or two, refers to post 1996-'97 production American made where a data stream accompany access to the engine, transmission, body controller, and other mudules.
Modern OBD II includes access to programmable parameters such as tire and wheel size.
You are very right!
bah. is all emission bs
and some data for the dash board
He's got odb port though. Ol dirty bastard.
Just wanted to say thanks for helping me to get my head around what CANBUS is all about. I watched videos of Damien Maguire driving forwards, backwards turning left and right etc collecting data but hadn't a clue what he was doing.
THANK YOU! It really is not as complicated as I thought.
Only issue with the CANBUS device you listed is they only sell them in kits of 10 so they cost over £200. I think I'll look into buying the CANBUS shield and suitable Arduino separately but thanks again for the best video I've ever seen on CANBUS.
Hay - It is worth contacting Hobbytronics - they used to sell 1's but moved warehouses and thats when they became kit only in 10's. Last time I spoke with them they did me 3 (as I blew one up, oops!) so worth a shout.
@@SouthWestEVUK LOL, I already ordered a separate Arduino Uno and CANBUS shield as soon as I finished watching your video.
Would you know what would need to be changed in the code to run your sketch on a standard Arduino Uno with a CANBUS shield plugged in.
I tried it as is but all I get is the following
20:50:05.824 -> Enter setting mode fail
20:50:05.824 -> Can Init Failed
20:50:05.824 -> I will wait here forever...I will wait here forever..I will etc.
Thanks
OK I have it working in my Mercedes C220 and here is how
I bought a genuine Arduino Uno but any clone should work
I bought a CANBUS Shield V1.2 cheap off ebay.
I connected the CAN high and CAN low on the shield to a pair of CAN signal wires in the boot of the car.
I changed your code to CS10 from CS17 (For the Shield I'm using) and Speed 125Kbs from 500Kbs
I used the "CAN_BUS_Shield-master" library from Seeed studio
I had several issues before due to not understanding Arduino. I had multiple libraries in the folder causing conflicts and I wasn't using the correct baud rate for my car.
Thanks again and good luck with the project.
Great tutorial! the tricky bit of is to make sense to all collected data and see what is what....
Just a clarification regarding CAN, every device will send data to the bus this is correct, but also this device will expect to see an acknowledge bit at the end of the transmission otherwise it will re-transmit the data again, and an error frame (normally form error) will be published on the bus that can cause issues. So every single device on the bus has to acknowledge all packages sent by the others or send an error in case the message format/bit/timing is wrong.
Yeah, you are right. Data does not have a recipient, It is just broadcast - and if you want what is being said then good - if not, move on! That I guess is more why I like to call it the shouty protocol, even ack's are sent by everything on the bus - shout your command and everyone shout back OK!
Never found our that was a db9 connection and couldn’t figure out how to connect it to can bus! Thanks for the video!
Glad I could help!
Yes, it's a busy fast protocol. If it has "noise" normally caused by EFI on the 2 wire bus, then that's a shielding problem. Maybe the terms in the UK are differant than NA. Can be confusing to some.
Yeah I mean noise as in lots of chatter - rather than electrical interference noise ;o) It is all meant to be there.
Great Video, thank you for sharing, I am working with a Mustang and im hoping to get an motor to run at a certain speed and run the other way at a lower speed. This could be some of the answers to get started with this process.
Glad to be of help
This looks like it could be the beginning of a fun and interesting project!
Never ending project lol!
Hi Dave or anybody that may be able to help Again... Thanks Dave for pointing toward the libraries not be include or something missing or a name change etc... and that does appear to be what it is. I have rephrased this question back on the root of the comments instead of buried in the replies for perhaps better visibility.
So I had mentioned that sure enough there is a .cpp file missing etc. So I went back tried following very slowly the steps again and I think I found a big clue! When Dave says click on the Library Manager, type in 'canbus' and pick the one at the top ... It shows to be picking 'CAN-BUS SHIELD' and it is described as 'Arduino library to control CAN-BUS Shield'. Now in 2022 (Im guessing perhaps things have changed) When I search for 'canbus' the pick at the top is 'CAN_BUS_SHIELD' and it is described as 'Seeed Arduino library to control CAN BUS and CAN BUS FD.'
Anybody have any guidance on how I can resolve this? I would like to have the same library that Dave used but I dont see it in the list or under several other searches. Maybe Seeed is the replacement but its missing stuff.
Thanks, Dan...
email me - pretty certain I have the original library here that I can send.
Brilliant video, could listen to you all day!
Different speeds at the wheels - different rotational speed as the car is unlikely to be traveling in a straight line? And the outer wheel has to travel further?
Good shout James, not thought about that!!! Love you too! x
Good work. Each wheel is a different diameter due to its physical shape, tire pressure and loading, hence different rpm for each wheel at a constant speed. I would submit it's an rpm input for differential processing for brake control. Speed is a by product if you will.
Yes all good and valid points.
Wow wow; thank you for the detailed info on how to read the CAN bus and insight into how to work with the sniffed info. BTW, it's _OBD2_ (On-board Diagnostics 2), not "ODB2". Also, _kilometre_ is pronounced like "nanometre", not like "thermometer", because it's a unit of measurement and not a measuring device.
yeah too much database development means I get odb and obd round the wrong way, and errrr, thats just the way I talk ;o)
Best description i have heard yet ! Thank you.
Wow, thank you!
Thanks for this video. It looks pretty straightforward, except when it doesn't. 😎
Yeah, and of course I only video stuff that works ;o)
11:34 ... The answer: That wheel speed difference happens when the car makes a turn, the inside tyre has to travel a shorter distance than the outside tyre.
Yeah, this is very true,
@@SouthWestEVUK Another Answer: Tire pressure and temperature will change the diameter of the tires also.
traction conditions, air presure, bumps on the road, all are different on every wheel when driving plus steering, all that causes different speed on every wheel
Yes all very true ;o)
very pragmatic info, thanks for that
Glad it was helpful!
Fantastic information! Thank you for taking the time to make the video
Glad it was helpful!
Great video, best I've seen so far!
Wow, thanks!
dude ive been trying to make an ecu. bro. thank you. this bit was soooo useful!!!
Not a problem, good luck with the project.
How many CANs does the Mazda Rx8 have? Most modern cars have several CANs (Drive, Body, etc.) which are linked by a Gateway-ECU. The gateway also separates the Diagnostic-CAN from these CAN busses. So generally the OBDII Port lets you only access diagnostic messages (eg UDS) on the diagnostic CAN without having access to the full CAN Network.
Hi, The RX8 has two Can Buses - a High Speed and a Low Speed, your right in that I believe the OBDII port only gives access to the High Speed bus, youd need to reference the wiring diagram for the car to see where the physical wires are for the other Bus if you want to access it. The Nissan Leaf has several Buses also.
Any car, really!
I defy you to find one of those on my 1974 Peugeot 104! :D :D :D
ahhhhh, true.
Thank you for the video. Any information on how can I use the data realtime. For example if I want to take the data do some post-process and display it.
Thanks in advance
You can output to a standard output - so if using a PC to compile the code you can output in real time to the console - same on the web interface (arduino.cc).
Hey Dave, I have watched your videos multiple times and want to thank you for the hard work you have done!!! While watching the videos I didn't see the point where you actually send info to the tachometer. I'm working on an rx8 engine swap and need to send signals from my aftermarket ECU to the stock tachometer like rpm, coolant temperature, speed, oil pressure, etc. My aftermarket ECU provides all this info, how do I tell Arduino to communicate my external ecu's data to the stock cluster. Thank you in advance
So you will need to bridge the canbus output of your ECU with the canbus input of the cluster. With code in the middle to translate what the new ECU is sending into what the cluster wants.
This looks great, but I'm having a problem compiling the code. I get this message...
"no matching function for call to 'MCP_CAN::begin(int)"
yeah looks like the library got updated - email me and ill send the old version.
Very informative. Smart little canbus arduino card.
Yeah it is, I think I am addicted - I have 14 of them here hahaha
Great. Absolutely helpful.
Glad it helped
Thank you Dave, very clear explanation. It helps a lot.
Glad it helped bud
There has to be an open source "client Software", that can filter and visualize the data from the Arduino on the fly.
I think there are a few things knocking about, but I do like doing things my way ;o)
The wheel speeds may not be the same because you were doing a turn, you may confirm it with the steering wheel angle
Yeah, I actually averaged them out, gets close enough for my means
You might wanna think about changing your title from "any car" to "any OBD-II car". Clicked here looking for some OBD-I help. Aside from that great video.
True true, got a little excited ;o)
Its got that old dirty bastard can bus interface, lol! Great video. Thank you sir!
No worries, cheers
Great video! Nicely explained.
Glad I could be of help.
RIP IN PEACE ODB
heh!
i watch the whole video. have no ideal whats going on.
i have car with obd. use paperclip to jump something and count blinking lights.
Thanks man, that topic is really important!Can we know which version of mcp library did you use ?
Hmm, I am not totally sure, but as the latest version is over 3 years old and I wrote this within that timeframe - I would expect the latest version (1.5?)
Good stuff and great explanation. thanks for sharing
Glad you liked it!
super overview, thank you so much mate
not a problem, hope it helps!
You pronounced "Arduino" like that just to increase engagement, didn't you? I guess it worked.
Hay you have to stand out somehow haha
@@SouthWestEVUK "Ard wee know" czcams.com/video/0qWtBIzaTi4/video.html
Thx for a great tutorial.
Hello,
I have a rare electric car from China, a SUDA SA01, where I have problems with the tire pressure sensor.
I would like to see what is being said on the OBD2 connector via the CAN bus.
Question: Is the speed of the CAN bus crucial as to whether you can read something?
This is what the tire pressure sensors and the receiving device look like, which then transmits the data via CAN bus, 4 x temperature and 4 x tire pressure.
The tire pressure sensors:
3636200XSA01BA
HW29112-SD01
C-Code:116AT
195200
ID:FDFED14F
And on the receiving device that then outputs the data via the CAN bus:
AA2012116ATKCV3226
3636100XSA01BA
C-Code:116AT
DATE:195200
Do you have any idea what “C-Code:116AT” and “DATE:195200” mean?
No idea - and yes the speed of the CAN is crucial...
Really helpful info. Liked & Subscribed!
Cheers bud!
Greetings! Do you do consultations? Your time is valuable and I’m trying to get information on the blind spot detection system.
Gonna be tough, but do-able!
Thanks. BTW - I prefer the term "BUSY" rather than "NOISY". In electrical terms noisy implies junk or meaningless information.
Yeah true, fully agree!
Excellent video. Thanks!
Cooll ta.
Cool vid, thx, but, I'm still unclear about usefullness of this. Once I get the ID of something, say 1234, like accelerater pedal, what can I do with that data? How to program other peripherals to interact with it? Say I want a Hand throttle for a boat to be in my car instead of foot pedal. How to map that device to the foot pedal? Do I have to program the peripheral to mimick that? And then where is that code saved? in the Hand Throttle device? or some itermediary box?
You would have to do two things with your throttle example. 1) stop the original throttle working and 2) make your new hand throttle output the right commands. the throttle itself is unlikely to be programmable, you would need something like an Arduino that you can program with inputs and outputs to the desired results.
you should use can-pi you can do a lot more in can-bus network, you can ignore reapeated pacets and just show only new codes appearing, candump cansniff, way better mate ;) nice video anyway
Cheers, there are quite a few solutions now - I am a bit old school and like to process things myself, excel is pretty good at filtering out noise!
Thanks mate, excellent video. Just trying to program an Aventador cluster for my own EV project, so far I can just turn it on. I’ve ordered the Arduino you use and hope to use your code to get me started. Thanks again. Scott.
Cool glad it helped, good luck - canbus can suck a lot of time out of you!
What's the type of wire end that you hve plugged into the left upper (farther from camera) part of the board shown at 2:45?
it is a usb cable?
Thank you very much needed this
Glad it helped
Hi, love the videos... got a big question... how do you charge your vehicle? Do you need a CANbus emulator to use the OEM leaf charging system? Or are you using a third party charger? Any help would be greatly appreciated 🙌
Currently i am sending the charger the right commands to start it charging. Not fully tested but wont be long before i have that nailed
@@SouthWestEVUK great work- keep it going! And consider selling pre-programmed Arduinos and CAN shields??? Would massively help us lot I reckon. Then anyone could take a Leaf and use it as a Donor car for a classic EV build. 👍🏼
Thank you for your efforts
But I have a question how can I control the inputs and outputs of the CANBUS
I hope you will help me because I dream of learning these things and I do not know where I should start
You need a canbus aware device - such as the ones in my video and that I link too.
Thank you for this nice video, I really enjoyed it.
From where do you know which heder ID is for what? Do you have any source from where you know lets say the ID 1201 or ID 129?
Thanks.
It is very much trial and error, piece by piece working out what each code does. Start by finding out what all the different ID's you have - log what their data is. Do something in the car (brake, throttle etc), and see which ones change. Its a long process but as you get your head into it and see the same codes over and over, you soon learn whats going on... Good luck!
How do you find ignition timing and the fuel injector pulse width and injection timing, crank and cam sensor ect?
I have not needed to look for those as I never had a working engine!
I have a problem with the arduino code, in this line "if (CAN0.begin(CAN_500KBPS) == CAN_OK) {" because in the program says that CAN0 might be and int, please I need your help.
Hi ping me an email and Ill see what I can do
Dave
Now if I only knew what any of this meant.....? I'm sure this is genius but it's lost over my head.
As you don't know what it is, then ill take full credit for it being the cure to all humanities problems ;o) (Honest)
Excellent video, I'm looking to do something very similar with CANBUS myself because the Front ACC cruise control radar on my MK7 Golf appears to be malfunctioning and I want to find out why. I've got Various Arduino's and also a CANBUS interface which uses the same IC's as what your CAN Shield uses. Do you know which SPI pins on the Canbus interface units connect to which pins on the Arduino if not using that particular shield? Thanks!
Ohhh, theres a good question! I guess the reason I bought this board was the fact that it does away with any internal communication issues between the Arduino and CanBus - they are hardwired.
I have two help requests related to your CAN Bus hack:
1) You mention needing the ECU codes for my make of car in order to understand the decoded data. Where would I find these? I searched every on the net and can't find a reference list anywhere for a 2014 Nissan JUKE TEKNA CVT, Petrol 5 DOOR HATCHBACK?
How would we adjust your code to support other cars?
2) I DON'T want to send any data packets or messages to the CAN Bus. I don't want to affect the car's operation in any way, I only want to read the data, safely. Does your solution support that. How can I ensure my solution only reads data and doesn't send data to the CAN Bus?
Thanks in advance.
You will not find your can codes on the internet, you have to discover them yourself. Not sending and only receiving depends on the code you write - its pretty straight forward to not send anything and just listen.
Hi, Thanks for this video.. I am looking to make something similar but to show to a small lcd some of my sensors. I have a bmw diesel m57 and I would like to read acc pedal position, boost temp, boost pressure.. and so on.. how can identity all CAN codes for some of the sensors that I need? is there a list of all BMW diesel can bus codes that represent each sensor? Thanks.
Hay - you might find someone has decoded them online - but the likely hood is that you are going to need to get stuck in and decode these yourself.
Great video! How do you know what each CAN ID corresponds to?
You don't, you have to work it out!
How would you read a can bus on an electric bike that doesn’t have a OBD port?
Controller, bike manager and bMS
You would have to find the can high and can low wires and tap into them.
Hi. What ever cable OBD to DB9 IS compatible, i mean does not matter the order of the pinout conversion or yes ?
errr I would suspect the pin out is pretty important.
What software application did you use, when you got the noisy codes?
Will advise on email ;o)
How to check my car baud rate and interface, it not respone any message :(
Probably best say what the car is?
Does this work on Mercedes as well? I have seen ads for interfaces that say they work on all cars except Mercedes. What is special about their messaging?
Dunno, should do, I have a merc van here that I am happily monitoring the canbus on
Awesome! Finally I can hack my car 😂 so is that little arduino just an uno or something with a ftdi chip for serial comms? Like I could potentially just build one and hack up my old kcan adapter for it's connector?
Take a look at my notes in the video (text) there is a link to buy this Arduino - comes with all the standard outputs and a canbus shield all in one.
amazing video. thank you for sharing your knowledge! I would like to create my application so i can personalise the way it show the data to me. How is it possible to read bluetooth data from a device and also i would like to make a version for computer. So i would like to read data with usb to TTL , serial communicaton.
Many many components to this, way too many for a You Tube comment! Good luck :o)
Nice explanation, to make things simple, is not better to trick the ecu that engine is running and leave the rest?
Problem with that is you would need to replicate every sensors output, which would mean recording all the sensors on a working car to figure out if they are voltage based, resistance based, communications based - bit of a headache! Yes you could replicate them all, but just not worth it.
@@SouthWestEVUK ok chess mate.👍
Hi sir. This can bus also do reduce mileage read and write..??
Depends on the car but in theory yes
Dave: This is great. We are working on an EV conversion project with a Porsche 996 C4S. We plan to circumvent the DME (ECU) exactly like you did with the Rx-8. Would love some insights/learnings. Is it possible to connect with you directly on specifics - Cheers!
Hay, ive got your email cheers.
Would you please tell me what are the PIDs codes for Turn Signal Right and Turn Signal Left.
Thank you very much
So I accessed the high speed can in the RX8, and those signals are not on it. I believe there is a low speed can also that has this information on it, and the ability to adjust the radio message display etc...
So if you wanted to play around with the cam bus protocols could you just buy a scraped ECU, hook it up to a 12V battery, wire up an OBD-1 connector, and plug it into the Arduino?
You could, but the ECU is going to send all manner of error messages out as the rest of the car is missing!
@@SouthWestEVUK time to get simulating then lol
@@SouthWestEVUK got any resources on how to solder the little bits you get in the mail? I was expecting it to be pre-assembled lol
Thank you. Would love to hear more from you on can hacking
Yeah I might do some more videos on it. I am working on a project decoding Merc's at the moment.
@@SouthWestEVUK there's someone on CZcams who did a video on a Merc using your video as starting point. Ali bro
Hi, great video, is it possible to read real time fuel level and odometer reading over CAN bus from a vehicle?
It depends on the vehicle, for instance the RX8 sends fuel information as a resistive value (not canbus). The odometer is likely stored by the dashboard in most cars, again you might be able to query it - but unlikely to be able to change it.
How can we access ecu flash mem to modify map data ..... Plz help
really depends on the system in question
H Dave, what is the purpose of reading my Can Bus? I take it the Diagnostic tool I have decodes it for me and enable me to read "Live Data" of countless sensors. What else can it do?
Yes, there are some standards that your tool will be picking up and you are reading. For me, in this project I have replaced the ECU - so send data such as car speed and rpm to the display over the canbus.
Great video opening the covers of what's otherwise a rather closed subject. As a small improvement you could create a lookup table In Excel and translate the codes I to something more readable, e.g. wheel speed rather than a code
yeah, or a small database to reference things properly.
Have been working on some CAN bus shield development - particularly with the ESP32 for wireless CAN bus debugging. Was also planning on looking to develop some software to improve the analysis of CAN signals for hacking purposes. Did you come across anything similar?
Ive not come across anything no, a wireless device that dumps the communications to a txt file on a local computer would be an awesome device.
Thanks, Can you remote control D, P, R with Arduino?
It depends on the car, but most need a physical movement to switch into Drive etc
@@SouthWestEVUK Thank you ~
Hello,
Can this assembly read J1939?
Hmmm, no I dont think so
Bonjour,
Ce montage permet il de lire du J1939 ?
D'avance merci pour votre retour.
Laurenr
Errr english?
Hi is it possible to clear fault codes? If so how?
I think it's fantastic what your doing and I'm going to do an interesting project later this year with can bus I'll let you know how it goes if your interested
So I can clear the fault codes in terms of them not lighting up a dashboard light. But I cannot clear codes on the ECU - well ive not tried to be honest as I dont need to.
Hello, what is connected in the laptop usb, isnt it supposed to be a simple usb wire to the arduino leonardo?
Yes just a standard usb cable.
Thank sir.. How did you calculate actual engine rpm value?
Ran the car at an RPM, looked at the canbus data - worked it out!
Great video very informative!
Glad to be of help!
Hi. I have link ecu g4x and i'm trying to find a way to connect it with my android car stereo. Is that adapter the correct for that work?
Its not really an adapter, it depends on so many things - is the stereo on the can? is the g4x? are those cans linked together? Are they designed to work together?
how can i isolated like: rpm, speed, gas level etc ?
btw i really like ur stuff and the fact you help people thanks let say i want to build an arduino tachymeter with all these value and maybe also to diagnose in the same screen would be helpful
i mean if im not wrong there more then 30ish stuff we can pull from ?
If the car you are using sends this information out on the canbus then Yes. Take the RX8 - RPM, SPEED are on the canbus, however the gas level is not - that is a resistive value.
I get this error at line 25 when I compile ???
Compilation error: 'long unsigned int time' redeclared as different kind of symbol
What you compiling bud?
@@SouthWestEVUK When I click the check mark on the top left menu bar or the check on the sketch of Arduino IDE. Wish I could attach a screen shot.
^~~~~~~
uint
Compilation error: no matching function for call to 'loop()::MCP_CAN::MCP_CAN(int)'
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
#include
#include
#include
#define CANint 2
#define LED2 8
#define LED3 7
unsigned char len = 0;
unsigned char buf[8];
unsigned long ID = 0;
unsigned long line = 0;
MCP_CAN CAN0(17); // Set CS to pin 17
unsigned long time;
void setup() {
Serial.begin(115200);
while (!Serial) {
Serial.print("I will wait here forever...");
delay(1000);
};
pinMode(23, OUTPUT);
digitalWrite(23, HIGH);
pinMode(LED2, OUTPUT);
pinMode(LED3, OUTPUT);
pinMode(CANint, INPUT);
digitalWrite(LED2, LOW);
Serial.println("CAN init:");
if (CAN0.begin(CAN_500KBPS) == CAN_OK) {
Serial.println("Can Init Success");
} else {
Serial.println("Can Init Failed");
while (1) {
Serial.print("I will wait here forever...");
delay(1000);
}
}
Serial.println("Good to go!");
}
void loop() {
time = millis();
if(CAN_MSGAVAIL == CAN0.checkReceive() && line < 10000) { // Check to see whether data is read
CAN0.readMsgBufID(&ID, &len, buf); // Read data
//Add this line back in if you want to filter traffic if(ID == 1201) { //39
line = line + 1;
Serial.print(ID,HEX); // Output HEX Header
Serial.print("\t");
for(int i = 0; i
And if I remove the 1st 10 or so setup lines and compile, I get this error...... Compilation error: 'MCP_CAN' does not name a type; did you mean 'DST_CAN'?
Does these codes the same for every vehicle and manufacturer ?
No sorry, all differ.
you can show hơ can take only rpm signal?
Sure, not a problem.
where can i get the sketch to run this
I can supply, or you can check out the links in the description...
How10AS immoblizer works. How to retrieve the program file?
Errrrr, I dunno!
thanks
Welcome
HEllo Dave, I am about to have a try if my c-zero can run the heating while charging - as factory setting it cannot. My question: if I figure out the ID and bits, can I use the same arduino to design a code? I understand that it is just highs and lows, but do I have in the library the info on how many milliseconds one high needs to be and how long intervals need to be between two signals?
Hi, so not sure what you mean by highs and lows, but you don't need to go that deep. The can library will handle all hand shaking, CRC, bits and conflicts. You just send the data you want and it will (most of the time) get to where it needs to go. Most CanBus's I have seen like to have repeats of the data, so for instance might want the RPM sent once every 50ms. Hope that helps.
You should use a can-bus adapter to interface with your arduino as the speeds will be too fast to just digitalRead the pins.
I'm an automotive electrician/electronic tech, i am familiar with can, and other protocols my question is first this interests me alot where should i start to learn this stuff heads up i am not familiar with arduino, yet i can clone pcms/ iclusters do immo off etc but this part is exciting can you please lead me in right direction if not to make money maybe to solve a tough one and make customer happy. thanks in advance
Hi - you have not really said what you are trying to do, other than learn this stuff? But what stuff?
@@SouthWestEVUK the entire process I have no education on Arduino and how it works my question is where do I start accomplish what you're able to do it's impressive and it seems useful for my shop
Guess I started some 30 years ago, and learnt to code! went to college and learnt electronics, uni for software engineering, 20 years taking stuff apart!
Can i read data in a Elevator system's MODbus or Canbus so that i can find out the floor number shown in the display using arduino? Please help
Gosh, I guess if the elevator has a canbus I do not see why not.
@@SouthWestEVUK So can you help me about how to sync with elevator canbus or properly setup a system for that using arduino. That would be very helpfull
sure!
How I know msg id for speed ?
Hi - check out some of my other videos, there is a excel in my github that gives you the codes for the wheel speeds.
I've now got the source building correctly and with the ODBII cable which I received today, pin outs checked and verified against SparkFun table. With the serial monitor I can see:
15:10:17.617 -> CAN init:
15:10:17.617 -> Can Init Success
15:10:17.617 -> Good to go!
Do I need to do anything else, car ignition is on, tried various things like indicators, but I'm not seeing anything? Any suggestions?
Hi Simon - probably best email me, help on the you tube messaging system is tricky!
After an email transaction with www.hobbytronics.co.uk, I got an email instructing me to solder the points on the back of the board for mid to right, for CANH, CANL and GND. However, having done this I still get no communication from the car.
Simon, we have been emailing back and forth, why have you messaged on here again? Stick to emails bud - you need to do a continuity test to verify what pins you need to use, I keep saying that - have you done it?