Steering angle/torque sensor tester - Page 1
Forum section: electronics / projects

author: omglol
author_rank: Regular Contributor
timestamp: January 30, 2019, 09:58:46 pm
content: Hello to all!I would like to build a test device for car steering angle/torque sensor. I'll start with a movie (not mine, of course), because it should make things much clearer to begin with.I would like to make a very similar device, but maybe Arduino based, since this way I can interface simple LCD very easy and fast. However, I have no problems (considerations) with this side (displaying results). I need advice on how to get accurate and reliable readings from the sensor itself. All those sensors work in very similar ways, here is a datasheet for the sensor I will be using:https://www.ttelectronics.com/TTElectronics/media/ProductFiles/Steering%20Sensors/Datasheets/SX-4472.pdfBasically, I need to apply to apply power (GND, VCC) to the sensor and read 5 different output voltages and calculate the values. I need 1 decimal point resolution (.1), with torque (relative angle) ranging from -8.0° to +8.0° and angle ranging from 0.0° to 360.0°. Here are my first questions:1) How do I know with what voltage should I supply the sensor? Maximum voltage is not specified in the datasheet, but increasing voltage should make easier to get accurate output readings?2) What kind of ADC should I get in terms of resolution and input voltage? 12-bit resolution should be OK? Using 5V ADC (a part of Arduino) is the simplest way, but what if I want to power sensor with voltages >5V and at the same time avoid using voltage dividers on output? How can I achieve that, is that even a good idea?3) Datasheet specifies how to filter output voltages just before they reach ADC. Is the manufacturers recommendation OK? Looking at the last page of the datasheet, why did they use 560K pulldown resistor for T1 output, but only 330K for output T2? Why the difference?This will be all for now, many thanks for your help!

author: omglol
author_rank: Regular Contributor
timestamp: January 31, 2019, 04:28:30 pm
content: Hmm ... nobody with a hint?

author: max_torque
author_rank: Super Contributor
timestamp: January 31, 2019, 07:54:19 pm
content: The sensor datasheet tells us each voltage divider has a resistance of 438 ohms (nominally). For a sensible power dissipation in each divider, you're going to want to keep the excitation voltage low. At 5v, each divider is going to consume around 11 mA and dissipate about 60 mW. If you supply the dividers with the same voltage you use as the ADC reference, then the entire system becomes ratiometric, so you don't need to worry about the stability / variance of your voltage reference.In their suggested schematic, the 10k resistor and 0.22uf capacitor provide a low pass filter, in this case, with a 3bd point at 70Hz, which would suggest you need to sample each channel at around 150 Hz to avoid aliasing.The higher the resolution of your adc, the higher the resolution of your system (for any given level of noise). Something like an arduino with a 10b adc, has 1024 steps, so each of those voltages can be decimated into 1024 descrete steps, so:1) for the position sensors, that have a FSD over 180 degrees, that a theoretical max resolution of 0.18 degrees2) for the torque sensors, that have a 10 degree range of 80% of FSD, that's a theoretical max resolution of 0.122 degrees

author: tatersalad
author_rank: Contributor
timestamp: January 31, 2019, 09:18:54 pm
content: ill bite, let me start with asking what the purpose is. are you making something out of it or are you trying to troubleshoot a car? what year make and model is the sensor off of? I have a fancy snap on scan tool and it gives me testing hookups so it might point out how to do it. I also have alldata and it is very good with wiring for cars so that might help as well.

author: omglol
author_rank: Regular Contributor
timestamp: January 31, 2019, 11:12:02 pm
content: Quote from: max_torque on January 31, 2019, 07:54:19 pmNice, thanks. I guess 5V should be fine? Could you tell me (roughly) what would I loose if I choose 3.3V Arduino board (Arduino Due) which has 12-bit resolution ADC? Better resolution ADC, but lower suppy voltage ... consequences?QuoteI don't really understand this one. Yes, LPF is clear to me, but why would I need sample each channel az 150Hz and what does this mean exactly? I was planning just to read a value from ADC and display in on LCD ... with a simple refresh rate of 3-4 frames per second?QuoteYeah, all clear here. I am just considering the most elegant, but accurate enough solution. Since I need to make daughterboard anyway (to put passive components of the low pass filter on it), does it also make sense to put more accurate (12/16-bit) ADCs on it, or do I go with 3.3V Arduino DUE which offers 12-bit ADC out of the box? What is your opinion? Thank you!

author: omglol
author_rank: Regular Contributor
timestamp: January 31, 2019, 11:15:12 pm
content: Quote from: tatersalad on January 31, 2019, 09:18:54 pmThe purpose is to make a tool for checking/calibrating these sensors before installing them. They need to be in a specific position before installing them. I do fix cars for a living, but this is also a nice challenge for me.

author: CJay
author_rank: Super Contributor
timestamp: February 01, 2019, 11:38:37 am
content: That's a really cute sensor, I like, an analogue quadrature encoder!I think the Arduino ADC could well be all you need for this project and if you're testing 'out of circuit' then you could even build a motorised test jig, drive the sensor to one angle, check the output is within a tolerance (I do not know what's acceptable) then drive it further, check again, repeat until you have enough data points to be happy that you've got a sensor that has no gross defects (broken track for instance) then do some dynamic tests, I.E. spin it back and forth while sampling.You need to sample fast enough for the ADC (and LPF) to settle and you need to sample a few times at each data point so you can average the measurements which eliminates noise, overshoot, spikes, etc. but I would also want to see the outputs on a 'scope because like any potentiometer, I suspect these could become noisy with wear and cause problems in the vehicle.

author: omglol
author_rank: Regular Contributor
timestamp: February 02, 2019, 12:03:26 am
content: Well, I will only be taking the measurements while the sensor is not moving, so I was thinking like taking 10 measurements and averaging them every 100ms. Do you think this is a good idea? I don't really understand I need to sample "fast enough" ... why the rush?Thanks.

author: omglol
author_rank: Regular Contributor
timestamp: February 02, 2019, 12:06:50 am
content: Quote from: CJay on February 01, 2019, 11:38:37 amI am not worried about old sensors, since they go straight in the bin when diagnostics show problem with them. I will be using this "tool" only with brand new sensors, which I need to put in position 0.0° before mounting them.

author: omglol
author_rank: Regular Contributor
timestamp: February 02, 2019, 12:18:32 am
content: Quote from: max_torque on January 31, 2019, 07:54:19 pmSorry, but is this correct, or should be 0.0122 degrees?

author: CJay
author_rank: Super Contributor
timestamp: February 02, 2019, 07:58:24 am
content: Quote from: omglol on February 02, 2019, 12:06:50 amThen all you need to do is measure the output of P3, set the sensor so it's half VP for position, for Torque make sure T1 and T2 are equal, you don't actually need to do any calculations to determine angle/torque.You could do it with a dual comparator and some LEDs but it sounds a fun learning project for an Arduino.Sampling rate for taking static measurements isn't that important as long as you've given the filter and ADC time to 'settle', ten measurements in 100mS isn't arduous

author: omglol
author_rank: Regular Contributor
timestamp: February 02, 2019, 08:08:15 am
content: Thanks! Yeah, I think I will just use suggested passive components to create filter, but nothing else otherwise ... I will just connect it to standard Arduino Mega. 10-bit resolution should be more than enough, since correct torque resolution in this case is 0.0122 degrees.