EEVblog Electronics Community Forum
Electronics => Beginners => Topic started by: yaqwsx on January 05, 2019, 11:09:55 pm
-
I want to control an old DC servo amplifier with a CNC controller. The servo amplifier takes +-10V command signal to control the speed (0V = stop, -10V full CCW, +10V full CW). The CNC controller can generate either: 1) PWM + direction 2) PWM (for the high side) + inverted PWM (for the low side), 3) PDM + direction.
Generating analog voltage in one direction is simple - I take the PWM signal, put it through an RC low pass filter and then amplify it through an op-amp. However, I am struggling to find a solution which would allow me to invert the command signal based on the direction signal. What would be the simplest solution? Or is it achievable with the low- and high-side signal?
-
Take a close look at how the second operational amplifier shown below is configured. When the switch is open, it has a gain of +1. When the switch is closed, it operates as an inverter with a gain of -1. The switch only sees positive or zero volts with a positive input so a bipolar transistor or FET works fine as a switch even when the output is negative.
-
Thank you for your response! I created the following schematic consisting of a low-pass filter, your circuit for inverting the signal based in the direction a and amplifier to get the full range of +-10V. The circuit is designed to use the components I have laying around (that is why the PWM and dir are isolated using Adum, the enable signal for the driver is isolated by an optocoupler - I don't have Adum1300 laying around).
I simulated the low-pass filter in Ltspice. Are there any mistakes in the schematic? I was also wondering if it would be possible to get rid of the last op-amp amplifier. However, when I added amplification to the low-pass filter, it got unstable according to Ltspice.
-
That looks good to me. A smaller MOSFET with lower leakage and capacitance is desirable but that one should work fine in a low frequency application.
-
69USD 7I33 from there http://www.mesanet.com/ (http://www.mesanet.com/) ?
manual doesn't have the schematic but if you ask nicely mesanet might share it?
-
I wanted to drop by and say that I threw together the first circuit and it seems to be working very well.. very linear. (tl082 dual op amp and a small mosfet for the switch)
Using pdm/dir out of the printer port using linuxcnc..
https://www.youtube.com/watch?v=xVrm4abue9w (https://www.youtube.com/watch?v=xVrm4abue9w)
-
Oh - and I switched the rc to a low pass (it is currently setup as a high pass)
sam
-
I saw you have one of those MACH3BoBs. I reverse engineered it last spring. Here's the drawing.
-
I saw you have one of those MACH3BoBs. I reverse engineered it last spring. Here's the drawing.
That makes total sense.. The cut off frequency for that r/c low pass is about .3 hz.. No wonder why getting 1hz sine wave through it was the limit..
The circuit I am playing with is currently around 67hz.. which - If I was able to get an 'ok' closed loop with the cheap bob at .3hz cut off - this should be a ton better..
sam