Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: LerninCNC on April 20, 2019, 09:21:25 PM

Title: Spindle Relay Configuration Questions
Post by: LerninCNC on April 20, 2019, 09:21:25 PM
I've just about got my mini lathe cnc conversion complete but have stumbled a bit with configuring the BoB spindle relay.  I want to turn the spindle on and off only with Mach3.  Speed will be controlled by a pot.  I've assigned Ouput 1 for M3 and M4 as I don't anticipate needing to run the spindle in reverse.  Based on the limited information contained in the BoB instruction manual (attached) I enabled Output #1 and assigned Pin 16.  Also tried Pin 17.  Checked Active Low too with no change.  The spindle is not wired to the relay terminals.  Using a multimeter and inputing a M3 S1000 command in the MDI I don't detect continuity across the relay terminals.  The motors turn and move the carriage and cross slide as expected so I know the board is powered up.  Does the relay need a load on it to close the contacts?  Is my configuration not correct?  Bad relay?  Looking for some help and guidance to get the lathe functional.     

My configuration screen shots are attached as is the BoB manual.

Thanks 
Title: Re: Spindle Relay Configuration Questions
Post by: reuelt on April 21, 2019, 12:22:53 AM
YOUR BOB cannot control Spindle Speed and does NOT have opto-isolation for inputs.
It is more expensive to patch it with daughter optional boards/circuits.

Please Buy
https://www.ebay.com/p/CNC-5-Axis-Interface-Breakout-Board-for-Stepper-Motor-Driver-CNC-Mill-Mach3-Lo/930903162
and replace your BOB.

That BOB can control  spindle on/off as it has ONE relay and Spindle speed as it has a 0-10V Analogue output to control speed. Also inputs have opto-isolation.
Unfortunately it has only 1 relay so you cannot have reverse unless you add another relay.
i have the manual for it and can get you going once you have bought that BOB.
Title: Re: Spindle Relay Configuration Questions
Post by: LerninCNC on April 21, 2019, 01:08:33 AM
Thanks for your response.  It doesn't surprise me that my BoB doesn't have the features I need.  It's been kicking around my "spares" drawer for a few years now.  I'll order the board you recommended.

Title: Re: Spindle Relay Configuration Questions
Post by: reuelt on April 21, 2019, 03:32:44 AM
"I'll order the board you recommended"

Attached  is manual for the popular 5-axis MACH3 BOB for your download and retention.

Happy CNC ing

You can even add a cheap "single-relay board" design for Aduino if you want to implement M4 for spindle counterclockwise spin if you use the unused pins (for the unused 5th axis) to drive a Aduino relay board.
Title: Re: Spindle Relay Configuration Questions
Post by: LerninCNC on April 21, 2019, 10:07:55 AM
Thanks for the manual.  The new BoB will be ordered today.
Title: Re: Spindle Relay Configuration Questions
Post by: LerninCNC on April 30, 2019, 09:46:31 PM
The new BoB came in today's mail.  The board relay needs 5vdc to the coil.  No problem here as I can power it with the supplied USB cable or use a 5vdc "wall wart" power supply.  My motor is rated at 110vdc so I can't wire the relay to the DC side of the motor control board because the BoB relay is rated at 30vdc or 25vdc.  The plan is to wire the relay to the AC power supply to the motor control board.  Does anyone have an opinion as to whether this will work without damaging the motor control board? 

Thanks
Title: Re: Spindle Relay Configuration Questions
Post by: reuelt on May 01, 2019, 02:42:54 AM
The BOB board must be powered by 12-24V otherwise the optically isolated inputs will not work.
USB connection is NOT required

The relay can take 250V AC 10Amps so can switch 110V AC directly.
Or it can also switch DC INSTEAD up to 30V also up to 10A current.

