PDA

View Full Version : VFD is blowing my RCD



Mr*Beaver
29-05-2018, 09:10 PM
Good evening,

I'm working on my first CNC build previously I have used and heavily modified a shapeoko. I'm in the final stages of my build (putting everything back in the garage and tweaking). Over the weekend I took my 2.2kw Chinese spindle and Huanyang off my shapeoko and fitted it. Thinking this would be a simple job I hooked it up the same way it had been connected.

The PWM going to the VI, ACM going to ground and DCM and For shorted - upon stating a job it would start and stop on stop.

Now I'm running of an Arduino mega board with external drivers and electronics. When the For and DCM are shorted if I turn the power of the VFD my RCD will blow within a few seconds.

I then shorted with a 2k resistor which actually worked. However I have been told I should use a relay. I went off and bought a 5v low voltage trigger relay rated at 10a 240v and now have that hooked up with For and DCM being linked when the relay is triggered.The relay is powered from the USB powered ardunio. Whilst this works if my usb disconnects for any reason my RCD trips. It's almost as if the surge of the power stopping is triggering the rcd, and previously it was the surge of it starting.

I've had the same vfd and spindle setup for almost a year and not had this issue.

In an ideal world this would not happen. I really don't like tripping the power in my house even if it is a unlikely situation/cause.

And here is a picture of my build :D it has a 80 x 80 x 15 cut ability. I designed and cut the entire frame on my shapeoko 3.

24285

A_Camera
30-05-2018, 05:25 AM
I have to admit that I have no idea what VI, DCM, For and ACM are. Please make a drawing to show what you connected to what and more details about the resistor and the relay. Perhaps post relevant pictures and not the whole machine which does not give us a clue about the possible problem.

Mr*Beaver
30-05-2018, 06:40 AM
Here is a wiring diagram it's a little poor as I'm on a bumpy train.

24288

Doddy
30-05-2018, 06:59 AM
There's a lot of ambiguity with the OP's description.

Firstly, how have you connected an Arduino PWM output to the VFD? I'm guessing this is a run-of-the-mill HuanYang VFD - no-where in the manual describes setting this up for a PWM input (ref. configuration parameters PD002 and PD070). You mention some external drivers and electronics, is this providing the PWM to analogue conversion?, details please.

Let's get back to basics. Isolate the Arduino. Just have two switches - connected between FOR and DCM (this is your On/Off), and between VR and VI (this is your 0/100% speed control), set PD002 to 1 (default = 0) and PD070 to 0 (default). Then test the behaviour using just these. If your problem goes away then it's nothing to do with "surge of power".



I've had the same vfd and spindle setup for almost a year and not had this issue.


So what's changed?



and previously it was the surge of it starting


I've read the description a couple of times. Maybe too early in the morning for me but I can't see where you discuss starting problems.



I hooked it up the same way it had been connected.


Let's have a look at the wiring diagram for this.

Also, please confirm that you've earthed the VFD.

I don't always agree with A_Camera :courage: but just this once - yeah - please post some relevant photos of the wiring to the VFD, and confirm the PD002 and PD070 settings.

Mr*Beaver
30-05-2018, 07:10 AM
I've posted a basic wiring diagram but the post is waiting to be approved.

The arduino is an analogue signal between 0-5v. The vfd takes this and sets the speed based on the voltage provided. Dcm and for need to be connected for the spindle to turn on.

Vd002 is set to 1, vd070 is currently set at 1. I did try using frontal controls and had no issue when using the start/stop button on the vfd.

The main change is the board I'm using, the shapoko board wasn't suitable for this build.

The vfd is earthed, so is the spindle and the arduino board.

komatias
30-05-2018, 09:25 AM
Mine was blowing the RCD. The spindle motor was shorting.

Also it may be the EMF filter inside the VFD that trips it. I think these can be disconnected on most units.

Doddy
30-05-2018, 12:45 PM
I've posted a basic wiring diagram but the post is waiting to be approved.

The arduino is an analogue signal between 0-5v. The vfd takes this and sets the speed based on the voltage provided. Dcm and for need to be connected for the spindle to turn on.

Vd002 is set to 1, vd070 is currently set at 1. I did try using frontal controls and had no issue when using the start/stop button on the vfd.

The main change is the board I'm using, the shapoko board wasn't suitable for this build.

The vfd is earthed, so is the spindle and the arduino board.

Thanks for that.

Firstly - has this behaviour started when you connected the arduino and configured the VFD for 0-5V operation? Or did it start when you move the machine into the garage? (or did you big-bang both changes together?)

