max9926 struggling with abs readings at low speeds - Page 1
Forum section: electronics / beginners

author: kaws
author_rank: Newbie
timestamp: November 19, 2024, 06:07:30 pm
content: Hello everyone!I have a little project that needs to read all 4 wheels speed of my 2001 GS Lexus in parallel with a factory ABS/VSC ECUCar has inductive type sensorsI've chosen a MAX9926 (x2) cause it has differential inputs, and it's popular in a very good wayCircuit is built in accordance to datasheets A2 op. mode reference.Reading MCU is Arduino RP2040 Connect. 3.3V logic is satisfied by COUTs being pulled to 3.3.IC's still have proper 5v supplyIt works, but there's a catch. A big oneCode:17:37:09.091 -> FL:1.00 FR:1.00 RL:1.00 RR:12.3317:37:09.604 -> FL:1.00 FR:1.00 RL:1.00 RR:12.5017:37:10.103 -> FL:1.00 FR:1.00 RL:1.00 RR:12.3217:37:10.606 -> FL:1.00 FR:1.00 RL:1.00 RR:12.0517:37:41.996 -> FL:1.00 FR:1.00 RL:1.00 RR:12.3917:37:42.531 -> FL:1.00 FR:1.00 RL:1.00 RR:13.59---17:39:36.374 -> FL:1.00 FR:1.00 RL:1.00 RR:34.7017:39:36.879 -> FL:1.00 FR:1.00 RL:1.00 RR:37.7617:39:37.358 -> FL:1.00 FR:1.00 RL:1.00 RR:40.7717:39:37.862 -> FL:1.00 FR:1.00 RL:4.29 RR:43.0417:39:38.367 -> FL:1.00 FR:1.00 RL:8.89 RR:44.5917:39:38.866 -> FL:1.00 FR:1.00 RL:46.48 RR:45.3817:39:39.366 -> FL:1.00 FR:1.00 RL:46.64 RR:46.4017:39:39.876 -> FL:1.00 FR:1.00 RL:46.53 RR:47.1717:39:40.379 -> FL:1.00 FR:1.00 RL:47.12 RR:47.60---17:42:23.754 -> FL:1.00 FR:1.00 RL:63.21 RR:63.2317:42:24.268 -> FL:1.00 FR:1.00 RL:65.46 RR:65.6617:42:24.767 -> FL:1.00 FR:1.00 RL:68.24 RR:67.5017:42:25.263 -> FL:68.73 FR:1.00 RL:70.95 RR:69.3517:42:25.764 -> FL:69.98 FR:1.00 RL:70.95 RR:70.9817:42:26.273 -> FL:72.38 FR:1.00 RL:72.28 RR:72.4817:42:26.754 -> FL:73.84 FR:1.00 RL:73.52 RR:74.05Minimum speed it reliably measures is very much not zero, and "threshold" is very different from wheel to wheel.Rear Right is pretty much acceptable and can be measured at >=10km/hThen, at around 45 Rear Left joins the partyLast to come alive is Front Left at astonishing 68km/hI think Front Right would also pop at higher speedIt all looks like sensor to sensor air gap difference, which is, i guess, normal for an old car,. But factory unit can easily read them all from, basically, zero km/h.Don't mind 1.0, it's just a minimum value for easier calculations, and a mechanism to avoid enormous coefficients. So 1.0 means 0.0 in this caseSo to the question...Anyone experienced anything similar?Is there a way to increase sensitivity of MAX? I was thinking about some audio pre-amplifier, cause we're talking about similar frequencies (2-2000hz) and voltage levels, but it feels very wrongFeels like there should be something easier. Maybe reducing 10k input resistors, or adjusting 1nf input cap?Any input is very much appreciated!Peace

author: MathWizard
author_rank: Super Contributor
timestamp: November 20, 2024, 01:51:05 pm
content: IDK about this stuff, but do you have anyway to measure the current or voltage from that sensor, besides the data that ends up in the MCU ? It would be nice to know what level is actually there, and that the part really still works.I'm assuming you can only test the wheel speed when driving the car. But are all those wires and connectors are sealed away when driving, can you probe any of it then, or have a DMM or battery powered scope setup to record the data while driving ?

author: HwAoRrDk
author_rank: Super Contributor
timestamp: November 20, 2024, 04:13:06 pm
content: An alternative method you might want to consider is investigating whether you can just capture the wheel speed data from CAN bus. It's likely that the ABS/VSC ECU is continuously outputting wheel speed data to the engine ECU and/or other things.It's not hard, just need to listen (that is, passively receive without ACK-ing the messages) on the CAN bus for the relevant message ID and decode its contents. If you're lucky it'll be something very simple like 4x 16-bit signed integer values packed into the 8-byte CAN message payload. Probably in meters/sec or km/h. Or maybe there might be multiple messages - calculated speed and also raw readings.

