PDA

View Full Version : -10V to 10v circuit

vre
13-01-2014, 10:42 AM
I want to control servo speed-torque & vfd from mach3/linuxcnc with analog voltage -10v to 10v.
My servo accepts digital step/dir - cw/ccw - quadrature for position control and analog -10v to 10v for speed/torque control.
So iam searching a circuit to do this thing..
Knows anyone something about that ?

EddyCurrent
13-01-2014, 11:31 AM
Sorry I can't be much help here, it's something I've not looked into with Mach3

using -10v to 10v is normally carried out with a joystick control and a VFD, -10v is the reverse direction whereas +10v is forward direction.

11271

To generate the -10v to 10v you could use a simple potential divider across a 20v supply with the centre tap connected to zero or you
could search for a better circuit on Google for example using the search term "Dual rail power supply"

There's some info here that might help.

http://www.machsupport.com/forum/index.php?topic=18151.0

Jonathan
13-01-2014, 01:40 PM
Mach outputs a PWM signal to control spindle speed, so that's 0-5V (assuming 5V parallel port). You therefore need a circuit to convert 0-5V to -10 to 10v. You can use op-amps to subtract 2.5V from the signal (so it's -2.5 to 2.5v), and apply gain of 4 to get the correct range. Use an RC filter to get an analogue voltage level from the PWM signal.

Something like this circuit:
Non-Inverting Op-Amp Level Shifter (http://www.daycounter.com/Circuits/OpAmp-Level-Shifter/OpAmp-Level-Shifter.phtml)

The op-amp would need a +-10V supply... one easy way, though probably not the cheapest way to get that is with one of these (http://uk.farnell.com/jsp/level5/module.jsp?moduleId=en/651711.xml) DC-DC converters.

Or you could get a breakout board which does it for you.

If you're using LinuxCNC then you could control the spindle speed using any of the position control (step/dir, cw/ccw etc) inputs, which is probably easier as it saves making the above circuit.

irving2008
13-01-2014, 05:07 PM
Think we need clarification of OPs needs. He doesn't mention spindle in OP only control of speed of a servo. Everybody's made the assumption of spindle speed control by virtue of mention of VFD but VFD is not a servo thing. If using step/direction controls then speed is related to step rate, so its not clear what analogue voltage is doing.

Creating -10 -> +10v from step (PWM) and direction (polarity) isn't hard but you need some skills in design, electronics assembly and testing. Jonathan has given part of a solution but its of little use without the skill/knowledge to do the rest.

I may be wrong but I know of no BOB that does -10v out... the speed output is invariably 0 -> +10v and direction goes to fwd/rev input on VFD.

@vre: please be more specific in your requirements; are you referring to motion control or to spindle speed/direction control?

JAZZCNC
13-01-2014, 06:42 PM
I want to control servo speed-torque & vfd from mach3/linuxcnc with analog voltage -10v to 10v.
My servo accepts digital step/dir - cw/ccw - quadrature for position control and analog -10v to 10v for speed/torque control.

Vre can you post the Make and model of your Servo drives because Like Irving says it's unclear what your saying and I think you maybe misunderstanding the requirements of your Servo drives.?

Also if using a VFD what Make and model of that also.

vre
13-01-2014, 08:22 PM
delete it.......

vre
13-01-2014, 08:22 PM
VFD is this ( Huanyang SL-440EE ) http://www.hy-electrical.com/bf/SL%20Series%20Manual.pdf
Servo is this chinese Yifeng AC servo motor drive controller AASD 30A - DinoDirect.com (http://www.dinodirect.com/ac-servo-motor-drive-controller-aasd-30a-p19512055.html)
manual http://www.mycncuk.com/forums/attachments/stepper-servo-motors/11162d1388641449-ac-servo-motor-help-servo-drives-.pdf

JAZZCNC
13-01-2014, 11:14 PM
Man that's one crap manual and very hard work reading.

Anyway you don't need +/-10v it just means the drive has the abilty to use Analog signal if that's what your control used. Lot's of older Machines used analog controllers so they provide it for compatibilty reasons but Step/dir is the more modern way.

In your case you'll use Step/Dir from the motion Control device you use, whether that be Parallel port or External Motion controller. If your using Mach3 then I highly suggest you get a motion control Card has the Parallel port will not be fast enough for servos with 2500cpr encoders.

To control the VFD spindle speed you just need a 0-10V signal which can come from either an external speed control card or one built into a BOB. Can also use RS485 I believe but not done it my self can't help here.

irving2008
13-01-2014, 11:22 PM
OK definitely some confusion here...

Servo controller is nothing to do with VFD. VFD is standard 0 - 10v speed and FWD/REV run/stop inputs and can be driven from normal spindle control board or BOB with 0 - 10v speed control output.

Servo controller can be programmed to operate in different modes - parameter Pn002. One of these modes is step/direction for positional control (like a stepper) using wiring diagram 2.3.1. Another mode is analogue speed or torque control using wiring diagram 2.3.2. These modes are mutually exclusive, you can use one or the other but not both.

@vre: what are you using servos for?

EddyCurrent
14-01-2014, 10:55 AM
Assuming the OP still wants -10 to +10.
With the method proposed previously by Jonathan there exists a problem, if the reference wire to the servo driver goes open circuit, the drive would go to full speed reverse.
Would it be possible to use a standard spindle board with 2 relays such that the output would always be 0-10v but one relay would reverse the polarity of the 0-10v output ? opto isolators would need to be used to prevent grounding issues. Within Mach3 the user would use S for speed and M3,M4 for direction.
In additiaon a Mach3 Brain could be used to read the Spindle Speed DRO and only operate the direction relay outputs if the speed was above a particular figure, this would give a deadband around the zero position.
Then the logic could also include a test to see if the requested speed (via S command within Mach3) was odd or even, if it was even this would indicate forward, if odd it would indicate reverse.
The speed would then be programmed in Mach3 such that a value ending with zero would be forward and ending in 1 would be reverse i.e. S1000 would be 1000rpm forward, S1001 would be 1000(almost)rpm reverse. The Mach3 Brain would operate the polarity switching relays automatically. It's clear that the code could move from full forward to full reverse e.g. S10000, S10001 implying that an integrator be used but this is normally a function of the VFD or Servo Driver that employ ramps.

Jonathan
14-01-2014, 11:26 AM
Assuming the OP still wants -10 to +10.
With the method proposed previously by Jonathan there exists a problem, if the reference wire to the servo driver goes open circuit, the drive would go to full speed reverse.

My intention was to expand on the circuit design when if it turned out to be necessary. There's a much easier way to solve that problem, but I don't think it's worth discussing the circuit here.

irving2008
14-01-2014, 12:03 PM
My intention was to expand on the circuit design when if it turned out to be necessary. There's a much easier way to solve that problem, but I don't think it's worth discussing the circuit here.Agreed, and I don't think OP wants to use analogue mode anyway as AFAIK Mach3 doesn't support open-loop servo & encoder feedback for positioning.

EddyCurrent
14-01-2014, 02:33 PM
My intention was to expand on the circuit design when if it turned out to be necessary. There's a much easier way to solve that problem, but I don't think it's worth discussing the circuit here.

Oh yes there is, what's the point of keeping it a secret ? I want to hear about it.

JAZZCNC
14-01-2014, 05:38 PM
Within Mach3 the user would use S for speed and M3,M4 for direction.
In additiaon a Mach3 Brain could be used to read the Spindle Speed DRO and only operate the direction relay outputs if the speed was above a particular figure, this would give a deadband around the zero position.

Then how do you start the Spindle or control it's speed thru G-code.?. . . . There will be better ways but I'm not wasting brain cells thinking about it because the guy has Servo drives that take Step/Dir so why make life hard.?

EddyCurrent
14-01-2014, 06:09 PM
Then how do you start the Spindle or control it's speed thru G-code.?. . . .

Don't be silly now, you know how to do that. Also this thread is going off the rails due to lack of info from the OP, he's either controlling a servo driver or a VFD. The VFD is straight forward, use a spindle board from Mach3, the servo driver, who knows until more info is given ?
Anyway I'm only looking at novel ways to derive a -10v to +10v output but nobody wants to play about with it or forward their own ideas.
It's one of those days when I'm thinking, why bother ?

vre
14-01-2014, 09:09 PM
I will use linuxcnc not mach3 because mach3 does not have the ability to make outer close loop (not real time kernel in windows).
The servos are for a lathe retrofit ( x & z axes) and the vfd is to control the spindle speed and direction (cc or ccw)
The servo has a mode position/speed and from an input signal you can select position or speed (step/dir or analog -10 to +10v).
I want to have the ability to override the speed manually outside from gcode so this is the reason why i want analog -10v to +10v.
Also i want to control vfd from gcode to have constant surface speed and i want to override this speed manually.
Because with parallel port hardware limit exits and i can't output 500khz pulse train (2500cpr encoder) i want a card to manage 500khz step/dir signals.
Do you know some card which can do this work in linux and cooperate with linuxcnc ?

Neale
14-01-2014, 11:29 PM
Eddy - I don't think that it's very novel, but to go from 0-5V to -10-10V I would use an op amp in a similar way to the link that Jonathan gave. Personally, I would do it slightly differently; the op amp needs +-12V to make sure that there is enough headroom on the output (unless you find an op amp that can work closer to the supply rails). Use a potential divider across the supply rails (or +12 and 0V), with whatever regulation/zener diode etc you like, to give a fixed 2.5V and connect this to the inverting input via R1. Use a feedback resistor R2 from output to inverting input. R2/R1 = 4 to give correct gain. Take the 0-5V via an appropriate resistor to the non-inverting input. Job done - I think. You could incorporate a bit more smoothing if you are using a PWM analogue "pseudo 0-5V" signal by putting a suitable capacitor in parallel with the feedback resistor.

You would then use this on a 0-5V output from a BOB connected to the LinuxCNC system and LCNC would allow either gcode-controlled speed or could be overridden for manual control from the LCNC control panel. I think - I use LinuxCNC but don't have speed control that way yet (just use VFD controls manually) so I'm not familiar with that bit.

irving2008
15-01-2014, 12:15 AM
I will use linuxcnc not mach3 because mach3 does not have the ability to make outer close loop (not real time kernel in windows).
The servos are for a lathe retrofit ( x & z axes) and the vfd is to control the spindle speed and direction (cc or ccw)
The servo has a mode position/speed and from an input signal you can select position or speed (step/dir or analog -10 to +10v).
I want to have the ability to override the speed manually outside from gcode so this is the reason why i want analog -10v to +10v.
Also i want to control vfd from gcode to have constant surface speed and i want to override this speed manually.
Because with parallel port hardware limit exits and i can't output 500khz pulse train (2500cpr encoder) i want a card to manage 500khz step/dir signals.
Do you know some card which can do this work in linux and cooperate with linuxcnc ?
I think you're still confusing analogue servo operation with step/direction.

You can use the servo
a) with analogue voltage control and encoder feedback for closed loop positioning OR
b) with step/direction pulse train open loop or closed loop with encoder feedback

You can't use step/direction AND analogue voltage together, they are different operating modes of the servo amplifier/driver. A CSMIO/IP motion control card (http://www.cs-lab.eu/en/galeria-dzial--3,-1CSMIO_Series__CNC_CONTROL_SYSTEMS.html) will do what you need and works with Mach3 (it does closed loop control outside of Mach3), don't know about LinuxCNC: the CSMIO/IP-S will do step/direction, the CSMIO/IP-A will do +/-10v analogue. Both will provide the spindle VFD speed/direction output.