PWM + DIR to +-10V signal - Page 1
Forum section: electronics / beginners

author: yaqwsx
author_rank: Contributor
timestamp: January 05, 2019, 11:09:55 pm
content: 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?

author: David Hess
author_rank: Super Contributor
timestamp: January 06, 2019, 03:08:43 am
content: 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.

author: yaqwsx
author_rank: Contributor
timestamp: January 08, 2019, 04:17:37 pm
content: 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.

author: David Hess
author_rank: Super Contributor
timestamp: January 08, 2019, 06:47:22 pm
content: 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.

author: awallin
author_rank: Frequent Contributor
timestamp: January 08, 2019, 07:03:36 pm
content: 69USD 7I33 from therehttp://www.mesanet.com/?manual doesn't have the schematic but if you ask nicely mesanet might share it?

author: skunkworks
author_rank: Newbie
timestamp: August 14, 2023, 01:27:18 pm
content: 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..

author: skunkworks
author_rank: Newbie
timestamp: August 14, 2023, 01:28:09 pm
content: Oh - and I switched the rc to a low pass (it is currently setup as a high pass)sam

author: jcdammeyer
author_rank: Newbie
timestamp: September 14, 2023, 04:33:09 am
content: I saw you have one of those MACH3BoBs. I reverse engineered it last spring. Here's the drawing.

author: skunkworks
author_rank: Newbie
timestamp: September 14, 2023, 01:22:40 pm
content: Quote from: jcdammeyer on September 14, 2023, 04:33:09 amThat 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