OUTPUT_SCALE < OUTPUT_MAX_LIMIT?

More
31 Mar 2023 06:43 #267949 by mor
I'm using a 7i92 + 5-axis breakout board on my Sherline 5400, using the 7i92_5ABOB_ENC.bit and I'm able to measure an analog voltage 0-10V on pin 1.

I've set up a test configuration with qtdragon and in order for the output to reach 10V I have to set OUTPUT_SCALE to less than the OUTPUT_MAX_LIMIT.

I've set OUTPUT_MAX_LIMIT = 2800 and OUTPUT_SCALE = 1500 so that 100% gets me to 10V but now 50% is 7V.  BTW...am I supposed to enter the max motor rpm or the spindle rpm?  Sherline states that the 90V DC motor max rpm is 6100 and the spindle is 2800 rpm.

Thanks in advance for your help.

Please Log in or Create an account to join the conversation.

More
31 Mar 2023 22:36 #267993 by blazini36
What are you actually trying to get out of the analog output? 0-10v would typically mean 0v is full reverse 5v is stopped and 10v is full forward. I never liked that setup but it depends on what your drive supplies as a reference which I assume is a brushed DC drive like a KB Drive or something. I don't really use the analog output so somebody correct me if I'm wrong here...

You're referencing ini tags which are setting hal parameters for the Mesa card. If SPIN- is 0v and SPIN+ is 10v then you have to figure out if you want that 0-10v output to be single direction and you use an IO pin to reverse or if 0-10v represents both directions in which case it winds up being what I said above. If you want everything to represent spindle speed and not motor speed and you only have a single pulley/gear ratio than yeah, put 2800 as OUTPUT_MAX_LIMIT. If 0v is supposed to represent full reverse then OUTPUT_MIN_LIMIT is -2800. OUTPUT_SCALE I assume is the scalemax pin and that should be 2800 if max voltage is to be applied @ 2800.

Using that setup you should get ~7.5v @ a speed request of 1400. as zerospeed is 5v. If you want to reverse on an IO pin then OUTPUT_MIN_LIMIT = 0 and OUTPUT_MAX_LIMIT = 2800 this gives you 0-10v in 1 direction and you have to do something else to reverse so a speed command of 1400 is probably what you expect @ 5v here.

Please Log in or Create an account to join the conversation.

More
01 Apr 2023 00:31 #268001 by mor
I'm trying to control a brushed DC drive (KBIC-120) for a Sherline mill. I'm only planning on using it in one direction per advice from Sherline not to run in reverse.

So I tried leaving OUTPUT_SCALE = 2800 to match OUTPUT_MAX_LIMIT = 2800 and I'm only able to see 7V at 100%. I can go to 10V only by overriding the spindle speed to 150%.

I have been able to increase the 100% speed to 10V using PWM frequency of 35000; it was set at 20000 by default in PNCCONF. With those settings, at 50% I can only see 2V.

I'm not sure if I'm doing this all correctly, these are just my observations. Thanks for your response and support.

Please Log in or Create an account to join the conversation.

More
01 Apr 2023 18:34 #268025 by blazini36
Post your hal and ini files

Please Log in or Create an account to join the conversation.

More
14 Apr 2023 23:49 #269044 by mor
Here's my latest hal and ini.  I've lowered the PWM base frequency to 100Hz as I've read the breakout board optocoupler on the analog output needs a lower value.  Without changing any scale, this allows for 0-2.5V if I invert the PWM signal or 10-7.5V if it's not inverted; this is using the spindle power of 50-100%.
Attachments:

Please Log in or Create an account to join the conversation.

More
15 Apr 2023 00:15 - 15 Apr 2023 00:50 #269045 by mor
I fixed some power supply wiring and got it back to where it was before. Setting 35000Hz gets me full 10V at 100% but now it goes to 8V at 50% so just a scaling issue now.  The closest I can get it is at 25000Hz it goes from 6.55V (50%) to 9.97V (100%). From 0-18% seems to be linear and then it becomes non-linear; might just be the breakout board PWM to analog conversion but not sure.
Last edit: 15 Apr 2023 00:50 by mor. Reason: Additional info

Please Log in or Create an account to join the conversation.

More
15 Apr 2023 10:12 #269089 by andypugh
This does sound like a problem with the PM-voltage conversion stage.
You can probably linearise it with the "Lincurve" HAL component.

Please Log in or Create an account to join the conversation.

More
15 Apr 2023 10:46 - 15 Apr 2023 11:01 #269093 by mor
Any idea why the high range changes with PWM frequency?

Can you point me in the right direction with lincurve?

If I’m using a quadrature encoder for feedback, does it even matter to linearize the voltage output? Would the closed-loop setup adjust according to the RPM feedback? 

Thanks in advance!
Last edit: 15 Apr 2023 11:01 by mor. Reason: Added question

Please Log in or Create an account to join the conversation.

More
15 Apr 2023 18:43 #269143 by andypugh
I would guess that the filter is not using a push-pull opto and so the off-state decay time is slow. But that is just a guess.

If you are closing the spindle speed control loop. then no, the linearity isn't all that important.

Please Log in or Create an account to join the conversation.

More
15 Apr 2023 20:05 #269154 by mor
Do you think the linearity would affect the PID as far as performance? Would fixing the linearity ultimately make PID tuning easier?

Please Log in or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 0.122 seconds
Powered by Kunena Forum