Welcome, Guest. Please login or register.
Did you miss your activation email?
November 22, 2017, 02:08:17 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  General Mach Discussion
| | |-+  Help spindle speed
Pages: 1   Go Down
Print
Author Topic: Help spindle speed  (Read 165 times)
0 Members and 1 Guest are viewing this topic.
manueluchiha
Active Member

Offline Offline

Posts: 10


View Profile
« on: November 13, 2017, 03:55:47 PM »

Good afternoon, buy the following card to be able to drive a motor with encoder, but I can not make the mach3 regulate the rpm with this card, you could help me with this problem, since I do not know what it is, if that is why I have badly configured mach3 or badly connected the card.
Annex the papers.


* motor-speed-driver-controller-mach3-spindle-governor.jpg (45.18 KB, 527x589 - viewed 18 times.)

* HL1cO6vFStbXXagOFbXD.jpg (58.2 KB, 1000x615 - viewed 20 times.)

* Sin título6.jpg (269.95 KB, 1280x1024 - viewed 17 times.)

* Sin título5.jpg (244.34 KB, 1280x1024 - viewed 14 times.)
Logged
joeaverage
Active Member

Online Online

Posts: 1,729



View Profile
« Reply #1 on: November 13, 2017, 04:09:58 PM »

Hi,
do you have a voltmeter to measure the PWM output voltage from the breakout board?

Not sure what your doing with an MPG, the spindle speed measuring is done off an index pulse, one pulse per rev not an
MPG. If you have an encoder with an index pulse that might work.

On the spindle setup page make sure PWM is used, don't worry about spindle speed averaging and all of that,
until you get the spindle to go it doesn't make any sense.

Craig
Logged

My wife left with my best friend...
     and I miss him!
manueluchiha
Active Member

Offline Offline

Posts: 10


View Profile
« Reply #2 on: November 14, 2017, 09:24:37 AM »

The motor is with encoder, the encoder has 6 cables, which are 2 for the supply voltage of + 12V, 2 cables are the activation voltages of the encoder + 5V and 2 cables are the outputs of the encoder output A and output B. I already set some mach3 data, for example kernel speed is 35khz, engine outputs> spindle> step pin # 5 and dir pin # 4, input signals> index pin number # 15, timing pin number # 13, output signals> output # 1 pin number # 4 to activate the relay and pin number # 5 is used as output for the pwm, encoder / MPG'S> encoder 2> A-port # 15 and A-port # 13, the maximum rpm is 2300 and minimum 150, attach the screenshots of the mentioned values.

* Doc193.pdf (930.71 KB - downloaded 7 times.)
Logged
joeaverage
Active Member

Online Online

Posts: 1,729



View Profile
« Reply #3 on: November 14, 2017, 11:57:04 AM »

Hi,
a few suggestions...don't worry about the encoder feedback to start with.

Your original post showed  a pulse width modulated DC power supply to drive your spindle motor yet here you are showing two pins for Step and Direction.
Which is it?

Craig
Logged

My wife left with my best friend...
     and I miss him!
manueluchiha
Active Member

Offline Offline

Posts: 10


View Profile
« Reply #4 on: November 14, 2017, 12:05:59 PM »

Ok, I want to vary the rpm of the motor by means of the pwm, due to this it was that I activated the output pin of passage so that from there is the output signal of the pwm, the output pin of the address occupied it to activate the relay and rotate CW O CCW, also for that reason activate the signal of index and timing to be able to be censando the real rpm with respect to the programmed.
Logged
joeaverage
Active Member

Online Online

Posts: 1,729



View Profile
« Reply #5 on: November 14, 2017, 12:27:19 PM »

Hi,
well you've got a few clashes and it won't work as you've got it at the moment.

Leave the Index and Estop inputs alone, they're fine.

Assign Output#1 to <port 1 pin 1>  and
Output#2 to <port 1 pin 2>

Disable encoder 2 inputs. Do yourself a favour, when you disable something enter zeros into the pin assignments, it saves confusion.
Disable the Timing input.

Now you have two outputs, one for CW and one for CCW at pins 1 and 2.
Pins 4 and 5 are motor ouput pins, one will be PWM, I don't know which one yet.

Mach will read the Index input to measure its speed and position for threading. Don't worry at the moment about hooking it up just get the PWM and relays sorted.

Craig
Logged

My wife left with my best friend...
     and I miss him!
manueluchiha
Active Member

Offline Offline

Posts: 10


View Profile
« Reply #6 on: November 14, 2017, 03:43:07 PM »

Ok, I already made some of the changes you recommended, but I have doubts about the frequency of kernel speed and on PWMBase freq. I also have doubts with my motor as I have 6 threads, 2 are from the power supply, 2 are from the encoder supply and 2 are encoder outputs, one of these outputs is connected as a index signal, but the second signal to where I connect it , I ask why a signal is to record the rpm, but how to count the fractions back to be able to make a string. Annex the pdf with the changes and the engine.

* Doc1.pdf (581.19 KB - downloaded 7 times.)
Logged
joeaverage
Active Member

Online Online

Posts: 1,729



View Profile
« Reply #7 on: November 14, 2017, 03:56:09 PM »

Hi,
don't bother with the encoder until you get the motor to go. You don't need it yet.

The base frequency (kernel is not the right term here, its confusing)  should be anywhere from 1 to about 5kHz
will be fine.

The Index input is expecting one pulse per revolution of the spindle. A multi pulse encoder won't really do you
any good. Until you get the motor to go you don't care about the  encoder. All your interested in at the moment
are the two wires going to the core of the motor, the big ones. All the rest are unimportant at this time.

Craig
Logged

My wife left with my best friend...
     and I miss him!
joeaverage
Active Member

Online Online

Posts: 1,729



View Profile
« Reply #8 on: November 14, 2017, 04:16:23 PM »

Hi,
the red and black wires are the motor wires. Don't worry about the rest of them yet.

You have Output#1 assigned to <port1 pin4> and the spindle Dir pin as <port1 pin4>, a clash.
Make Output#1 <port1 pin2> Output#2 <port1 pin3>.

Now use a voltmeter to establish which of pins 4 &5 are PWM.

Craig
Logged

My wife left with my best friend...
     and I miss him!
joeaverage
Active Member

Online Online

Posts: 1,729



View Profile
« Reply #9 on: November 14, 2017, 05:40:29 PM »

Hi,
once you've cleared the clash on pin 4 try setting the PWM Min to 50%. That will mean that pin 5 (or possibly 4)
is about 2.5V whereas the other pin will be 0V or 5V depending on whether the spindle is supposed to be running
or not. May make it a bit easier to work out which pin is which.

Craig
Logged

My wife left with my best friend...
     and I miss him!
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!