I am trying to control the speed of my Chinese spindle from a self built GRBL controller. I have Best VFD and 800w spindle. I had a lot of noise problems initially that were solved when I took off the end of the spindle and connected the ground wire to it. I have added the attached circuit to my controller board and have verified that it is outputting 0-10v when controlled either via bCNC or terminal. My system all works fine when I control the VFD speed from the control panel. But when I connect it to the controller board - connected to COM and AVI - when I start the spindle it works for a few seconds and then slows back down and stops and nothing will work. I have to disconnect and reconnect to it in order for it to work again. I have blown the output on pin 11 on one Atmega328 ic already testing it so something is definitely not right...
All of my cables are shielded and twisted on my CNC machine. And all of the shields, the frame and power supply earth are connected. The Spindle pin 4 and shield are connected to PE on the VFD - as mentioned I had a problem when trying to router a PCB with the machine the hard limits would trigger (but I was able to work on non metal parts). Once I connected the ground on the spindle that problem went away. The COM on the VFD is not connected to PE, and my 12/5v- is not connected to the earth on the CNC either.
I have tested with the output of Pin 11 directly and through the attached circuit and it reacts the same in both cases - the MCU crashes as soon as the spindle is started and I need to disconnect the connection in bCNC and reconnect to be able to do anything.
What is the proper way to control a 0-10 VFD through a GRBL controller?