2
\$\begingroup\$

I am trying to control an electric power steering rack with an Arduino. To do this I need to "trick" the EPS module that there is torque being applied when there really isn't.

On the rack there are 4 wires coming from the torque sensors where the torsion bar is which go into the EPS module. I cut these wires so I could splice in and play around.

I determined each wire is 5+V, T1, T2, and GND. When I connect my own 5V and GND to the torque sensor, I am able to read T1 and T2 via the two analog-in pins on my Arduino. When no force is on the wheel, T1 reads about 2.3V and T2 reads about 2.6V. When trying to steer left, T1 drops while T2 rises and vice-versa.

I have a shield with 4 (100k) digital potentiometers. I figured it would be easy enough to have the Arduino "emulate" the torque sensor, so I connected the EPS module 5+V to POT1A, GND to POT1B, and T1 to POT1Wiper. I did the same for T2 (5+V to POT2A, GND to POT2B, and T2 To POT2Wiper).

My Arduino sketch simply reads the analog pins for T1 and T2 connected to the torque sensor, scales them into a float ranging from 0.0-1.0, and then I tell each digit-pot to adjust the wiper accordingly. What should result is the steering be close to the same as if it were directly connected to the torque sensor.

When I try applying my own 5V source to the POTs, the wiper voltage reading is correct (i.e. I tell the digi-pot to set wiper position to 128, meter reads 2.5V). But, when connected to the EPS module, the reading is off (at 128 it reads around 4V and only changes slightly as from 0 to 256).

I then tested the EPS module wires. Connecting my multimeter to 5+V and GND reads 5V (expected), but also reads 5+V on T1 or T2. T1 and T2 show no voltage.

Also to note when testing voltages on T1 and T2 while the torque sensor is connected to the module like normal, the voltage readings are what I get when I power and read the torque sensor directly.

I have confirmed that the signal from the torque sensor is pure analog, no PWM or digital signals at all.

Any ideas on what the torque sensor is doing to drive the ECU properly to get this working would be much appreciated.

Thanks, Andrew

\$\endgroup\$
  • \$\begingroup\$ Can you provide more info about your digital potentiometers (e.g., part number or a datasheet for the shield)? Also have you looked at how much current the EPS module is drawing from T1 and T2 under normal conditions? \$\endgroup\$ – Cheibriados Aug 26 '15 at 19:13
  • \$\begingroup\$ The pots are MCP4261 (100k). When trying to test current on either torque signal wires with my multimeter the EPS module doesn't respond or provide assist - the meter must be interfering. \$\endgroup\$ – Andrew Aug 26 '15 at 19:20
  • \$\begingroup\$ If you can, take a look at T1 and T2 on an oscilloscope under normal operation while they're hooked up to the EPS module. While I don't know the make or model of your vehicle (nor would that be likely to help much) there's a strong possibility that the sensors aren't outputting constant DC but instead a periodic voltage signal (see here). \$\endgroup\$ – Cheibriados Aug 26 '15 at 20:36
  • \$\begingroup\$ It is a constant voltage (no PWM or anything like that). I tried connecting the POTs inline like the person did at that link (using the POTs as a rheostat instead and without the resistors) and when setting to 0 steering was normal, and as I increased the steering became more stiff depending on which wire I added the resistance to. Anything after 4 (which would be 1.56k) the ECU shuts down. Too high resistance POT it seems - how could I lower it (adding resistors did not work)? \$\endgroup\$ – Andrew Aug 28 '15 at 14:08
  • 1
    \$\begingroup\$ You cannot. You may buy a different model, with lower resistance (100k sounds way too much anyway). You should measure the resistance of the original sensor. \$\endgroup\$ – Laszlo Valko Aug 30 '15 at 18:59
1
+100
\$\begingroup\$

Looks like you are not driving the output drivers are not strong enough. Many of the sensors have low output impedance (about a kiloohm or less) and thus can provide tens of mA's of current. Your 100K digipot can provide much less than that.

Try adding op-amps to each output in a simple buffer connection. Make sure the op-amp can have the desired input and output voltage (you likely want 'rail-to-rail' opamp) -- for example LM324 will only accept 0V to 3.5V input when powered from +5V.

\$\endgroup\$
  • \$\begingroup\$ Alrighty I think I got it. How does this circuit look? I see what the buffer op-amp is doing - it prevents voltage drop from the digitpots no matter how much load there is on them. \$\endgroup\$ – Andrew Sep 4 '15 at 23:21
  • \$\begingroup\$ It works! Your answer led me in the right direction for using an op-amp as a voltage follower. Thanks!! \$\endgroup\$ – Andrew Sep 6 '15 at 3:27
0
\$\begingroup\$

To me it seems that is is driving a differential signal. You could try using a Single-Ended to Differential Converter to try to emulate the signal that you are seeing with a low output impedance that will not get any loading effects from the ECU as you seem to be experiencing with the digital POTs

\$\endgroup\$
  • \$\begingroup\$ So - if I understand this right, the current the ECU is drawing from T1 and T2 is causing a voltage drop (V = IR) which is why my the voltage reading from my POTs are off when connected? I have a few op-amps, a Philmore LM324, and a NTE941. Will these work? Any schematic that I could follow? Thanks! \$\endgroup\$ – Andrew Sep 4 '15 at 4:13
0
\$\begingroup\$

It is my understanding of most EPS sensors that the difference in voltage from T1 and T2 tells the controller two things. Which direction for the motor to turn and with how much force, current. The controller needs both, rather the difference in the two.

\$\endgroup\$
0
\$\begingroup\$

You are half way there. The torque sensor is activated by the EPS module, but first you have to activate the EPS module by feeding it data as ignition switch, RPM data and the constant 12 volts for the DC motor.

\$\endgroup\$
0
\$\begingroup\$

Use a Ratiometric DAC with 12 bit resolution and bandwidth 3.2kHz with a digital low pass filter to generate the emulated sensor output. Make sure your circuit doesn't pull more than 30mA.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.