BlueWave Studio forum
Steering Wheel Controls functionality is intermittent - Printable Version

+- BlueWave Studio forum (https://bluewavestudio.io/community)
+-- Forum: OpenAuto Pro (https://bluewavestudio.io/community/forum-86.html)
+--- Forum: General (https://bluewavestudio.io/community/forum-81.html)
+--- Thread: Steering Wheel Controls functionality is intermittent (/thread-3065.html)



Steering Wheel Controls functionality is intermittent - JasonW - 11-28-2021

I've been having struggling to get the steering wheel controls to work consistently.  The issue is the signal from the resistor ladder is too sensitive to voltage change causing the functionality of the steering wheel controls to be intermittent.  For example I can be driving and the SWCs are working fine, the radiator fans turn on, causing a higher load on the alternator, and then the volume up button will result in the volume going down.

Here are the signal readings with the engine running and not running:
Engine not running:
volume up 525
volume down 465
next 400
prev 425

With the engine running the signal changes to:
volume up 630
volume down 550
next 440
prev 495


I'm using an Arduino Leonardo and my resistor ladder get's 5v from the Arduino. The Arduino gets power via USB from the PI.  The resistor in the resistor ladder is 2k ohm.  I've tried using resistors from 22 ohms up to 100k ohms with no luck. Is there something I could do to make the functionality of the SWCs more consistent?


Thanks in advice.


RE: Steering Wheel Controls functionality is intermittent - jhornbr225 - 11-29-2021

I guess the first thing I would do is to monitor that 5V line coming out of the Arduino with a voltmeter. The Leonardo should have a pretty good voltage regulator. Feeding it between 12-14V from the car, that 5V out should be able to hold 5V pretty well. That is unless you are drawing too much current from it. If you have a voltmeter, you could test the current flow coming out of the 5V line. According to the schematic, the Leonardo has a NCP1117ST50T3G regulator, rated for 1A max. That should be plenty for a steering wheel control resistor divider.

Make sure that the common of the Arduino is securely tied to the chassis of the car. If there is any resistance in that line, the voltage regulators on the board won't be able to hold the proper voltage.

The max limit on the input voltage is 20V. I doubt you're going over that. But as an experiment, you could get a basic 7809 voltage regulator. That would take the cars voltage, and hold it at 9V. Hook that 9V to the Leonardo, and it should have an easier time regulating the lower voltages, 5V and 3.3V.

Are you having any other electrical problems in the car? Headlights dimming, excessive alternator noise on the radio, battery not holding a charge? Of course check the basics on the car side too. Battery terminals clean? Alternator securely grounded to the chassis?


RE: Steering Wheel Controls functionality is intermittent - JasonW - 11-30-2021

Thanks for the quick reply.

When you say make to ensure the Arduino has a good connection from common to the vehicle chassis, can I use any pin labeled ground on the Leonardo?  Right now it's getting power from the PI via USB.  So the only ground it has now is going through the PI.

It will be a couple weeks before I can mess with this again.  Thanks again for the advice.  You've given me a couple of paths I go down.


RE: Steering Wheel Controls functionality is intermittent - YarissSS - 12-01-2021

From my reading, you may need to find a more stable voltage for the ADC. The Leonardo board includes a built-in analogue reference (Aref) that can be configured to a relatively stable 1.1 V, but it varies ±0.1 V by board. There is a technique described here (Arduino forum) that can be used to calculate your board's 1.1 V analogue reference, and to apply this reference to your code. More information about the 1.1 V analogue reference and the aforementioned calibration technique is available here (blog post).

Note that in the above technique, you would be applying Aref (effectively Vref) to the SWC resistor ladder. There would be no need to use the ~5 V outputs of the board. I'm not sure how vulnerable this approach would be to noise, however. While presumably the circuit is comprised of only passive, resistive elements, the original system may use 5-12 V so this is quite a step down.

Failing this, a voltage regulator may be required.

Good luck!