PDA

View Full Version : Control Cabinet Wiring



GREG021
14-04-2021, 08:00 PM
Hi All

Would some knowledgeable member please cast their eyes over my attempt at the wiring of my controls?

29809

I confess to being a bit of a novice and inclined to senior moments and would prefer not to create smoke.

:whistle:

Kitwn
15-04-2021, 01:48 AM
The image appears to have been compressed a bit too far to be quite sure what's there and I'm not familiar enough with that specific BoB to know which of the six connections on the right is which without further labelling but Q1 looks to be an NPN bipolar transistor with the emitter connected to the +12V rail which is the wrong way round, should be the collector to +12/24V and the emitter to the relay coil.

You also have an LED in series with the base of the transistor. Depending on the hfe value of the transistor there may not be enough current to get much light out of it. I'd suggest you put the resitor R1 and LED in parallel with the relay coil so that the transistor drives it. The value of R1 will depend on the required current for the LED you have and the exact voltage of the 12/24V supply.

The back-emf protection diode D1 across the relay coil is the wrong way round and will be forward biased when you drive the relay thus shorting it out which may be terminal for the diode and the transistor.

Most serious of all...
I'm not sure what the difference in function is between X5 and X6 but your relay switches between "ON forward" and "Reversing switch active" without any obvious 'OFF' position being available. Note that with X4 connected to the NC contacts on the relay, powering the VFD will start the spindle in the forward direction if the relay is not energised. This is potentially messy and could permanently affect your piano playing ability. Some sort of safety interlock for tool changing would be advisable.

Apart from that....:congratulatory:

Clive S
15-04-2021, 07:33 AM
The relay on the bob only brings out two contacts on to the terminals, but the third contact can be got by soldering another wire under the bob to the other contact.

Neale
15-04-2021, 07:37 AM
Slightly more general comment - if this is for a router, I'm not sure if you ever need to reverse the spindle. Just forward is enough. So scrap that transistor and extra relay altogether and use the BOB relay to switch the VFD "forward" connection directly. Much simpler. I have never had "reverse" available on my router - and in the few years I have been using it, never needed it.

Apart from that, I'm with Kit - it's just a little too fuzzy to clearly see all the detail.

Kitwn
15-04-2021, 09:50 AM
Slightly more general comment - if this is for a router, I'm not sure if you ever need to reverse the spindle. Just forward is enough. So scrap that transistor and extra relay altogether and use the BOB relay to switch the VFD "forward" connection directly. Much simpler. I have never had "reverse" available on my router - and in the few years I have been using it, never needed it.

Apart from that, I'm with Kit - it's just a little too fuzzy to clearly see all the detail.

VFDs get used for all sorts of motors including pumps, conveyors and traction as well as routers. Some applications might want to reverse the motor but I'm with Neale if this is for a router. KISS rules!

Kit

Neale
15-04-2021, 10:19 AM
Certainly for something like a mill which might be used for tapping, then reverse is essential. Must admit, though, only time I've needed reverse on my mill was when I made a custom T-slot cutter and realised just before I turned it on that I had made the teeth left-handed... Had to temporarily rewire the motor in those pre-VFD days. Ho hum...

There are some mills with a back-geared spindle as well, where you run the motor in reverse in the low-speed range. But for reversing, you do need two separate outputs from the BOB with the capability of both being "off" - a single change-over contact and relying on the "speed" signal to stop the spindle is not enough.

GREG021
15-04-2021, 01:02 PM
Hi All

Greatly appreciate your response but I think I need to provide a better image.
I would prefer to have reverse, as this is a mill and I hope to thread with it.
First things first how to provide a bigger and better image.
I will go and figure it out. One thing I would add is I have used a Keyes sr1y relay from the BoB to try and control the direction. I will split up the images to see if that helps.
29810
29811
29814

Many thanks, Greg

Kitwn
15-04-2021, 10:50 PM
Greg,
The relay diagram has the polarity of the supply the correct way round for the diode and the transistor, you have them reveresed in your first diagram.

Your problem with reversing the spindle is that there is only the one "spindle ON/OFF' output from the BoB you have chosen so it cannot automatically respond to separate FWD and REV start codes from the G-code.

Kit

GREG021
16-04-2021, 12:40 PM
Hi Kit

Thanks for getting back to me.
I am trying to follow previous diagrams but do not really understand.
Here goes what I thought happens.
There is a relay on the BoB that sends a signal to the Keyes Sr1y if you want to switch motor direction. In the NC position, it is wired for Forward and in the NO position, it will use reverse.
Not really sure how other than it is controlled by Mach3.
I was hoping someone more knowledgeable might understand and help.
Greg:ambivalence:

Neale
16-04-2021, 07:46 PM
Greg,

