Mimic a 12v potentiometer

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.

When you say 12V Pot, what do you mean? How does it function in your circuit?

  1. Voltage divider/Fixed voltage fed into a high impedance input?
  2. Change in resistance?

#2 requires a digital Potentiometer (Separate part), #1 could be done with an op-amp amplifier circuit fed by a low pass filtered output of a PWM pin. (You will need lots of filtering)

Thanks for the quick reply Mirith.

I am trying to control a hydraulic ram connected to the boom of an agricultural sprayer.

Currently the system is manual where a knob is attached to a potentiometer on the sprayer control panel. When the pot is turned anti-clockwise, the ram closes and the boom tilts left, when the pot is turned clockwise, the ram opens and the boom tilts right. The more the pot is turned the further the ram moves and the more the boom tilts.

The two things I would like to do is:

1.) Connect the current pot to the arduino and monitor what its output is.

2.)Use the arduino to mimic the output of the pot allowing the arduino to control the movement of the ram and hence tilt of the boom.

I have not tested the voltages on the pot as of yet but as the box takes a 12 volt supply and the rest of the sprayer controls are 12 volt I am assuming it is 12 volts.

To do number 1.) would it be a case of putting in the correct resistance to make sure that the maximum voltage of 5 volts is supplied to the arduino, or is there a better method?

I'm stuck completely on number 2.)

Any help greatly appreciated!

Link to pot datasheet : http://www.resenso.ch/J17/images/Produktealt/datasheet_pod_20_e.pdf

http://forum.arduino.cc/index.php?topic=80996.0

You really need to know the pot circuit details - or work that servo-linkage-knob deal.

Yeah. Connect an RC servo to the existing potentiometer. A motorized potentiometer, so to speak. Then when it goes haywire and your spray boom starts digging furrows you can rip it off in a hurry and adjust it manually.

I don't see why a transistor couldn't be used as a series pass element to replace the pot. I am not however sure what type of transistor would work best. If it works for regulators and power supplies why wouldn't it work as a pot replacement ?
Any comments ?

raschemmel:
I don't see why a transistor couldn't be used as a series pass element to replace the pot. I am not however sure what type of transistor would work best. If it works for regulators and power supplies why wouldn't it work as a pot replacement ?
Any comments ?

Maybe it's a pot, maybe it's a rheostat.
Is it scaling a voltage or limiting a current or what?
I don't know. Who does?
It's all speculation.
You really need to know what the pot circuit is.
Just guessing and throwing components at it may yield surprises.

It's a "wirewound", not a tweeker pot, so forget about any "digital pot" ideas.

As y0u so aptly put it, it's speculation. You don't know. It MAY be wirewould. But it may npt.

lar3ry:
As y0u so aptly put it, it's speculation. You don't know. It MAY be wirewould. But it may npt.

Well, I think that I do know lar3ry.
I read the datasheet/pdf that Roderick1st (OP) linked (Reply #2).
N'est-ce Pas?

see datasheet
(100 ohm/2 W)

POT_100 ohm_2_W_wirewound.pdf (36.6 KB)

@Chagrin,
Servo idea is version 1 of the project except I'm using a stepper motor - great minds!

However, it would be neater to have my own box electronically doing the levelling.

@Everyone
I'm no electronics specialist but I thought:

In by-pass mode: (Mechanical pot controls digital pot)
Collect reading from current mechanical pot --> reduce to usable voltage for Arduino --> Arduino reads voltage and sends signal to digital pot --> digital pot controls boom.

in automated mode: (Arduino controls boom)
Collect data from sonar sensors --> Calculate required boom movement with Arduino --> Arduino sends control signal to digital pot --> digital pot controls boom.

Granted this is theory at the moment as I don't know exactly what the mechanical pot is doing but I can see that it is directly wired to the 12v supply. I'll have my umbilical cable made in the next couple of days then I can do some testing on the output of the pot.

Any constructive criticism on my theory's?

Thanks,

Rod.

Find out what the maximum current output is from the potentiometer, then you will know the demands of the circuitry to replace it. The 0-5v output from the arduino can be used to control and op amp that runs on 12v, and with the appropriate amplification (set by 2 voltage dividing resistors), it will change the varying 0-5v into 0-12v proportionately. The only issue will be ensuring that the current draw requirement for whatever the pot drives is within the capability of the op amp. You can set up a switch to move back and forth between the pot driving the control or the op amp. I've seen exactly this setup on welding equipment using op amps.

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).

mirith:
When you say 12V Pot, what do you mean? How does it function in your circuit?

  1. Voltage divider/Fixed voltage fed into a high impedance input?
  2. Change in resistance?

#2 requires a digital Potentiometer (Separate part), #1 could be done with an op-amp amplifier circuit fed by a low pass filtered output of a PWM pin. (You will need lots of filtering)