Particularly relevant to the problems being encountered during the move to the garage: I'd be inclined to examine your RCD and understand if it's a Type-A or a Type-B - the latter being recommended for frequency convertors (e.g. VFD). Google the two types to understand more if you want to pursue this.

If the problem was introduced by the Arduino - then, first-off you know the Arduino analogue/PWM outputs are not analogue outputs, but a digitally switched 0/5V PWM output?, I've not seen anything that gives me confidence that this would work directly connected to the ACM/VI input to the VFD. If it does, then it's likely more by luck than by design. Normally you connect a PWM output through some form of integrator to generate the analogue output (many cheap BoBs provide this functionality - and that might be an option to explore). My thoughts are around what the VFD may be trying to do with an VI input that alternates 0/5V a thousand times a second. One thought - flash the arduino to set the PWM output to ONLY 0% or 100% (and no-where in between!) - or better still remove any of the PWM initialisation and drive it as a discrete output - again, only 0 or 1. If that cures your problem then it's the PWM behaviour that's the problem and is resolvable. If you don't fancy changing the code, then pull a 5V supply from the arduino and drive that into the VI input, instead of the PWM drive - you'll only have on/off control, but it'll help isolate the problem.

If you try the above and the problem remains (with the VI connected only to 0V or 5V) then... try disconnecting whatever PSU you're using to drive the arduino - power it through the supply socket using a PP3 battery (it won't last long!) - if that cures the problem then I'd be inclined to dump the USB PSU that you're driving the ardy with (I'm thinking what can cause an earth-leakage the the RCD is picking up)

Mr*Beaver
30-05-2018, 05:16 PM
Hi Doddy, thanks for coming back.

Unfortunately I next tested the spindle whilst the machine was in the living room being built, however the spindle never caused me an issue in the past so when I swapped it from one machine to the next I thought nothing of it. That was till I blew the power. It's also why I'm ruling out wiring the spindle wrong etc and I have seen it working. I did however run the spindle on a different circuit whilst in the garage and had the same result.

I don't believe it is my RCD as I haven't had any random trips in the past and have been using this VFD and spindle in the past. I do know it has something to do with the arduino board - as really thats the only thing that has changed.

When I initially wired it up I found multiple people who had connected it in the way I describe. I can control the speed to the nearest 1000rmp - from the instructions it does state 'Analog Voltage Frequency Reference Input' I'm not sure it's a true PWM input? However looking at the manual I could also try hooking it into the AI terminal? I'd need to check the current is between - 4~20mA.

I will try feeding a 5v input into it, I like that idea as it should tell me is the issue lies with the PWM/gnd or the DCM/For enable spindle.

Do you think it's worth me grounding the machine earth through an additional power supply? Currently it runs through the laptop power.

Doddy
30-05-2018, 07:15 PM
Hi Doddy, thanks for coming back.

Unfortunately I next tested the spindle whilst the machine was in the living room being built, however the spindle never caused me an issue in the past so when I swapped it from one machine to the next I thought nothing of it. That was till I blew the power. It's also why I'm ruling out wiring the spindle wrong etc and I have seen it working. I did however run the spindle on a different circuit whilst in the garage and had the same result.

I don't believe it is my RCD as I haven't had any random trips in the past and have been using this VFD and spindle in the past. I do know it has something to do with the arduino board - as really thats the only thing that has changed.

When I initially wired it up I found multiple people who had connected it in the way I describe. I can control the speed to the nearest 1000rmp - from the instructions it does state 'Analog Voltage Frequency Reference Input' I'm not sure it's a true PWM input? However looking at the manual I could also try hooking it into the AI terminal? I'd need to check the current is between - 4~20mA.

I will try feeding a 5v input into it, I like that idea as it should tell me is the issue lies with the PWM/gnd or the DCM/For enable spindle.


Chinglish at it's best - Analogue Voltage Frequency Reference Input... to me at least... refers to the per-unit proportion of the VFD output frequency. So, for a 2.5V (of 5) input = 0.5, then the output frequency would be 0.5 x 400Hz (or 12000 RPM). Nothing to do with a PWM mark/space ratio. My guess is that there's a simple R/C filter on the VI input that is providing crude integration of the PWM signal.

The problem is that without a well-designed input circuitry that the VFD is unlikely designed to suit the PWM output of the arduino (which is not particularly conventional) - the integration function required for the PWM conversion (assuming it's analogue - not unreasonable) requires a timing constant suited to the PWM source - and I think it's optimistic to assume that this will work well (you might find that you have good control over only a small portion of the PWM variable range - but not linearly across the full range).

To use the AI/4-20mA current loop requires more circuitry - you need to generate a constant current, a value of 4mA representing 0 RPM and 20mA representing 24000 RPM, and all the steps between. This is an industrial signalling system that helps avoid errors due to voltage drops in the system. You won't do this easily with an Arduino PWM output. I'd give up on this until you get your tripping bug ironed out.


I will try feeding a 5v input into it, I like that idea as it should tell me is the issue lies with the PWM/gnd or the DCM/For enable spindle.


If it trips - it's earth leakage. If it doesn't, but does with the PWM input, it is the Type-A RCD reacting to repeated surges from the VFD as it switches rapidly between on and off (though I doubt this, but it's the rationale for this test) - or maybe capacitively coupled earth leakage... which leads me onto...


Do you think it's worth me grounding the machine earth through an additional power supply? Currently it runs through the laptop power.

Eh?, I'm a little confused - I'm assuming that you have an adequately earthed connection to the machine?, my next thoughts would be how the supply earth is exported to the garage - whether through a 3-core cable or a local earth rod... but you're clear that the trip also occurred in the house and that the RCD circuit is okay, so I won't pursue that.

What do you mean by grounding the machine earth through an additional PSU - currently laptop power - I'm not aware of a laptop PSU that exports an earth - I'm guessing from the language that you've connected the negative supply to the machine earth??, if that's the case then that isn't earthing the machine and this could be a cause of your problem. Absolutely provide a low-impedance earth strap from the machine to the garage supply earth. Also - from your picture of the machine - make sure that all exposed metalwork has a reliable earthing.

cropwell
30-05-2018, 07:33 PM
I had a look though the Huanyang inverter manual and the only reference I can find to PWM is SPWM, which is used within the inverter to control output switching. If your arduino is putting out 5v PWM signal and you have connected it to VI it will be switching on and off like it is stupid. What software are you using on the arduino. If you are using GRBL v0.9 then D11 should put out a 0-5v analogue signal
https://github.com/grbl/grbl/wiki/Connecting-Grbl. I have the feeling that describing D11 output as PWM is in error.

Doddy
30-05-2018, 07:38 PM
If you are using GRBL v0.9 then D11 should put out a 0-5v analogue signal
https://github.com/grbl/grbl/wiki/Connecting-Grbl. I have the feeling that describing D11 output as PWM is in error.

No. The MEGA328/2560 based arduinos do not have a DAC, or any other form of analogue output. They provide a number of PWM-enabled discrete outputs (those prefixed with a tilde on the board silk-screening) with the signal value switched between GND and VCC - which if used for e.g. LED drives allows a direct control over the LED luminance, similarly for a DC motor drive; but the output remains a digital PWM signal (they do, however, support multiple ADC inputs)

cropwell
30-05-2018, 08:13 PM
No. The MEGA328/2560 based arduinos do not have a DAC, or any other form of analogue output. They provide a number of PWM-enabled discrete outputs (those prefixed with a tilde on the board silk-screening) with the signal value switched between GND and VCC - which if used for e.g. LED drives allows a direct control over the LED luminance, similarly for a DC motor drive; but the output remains a digital PWM signal (they do, however, support multiple ADC inputs)

You are right Doddy, I have had a closer look at the AnalogueWrite function. The DAC converters in the arduino put out a variable duty cycle PWM 0-5v. I have a feeling that that is where the OP's problem lies. I fell into the trap of assuming that, when Arduino described the board as having DAC function they meant in in the true sense. Maybe a simple RC integrator would prove the root of the problem, but in the long term an OpAmp circuit would be better (to give a better 0-5v). I am surprised that the inverter does not have an integrator on the input VI.

Mr*Beaver
30-05-2018, 08:15 PM
Eh?, I'm a little confused - I'm assuming that you have an adequately earthed connection to the machine?, my next thoughts would be how the supply earth is exported to the garage - whether through a 3-core cable or a local earth rod... but you're clear that the trip also occurred in the house and that the RCD circuit is okay, so I won't pursue that.

What do you mean by grounding the machine earth through an additional PSU - currently laptop power - I'm not aware of a laptop PSU that exports an earth - I'm guessing from the language that you've connected the negative supply to the machine earth??, if that's the case then that isn't earthing the machine and this could be a cause of your problem. Absolutely provide a low-impedance earth strap from the machine to the garage supply earth. Also - from your picture of the machine - make sure that all exposed metalwork has a reliable earthing.

Well the machine and all the machines metal parts are earthed so the spindle, power supplies for the drivers etc all go to earth - being in the UK almost everything here is earthed. In my garage this comes through 3 core cable. The spindle has also been earthed by myself and this runs through the spindle cable.

However the electronics box/machine case, ardunio, relay are not earthed... I can work out the machine case but I'm not sure how you earth a arduino board?

Also the board I'm using is running grbl 1.1