Arduino controlling resistance in black box circuit

I have a black box device, the state of which is controlled by insertion of a resistance between two exposed control pins. The allowable values are 0, 277, 692, 1523 ohms and open circuit. I want to use an Arduino to control that resistance.

Black box and Arduino share a common ground, but I cannot make assumptions about the voltages on the control pins other than they will be less than 30V. Current on the external control circuit is max 5mA.

To date I've been using a set of reed relays to switch in discrete resistors. I like the isolation provided by the relays, but the board real estate, mechanical nature and general clunkiness of the relays are disadvantages. Is there a better way? Optocoupler? Analog 4:1 mux? Digipot? ...?

To date I've been using a set of reed relays to switch in discrete resistors.

Good solution.

Is there a better way? Optocoupler? Analog 4:1 mux? Digipot? ...?

Unless you know the relationship between the ground of both devices and if the voltages will not exceed the power supply voltages of the Arduino and other chips then no.

Stick to what you have.

but I cannot make assumptions about the voltages on the control pins other than they will be less than 30V

Then doubly stick to what you have.

How about a Digital Potentiometer?

digital pot.jpg

digital pot.jpg

Because he doesn’t know what voltage the lines are at, only that they are within 30V of the Arduino which is not good enough for a digital pot

Grumpy_Mike:
Because he doesn’t know what voltage the lines are at, only that they are within 30V of the Arduino which is not good enough for a digital pot

Terminal Voltage Range: +15V, ±15V, +30V, +3V, ±3V, +5V, ±5V

Should work.

Thanks very much for your thoughts. My concerns about digital pots were:

  1. On-state (/wiper) resistance, making it difficult/impossible to get near 0R through the pot/rheostat
  2. I'd still need some sort of relay to break the circuit for open/off
  3. My understanding is that tolerance is pretty lax at typically 30%.

Of course I may have missed the ideal part, but I'm not finding it on di?ikey.

As Mike says, the reed relays work, but I would really like to avoid moving parts. This has me wondering about SSRs and optocouplers. To my newbie eyes it looks like a couple of TLP222A-2s or CPC2014Ns would do the job with discrete resistors?

But then I find myself wondering whether it could be done with a single TCMT-4100 quad channel optocoupler plus discrete resistors, this being a lot cheaper. But honestly I find it hard to interpret the specifications in the datasheet in the context of my intended use. The datasheet talks about things like current transfer ratio, while I'm interested in on-state resistance, Ir etc. Could the TCMT-4100 be made to work as four solid state relays?

Thanks again.

This has me wondering about SSRs

No, the AC ones use triacs and the DC one are just FETs in a fancy box designed to pull down, they are not in any way equivalent to a relay.

and optocouplers

You need to know which way round the voltage on your terminals are. Is one always lower than the other? If so you could use that lower one as a ground and use the output of the coupler to drive a transistor which would then connect the two with a resistance. However note you will always get a voltage of 0.7V across a fully turned on transistor. That will be interpreted as an extra resistance by the black box.

SteveMann:
Terminal Voltage Range: +15V, ±15V, +30V, +3V, ±3V, +5V, ±5V
Should work.

From that "data sheet" ( actually a tutorial ) you posted:-

The voltages on the A and B terminals can be any value as long as they lie between the power supply voltages VDD and VSS.

So you need to use a device that can handle a 30V supply and the OP has to provide a 30V supply to that chip.

Hi,
I think you need to get back to Ohms law.

Worst Case;

If supply can get to 30V and you program 277Ohms.
Power = V*V/R= 30 x 30 / 277 = 900 / 277 = 3.25 Watts.

Stay with relays and fixed resistors.

Tom... :slight_smile: