Author Topic: ESS and C11G help needed  (Read 718 times)

0 Members and 1 Guest are viewing this topic.

Offline NKS

  • Active Member
  • Posts: 9
    • View Profile
ESS and C11G help needed
« on: June 14, 2018, 05:26:49 PM »
Hi Folks,

I'm having an excruciating time trying to get my spindle control working.  Running Mach 4, ESS v216, and a C11G BOB.  All I'm trying to do is get a variable 0-5V output from the board to replace a potentiometer that drives my brushless dc spindle motor. 

My understanding is that pin 14 on the board should be able to do this, but I can't get the ESS configured correctly.  Not sure if I should be in PWM, OB, or relay control.  Some have said to set the spindle up as I would another axis motor.  Other's have said to leave it in PWM, no step or dir signals needed.  I'm completely clueless.

The board also has this 'analog output' pin.  Should I try using this instead of pin 14?  Does this work in cunjunction with pin 14?

My sincere thanks to anyone who can shred some light on this.


Online Tweakie.CNC

  • Global Moderator
  • *
  • Posts: 7,641
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: ESS and C11G help needed
« Reply #1 on: June 15, 2018, 02:32:10 AM »
Have you followed the directions given in page 10 of the C11G users manual and are you using the external power supply (connected to X1) ?

Tweakie.
Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.

Online joeaverage

  • Active Member
  • Posts: 4,520
    • View Profile
Re: ESS and C11G help needed
« Reply #2 on: June 15, 2018, 03:34:57 AM »
Hi,
I think there might be two ways you can do this.

First, as tweakie has suggested use the capabilities of your C11 breakout board. My reading of the manual suggests that its analogue output is related to the frequency
of the input pulses. If my interpretation is correct then pin 14 port 1 of the ESS should be configured as a step signal of a step/dir pair. Note you will require a external
nominal 10V supply. If you have the ESS pulse at 25kHz the analogue output will be 10V.

Another way of doing it but does not use the specialist circuit built in to your breakout board is to use a regular output, say pin 9. If you have the ESS produce a PWM output on pin9
the output of your breakout board (pin 9) will be PWM also. A small capacitor would smooth the output and would produce a roughly 0-5V analogue voltage.

Given the simplicity of this last idea I would suggest that you try it as an experiment. Assign pin9 port 1 in the ESS plugin as your spindle PWM and measure the output voltage
of pin 9 of your breakout board with a multimeter, even without a capacitor or low pass filter it should produce an analogue voltage which might be sufficient for you.
If it doesn't work...well it didn't cost anything to try.

Craig
My wife left with my best friend...
     and I miss him!

Online joeaverage

  • Active Member
  • Posts: 4,520
    • View Profile
Re: ESS and C11G help needed
« Reply #3 on: June 15, 2018, 03:40:24 AM »
Hi,

Quote
Note you will require a external
nominal 10V supply. If you have the ESS pulse at 25kHz the analogue output will be 10V.
I think if you had a 5V supply then the max output would also be 5V. I think the recommendation is the the supply be separate so that your spindle
and breakout board can't 'fight' each other.
My wife left with my best friend...
     and I miss him!

Offline NKS

  • Active Member
  • Posts: 9
    • View Profile
Re: ESS and C11G help needed
« Reply #4 on: June 15, 2018, 10:07:21 AM »
Thanks for the responses guys!

If I tell the ESS config that I want 'step/dir' spindle control then the pin mapping gets weird.  In 'PWM' mode I can map a pin for the PWM signal.  However, in 'step/dir' mode this option turns into 'Spindle - unused'.  And while I can map pin 14 to 'spindle - unused', I cannot turn the pin on/off, much less control it's voltage.

The manual I'm following is here: http://cnc4pc.com/Tech_Docs/C11G-R9_USER_MANUAL.pdf  

