PDA

View Full Version : Mach3 VFD PWM signal...



Davek0974
23-03-2016, 08:21 PM
Has anyone achieved linearity between Mach3 PWM signal and a VFD spindle??

My VFD display matches the actual spindle pretty closely as checked with a laser tacho.

When i request 24,000rpm, I get it, when I request 10,000rpm i get something like 8,000 instead - it's not a linear scale so need calibrating.

I know it can be done, using the motor steps-per & velocity plus the spindle pulley settings but I cant find any concrete way of how its done.

Davek0974
24-03-2016, 08:07 PM
Well, spent an hour messing tonight, i have no doubt it can be done, but its not going to happen by trial and error i think - too many variables and unless you know what effect each one has your'e just pissing in the wind Wink

Pretty certain now that steps/per and acceleration does nothing, this makes sense as we are on PWM so I think that can be taken out of the equation.

That just leaves Min PWM, base frequency, pulley min and pulley max.

Unless there is a setting on the VFD, i guess there might be, might be worth checking that 5v does give 50% speed.

Davek0974
25-03-2016, 04:45 PM
Been messing again - it all seems relative to the spindle pulley settings.

I set the min as whatever I got after setting a M03 S1 command - this was 1500rpm.

The max was then tried setting above the actual limit - this made things worse.

Then I went below the limit - 20,000 actually did a good job at the 5,000 to 15,000 range and was pretty close BUT it means you cannot command full speed as you have limited it to 20,000 so not good Sad

I am leaving this at present as I am unsure it actually be done without a lot more knowledge and maybe some VFD tweaks too.

Davek0974
26-03-2016, 02:59 PM
Should it be possible to measure the 0-10v signal?

I thought so, but I tried measuring the input to the VFD from the BOB and as soon i touched the VI & ACOM pins in the VFD the motor stopped as if the input was being shorted out?

This was with an expensive Fluke DMM on DC volts, i was expecting to see something 0 and 10v here??

Odd?

Clive S
26-03-2016, 03:17 PM
Should it be possible to measure the 0-10v signal?

I thought so, but I tried measuring the input to the VFD from the BOB and as soon i touched the VI & ACOM pins in the VFD the motor stopped as if the input was being shorted out?

This was with an expensive Fluke DMM on DC volts, i was expecting to see something 0 and 10v here??

Odd?Was it on auto ranging !! could be capacitance !!

Davek0974
26-03-2016, 03:22 PM
Yes autorange but only Volts DC, it has no capacity ranges - too basic.

Ger21
26-03-2016, 03:42 PM
Should it be possible to measure the 0-10v signal?
Disconnect the VFD and measure it.

Davek0974
26-03-2016, 03:47 PM
will try that tomorrow, thanks

JAZZCNC
26-03-2016, 04:20 PM
What you using for Speed control Dave.? On-board Bob or separate board.?

Davek0974
26-03-2016, 05:07 PM
Its a cnc4you CP 0-10v breakout board with on-board converter.

I fired the question at cnc4you and just got a reply - yes i should be able to measure 0-10v there, so i have no idea why i cannot.

Graeme
26-03-2016, 05:49 PM
Make sure you don't have the lead plugged into the current connectors marked "A" or "mA" - For voltage they should be plugged into "COM" and "V". Its very easy to forget.
Graeme

Clive S
26-03-2016, 07:46 PM
Make sure you don't have the lead plugged into the current connectors marked "A" or "mA" - For voltage they should be plugged into "COM" and "V". Its very easy to forget.
GraemeYes but good meters don't let you do that:friendly_wink:. But good point. Dave: By capacitance I meant from the leads they act as a capacitor if they are very close.

Davek0974
26-03-2016, 08:18 PM
Thanks guys,

Definitely on the volts, this meter only has three sockets - V/mA, Com, 10A and i only used the Com and V/mA ones 99% of the time.

I can't see lead capacitance having any effect here, surely it should be a measurable 0 to 10v Dc signal going to the VFD?

I know 4-20mA can be a pain to measure sometimes unless its loaded properly but 0-10v?

JAZZCNC
26-03-2016, 09:29 PM
I fired the question at cnc4you and just got a reply - yes i should be able to measure 0-10v there, so i have no idea why i cannot.

Sounds like you have dodgy Bob to me.? 100% should be able to measure the Voltage coming out the speed Controller.

Davek0974
26-03-2016, 10:48 PM
Bugger, sounds about right for my luck.

But then how the heck does it manage to work at all?

Might be worth putting the 'scope on it?

Clive S
27-03-2016, 12:53 AM
Bugger, sounds about right for my luck.

But then how the heck does it manage to work at all?

Might be worth putting the 'scope on it?A telescope won't help:hysterical:

cropwell
27-03-2016, 01:17 PM
I think he meant a proctoscope :toot::hysterical:

Clive S
27-03-2016, 01:50 PM
I think he meant a proctoscope :toot::hysterical:I think you meant a endoscope:rolleyes:

cropwell
27-03-2016, 02:00 PM
I think you meant a endoscope:rolleyes:

No I meant a proctoscope ! Happy Easter Clive..