I think it is better to switch the DC side of your spindle.
The 0-10V Analog output of the BOB should connect to the ground and wiper pin of your Speed controller variable POT that now control the spindle speed.
Title: Re: Spindle Relay Configuration Questions
Post by: ZASto on May 01, 2019, 04:05:41 AM
Switching CD side of the spindle would be a disaster for a relay.
The killer of relay contacts in DC switching is electrical arc. It can destroy contact quickly.
DO NOT trust what is written on relay regarding DC switching. Relays do not have arc extinguisher.
Title: Re: Spindle Relay Configuration Questions
Post by: reuelt on May 01, 2019, 05:48:27 AM
The relay is rated at 10A (resistive load)
Max AC voltage 250VAC
Max DC voltage 30VDC
The lower DC voltage (30V MAX. ONLY) permissible already caters for DC arcing. That's why you cannot use 250VDC when you can use 250VAC.

For Inductive load (motors) the max. current rating should be derated 50% meaning 5A is max if using inductive loads like a motors.
Title: Re: Spindle Relay Configuration Questions
Post by: LerninCNC on May 01, 2019, 09:48:09 AM
The BOB board must be powered by 12-24V otherwise the optically isolated inputs will not work.
USB connection is NOT required

The relay can take 250V AC 10Amps so can switch 110V AC directly.
Or it can also switch DC INSTEAD up to 30V also up to 10A current.

I think it is better to switch the DC side of your spindle.
The 0-10V Analog output of the BOB should connect to the ground and wiper pin of your Speed controller variable POT that now control the spindle speed.


Thanks for your response.  I already have a 12vdc power supply in my electronics cabinet so providing power to the BoB will be easy.
Title: Re: Spindle Relay Configuration Questions
Post by: LerninCNC on May 01, 2019, 09:56:53 AM
Are you saying that if I wire the 0-10vdc BoB output to the wiper and ground points on the motor control board that will turn the spindle on and off with a M3 and M5 command?
Title: Re: Spindle Relay Configuration Questions
Post by: Tweakie.CNC on May 02, 2019, 03:26:51 AM
Hi LerninCNC,

You can even add a cheap "single-relay board" design for Aduino if you want to implement M4 for spindle counterclockwise spin if you use the unused pins (for the unused 5th axis) to drive a Aduino relay board.

The 5th axis direction pin is jumper selectable and can be used for either the onboard relay or external direction control – it cannot be used for both.

 
The BOB board must be powered by 12-24V otherwise the optically isolated inputs will not work.
USB connection is NOT required

A 5 Volt connection is required for the BoB and the USB connection from the PC is the easiest method.
And (as mentioned by Reuelt) a 12 – 24 Volt supply will also be required to power the inputs and the analogue output of the BoB.

I think it is better to switch the DC side of your spindle.
 

As already mentioned by ZASto this is extremely bad advice.
Ideally, using the BoB relay to switch the AC side of the motor controller via an AC switching solid state relay would produce far less electrical noise and cause less problems than taking any high voltage AC or high current DC to the BoB.

Hope this helps,

Tweakie.

Title: Re: Spindle Relay Configuration Questions
Post by: TPS on May 02, 2019, 04:05:31 AM
btw witch spindle Controller are you using?
Title: Re: Spindle Relay Configuration Questions
Post by: reuelt on May 02, 2019, 04:26:13 AM
Are you saying that if I wire the 0-10vdc BoB output to the wiper and ground points on the motor control board that will turn the spindle on and off with a M3 and M5 command?

No
M3 On and M5 off is done by the relay.

Switching the AC side requires "a SOLID STATE RELAY" that uses 0 crossing TRIAC to on and off the power supply. BUT it means you can never implement M4 if you do that. AC is only ON or OFF ie. NO DIRECTION. If you are using a (wood) router and not a VFD spindle, That is the way to do it.

I have both M3 and M4 working with my VFD spindle.
The relay connects to the VFD inverter at low voltage (TTL LOGIC) level at the inverter. One relay turns the spindle clockwise, the other relay turns the spindle anti-clockwise.
(see attached)
Title: Re: Spindle Relay Configuration Questions
Post by: LerninCNC on May 02, 2019, 09:26:23 AM
btw witch spindle Controller are you using?

Currently my spindle direction is controlled with a switch (FWD-OFF-REV) and speed is with a potentionmeter.
Title: Re: Spindle Relay Configuration Questions
Post by: LerninCNC on May 02, 2019, 09:27:19 AM
Are you saying that if I wire the 0-10vdc BoB output to the wiper and ground points on the motor control board that will turn the spindle on and off with a M3 and M5 command?

