theres a whole mess of often contradictory information online about the proper way to configure blackbox/huanyang inverters to work together. one video on youtube shows a method which appears to work using just the reference voltage from the BB, but then it seems he gets the spindle to stop when 0-10 voltage from blackbox goes to zero by setting minimum spindle speed to zero too.. this seems a bad idea since even a watercooled spindle has a minimum safe speed, and if some tiny stray voltage gets on the 0-10v line, my spindle could activate and try running at 3 rpm or something. i saw another method which used the coolant relay output to switch on the spindle, with a post code to turn on that relay added to all gcode.. it was described as a "hack" by the author. are these the only two options? i ask because when i choose the "run spindle" option on the interface, i hear a relay output clicking in the blackbox.. this suggests theres a relay i can wire the inverter to? or is that the coolant relay i can hear? the instructions state that you can set the extra relay output to respond to m5 spindle start commands, but the same page states you should disable the relay if you are using the 0-10v output to control the vfd speed.. ..?! im very confused. theres also a ton of contradictory info regarding the actual vfd settings.. the manual is not the clearest document ever. ..ive got something that works nicely with the manual controls and my spindle, but a) i want to control with the BB and b) ive lost the guide i followed to set it up originally, and cant find it online.
ive also read you can use the pwm output from the blackbox to control the vfd but theres nothing i can find online about how to do that, and pwm is only mentioned in the blackbox guide wrt. controlling a servo, and requires a custom firmware?
For tech support for the VFD/Spindle itself, the manual, manufacturer, and the vendor you purchased from should be the primary support channels - only they "know" their products The BlackBox docs covers the BlackBox side of it - with limited community provided writeups for some popular VFDs Please refrain from finding information on third party channels. We have detailed official Documentation: See: docs:blackbox-4x:connect-vfd [OpenBuilds Documentation] The right way to do this is to set Minimum Freq in the VFD parameters to prevent it spinning up unless commanded to be over 7200RPM. This is also the way you control it using only 0-10v. 0-<7200RPM = spindle off, 7200-24000RPM = spindle on You could, but its not in our docs - not needed if the VFD is properly setup with working Minimum Freq parameters as recommended. Coolant output is a Mosfet: See docs:blackbox-4x:connect-coolant [OpenBuilds Documentation] The relay you hear, is over here: docs:blackbox-4x:jumper-relay [OpenBuilds Documentation] - and do note the "DISABLE THE RELAY" section - which says "Typical for ... Spindle wired to the PWM/0-10v (VFD) Terminals, ... With the jumper removed the PWM signal will not be sent to the relay (which would make it chatter)" You forgot to remove the jumper Read that page again, it states clearly the Relay option is for esoteric VFDs that cannot be configured to only use 0-10v (we've not come across one yet! Almost all VFDs CAN be correctly configured) Very different setup. See docs:blackbox-4x:connect-rc-servo [OpenBuilds Documentation] - a VFD is not a servo (very different thing)
Yeah I saw that.. As I noted the guide shown as the "official" method on this site requires the minimum speed of the spindle to be set to 0, otherwise it won't stop when the m5 command is given.. This idea I don't like as detailed above.. A stray current on the 0-10v line could try to run my spindle at stupidly low rpm and let the magic smoke out. I might try the method you linked, using the on board relay.. However custom flashing the blackbox also gives me pause. However I might just go with manual spindle control. Possibly less risk of some rogue signal firing up the spindle. I did message the seller of the vfd/spindle, but I've not heard back weeks later..also, should I trust the advice of an ebay seller any more than what I read online? I feel a definitive setup still eludes us.
I am wondering where would this rogue signal come from? When the pin on the blackbox is low it is driven low, not just floating around about low (0v). Once the BB gets an M3 Sxxxxx command the pin will start to run a PWM signal which will generate the 0 to 10 volt signal to tell the VFD to run. Seems safe to me and I would be happy to run my machine with this setup.
I expect you are right! The main problem is probably me trying to make sure everything is totally safe, with a slight "knowledge defecit". Vey easy to imagine the worst..!
hehe, I get it, spindles don't take hostages, just like table saws. The power off switch is your friend, so is a checklist for running jobs, power off, mount workpiece, power on, code loaded, X Y and Z zeroed?, check extents, ok? now use both hands to press the 'run code' button (-:
In the resource I linked I do suggest a switch rather than a jumper, this would "disarm" the spindle. I understand being hesitant about flashing the firmware I did a practice run on an arduino before I flashed the bb. The new Balck box x32 does has a relay intended for the spindle and the wifi connection is pretty nice.
Yes I was considering the idea of running another cable to the machine from that jumper.. Add a nice toggle switch on the side of the spindle so I can "disable" the spindle when changing tools. Not sure if that's a good idea/worth it or not.
ok i have it working.. i did have to set the minimum spindle speed to 0, so hopefully i dont do any "sausage fingers" when im setting the rpm in grbl.. one final question.. not sure if this is a setting in control/interface or a vfb setting. in control, i can choose to start the spindle and choose the speed. on the interface i have "start spindle" and "stop spindle" how do i tell it what speed to run at? it seems to ramp up immediately to 24000 rpm.
ah thats a shame, i had the idea of using the machine with the interface jog controls etc as a "poor mans pillar drill" when i need to make some holes and cant be bothered to draw it up in cad. having to either settle with 24000 rpm or pull out the laptop is not ideal. i guess its only 2 mins with the vfb settings to re enable the manual spindle controls..
I can think of one way to configure the bb and vfd that you give you relay control from the bb and manual control of the speed from the vfd. Would that be what you are looking for?
To be honest im not exactly sure "what im looking for" ive never used a cnc machine before and am "learning by doing" the machine is still half built and probably wont be finished for ages as i always seem to be busy. im sure ill work out what is best for me as i start actually making sawdust. however, in the meantime, if you dont mind detailing your proposed setup, itll be useful reference for me and maybe others who might wish to configure that way.
No matter whose advice you take, you are wise to explore all the options and learn how the machine works. Take your time.. The following set up would give you on/off from the interface or software and speed control only from the pot on the vfd. Set the onboard relay jumper in the blackbox to DIR/VFD. The pwm and relay share the same pin with the standard firmware this would normally make the relay chatter with low spindle speed. But we will 'fix' that in the next step. This pin does pulse when the black box is powered up so its best to turn on the controller then the vfd. If you set grbl to with a min speed of 0 and a max of 2 the relay will now turn on at any speed above 1. Connect the RELAY outputs COM and NO from the blackbox to the FOR and DCM on the VFD. This will put the VFD in run when the BB turns on the relay. Set the following in the vfd. PD01 = 1 this uses external terminals (FOR) to set run command. You can use the onboard dial to set the spindle speed on the VFD. Set the following in the vfd. Verify that on board jumper set to VR, this is the default position. Jumper is located to the right of the low voltage terminals. PD002 = 1 this set the source of operating frequency to the board pot PD070 = 1 0-5v PD072 = 400hz PD073 = 150hz this will set a min speed of 9000 rpms this is what keeps the vfd from running at a dangerously low speed.
thanks for that, im trying to set it up now. one thing that is not clear to me.. the relay.. why use dir/vfd jumper setting as opposed to the m3/m5 jumper setting?
M3 = a PWM signal - you want a relay to be ON or OFF - does not like a variable pulse, it will chatter But NB do note the docs, recommend proper VFD setting, not the relay. Arduino's bootloader toggles the relay pin before Grbl has control of it. Its nonstandard - we've not come across a VFD that needs that option, it exists for advanced use cases (and required removing the bootloader - flashing firmware using a ISCP programmer, etc - see the comments in the Grbl config.h file here: grbl/config.h at 40eb439bf2afc4c6f3003836c396e183ba72c45b · gnea/grbl (Line 357's "NOTE: BEWARE!")
apologies, im still a bit confused, feel free to ignore me if im taking up too much time. appreciate im investigating a non-standard setup.. i quite like the idea of having manual control of the spindle when using the Interface, and since that (currently) doesnt offer spindle speed control, i thought id test the method provided by that-jim obviously i wont have speed control from Grbl, and if that turns out to be an issue, its 2 mins to change things back. i set up as described above, and it -kinda-worked.. as Peter mentioned, i get 4 or 5 clicks from the relay when the blackbox boots up (this is actually ok, as it powers up at the same time as the vfd, but the vfd takes much longer to start, so i dont get any reaction from the spindle to these initial clicks) however i also got a few random triggers of the relay when i connected the usb to my pc, causing the already booted vfd/spindle to stutter for a second or two. this is potentially more unpredictable. apart from that it behaved as described. so, because i remember that the default relay setting (m3/m5) didnt seem to chatter the relay at all, i tried setting the jumper back to that... all else as shown in the method above.. now it behaves exactly as i would expect, the spindle starts and stops with any m3/m5 commands from control/interface, but i can adjust the speed from the potentiometer on the vfd. i have a nice safe minimum rpm dialled in too. no relay chattering on boot up, or when connecting /disconnecting the pc.. since the max rpm in grbl is set to 2rpm, i dont appear to risk a chattering relay during use either. however, there must be a reason why this was not the suggested method, its the default relay setting after all. . am i missing something important?
The test menu on Interface would still not offer variable speed in this config - you'd have to use the VFD front panel - the danger here is a CAM'ed up job containing speed parameters - are then overwritten by you having to remember to set the VFD speed by hand It WOULD chatter with S values that aren't 100% speed Yes, see my earlier comment and click through to read more: Not random, upon USB connect, Grbl resets itself - during boot the pins are triggered by the bootloader, again, explained in the link above
Yes this would make the speed dial on the VFD operate just like the speed dial on a router, you will have to remember to set it correctly for the job if the grbl max speed is set to something very low like 2 then this will not chatter, if given any reasonable speed via gcode, right? Glad to hear that the pwm pin does not toggle at startup I did not realize this. It sound like you may have found a solution that works for you.