the problem is that the VFD has two inputs. One for starting in forward, one for starting in reverse. It's not quite as simple as a changeover relay operating one or the other - you need to be able to switch one for fwd, the other one for rev, or neither to stop the spindle. Your BOB only has one output - which it states is for spindle on/off, not direction switching - and even if you take that to a second relay with changeover contacts, you still do not have a true "off" position. To be honest, I don't think that that BOB is going to do what you want unless it has a second output somewhere. BOBs with only one relay output are quite common (the one in my first router was the same) but you need something with two separate outputs to get fwd/rev/stop switching. You cannot use the changeover relay contacts to provide direction switching and rely on the 0-10V analogue speed output to stop the spindle. If you are changing tools in the middle of a job, you want a stopped spindle to definitely stay stopped, and not suddenly decide to creep a bit because the analogue signal has drifted a bit.

Actually, looking more closely at the BOB connection diagram, it might be possible to do what you need. You have shown yourself using the "spindle control" output pins. However, there is also an option to select between "B axis direction" and "relay output" on one of the pins on the bottom row (as per your picture). This is controlled by a jumper next to the relay. I can only guess at how the actual switching is arranged, but it might be possibe to configure things so that one of these drives "VFD fwd" and the other "VFD rev". But without knowing a bit more about the BOB internals and how it does its switching, I'm not sure with the information available exactly how this could be arranged. You could scrap your additional relay and transistor in this case.

GREG021
16-04-2021, 09:30 PM
Hi Neale
Thank you for your help.
I understand, so what are other people using to find this control?

Greg

Clive S
16-04-2021, 10:10 PM
Hi Neale
Thank you for your help.
I understand, so what are other people using to find this control?

Greg

I have used these in the past

https://www.ebay.co.uk/itm/5V-1-2-4-8-Channel-Relay-Board-Module-for-Arduino-Raspberry-ARM-AVR-PIC/262499095094?hash=item3d1e2a5236:g:NdsAAOSwnNBXb~m S

https://photos.app.goo.gl/dtehJx1BSmoUGyX27

With a china bob with linuxcnc on a Boxford 125 lathe for threading etc

net spindle-cw => parport.0.pin-08-out
net spindle-ccw => parport.0.pin-09-out
net spindle-on => parport.0.pin-17-out

net spindle-phase-a <= parport.0.pin-11-in
net spindle-phase-b <= parport.0.pin-10-in
net spindle-index <= parport.0.pin-12-in

net all-home <= parport.0.pin-13-in
net estop-ext <= parport.0.pin-15-in

GREG021
17-04-2021, 11:43 AM
Hi Clive

Thank you so much for your reply, I am in the process of studying it at the moment, takes longer these days.:upset: Would it be possible to have a wiring layout to make it easier?
You are using the same BoB as me so could be a great solution.
Did you have to use Linuxcnc to make it work or just preference?

Greg

Doddy
17-04-2021, 12:12 PM
Following from Neale's reply.

The BoB is basically a collection of discrete inputs and outputs. One, by design, is able to drive an onboard relay. One other is able to drive a PWM output. But, apart from these functions, they are all just bog standard discrete outputs.

Now, the problem you have is interfacing to the VFD. The inputs to the VFD need to be pulled low (connected to ground) to activate. You *could* connect these directly to the BoB outputs (any of, including the relay output... more in a second), but the problem is they are likely pulled to 12-24V internally to the VFD. You don't really want to connect the outputs from the BoB to something at that voltage (though, it's likely to survive through the internal clamp diodes on the logic outputs). But I digress.

OP - you show that you basically understand an NPN transistor switching element. Use NPN transistors to provide the switch-to ground (collect -> input, emitter -> ground), and a 4k7 resistor (or near-neighbour) to any of the unclaimed outputs on the BoB, Two - one for forward, one for reverse.

With that configuration, remove the jumper for the relay (unnecessary) from the BoB. Then, an active-high signal into the BoB from Mach3 on the corresponding pin will activate the corresponding input into the VFD. As Neale suggests - you can re-appropiate the B-axis outputs - whichever pins they are bound to - just use those to create outputs within Mach that you then bind to the forward/reverse "relay" pins in the Mach3 configuration page.

I'm not able to look at Mach3 to give precise details at this time, but speak up if that's less than clear.

Doddy
17-04-2021, 12:16 PM
29819

Apologies for brevity. - something like this

GREG021
17-04-2021, 12:26 PM
Hi Doddy

Thank you for your reply, I am in the process of getting my head around it.
I have just ordered a 2 relay board as shown in Neale's setup, could I use that instead of the NPN transistors? (as I have just bought it)
The rest seems remarkably straight forward even for an old duffer like me.

Greg

Doddy
17-04-2021, 12:28 PM
yeah. two relays will work fine

GREG021
17-04-2021, 12:29 PM
Thank's Doddy your help is greatly appreciated.:cheerful: