Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: theliadir on October 08, 2022, 04:43:48 AM

Title: Control spindle speed with Mach3
Post by: theliadir on October 08, 2022, 04:43:48 AM
Hello everyone

I would like to install a spindle on a CnC I bought second hand.
I have first CnC experience with the Dremel CnC, but am otherwise
inexperienced and new with Mach3.

I would like to install the following spindle:
https://www.aliexpress.com/item/32325323186.html?spm=a2g0o.order_list.0.0.22ab1802ycUMve
The unit would need to be controlled with the analog 0-10V signal.

The cnc is run by a triple beast board. The Triple Beast has a 0-10V output:
https://www.upload.sorotec.de/doku/manuals/TripleBeastBOB-Installation.pdf

In Mach3 (R3.043.062 - Demo) I made the following settings:
(pictures attached)
Output Signals:
- Motor Output: Enabled Step Pin 1, Dir Pin 1, Step Port1, Dir Port 1
- Output #1 Enable Port 1 and Pin Number 17
- Spindle Setup: Relay Control M3 and M3 Output #1 (hack removed)
Motor Control: Use spindle Motor Output, PWM Contorl, PWMBase 250,
Minimum 0%

I've gotten to the point where I can turn the spindle on and off in Mach3.

If I use my VC276TRMS
(https://www.amazon.de/Voltcraft-VC-8235910-VC276-TRMS-DMM/dp/B07DKSW9N5)
measure the output, it only measures 0 or 10 volts.
It never comes out 5 or 6 volts. If I understand it correctly,
it should.

When I connect the spindle, does it not adjust the speed when I go to
adjusted when I set it to 20% or 50% in Mach3. It turns with
full speed.

Does anyone have any ideas?
Title: Re: Control spindle speed with Mach3
Post by: JohnHaine on October 08, 2022, 05:21:53 AM
That appears to be a spindle controller, not a spindle!  What spindle are you using?

My understanding is that the PWM signal is generated digitally and there is a trade-off between precision and rate.  I think if you read the documentation carefully they recommend a rather low frequency, more like 25Hz than 250.  Hopefully the filter in the BoB will have a long enough time constant to smooth this - I would check but that manual is in German.

Look out for isolation between the BoB and the controller.  If you haven't already had a "magic smoke" moment is is probably OK, but some motor controllers do not have an isolated control input because the 0v line in the controller floats at mains voltage.  Some BoBs incorporate isolation.
Title: Re: Control spindle speed with Mach3
Post by: theliadir on October 12, 2022, 02:19:22 PM
Hi John

Thank you for your help and sorry for my late answer.
I posted an answer but probably forgot to publish and now I dont find it anymore.

The spindle I am using whith the controller I linked is this one: https://de.aliexpress.com/item/32341418790.html?spm=a2g0o.order_list.0.0.285c5c5fUByh7k&gatewayAdapt=glo2deu

I actually kinda figured it out. there are pin connectors which need to be connected correctly.
Altought it works now, the BoB goes into emergency error sometimes when I turn on the spindle.
Well ... I am getting there. step by step.

Thx again. Take care.
Title: Re: Control spindle speed with Mach3
Post by: JohnHaine on October 12, 2022, 02:58:16 PM
Glad it's working.  Sounds like an electrical spike is getting into the estop wiring from the spindle perhaps.
Title: Re: Control spindle speed with Mach3
Post by: theliadir on October 12, 2022, 03:18:59 PM
Yeah, this might be it. I will try with real g-code and see it its an issue or not.
Title: Re: Control spindle speed with Mach3
Post by: Nimras1 on December 05, 2022, 01:40:00 PM
hello, can someone help me? I have vfd chinese inverter AE200H and 5 axes breakout board db25 with 0-10v control. How to connect it, which pins from bob must be connected to vfd?
Title: Re: Control spindle speed with Mach3
Post by: JohnHaine on December 05, 2022, 01:43:03 PM
10 seconds on Google found this: https://www.vallder.com/images/product_details_images/ae200/AE200a-x.pdf
Title: Re: Control spindle speed with Mach3
Post by: Nimras1 on December 05, 2022, 01:52:00 PM
Yes but i cant find where connect p17, and pwm and do i need something else, i know 0-10v go to FV and com.
Title: Re: Control spindle speed with Mach3
Post by: JohnHaine on December 05, 2022, 01:58:01 PM
Can't say without decent documentation on the BoB.  Does it just output PWM of is there an internal filter?
Title: Re: Control spindle speed with Mach3
Post by: Nimras1 on December 05, 2022, 02:06:34 PM
I dont know, i need help. This is link of bob, in downloads have datasheet

https://www.vallder-rs.com/sr/c-sr/300/38/kora%C4%8Dni-motori-drajveri/mach3-5-axis-board-detail#details
Title: Re: Control spindle speed with Mach3
Post by: JohnHaine on December 05, 2022, 02:12:18 PM
See page 3 of the manual for wiring diagram.  Page 7 shows the spindle setup including setting the PWM base frequency.
Title: Re: Control spindle speed with Mach3
Post by: Nimras1 on December 05, 2022, 02:15:30 PM
Ok but what connect from bob and where to vfd? How to know this

I mean which pins must be connected for both side
Title: Re: Control spindle speed with Mach3
Post by: JohnHaine on December 05, 2022, 04:04:36 PM
You'll just have to read the manuals.  It isn't hard.
Title: Re: Control spindle speed with Mach3
Post by: Nimras1 on December 05, 2022, 06:48:46 PM
What I'm asking is not in the manual, and I can't find a query to connect these two things.
If anyone knows, please help me
Title: Re: Control spindle speed with Mach3
Post by: reuelt on December 05, 2022, 09:18:12 PM
Ok but what connect from bob and where to vfd? How to know this

I mean which pins must be connected for both side

If you are using the 5-Axis BOB, jumper for relay must be shorted. Relay is controlleed by Pin 17. Relay Closed when P17 is active.
Relay output connect to FOR and DCM of VFD (TOP ROW in picture)

0-10V output connect to VI of VFD and Analog Ground to ACM. (Bottom ROW in picture). Activated by Pin 1

You need a small 0.1uF capacitor between VI and ACM. Also the two wires must pass thru a ferrite core.

Set the VFD control function to external analog input.


Title: Re: Control spindle speed with Mach3
Post by: reuelt on December 05, 2022, 09:50:12 PM
Confirm Mach3 configurations