I am trying to find a definitive way of measuring steering angle of a car, The subject car is equipped with power steering and has adaptive cruise control so I believe it will have the ability to be manipulated via OBD-II port and capture real time steering angle capturing, Also I currently am in possession of an ESP32 microcontroller so I was thinking how can I first connect to the car's micro controller and read and filter data to find the steering angle?
I am aware of this being on of the hardest challenge and also am aware of it being the hardest to manipulate. I would love any guidance/help from the community as there is almost to no literature on the web for the same.
I moved your topic to an appropriate forum category @noorchauhan.
In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.
I bought an OBD reader, did poke around in a suggested library and code. I don't remember any steering parameter being read. At the tablet for now and all stuff mentioned sits iles away.....
see that is the issue, the web has almost to no points for the same, the hardware is not even a problem, if we tinker around we can find out how to manipulate the same. The documentation here in my country does not specify the customer these things
A long shot, a complete guess.... Suppose You can get the ABS wheel sensors values and calculate a steering angle out of the small difference in the valus?
In a curve the wheels rotate at slightly different speeds.
But I got a reader for when the "check engine" light comes-on. The codes are different for different cars so I have to assume all cars (or all manufacturers) use different codes for everything.
And I'm pretty sure that my 2004 Honda doesn't have a steering angle sensor...
Even with a self-driving car it doesn't seem essential. I don't know the steering angle when I drive... I just need to know when to turn and if I'm headed in the right direction and correct left or right, which way to turn, and if I've turned too-far or not far enough.
I asked a friend who loves messing with cars about this: he told me it's so the ABS can tell the difference between wheels turning at different speeds as a result steering or turning at different speeds because of skidding etc.
Reading the angle is likely not an issue. I have an Audi and I was able to read al sorts of data, even the brake pressure (in real time).
However I don't think it is possible to modify the parameters in real time and from the OBD-II port. We used to do a lot of testing with the Automotive OE's. They had devices to read and display in real time, however they needed to stop and enter some options then their connected device would "upload" the new variables. Things may have changed but likely its not possible.
We also had a gearhead working for us who was into "chipping" cars. He claimed he could change things like the function of the middle button on my key remote. But this required replacing the program chip in the ECU with a modified one.
Curious, what parameters are you considering changing on the fly?
I am trying to capture data [ corresponding steering angle with images] to feed into my Convolutional Neural Network and then I was guessing if I can send three types of commands to the steering i.e left, right or center [no change] to the steering motor of the car. This has almost to no literature on the web and I guess only community can help me here. It is a simple steering angle prediction project.
I'm going to guess the OE's have made it really really difficult to change the steering angle remotely. Their goal is to make this impossible due to safety issues.
Every part and every programmable function goes through a FMEA (failure modes and effects analysis). What you are attempting to do is definitely a failure mode for the "normal" driver.
So it turns out it is possible to calculate the steering angle of the car but to manipulate the steering wheel I need to find alternative method [ probably some external device ] to manipulate the steering according to the angle. I think so it is possible to manipulate the CAN bus and reverse engineer it to send control commands if it is electrically wired to do so. Thanks @JohnRob & @gilshultz for the safety guidance.
Any Ideas on manipulating the steering angle using a external motor? I am thinking about how can I possibly tell the motor to spin specific rotations so that the the steering angle is achieved desiarably, it is hard when thinking to power using external sources
It appears you want to build an electronic power steering unit. I have been involved with electronic power steering and know many of the pitfalls. There is also the huge liability factor. It took several years for a team to get the first prototypes to actually work. This will require basically a ground up design of the steering system and its components. For NDA (Non Disclosure Agreements) and liability reasons I am backing out of this project.