Controlling isolated 0-5V

Hi all,

I would like to use and Arduino to replace the 0-5V 10K analog potentiometer that is currently used to control the speed input on a DC motor controller. Additionally, the Arduino and the 0-5V speed control input must be isolated. I have tried using a digital pot (MCP4131) but it is acting erratically (I suspect the current is too great because the 4131 is getting very hot). I do not have any current ratings on the 0-5V speed control circuit. I have also used a PWM signal from Arduino to mimic the voltage on the wiper, which works well, but does not solve the isolation constraint.

Any thoughts on where to go from here?

Best,
stueveone

PWM is digital so it will pass-through an optical isolator but if you need "higher current" you might have to add a MOSFET or transistor driver circuit.

With a 10K pot and 5V you can't get a LOT of current (but it might depend on the pot setting which can give you lower resistance and more current, depending on the resistance of the attached load).

I have tried using a digital pot (MCP4131) but it is acting erratically

How did you isolate that?

Thanks for the response DVDdoug.

PWM is digital so it will pass-through an optical isolator

That's interesting. I'll do some research on that and see what I come up with.

How did you isolate that?

That's the thing, I didn't! :o

You may find something here. It is about a similar problem of replacing an isolated motor controller potentiometer using a pwm method:
https://forum.arduino.cc/index.php?topic=511067.5

stueveone:
Hi all,

I would like to use and Arduino to replace the 0-5V 10K analog potentiometer that is currently used to control the speed input on a DC motor controller. Additionally, the Arduino and the 0-5V speed control input must be isolated. I have tried using a digital pot (MCP4131) but it is acting erratically (I suspect the current is too great because the 4131 is getting very hot). I do not have any current ratings on the 0-5V speed control circuit. I have also used a PWM signal from Arduino to mimic the voltage on the wiper, which works well, but does not solve the isolation constraint.

Any thoughts on where to go from here?

Best,
stueveone

Digital pots are not isolated at all. If its getting hot, its probably fried. There is no easy way to do this isolated, you need to know more about the motor controller, in particular what voltage it uses on the pot, whether it has open-circuit and closed-circuit failsafe modes on the potentiometer connections. The receive side needs power from the controller circuit too of course.

The conceptually easiest approach is servo controlling the existing pot shaft.

You've posted no details of the motor controller, this is the primary piece of information required.

Also why the isolation requirement?

Hi,
Can you post a diagram of how you have the Arduino, what model, and the digital pot and motor controller please?

Can you please post a link to data/specs of the motor controller?

Tom.... :slight_smile:

stueveone:
Additionally, the Arduino and the 0-5V speed control input must be isolated.

Why dos it have to be isolated? That's rather unusual.

You could mount a regular pot to a servo... full electric isolation between the to.

Presumably the motor controller is not cleanly isolated from the mains supply, hence the isolation requirement for the potentiometer.

6v6gt:
Presumably the motor controller is not cleanly isolated from the mains supply, hence the isolation requirement for the potentiometer.

Usually motor controllers have analog inputs designed to have their signal gnd connected to external gnd, such as the Arduino.
The system should work as the Arduino 5V and the controller 5V are within the specs for the digital pot.
We await more information... :slight_smile:

OK. But here is an example of such a controller which specifically warns that the circuit is not at ground potential but I agree that we have to wait for the OP to come back.

Sorry, stepped away from my computer for a few...

Digital pots are not isolated at all. If its getting hot, its probably fried. There is no easy way to do this isolated, you need to know more about the motor controller, in particular what voltage it uses on the pot, whether it has open-circuit and closed-circuit failsafe modes on the potentiometer connections. The receive side needs power from the controller circuit too of course.

The voltage is 0-5V. How can I tell if it has failsafe modes? I'm not sure what you mean by "receive side needs power from the controller circuit"?

You've posted no details of the motor controller, this is the primary piece of information required.

I can try and get a schematic from the manufacturer, but that might take a bit.

Hi,
Can you post a diagram of how you have the Arduino, what model, and the digital pot and motor controller please?