author: kaws
author_rank: Newbie
timestamp: November 20, 2024, 05:59:35 pm
content: Thanks a lot for your suggestions, @MathWizard, @HwAoRrDk!There is no CAN-bus in my car, and reading sensors directly is just quicker, which is importantAlso easier for MCU, cause there's stuff that needs to happen as quick as possibleAnyways, this morning I dug in, to see what the heck is going on there, cause people all over the web are claiming, that MAX9926 is extremely sensitive little guy, so there's no way I need any amplification.What I saw was 1.43V across front wheels sensors, and 1.05V across rears. Factory ECU is injecting current for constant open-circuit detection.Minuses of sensors are grounded, which is also suboptimal, as I see it.So we have constant DC on both outputs.First thing that comes to my mind in such cases- are DC-Blocking caps. 0.1uF (C1-C4 on schematic) were smacked right into the each input and voilaCode:18:09:06.672 -> FL:1.00 FR:1.98 RL:1.00 RR:1.0018:09:07.182 -> FL:2.40 FR:3.15 RL:1.00 RR:1.0018:09:07.689 -> FL:3.24 FR:4.20 RL:1.00 RR:1.0018:09:08.164 -> FL:4.07 FR:5.31 RL:1.00 RR:1.0018:09:08.669 -> FL:4.94 FR:6.26 RL:1.00 RR:1.00---18:16:05.156 -> FL:61.34 FR:61.27 RL:60.05 RR:61.4918:16:05.678 -> FL:61.54 FR:61.49 RL:62.44 RR:61.4418:16:06.146 -> FL:61.71 FR:61.64 RL:60.17 RR:61.6918:16:06.650 -> FL:61.94 FR:61.89 RL:62.92 RR:61.8618:16:07.162 -> FL:62.09 FR:61.99 RL:63.57 RR:62.0618:16:07.659 -> FL:62.29 FR:62.24 RL:63.57 RR:62.2918:16:08.179 -> FL:62.64 FR:62.56 RL:63.26 RR:62.74Only front wheels got "upgraded" for a test, so never mind rears still sleepingI am more then happy with the result, so case is closedThough, not sure if that's a good way to deal with the problem, so I am definitely open for a better solution

author: HwAoRrDk
author_rank: Super Contributor
timestamp: November 20, 2024, 07:51:24 pm
content: Quote from: kaws on November 20, 2024, 05:59:35 pmAh, shame. From a quick search, looks like might be a Denso unit, and split into ABS/DSC ECU and separate ABS actuator units, so not quite as advanced as the Bosch units of similar era. Seems the ABS/VSC ECU still has some kind of diagnostic 'data link' connection though, but who knows what protocol that uses to communicate.As for "quick as possible", don't underestimate how fast things happen on CAN bus.If it were a CAN unit, it would likely be broadcasting messages on the bus every 10-20ms or thereabouts, so unless you need single-digit millisecond reaction time then CAN messaging is perfectly speedy enough.

author: kaws
author_rank: Newbie
timestamp: November 20, 2024, 09:33:09 pm
content: Quote from: HwAoRrDk on November 20, 2024, 07:51:24 pmYesQuote from: HwAoRrDk on November 20, 2024, 07:51:24 pmYesQuote from: HwAoRrDk on November 20, 2024, 07:51:24 pmAnd yesOk, maybe not single digit, but around 10. Another issue would be slightly "dated" values, cause it definitely takes non-negligible time for ABS unit to measure, encode and send data to a bus. While direct read-out would always provide most accurate data. Anyway, in this particular case it's a bit of a useless polemicsMy ECU, I believe, uses regular K-Line for diagnostics, and yeah, it's not that dumb. It can provide a pretty good bunch of data (including all 4 wheel speeds, that's how I knew it can read low speeds perfectly fine)But getting custom setup to fetch needed values would be a lot of hustle. Addressing is proprietary, and finding a way is not a 5 minutes google jobMostly because K-Line reading itself is nowhere near as common as CAN-busAnd till now I was only talking about perfect theory world, where in practice- every time you connect diagnostics to ABS/VSC ECU- it resets YAW Sensor calibration data and throws a pretty MIL lightIt would not function right, till you recalibrate it via paperclip stuck into yet another diag port under the hoodFun, right?

author: kaws
author_rank: Newbie
timestamp: November 20, 2024, 11:15:38 pm
content: Excuse the off-top, but I just want to correct myselfThere was somehow very different definition of "polemics" in my head, and I definitely misused itI saw nothing aggressive in our extremely friendly discussion

author: kaws
author_rank: Newbie
timestamp: November 24, 2024, 10:44:31 pm
content: A little stress-test report to finish things up:Code:23:09:08.419 -> FL:243.44 FR:243.82 RL:244.15 RR:244.6023:09:10.421 -> FL:245.77 FR:244.98 RL:250.15 RR:248.1423:09:12.422 -> FL:247.34 FR:246.95 RL:249.34 RR:249.7523:09:14.418 -> FL:248.94 FR:248.94 RL:248.54 RR:250.5623:09:16.420 -> FL:250.97 FR:250.97 RL:251.18 RR:252.2023:09:18.422 -> FL:252.20 FR:251.79 RL:248.54 RR:254.7023:09:20.421 -> FL:254.28 FR:253.45 RL:255.55 RR:256.8323:09:22.419 -> FL:253.45 FR:253.03 RL:254.29 RR:255.9723:09:24.420 -> FL:253.86 FR:253.45 RL:254.28 RR:256.8323:09:26.422 -> FL:253.45 FR:253.86 RL:255.25 RR:256.4023:09:28.423 -> FL:253.86 FR:253.45 RL:255.22 RR:256.8323:09:30.420 -> FL:243.82 FR:243.44 RL:244.14 RR:243.4423:09:32.421 -> FL:233.48 FR:233.48 RL:233.95 RR:233.4823:09:34.419 -> FL:223.00 FR:222.68 RL:223.48 RR:223.0021:09:36.420 -> FL:212.25 FR:212.25 RL:213.13 RR:211.9621:09:38.429 -> FL:204.91 FR:204.37 RL:205.68 RR:205.19Factory ECU readings were not affected, so I think that's a perfectly usable setupPeace