I've followed the manual in connecting 2x 5V signals to power the board, and connecting a 12V signal (as per page 7).  There are pins for "0-10V" and "GNDA" which I believe are the variable analog and analog ground pins (these are completely separate from pin 14).  I'm lost when it comes to how pin 14 is related, if at all, to these analog voltage pins.

Joe, I tried your PWM on pin 9 idea, but I can't get any voltage out.  I'm probably missing something on the mach config side of things...  I've set a maximum spindle speed (in 2 places on that screen), step/dir spindle axis is left as 'none'.  I notice that although spindle PWM is an option in the ESS config, it is not showing up in the mach config output signals tab.



Online joeaverage

  • Active Member
  • Posts: 4,520
    • View Profile
Re: ESS and C11G help needed
« Reply #5 on: June 15, 2018, 01:00:01 PM »
Hi,
lets start with using the built in spindle control circuitry.

On the Configure/Plugins/ESS V220/1) Settings.....choose OB
Confirm on Configure/Plugins/ESS V220/Motors that motor 5, which is going to be your spindle is set for step/dir
On Configure/Plugins/ESS V200/Pins Config enter at Port1Pin8 'spindirection' and at Port1Pin14 'spinpulse'
Click OK to save the changes to the .ini file.

On Configure/Plugins/ESS V200/Output Signals....Check Enable Motor 5 Step and select 'spinpulse' from the drop dpwn list of available pins
an Check Enable Motor 5 Direction and select 'spindirection' from the drop down list of available pins.

Now we need to configure Mach, also called Control in the latest Mach builds.
On Configure/Mach(Control)/Axis Mapping Enable OB(6) and select 'Motor 5' from the drop down list of available motors
and on Configure/Mach(Control)/Motors tune Motor 5

My knowledge at this point is pretty thin, you may need to experiment with Motor 5 tuning to get the right results. What we a re trying to achieve is that
at maximum spindle speed that Pin 'spinpulse' is pulsing at 25kHz. May I suggest trying Steps Per Unit at 25000, velocity at 1 and acceleration at 0.1

On Configure/Mach(Control)/Spindle select OB(6) as Step/Dir axis and in  row 0 populate the max and min values of your spindle.

If you have an oscilloscope now is the time to issue the MDIs:
M3, turn the spindle on clockwise
Check pin8 and note the output voltage
Now Issue M4, turn the spindle on counterclockwise
Check pin8 and note the output voltage. It should be in opposite state to the M3 condition

With M3 issued then;
S10000 (if 10000 is your max rpm) observe the pulse stream at pin 14, aka your 'spinpulse' output. Ideally it would be pulsing at 25kHz.
With an appropriate 10V supply, or even a 9V battery for experimental purposes, fitted to the BoB the analogue output pins should output max voltage.

Try the above ans see how you get on.

Craig
My wife left with my best friend...
     and I miss him!

Online joeaverage

  • Active Member
  • Posts: 4,520
    • View Profile
Re: ESS and C11G help needed
« Reply #6 on: June 15, 2018, 11:58:58 PM »
Hi,
had some more thoughts about the motor tuning parameters.

I read the ESS notes about it in the Warp9 forum. It suggested that the steps per unit be set equal to one and the velocity be set to the maximum of your spindle.
I am going to assume that your spindle max is 10,000 rpm. Thus if you issued an M3, ie turn the spindle on and an F word of 10,000 the ESS output pin would produce
10,000 pulses in a minute.

That's not what the C11 requires though. From the C11 manual the analogue output is maximum when the input is a pulse stream of 25,000 per second.
For a full minute:
60 X 25,000 = 1,500,000 pulses.

I would suggest that you put 10,000 in the velocity of the motor tuning page, your assumed maximum. Therefore the step per unit must change to:
1,500,000 / 10,000 = 150.

Note that this behavior is NOT PWM but rather F to V (frequency to voltage). The C11 manual tells us that the analogue output is maximum when pulsed at 25Khz, and would be half of maximum
at 12.5kHz and so on.

Craig
My wife left with my best friend...
     and I miss him!