Can you please post a link to data/specs of the motor controller?

Tom.... :slight_smile:

I was able to get the digital pot to work with an LED and an external power source, so I don't think it's the digital pot circuit. Once I connected the digi pot circuit to the motor controller, that's when it got hot and acted erratically. It was connected in the same orientation as an analog potentiometer with respect to wiper and 0V and 5V.

Why dos it have to be isolated? That's rather unusual.

When I was sending a PWM signal straight from the Adruino, the only way I could get the motor controller to work is if I also connected the 0V signal from the motor controller to Arduino ground. This worked on its own and controlled the speed well. However, after connecting a display to the Arduino, whenever the motor went from off to on, it would reset the display. That is the why I reckoned I needed to isolate the signals coming from the motor controller.

Not sure if this helps clarify or not? I'll see about obtaining a motor controller schematic.

Best,
stueveone

@6v6gt

6v6gt:
You may find something here. It is about a similar problem of replacing an isolated motor controller potentiometer using a pwm method:
Control motor with Arduino via "isolated 0-5 V DC signal" - Project Guidance - Arduino Forum

I am trying to digest your recommended post, thanks for sending BTW! Do you have a final schematic that you got to work? I am not sure where the PNP transistor should go. I would also be interested to see how you omitted the power supply circuit, seeing as I have a 5V supply already provided with the speed control circuit?

Best,
stueveone

@6v6gt

Sketched over the "hackaday" schematic using the components you called out. Is this close?

Best,
Stueveone

stueveone:
When I was sending a PWM signal straight from the Adruino, the only way I could get the motor controller to work is if I also connected the 0V signal from the motor controller to Arduino ground.

Of course - otherwise you don't have a circuit.

This worked on its own and controlled the speed well. However, after connecting a display to the Arduino, whenever the motor went from off to on, it would reset the display.

That indicates a power supply issue, or some other form of interference.
Without knowing what motor, what motor controller, what power supply, how everything is actually wired, what display, etc - that's all I can say about this.

stueveone:
@6v6gt

I am trying to digest your recommended post, thanks for sending BTW! Do you have a final schematic that you got to work? I am not sure where the PNP transistor should go. I would also be interested to see how you omitted the power supply circuit, seeing as I have a 5V supply already provided with the speed control circuit?

Best,
stueveone

Just to be clear. This design was used for a motor controller which was not isolated from the mains.
It was this controller: link . If however, yours is mains isolated then you could probably use a simpler circuit.

The OP (not me) of the thread where this design was used, found a 5 volt supply on the motor controller which he could use because it shared a common ground with the terminals he was using for the connection.

Anyway, here is the circuit:

And the simulation with a 25% duty cycle (Green trace shows output voltage):

Note: This is from an LTspice simulation in which the MCP6002 (dual rail to rail) Opamp was not available so a substitute is shown. The power sources V1 and V2 are again for the simulation.

Edit: Circuit now modified to remove the need for a PNP transistor, but still keep the requirement that a 0% PWM duty cycle gives minimum voltage at the output and a 100% duty cycle gives the maximum voltage at the output. The original HackaDay circuit gave the inverse of this.

@6v6gt

Thank you very much for that schematic. I did some tinkering having stumbled upon THIS thread pertaining to optocouplers and figured I'd give it a try with what I had on hand. Well... it works and functions as expected. The display not longer crashes. I need to do some more testing but so far... :slight_smile:

I put a thermocouple on the optocoupler to see if it was heating up with use and it was ambient temp. Any other thoughts or suggestions? The schematic is attached (first attempt at fritzing). I understand the request for more info about the motor controller, which I am working at getting, but in the meantime let me know if anything jumps out.

Best,
stueveone

Ok. Usually if you are converting a pulse duty cycle into a voltage (which you are doing to simulate the voltage at the wiper of a potentiometer/voltage divider) the circuit (low pass filter) would include a capacitor.
Interesting is that it appears to work as it is, though.

Maybe that (so far undisclosed) motor driver does in fact like PWM signals...