+/-10v to 0-10v

If you have a question about the software please ask it here.

+/-10v to 0-10v

Postby mark4 » Sat Jun 18, 2022 2:12 am

Hello
I have a working setup for +/-10v control on spindle.
It works by using an operational amplifier to invert the signal.
So the control outputs a 0-10v signal and the op amp converts this into a +/-10v signal
then it has a relay to switch between the two fwd/rev. The problem is I get a little creep
I have considered a relay to connect to 0v when it is stopped as this would eliminate creep.
i was thinking "Always a dangerous thing" I am running the ETH300 with a cncroom UB1
There are two analog outputs. if i ran forward with one 0-10v and ran the second
through my converter for -10v. connected the grounds together.
Then each analog signal would have a job and it could make the creep problem go away.
And give me better control. since only one is on at a time it should perform.

Please tell me what you think or if you have a better solution. I am still working
on all the spindle functions and right now the encoder is throwing me.

I have a resolver on the motor that feeds back to the drive and the drive outputs a digital encoder signal.
that I have working. The problem is i need a count. What i would like to do is count the pulses of an led on the screen.
I have seen digital readout fields but as yet have not figured out a way to have it count. then i could just turn the spindle by hand
one revolution and get my ppr. This is also important to a tool changer as i need a dro or something to count from 1 to 21 and reset.
If anybody knows how to accomplish this or can direct me on how to start it ? that would be great.

I dont know any c to speak of. I know more vb. However I will work with what I get and thank you for your help.
Mark
mark4
 
Posts: 26
Joined: Tue May 24, 2022 3:55 am

Re: +/-10v to 0-10v

Postby Robertspark » Sat Jun 18, 2022 6:20 am

opamps are high impedance devices

do you have resistors to pull down inputs and outputs as this may remove the creep. this may be more valid if you have one op amp feeding into another to provide your offset with something like a unity gain opsmp

do you have a rough sketch of the circuit as someone may have some ideas.
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: +/-10v to 0-10v

Postby Battwell » Sat Jun 18, 2022 9:00 am

does your drive have a direction input? for forward/reverse?
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 866
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk

Re: +/-10v to 0-10v

Postby CT63 » Sat Jun 18, 2022 1:41 pm

If I'm reading this right, sounds like you are over complicating the drive forward/reverse control and adding controls the VFD already has built in.

All VFD's have forward and reverse select input. Simply connect a relay NO and NC contacts to the direction inputs and relay contacts common connected to the drive input common to select the direction. Depending on relay drive input direction selected, the 0-10v will control the spindle speed. No need for -10v to +10v with external circuits. Trying to use -10v, 0v, +10v crossover is usually problematic.
CT63
 
Posts: 124
Joined: Sat Sep 03, 2016 11:19 pm
Location: Connecticut, USA

Re: +/-10v to 0-10v

Postby mark4 » Sat Jun 18, 2022 7:56 pm

vfddriver.png
vfddriver.png (9.73 KiB) Viewed 6117 times
Hello
The spindle drive is a drive so no it does not have a forward and reverse like a vfd.
Some do but allot dont. they use the +/- 10v to determine fwd and reverse and 0v to stop.
The circuit i have used does fine on forward and reverse. It just creeps. I like the idea of changing resistance
Maybe making the two 1k resistors variable is an option.
i was thinking of using the two separate analog outputs as an easier to construct circuit that is less temperamental.
However I am not the author of this circuit so while i understand it. modifications can be sketchy.
i seem to remember the original author saying he had another op amp to pull the signal to ground but he deleted it.
it has been a very long time so don't have access to him anymore.

I also have some modification in mind for the startup of the drive and what works best. i will share anything on that front.
i am attaching the circuit. Let me know what you think.
Mark
mark4
 
Posts: 26
Joined: Tue May 24, 2022 3:55 am

Re: +/-10v to 0-10v

Postby beefy » Sun Jun 19, 2022 12:25 am

It's been a while since I played with op-amps but from what I can remember, this is what I would do.

Use a power supply that gives a positive and negative output, to power a single op-amp.

Bias the op amp so when the input from your 0-10v from your potentiometer is 5v the output from the op amp is zero volts. So the mid point of your potentiometer is "drive off".

Then when the potentiometer is giving out 0v the op-amp output is fully negative.
And when the potentiometer output is at 10v the op-amp output is fully positive.

Many op-amp amplifier circuits swing from a positive rail to a negative rail, passing smoothly through the zero volt level. Seems like that's what your drive needs.

Some googling on op-amp circuits should give more details.
beefy
 
Posts: 449
Joined: Mon Sep 05, 2016 10:34 am

Re: +/-10v to 0-10v

Postby mark4 » Sun Jun 19, 2022 11:17 pm

beefy wrote:It's been a while since I played with op-amps but from what I can remember, this is what I would do.

Use a power supply that gives a positive and negative output, to power a single op-amp.

Bias the op amp so when the input from your 0-10v from your potentiometer is 5v the output from the op amp is zero volts. So the mid point of your potentiometer is "drive off".

Then when the potentiometer is giving out 0v the op-amp output is fully negative.
And when the potentiometer output is at 10v the op-amp output is fully positive.

Many op-amp amplifier circuits swing from a positive rail to a negative rail, passing smoothly through the zero volt level. Seems like that's what your drive needs.

Some googling on op-amp circuits should give more details.
mark4
 
Posts: 26
Joined: Tue May 24, 2022 3:55 am

Re: +/-10v to 0-10v

Postby mark4 » Sun Jun 19, 2022 11:33 pm

thank you beefy
I dont follow what you have written i got a little lost.
Their is no potentiometer only the electronic equivalent in the form of two analog outputs 0-10v on a cncroom UB1
The object it to make the drive receive 10 to 0 to -10 i dont see how 5v will accomplish this.
Also i will need to control it through the uccnc software
Maybe you can draw a circuit to help the vision.
I am very interested in the seamless change at zero.
i am thinking it does not bother me if there is a small stutter to change between both sides of the zero.
As now i havent seen a stutter. i have seen several configurations in spindle on and machine ready and their is an orient also.
I have it working but have not figured out the right combination of this. as my servos came in and i had modifications to do.

What i am looking for is good stable spindle control. Right now it spins well and changes direction on the fly
bear in mind i will not cruze along at 2000 rpm and throw reverse so to speak. it needs to ramp down slow and reverse.
I want to be able to offer rigid tapping. something this machine could do before its control and other things died.
From what I have learned with it working the way i have described it should do rigid tapping well.

It just leaves it for me to work out proper spindle control
mark4
 
Posts: 26
Joined: Tue May 24, 2022 3:55 am

Re: +/-10v to 0-10v

Postby beefy » Mon Jun 20, 2022 6:55 am

Sorry Mark, guess I wasn't paying enough attention.

Your existing circuit looks like it should work if it has been built correctly.

You say you are getting motor creep. I assume that is when the analogue output from the board is at zero volts.
The first thing to check is that voltage is indeed zero volts.
If it is then you need to check the outputs voltages of the op-amps are exactly the same as the input voltage they receive, i.e. do they give zero volts out when they get zero volts in.
The top op-amp IC1A is called a "voltage follower" and it's output should follow it's input quite precisely.
The 10K resistors R1 & R2 of op-amp IC1B need to be exactly the same value, in order for the output voltage to follow the input voltage precisely. If these are not precision resistors the output voltage may not be zero when the input voltage is zero.

See how you go with those checks.
beefy
 
Posts: 449
Joined: Mon Sep 05, 2016 10:34 am

Re: +/-10v to 0-10v

Postby mark4 » Tue Jun 21, 2022 2:27 am

I will try the resistors. I wasnt thinking precision resistors and use common % resistors
I am contemplating using two potentiometers something over 10k that would allow me to
dial a zero if it needed more or less. Do you think this will work or am i better off with two
precision 10k resistors. I look forward to your reply
mark4
 
Posts: 26
Joined: Tue May 24, 2022 3:55 am

Next

Return to Ask a question from support here

Who is online

Users browsing this forum: Google [Bot] and 2 guests