The low pass filter could be a part of the op-amp circuit (and indeed using the op-amp would make the filter more effective for a given set of filter values).

While all of this is true, the OP still hasn't actually said what the pot is doing in the circuit. He probably needs to grab his multimeter and start measuring. While it is most likely going to be a 0-12V or some such input, this isn't guaranteed. It could be a current loop, or it could be some other resistance controlled loop (Like adjusting the frequency in an oscillator circuit).

mirith:
While all of this is true, the OP still hasn't actually said what the pot is doing in the circuit. He probably needs to grab his multimeter and start measuring. While it is most likely going to be a 0-12V or some such input, this isn't guaranteed. It could be a current loop, or it could be some other resistance controlled loop (Like adjusting the frequency in an oscillator circuit).

Yes. It's important for the OP to know the range of the control voltage (if it is a control VOLTAGE and not a current loop) as well as if the control signal is referenced to ground. If it's not referenced to ground, the problem gets bigger because now some kind of isolation between the Arduino and the machine will be necessary.

Without knowing this info, it's impossible to even get started on a design.......

Well, I think that I do know lar3ry.
I read the datasheet/pdf that Roderick1st (OP) linked (Reply #2).

Yes, I missed that. In any case it really doesn't matter if it's wirewound or not, provided that any digital pot can handle the current and voltage of the existing pot circuit.

rashemmel pointed us to a thread that mentioned AD5293 digital pot, and as far as I can see, it's ideally suited to the task; again, as long as the existing circuit's current and vltage are within the capacity of the digital pot. See the spec sheet at http://www.analog.com/static/imported-files/data_sheets/AD5293.pdf

es. It's important for the OP to know the range of the control voltage (if it is a control VOLTAGE and not a current loop) as well as if the control signal is referenced to ground. If it's not referenced to ground, the problem gets bigger because now some kind of isolation between the Arduino and the machine will be necessary.

Again, these things do not matter, provided the digital pot's current and voltage capabilities are sufficient. On the datasheet, have a look at the block diagram on the first page. VDD (the Arduino's VDD), is completely separate from the three pins of the output. In fact, that output can control voltaages or currents up to 30V, and in any polarity. It can be hooked up as a voltage divider or a rheostat.

I think the project has an excellent chance of being successful in that the existing pot can be used as an input, or the digital pot can be used with input from a height-measuring scheme.

The main thing I would be concerned with in a project like this would be the proposed sonar units for height. A boom on a sprayer is a humid and harsh environment for any electronics, let alone a low-cost, non waterproof sonar module. Even waterproof ones might have problems with accumulation of spray chemicals and/or the residue after drying..

lar3ry:

Well, I think that I do know lar3ry.
I read the datasheet/pdf that Roderick1st (OP) linked (Reply #2).

Yes, I missed that. In any case it really doesn't matter if it's wirewound or not, provided that any digital pot can handle the current and voltage of the existing pot circuit.

lar3ry,

It's a 100?, 2W pot.
1/2 that power is a bridge too far for a digital pot.
And they can only be used in Ground-referenced applications.
And, again, the circuit details extant are, basically, nil.
[Also, as it's wirewound. It's not unthinkable that its inductance, therefore, may be essential to proper operation.]

I assume you stroked that 100? out because you re-read the datasheet, which says it's range is 100-20K?.

1/2 that power is a bridge too far for a digital pot.

Again, it's not a problem if the actual voltage and current values across its range are within the specs of the digital pot.
Just because it's a 2W pot, it doesn't necessarily need that capacity in the application.

And they can only be used in Ground-referenced applications.

Well, you should probably look at the datasheet.

I quote:

The ground pin of the AD5293 is primarily used as a digital ground reference. To minimize the digital ground bounce, the AD5293 ground pin should be joined remotely to common ground. The digital input control signals to the AD5293 must be referenced to the device ground pin (GND) to satisfy the logic level defined in the Specifications section.

This requirement is no different than having the Arduino control, for example, a MOSFET driving a 50V motor, with the grounds connected together, and the aArduino pin driving the MOSFET's gate. One thing to keep in mind is that a ground on one piece of equipment can be conected to a non-ground on another device, as long as care is taken to not connect any other parts of the circuits together in such a way that bad things happen.

And, again, the circuit details extant are, basically, nil.

And that's why I keep saying "as long as the voltage and current requirements are within the capabilities of the digital pot".

And yes, the circuit needs to be investigated. Were I doing such a project, I'd have a look to see where the pot connects, how it's connected, checking the voltage across the endpoints, and across each end-point to wiper, current through the end points, current through the wiper, all measurements taken through the full range. I'll be very surprised if one could not find a reasonably priced digital pot to take the place of the existing one.

[Also, as it's wirewound. It's not unthinkable that its inductance, therefore, may be essential to proper operation.]

Highly unlikely. It's not as if we're talking about multi-kiloHerz signals here. This is Ag equipment, after all.