Author Topic: PID control proportional to velocity  (Read 4536 times)

0 Members and 1 Guest are viewing this topic.

Offline flyingthinktank

  • Active Member
  • Posts: 4
    • View Profile
PID control proportional to velocity
« on: February 16, 2016, 12:24:27 PM »
Hello, we have a small-ish 3 axis gantry system that we've adapted for 3D printing. The 3D printing method is direct ink writing, which is kind of like making things by squirting out toothpaste in the shape you need. The extrusion is controlled by air pressure, and I was wondering what it would take to control the air pressure based on the velocity of the nozzle (the "tool").

Basically, I'm wondering what's required in order to have a PWM output that is adjusted on the fly based on how fast the tool is moving. That way, when putting down a line of material, the pressure is slightly lower when the tool is accelerating and decelerating, but at full strength when the tool is at full speed. Without it you end up with blobs of material whenever there's a direction change.

I'm wondering if this is something that can be done in Mach4 (we'd be buying a license if it has that capability). If using Mach4 and an ESS, would a PLC also be required? I'm trying to find the right combination of hardware and software to do this so that we can rip the current brain out of the machine and plug the steppers into something that'll give us more flexibility.

Thanks,
     Tim

Offline Tweakie.CNC

  • Global Moderator
  • *
  • Posts: 7,638
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: PID control proportional to velocity
« Reply #1 on: February 17, 2016, 03:44:07 AM »
Quote
Basically, I'm wondering what's required in order to have a PWM output that is adjusted on the fly based on how fast the tool is moving.

Something similar to this was done many years ago by Art and he used the axis step signal – the faster the axis travels the higher the step frequency and visa versa. This is fine for just one linear direction of movement but the math may become complicated for the blended moves associated with arcs etc. but something to think about perhaps.

Tweakie.
Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.

Offline flyingthinktank

  • Active Member
  • Posts: 4
    • View Profile
Re: PID control proportional to velocity
« Reply #2 on: February 17, 2016, 07:21:15 AM »
Thanks for the reply, Tweakie! Is there anywhere that I can get more information on that? That sounds like it's just what we need. Was this done via a script in Mach3/4? Is Art around to chime in?

Thanks,
     Tim

Offline Tweakie.CNC

  • Global Moderator
  • *
  • Posts: 7,638
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: PID control proportional to velocity
« Reply #3 on: February 17, 2016, 07:53:22 AM »
To do it as Art did, within a plugin, would, I think, require inside knowledge of the Mach3 engine. My approach would be electronic – receive the PRF (pulse repetition frequency) of the axis step pulses and output PWM (or an analogue voltage) using a Microchip PIC (or similar). As said earlier I am not sure about the math of the blended federates of two or more axes but I am sure it could be handled.

Certainly makes for an interesting project.

Tweakie.
Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.

Offline flyingthinktank

  • Active Member
  • Posts: 4
    • View Profile
Re: PID control proportional to velocity
« Reply #4 on: February 17, 2016, 08:00:33 AM »
I'm a hardware guy, so the PLC would be my route, but I have at least 1 programmer on my team so we might end up trying a software route as well.

How would I receive the step pulse signal? Can I have it set to be output to more than one pin on whatever I'm using as the CNC brain, like a smooth stepper?

Offline Tweakie.CNC

  • Global Moderator
  • *
  • Posts: 7,638
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: PID control proportional to velocity
« Reply #5 on: February 17, 2016, 08:18:15 AM »
Yes.
The actual step pulse for each axis would be available at the input to it's stepper motor driver (or the output from the Smooth Stepper - Mach3 outputs Step & Direction signals for each axis).

The software solution, I am thinking of, relates to the Engraving Trigger for Laser or Impact and the source code for this can be downloaded from here; http://www.machsupport.com/software/plugins/

Tweakie.
Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.

Offline flyingthinktank

  • Active Member
  • Posts: 4
    • View Profile
Re: PID control proportional to velocity
« Reply #6 on: February 17, 2016, 08:29:04 AM »
Thank you so much! This is very helpful info.

Offline robertspark

  • Active Member
  • Posts: 585
    • View Profile
Re: PID control proportional to velocity
« Reply #7 on: June 30, 2016, 03:21:21 PM »
An old post I know, but just spotted it.

An Ethernet smooth stepper has 256 step pwm output available relative to blended velocity, this can be programmed via a 256 point table to give a linear or exponential curve or whatever other profile you want.

It's intention was to output for laser (or maybe plasma) although I don't think it's been well utilised as it was not documented well previous.

Check out the website and forum searching for pwm and it'll come up from the last year of discussions.

Rob
Rob

Albert Einstein ― “If you can't explain it to a six year old, you don't understand it yourself.”