Roderick1st:
Hi All,
I am new to Arduino and electronics in general but am steadily getting the hang of it.
The project I am working on will require me to mimic a potentiometer using the arduino. The main issue I have is that the potentiometer has a 12 volt supply.
Can anyone suggest how I could go about this?
Thanks,
Rod.
Depends on what type of output you expect.
A "potentiometer" connected to a 12 volt supply will provide, at the wiper, anywhere from 0 to 12 volts depending on the position of the pot's shaft.
If you want a circuit to do that with the Arduino (which only puts out 0 to 5 volts via PWM), you will need to do 2 things:
(1) Low pass filter the PWM signal from the Arduino so that it is DC with as little AC (PWM) ripple on it as you desire.
(2) Use that adjustable DC signal to drive an op-amp with sufficient gain (i.e. gain = 12/5 minimum) to convert the 0-5 volts into 0-12 volts.
Since this sounds to me like a school project, I'm not going to provide code and circuit examples. From the assignment, I assume you should know how to do at least the op-amp circuit (and the Arduino part is equally easy).
We can, however, give you guidance on code or circuit design if you first post what YOU tried to do.
(edit to add):
After reading your later posts, I see this is not a school project. Your servo circuit MAY just take a 0-5 or 0-12 volt signal and run it into a comparator which is part of the servo loop (which means the Arduino may be able to drive it directly). You need to find out how your control pot works and if one side of it (as well as the control signal) are referenced to ground.
Maybe you can do the same thing that I did... use a gear motor and a pot as a servo rotational controller and use it to physically drive your machine's control potentiometer.
Lastly, a bit off topic... but something I did quite a while ago mostly for fun was to have a DC gear motor drive a 10 turn linear potentiometer with feedback (a servo loop).
I used this as part of a digitally controlled DC power supply which is a switching / linear hybrid (there is a switching part to control the input voltage to an LM-317/MJE2955 voltage regulator).
When I set a certain voltage on the power supply display, the motor rotates the potentiometer to adjust the LM317 circuit to give me the right voltage, and the Arduino also runs the switching side of the supply to provide "voltage + 5" to the regulator input side (to minimize power waste at low output voltages).