Hello all, I am in process of building a cnc router and could use

I’m also struggling with controlling my spindle speed through PWM to analog conversion. I have a separate board interpreting PWM signals from the smoothie and forwarding analog voltage to the VFD. Despite having a nice steady voltage coming out of the converter for a specified speed; the frequency output on the VFD is fluctuating wildly (by the best part of 100Hz.). Any ideas what my problem could be? Bad VFD or noisy converter maybe? I have no scope to check the cleanliness of the signal from the converter but multimeter shows a steady voltage. Could this be a settings issue on the VFD? It’s a YL620-A 1.5 KW 220v I’ve done my best to read the terrible manual but i can see no settings that would help. Since you guys seem experienced with this, got any clues for me @cprezzi @donkjr ?

@Steven_Kirby how are you connected to the VFD? Can you post a wiring diagram.
Have you tried using a power supply to provide an analog voltage to the VFD to eliminate any problems with the PWM to analog converter.

BTW the setup on these VFD’s are a challenge :(.

@donkjr , Here’s a fantasic MS paint rendering of what’s going on with my wiring:
missing/deleted image from Google+

I’m pretty sure the wiring is correct and everything functions as it should aside from the wildly fluctuating frequency. M3 S12000 will cause the relay to switch on the spindle and set it’s frequency via the DAC however the frequency is completely unstable.

After some more digging on the web last night, I discovered that beneath the control panel there’s a series of jumpers to be set for different input types. J1 J2 & you guessed it J3. No mention of this in the “instructions”! There is however a cryptic diagram of what the jumpers (J2/J3) do in different positions. One config is for 0-10v inputs, another for 0-5V and one for interpreting current 0-20mA. This is about all I can figure out as the pins aren’t labelled and the diagram only shows the configuration of one jumper (I’m assuming both must be set in the same position for the corresponding function) Right now they’re either set to both bridging pins 1+2 or 2+3 which would be the config for either 0-10v or 0-20mA, but it’s hard to day as the pins arent labelled. If I take the orientation of the text as reference , their current configuration would be both J2 and J3 are bridging pins 2 and 3 which would mean it’s in current sensing mode, which could well be my problem. I’ve not measured the current coming from the DAC but the voltage is steady, maybe the current is fluctuating and this is causing my problems. Thing is I’m not sure about the jumpers and I like to be sure before I set physical things like this, helps keep the magic smoke in. Any experience of these jumpers @donkjr ?

Cheers,

Steve

@cprezzi Like so?
missing/deleted image from Google+

@Steven_Kirby I dont have a VFD on my system but have used them before. You do NOT want it to be in the current loop mode (0-20ma).

@Chuck_Comito Yes, that’s what I tried to explain. :slight_smile:
Just make sure you use the separate PWR IN (jumper removed) for the small mosfets and only supply 5V to it.

@Steven_Kirby I would first try if the VFD works correctly if you connect a pot to the 0-10V input (pot side contacts to gnd and 10V, middle contact to the 0-10V input). But make sure you are in 0-10V mode.

@donkjr , I know I don’t want it in that mode. It’s just difficult to tell what mode it’s in from the diagram, I’ll upload some pictures so you can see for yourself why I’m having trouble deciphering what mode it’s in. Measuring the current output from the DAC It’s spitting out ~60mA so way above the 0-20 that the circuit is designed to sense, I can only assume it is jumpered correctly for 0-10 v at the moment, if it was in current sensing mode I’d just see 400Hz constantly. (or something would break.) :stuck_out_tongue: So it just looks like I have a sucky VFD or a problem with noise. I’m just using normal wires for the connection from DAC to VFD no shielding on the cables so this could be an issue. I could cut a short length of CY cable from my spindle run and use that to see if it stabilizes things. Maybe an electrolytic capacitor in the mix could clean things up but I wouldn’t know how to hook this in or what rating to use.

@cprezzi Unfortunately I have no spare 10k pots in my parts bin or I would have given this a try already, guess I could just hook the 10v from the vfd straight to VI1 and see if that gives me the expected 400Hz, which it probably will, everything is stable at that end of the scale. Short of moving those jumpers I’m at a loss on what to try next. I’m just concerned that if I move them over and it does switch to current mode the circuit won’t handle the current from the DAC very well and could damage something. Should I risk it for a biscuit? Photos of the jumpers to follow…

Here’s the diagram, but notice the orientation of the text on the jumpers, they’re at 180 degrees to the diagram and there’s no labeling on the pins to denote number!
missing/deleted image from Google+

and here’s a closer look at the jumpers:
missing/deleted image from Google+

@Steven_Kirby I see what you mean. It’s impossible to know what the diagram exactly means. I would do what you guess and connect 10V to the input, which should generate the maximum frequency (speed).
What PWM frequency range does your PWM to 0-10V converter accept? The one I linked only accepts PWM signals between 1 and 3 kHz. Default frequency of smoothieware ist 5 kHz (200ms PWM duration). So that param needs to be changed to something like 500ms.

@cprezzi Cheers for the input, most useful. I’ve not looked at the config regarding pulse width so that’s somethng to try. However I am getting a sensible output from the DAC with the settings I have in the spindle module right now. My DAC is also 1-3Khz input range so it’s worth a punt to see if that changes anything.

I did just go on a salvaging mission and find a 10k pot though. The Psychology department at the university I work for were throwing out an old piece of equipment called neurolog, looks like a modular synthesizer. I thought, I can’t let those components go to waste. There’s some beautiful clicky mechanical switches etc on the modules that you just don’t see on modern hardware. I almost felt bad removing the pot from the module I pulled. It was clearly hand made with beautifully soldered components. But hey at least it can get put to good use now instead of ending up in a landfill! I’ll see what reults I get with the pot and if it works as it should I think we’ve narrowed it down to a problem with my DAC or the wiring run between DAC and VFD I still have my suspicions that the VFD is just crap though. I’ll let you know how things turn out when I’ve conducted my tests. Thanks again for your input. :slight_smile:

@Steven_Kirby if you do not have a pot, as I previously posted, you can use any power source between 0-10v even a 9v battery. This way you can prove that the VFD still misbehaves with a stable voltage and it proves your problem is the VFD setup not the analog conversion or noise.

@Steven_Kirby have you tried the VFD in manual speed mode controlled from the panel without PWM and did it hold speed?

Cheers @donkjr I have managed to find a pot now ^^ although connected as it should be according to the manual it’s not doing anything to the frequency!? I do have a couple of power supplies but they’re not adjustable, just generic LED PSUs and an ATX. Although I do have some buck converters so I could rig something up to give me 0-10v using the 12v rail on one of those.

You weren’t kidding when you said these VFDs we a pain to set up! I think VFD actually stands for Very F@#!king Demoralising! :persevere:

Yes @donkjr steady as a rock using the potentiometer on the front panel and manual control.

@Steven_Kirby are you using the pot to create a simulated 0-10v signal on the VFD’s analog terminal or trying to use it as a speed control dial? Can you show us how you have hooked it up?

OK @donkjr @cprezzi . We have some progress! The pot was working it just wasn’t linear so I had to turn it a long way before the frequency changed. And… wait for it… the set frequency is stable. So we’re back to the problem being in the conversion of the pwm to analog voltage and it’s transition to the VFD, at least we’re narrowing things down. I’ll have a look at the config on smoothie and see if adjusting the pulse width changes anything at this point; though my money is on electrical interference and shielded cable will be my solution looks like another trip to CPC for some CY cable in the morning, If I cut some from my spindle motor run it might end up being to short to reach where I intend to install the control box when this saga is over!

Also, @Chuck_Comito , apologies, I’m totally hijacking your post here. I hope your Spindle setup is going more smoothly than mine!

@Steven_Kirby is this the correct manual?

If so…
it looks like if you are connected to terminal AI1 is not a current loop so that should not be the problem. You have to set it to 5 or 10V. It says use JP2 but I think that is a mistake it should be JP1.

F89 and 91 set the analog gain parameters.

It also says the factory value is in the +10v setting.

Then again the pictures in the manual do not look like the pictures of the circuit card :(.