I cannot for the life of me figure out how to control the resistance of a circuit using arduino.
The parts I need to control are...
Electric Power Steering
Power Steering Controller (off the shelf) that controls the errr.. power steering
The process is as follows currently. Both parts are controlled via standard car power (say 12v for simplicity sake). The Control Box has a potentiometer on it that allows the driver to adjust the amount of assist that the steering column offers. Dead easy. At speed, you'd want the power steering less active and at low speeds (for example parking) you adjust the resistance of the pot to make the steering really light.
That's all great, except I don't want a pot in the equation that I have to adjust manually. I can read the speed off the vehicle using an output of my ignition controller. So we have an input signal.
What is really frying my brain is how to control the amount of resistance across two points in the circuit.
Can you measure the voltage between the two potentiometer points? Does it change when you vary the potentiometer? Or even better: is there a complete datasheet on the speed control that talks about HOW this potentiometer controls the speed (is it current? voltage?)
You may be able to use a "digital potentiometer" (like an MCP4131) instead of a physical potentiometer, though the digital version has limits on voltages and currents (basically, less than 5V at any terminal).
If not you might have to fake it out by controlling the voltage/current that the potentiometer is itself controlling.
ahaaaa... good question! I shall try and find out. The controller is just a box of tricks at the moment, and not installed. Will contact the designer to find out.
Got a very conclusive answerr to the quetion around what the pot is doing from the original creator.
If using the cars speed to adjust the assistance you would need a magnetic pickup that could give at least 4 square wave 12V pulses per wheel revolution as the original column uses the corsa's abs sensors to provide the 12V pulses, the POT adjusts the timing for the chip inside not adjusting any voltage im afraid
That's part common sense and part gibberish to me :o
The pulses per rev is simple... the rest is sheer luncay.
I think you're back to measuring voltages then. Hopefully you'll find the voltage at one terminal doesn't exceed 5V and the other terminal is always 0V relative to the system 0V so you could insert a digital potentiometer in there.
Or maybe take the unit apart and try to reverse-engineer what the pot is controlling?
The creator kindly got back to me without me having to get the hammer out (in truth I haven't had time... )
The resistor limits the amount of current charging up the capacitor in the timer chip, hence when you adjust it you get slower or faster waveforms, you would have to try an provide 0 ohm to 1M relating to your speed some how
Now to get said gear out and measure how much the current changes.
I not suggesting this for your automotive application necessarily, but just to throw this out, you can make a poor man's digital resistor.
Get an LED with a flat top (or file one) and epoxy it to an LDR. Cover it in heat shrink. Unlike an optoisolator the resistance varies with the intensity of the LED.
if you are replacing the mechanical pot why not hack the current system and measure the rate of the changing wave form and value then disconnect it and replace it with your own output from the arduino based on speed. Is that after all what you are trying to do.
hope this helps
jerryb
I don't, however, have an oscilloscope to measure said wave form... mebbe making an oscilloscope first is on the cards
I think it may be easier (famous last words) to rip it open, and check the specs of the timer chip, then retro-fit it with some form of current changing circuit.
Sounds to me like this steering control box simply needs a 12V PWM signal and you vary the duty cycle to change the amount of assist...
I'd think all you need is to use one of the Arduinos PWM ports, an op amp and a with suitable resistors to adjust the 0-5PWM to 0-12VPWM and suitable regulated 12V power supply to feed the op amp supply.
But maybe I'm crazy
The resistor limits the amount of current charging up the capacitor in the timer chip, hence when you adjust it you get slower or faster waveforms, you would have to try an provide 0 ohm to 1M relating to your speed some how
In the past I've used pulses to charge a similar type of RC circuit I made. To charge the circuit with the capacitor, you might be able to use the arduino pwm, an NPN transistor, a diode, and one or two resistors. The pwn controls the transistor, which supplies the capacitor thru a diode (acts like a check valve) on the transistor output. A resistor also on the transistor output keeps voltage up and also completes the pwm electrical flowpath.