No
M3 On and M5 off is done by the relay.

Switching the AC side requires "a SOLID STATE RELAY" that uses 0 crossing TRIAC to on and off the power supply. BUT it means you can never implement M4 if you do that. AC is only ON or OFF ie. NO DIRECTION. If you are using a (wood) router and not a VFD spindle, That is the way to do it.

I have both M3 and M4 working with my VFD spindle.
The relay connects to the VFD inverter at low voltage (TTL LOGIC) level at the inverter. One relay turns the spindle clockwise, the other relay turns the spindle anti-clockwise.
(see attached)

Got it.  Thanks.
Title: Re: Spindle Relay Configuration Questions
Post by: LerninCNC on May 02, 2019, 09:28:46 AM
Hi LerninCNC,

You can even add a cheap "single-relay board" design for Aduino if you want to implement M4 for spindle counterclockwise spin if you use the unused pins (for the unused 5th axis) to drive a Aduino relay board.

The 5th axis direction pin is jumper selectable and can be used for either the onboard relay or external direction control – it cannot be used for both.

 
The BOB board must be powered by 12-24V otherwise the optically isolated inputs will not work.
USB connection is NOT required

A 5 Volt connection is required for the BoB and the USB connection from the PC is the easiest method.
And (as mentioned by Reuelt) a 12 – 24 Volt supply will also be required to power the inputs and the analogue output of the BoB.

I think it is better to switch the DC side of your spindle.
 

As already mentioned by ZASto this is extremely bad advice.
Ideally, using the BoB relay to switch the AC side of the motor controller via an AC switching solid state relay would produce far less electrical noise and cause less problems than taking any high voltage AC or high current DC to the BoB.

Hope this helps,

Tweakie.


Thanks for the clarifications. 
Title: Re: Spindle Relay Configuration Questions
Post by: reuelt on May 02, 2019, 09:42:19 AM
" switch (FWD-OFF-REV)"

VERY GOOD!
Now One relay should just be soldered to imitate the FWD function of that switch (to get M3 working)
Another relay should just be soldered to imitate the REV function of that switch (to get M4 working)

 
Later Buy a relay for Arduino like:-

https://www.amazon.com/Tolako-Arduino-Indicator-Channel-Official/dp/B00VRUAHLE?SubscriptionId=AKIAILSHYYTFIVPWUY6Q&tag=duckduckgo-d-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B00VRUAHLE

It will cost peanuts to get M4 working.
Title: Re: Spindle Relay Configuration Questions
Post by: LerninCNC on May 02, 2019, 09:48:33 AM
" switch (FWD-OFF-REV)"

VERY GOOD!
Now One relay should just be soldered to imitate the FWD function of that switch (to get M3 working)
Another relay should just be soldered to imitate the REV function of that switch (to get M4 working)

 
Later Buy a relay for Arduino like:-

https://www.amazon.com/Tolako-Arduino-Indicator-Channel-Official/dp/B00VRUAHLE?SubscriptionId=AKIAILSHYYTFIVPWUY6Q&tag=duckduckgo-d-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=B00VRUAHLE

It cost peanuts to get M4 working.
Thanks for the link.
Title: Re: Spindle Relay Configuration Questions
Post by: reuelt on May 02, 2019, 10:00:09 AM
You should connect the BOB ONLY to a 12-24V power supply.
and DO NOT CONNECT a USB CABLE TO THE PC!

(i will explain to you why via PM if you want to know)
Title: Re: Spindle Relay Configuration Questions
Post by: LerninCNC on May 02, 2019, 10:03:29 AM
You should connect the BOB ONLY to a 12-24V power supply.
and DO NOT CONNECT a USB CABLE TO THE PC!

(i will explain to you why via PM if you want to know)

Yes, I would like to know.  While I appreciate you sending me the BoB manual it doesn't do a good job of explaining the boards functions.
Title: Re: Spindle Relay Configuration Questions
Post by: TPS on May 02, 2019, 12:23:29 PM
Currently my spindle direction is controlled with a switch (FWD-OFF-REV) and speed is with a potentionmeter.

so there must be a Kind of Controller, maybe it has got control Inputs to Switch ON/OFF instead of switching
the powersupply. just a thought.