Serious suggestion now - If you have an analogue meter these can have impedances as low as 5000 ohms per volt. All electrical measuring devices draw current from the circuit and this affects the circuit (experts can get precious here, but I am simplifying !). Having said that, I would not expect the BoB to be such a high impedance source as to have a drastic voltage drop when meter is put on it.

As Jazz says, it could be a dodgy Bob. I have never met a Dodgy Bob, but I do know a bloke called Dodgy Dave.

Clive S
27-03-2016, 03:09 PM
Yep happy Easter Rob I was just jesting Avo 7 days and valve volt meters.

Davek0974
27-03-2016, 09:16 PM
LOL:)

Anyways, I disconnected the BOB from the VFD and I can get sensible measurements from 0 - 10v so it seems the BOB is fine, the output is not linear though.

When connected to the VFD, no voltage again and the motor stops as soon as the meter is connected.

Very odd.

I did make a lookup table of speeds so I can easily set what i really want even though its not what it displays.

routercnc
28-03-2016, 09:14 AM
If you only use a few speeds to cover your jobs I wonder if a relay module board with each relay connected to a trim pot and resistor pair from a 10v supply (each of which was fine tuned to give the right volts for that speed) could be used?
I guess you would need a gcode command in the code to switch the right relay on instead of the speed command. Just a different take on it.

Davek0974
28-03-2016, 09:30 AM
I have done a similar thing at work with an awkward interface for a temperature controller - works well.
It used a 10 channel bargraph chip to take a 0-10v signal and convert to 10 adjustable resistance outputs using 10 miniature relays and 10 trim-pots - the relays were needed to give isolation.

trouble with using Mach it would need multiple outputs to do it directly and thats not so easy.

The bargraph / relay / pot system would work though - it just converts 0-10v variable into 0-10v stepped signals.

I think the lookup table will work for now until a proper fix comes up.

I see we have 15 spindle pulleys - could they be set up to do this?
I'm not sure the ratio does anything when using PWM though.

Doddy
28-03-2016, 04:48 PM
Having just come in from the shed doing very much the same thing:

BOBs, or cheap ones at least, may not have a linear output from the PWM drive. I had very much the same experience as the OP.

You absolutely should be able to measure the voltage at the VFD with a DVM/DMM/etc. If you can't, then I'd look for possible dry-joints (as you prod the terminals with the meter leads it may crack the joint open). Try prodding each terminal in turn with a single lead to rule out mechanical play. Other than that - hand-held or bench meter? (I'm wondering if a bench meter if you've got a grounded common line... unlikely, but I can't think of any explanation why, having confirmed not on current-input on meter, why you couldn't read the voltage at the analogue input to the VFD).

What I can recommend as a very cheap alternative solution is one of the 2-pin USB/RS485 adapters (I picked up 3 for less than a tenner, UK) - use one to control the spindle (direction, speed, on/off) digitally, using the Mach3 plugin. (assuming HuanYang VFD).

Or, google mach3 linearity.dat

Davek0974
28-03-2016, 05:15 PM
It seems i can measure the 0-10v ok but only if the vfd is not connected?

I now have a list of voltages to speeds and also a list of actual s commands to speeds

I tried googling linearity.dat but all i can find is that you can delete it :)

Davek0974
29-03-2016, 01:05 PM
I had a mail back from CNC4YOU today, they supplied the BOB but not the VFD - I presumed my VFD was identical as they are both (supposedly) the standard Huyanyang 2.2kw items.

Their tests revealed that voltage should definitely be measurable when the BOB is connected to the VFD, they even loaded it up a little with a 4k7 resistor and still got the 0-10v ok.

So this issue points to my VFD being a bit iffy - it came from the usual guy on Aliexpress with all my other bits.

Most odd, hopefully it won't damage my BOB?

JAZZCNC
29-03-2016, 02:22 PM
Lets have look at the VFD front Dave because some of the VFD look like Huanyang and use same shell but are not. Can tell at glance.

Also you sure your using VI not AI. It's usualy 3rd terminal from right on bottom row.

Davek0974
29-03-2016, 03:12 PM
Hi JAZZ,

Just got off the blower to my preferred UK inverter supplier, use them a lot in the day job, well used to anyway ;)

Lengthy chat, helpful as always. Explained exactly what I was seeing and they had never seen that behaviour before!

The fact that I can see 0-10v when disconnected indicates my control is working fine, the big question mark comes from the fact that as soon as you connect the signal to VFD and put a volt meter across it the motor stops as if the 0-10v was being shorted out - no volts are read. This was tested with two meters - a new(ish) Fluke DMM and a 1960's vintage Avo Mark8 - same results both times.

A bit more chat with the VFD guy and as it was not behaving as expected, I decided to bin the Huanyang probably to eBay and ordered a new Schneider Altivar 12 sensorless vector drive for £115.

My main concern was that something clearly was wrong in that VFD and knowing my luck it would end up in fried BOB and possibly more, usually on a Friday afternoon;)

Should be here tomorrow and slot straight in hopefully.

I can't relax when things just don't play together. Possibly the VFD is a clone, or has some minor parts missing from the inputs, expecting everyone to use the front panel pot for speed maybe, who knows.

Davek0974
29-03-2016, 07:51 PM
Messing with numbers...

Seems pretty linear, no dips or bumps...

18052

Not centred at 5v / 12000rpm though - bit lower in the middle.