Problems using the DUE DACs to drive a difference amplifier

Hello

I am using an Arduino Due to temporarily control a tensile testing frame. The motor is driven by an Advanced Motion Controls 20a14 Analog Servo Drive (http://www.a-m-c.com/download/datasheet/20a14.pdf). From what I gather from the datasheet, the +REF and -REF voltage input with respect to REF ground proportionally controls the current going to the motor. So I wrote some code to use a joystick to control the DACs on the due, buffered them through an op amp, then connected the first DAC to the +REF and the second DAC to the -REF and the REF ground to the Arduino ground.

When nothing is connected, an oscilloscope shows that the voltage reading from +REF to -REF coming out of the op amp ranges from +3.3v to -3.3v, depending on the position of the joystick. However when I connect the buffer to the Servo Drive, the motors randomly speed up and slow down with little regard to my input with the joystick. An oscilloscope reading from +REF to -REF shows the voltage is randomly fluctuating.

Any ideas on how I can rectify this? I can provide code and/or circuit diagrams (if needed) once I get back to my apartment after the holiday weekend.

This might be your opamp picking up the noise from the driver and going crazy because of that. Test what's coming from the DAC. Try out the servo drive alone. Try getting rid of your opamp and connect it to arduino simply through a resistor.

See, that was actually the first thing I tried, and it did the same thing except worse.

Do you think adding decoupling capacitors on the Op Amp supply lines would help any?

interesting...
The caps across opamp supply are always a good idea. Connect them.
You may also try bypassing diver's inputs with RC low-pass filter (be sure to place the C very close to the driver).

Please share the schematic and the photo of your actual system.

"I can provide code and/or circuit diagrams (if needed) once I get back to my apartment after the holiday weekend."

Did you return already?
Posting the schematic will help.

Hello,

I had some similar problems with recording data over a analog Pins

the analog pins arent that stable so by taking some samples and average it we can improve the sensors quality. For my Voltagedivider I used only one pin, First i wanted to measure over a Difference Amp but that involves extra 7805 Voltage regulator. By boosting the signal youll also improve the signals you dont want. So i left the Amp out of my design.

secondly i used 1 for loop for the calculation of a voltage divider and sampled it around 750x. the code is added in the lower section of the screen.
you can place it in the top of the Void loop.

int vn=0;
for(vn=0;vn<MAX_AV_READ_VOLTAGE;vn++)
{
Volt +=analogRead(pin2);
}

Volt/=MAX_AV_READ_VOLTAGE;

VCalc = Volt * 0.054985713;

more is less.

sincerly yours

B

I FIXED IT!

I simply powered the board from a LM7805 attached to the same DC power supply the motor controller was attached to. Then I ran the the analog outputs into a quad op amp, which was powred with rail voltages provided by a LM7812 and LM7912. The first two op amps were simply used as buffers, while a third was wired as a summing amplifier with a gain of 3 (so I could use the controller's 10v range).

I guess it's true...enough Op Amps can fix any problem. :stuck_out_tongue: