Problem DIY Torch Height Control


Page 1 of 2 12 LastLast
Results 1 to 20 of 34

Thread: DIY Torch Height Control

  1. #1
    Registered
    Join Date
    Oct 2010
    Location
    USA
    Posts
    317
    Downloads
    0
    Uploads
    0

    Default DIY Torch Height Control

    I am working on making my own torch height control for my plasma table. I can get the signal fairly easily from the Powermax45 because it outputs a 1/50 voltage out the back. I am going to use an Arduino microcontroller to sample this every half second or something similar and compare the analog input to a set parameter and adjust the height accordingly.

    The problem I am running into(in my head) is how to interface the Arduino with the Gecko G540 I am using.

    Example...

    I dont remember the voltage range the Powermax outputs but I know it is higher than what the Arduino can handle so I will be using a voltage divider to be decided at a later time.

    Arduino gets a signal...signal will be 0-1023

    Arduino compares signal...Input signal is 700, set range is 500-550

    Arduino outputs signal...Lower Torch(output 1) <---How would I make this actually control the stepper motor? Intercept the signal from the DB25 connection and use pin 6 and 7 to control it?

    Like if I need to lower it, set pin 7(step direction) high or low and then pulse or power pin 6 to get motor to move?

    Similar Threads:


  2. #2
    Registered
    Join Date
    Oct 2010
    Location
    USA
    Posts
    317
    Downloads
    0
    Uploads
    0

    Default

    Anyone?



  3. #3
    Registered
    Join Date
    Jun 2009
    Location
    Netherlands
    Posts
    45
    Downloads
    0
    Uploads
    0

    Default

    hi tjb1,
    My impression is that users of the machine project log are more mechanicaly oriented, like myself. I have some electronics background, so I can understand your question but not answer it. I suggest posting your question in the Electronics section of cnczone.
    Arthur



  4. #4
    Registered
    Join Date
    Mar 2007
    Location
    UK
    Posts
    534
    Downloads
    0
    Uploads
    0

    Default

    I'm just looking at DIY torch height control, how are you getting on with it?

    I did similar with a spark eroder and stepper. Basically it fired the arc then looked at the residual voltage on the capacitors. Fully charged was no spark, move down. Zero volts was touching, move up. In between was do nothing.

    No microprocessor required.

    I used two comparators, one to say volts too high, one to say volts too low and latched both outputs with one 74LS74 flop.

    A 555 timer generated the step pulses.

    If either comparator indicated movement I allowed the pulses on to the stepper.

    The DIRection was either of the comparator lines.

    Worked fine and dandy, when cutting it usually oscillated one step.



  5. #5
    Registered
    Join Date
    Nov 2006
    Location
    usa
    Posts
    1
    Downloads
    0
    Uploads
    0

    Default

    I'm thinking about torch height control also. I also have the G540 and Powermax 45 and am using EMC2 (now LinuxCNC). Am wondering if one can use the torch height control configuration PLASMA-THC using the G540 VFD output (0 - 10V) as the voltage to compare (now that I've found out how to get the 50:1 divided arc voltage and arc ok signal while using the hand torch) so its settable in LinuxCNC. Then just use two comparators to tell LinuxCNC to move Z up or Down. May be missing some of the fancy features but is that to simple and why can't I find anything on the web about people trying this already?



  6. #6
    Registered
    Join Date
    Mar 2007
    Location
    UK
    Posts
    534
    Downloads
    0
    Uploads
    0

    Default

    I won't know if it is simple until I get my oscilloscope on it

    I think divide the volts down, low pass RC filter, buffer the volts with a unity gain op amp then two comparators and two pots, one pot to set the threshold, one to set the no step hysteresis.

    If nobody is posting DIY there are two possible explanations...

    a: It is horrendously difficult due to unforseen complications.

    b: Anyone who can do it wants to sell us expensive THC



  7. #7
    Registered
    Join Date
    Oct 2010
    Location
    USA
    Posts
    317
    Downloads
    0
    Uploads
    0

    Default

    I havent gone any further into this, been busy actually designing the table and school work but what I think I am going to do is...

    Run 50:1 voltage output through a voltage divider into analog input on arduino.

    Run "Motion Start" into a digital input.

    Run both Z-step and Z-direction into digital inputs.

    Take Z-step and Z-direction from outputs and go to G540

    Arduino will be sampling and if "Motion Start" is low, I will pass the Z-step and Z-direction right through to the G540 with no modification. When arc starts and the cutter sends the motion start, that will go to the Arduino also. When Arduino gets this it will take the plasma voltage and compare it to my set range and then output its own steps-direction pulses while ignoring any information coming from the computer for Z-step and Z-direction.

    Then hopefully when computer shuts off arc, motion start will shut off and the Arduino will pass the Z commands from computer right to the G540 with no modifications.

    I have also decided just to use an "ohmic" shield and get the start height using that in the program instead of the Arduino.

    So basically Arduino takes over Z when the cutter sends the motion start signal, anything other than that and the Arduino is just passing the information through. Im just using an Arduino because I have it and they are cheap and easy to use(for me at least). I may be able to get all of this to run on an ATtiny85 if I can drop an IO or modify it to use the RESET as an IO and if I cant I will just use an ATmega328p. The tiny is like $3 the mega is like $5 so its really not that bad.

    Problem is I do not have a G540, steppers or a computer running Mach3 yet.



  8. #8
    Registered
    Join Date
    Jan 2006
    Location
    USA
    Posts
    2985
    Downloads
    0
    Uploads
    0

    Default

    I'm not sure what thickness you plan to cut but on the thin stuff you will be cruising along pretty fast according to the plasma cutter manual. At high speeds, you are gonna need THC at something substantially faster than "every half second or so".

    Other than that, your approach seems logical.

    I think a simple approach like Robin has mentioned could work here also.

    Use the "motion start" output to switch the step and direction signals from mach to your "controller". That will put your controller in control during the cut and mach in charge every other time.

    The controller could output a steady step pulse stream, maybe like 100 hz or something to start. The controller could be a simple comparator between the commanded and actual arc voltage. The output of the comparator could toggle the direction pin. Due to the constant step pulse stream, the torch would oscillate up and down around the setpoint. I am not sure how much. In theory anyway, this could get you a working solution with only a couple dollars in solid state components and no programming required.

    Matt



  9. #9
    Moderator
    Join Date
    Jan 2008
    Location
    USA
    Posts
    2247
    Downloads
    0
    Uploads
    0

    Default

    It all sounds pretty simple...make sure you cover the following issues as well....like most of the available plasma THC systems do:

    -Find the plate surface then retract to manufacturers suggested pierce height. (different for different power levels and thicknesses...must be operator setable)
    -After pierce starts...activate a timer that freezes x, y and z motion until the pierce is complete. (different for different power levels and thicknesses...must be operator setable)

    - Once pierce delay timer completes, index rapidly to a physical cut height as recommended by torch manufacturer. (different for different power levels and thicknesses...must be operator setable)

    - Once x and y have achieved at least 80% of cut speed....activate arc voltage feedback circuitry to control height. (some THC systems sample the arc voltage at the beginning of every cut, after motion is near programmed speed and lock on that voltage, others use an operator set voltage that will maintain the physical cut height)
    -when machine decelerates for corners and fine features....freeze the z axis to eliminate diving.
    -when crossing the start kerf at the end of the cut....use kerf crossing voltage anomaly recognition to minimize torch diving.
    -be sure to filter divided arc voltage to minimize hash and noise that is the result of the plasma arc interacting with the molten metal movement....voltage output varies quite a bit.
    - As the torch electrode wears...the voltage reading will increase....causing the torch to be closer to the plate. Allow for automatic compensation if possible.

    These are a few features that make plasma arc voltage height controls work well. I'll be happy to offer advice as I have been working with these devices for over 35 years. I would love to see a functional, stand alone THC system that would work on any cnc / plasma for a low price. Industrial THC's cost between $5000 and $12,000.....including torch lifter/drive.


    Jim Colt



  10. #10
    Registered
    Join Date
    Mar 2007
    Location
    UK
    Posts
    534
    Downloads
    0
    Uploads
    0

    Default

    Been thinking. Rarely a good idea at my age...

    A stepper motor is the wrong tool for the job, it wants a little DC gear motor driving a screw.

    A power op-amp to drive it so it can receive plus or minus volts to go up and down with a two wire connection.

    It needs to be able to rise to the top and drop down to touch. I can sense those with two microswitches. If I split the motor power line with two diodes I can route the plus through the "top stop" switch and the minus through the "bottom hit" switch. That way it will stop automatically at top or bottom.

    To do torch height I send the error to the motor. If it's way out it goes quick, if it's barely out it hardly moves at all.

    That only leaves rise to the pierce height, still thinking on that, want to keep it simple.



  11. #11
    Registered
    Join Date
    Oct 2010
    Location
    USA
    Posts
    317
    Downloads
    0
    Uploads
    0

    Default

    Doing my daily reading I found this post by Jim...

    "The diving in the corners can be stopped with a setting in your Mach3 that freezes the height control whenever the cutting speed gets below 80% of the program speed. I know the setting is in there...but I am no expert on Mach3 systems....so you will have to consulat with someone that is!"

    Wow, thank you so much. That just made me rethink this. I was about to give up on it after reading your last post about the corners and everything and trying to decide how to monitor that but at least to get started I can use that Mach3 output to stop the THC. Now to figure out the pre cut area crossover...this would be so much easier if I had Mach3 and a plasma table. Fall cant come any faster.



  12. #12
    Registered
    Join Date
    Oct 2010
    Location
    USA
    Posts
    317
    Downloads
    0
    Uploads
    0

    Default

    Im gonna tackle the corner and pre cut crossover by just setting it not to move after dropping the voltage below a certain level. I am going to do some testing on some different materials and thicknesses to see what voltage it maintains. The max I was able to get out of it was 6.62 and that was 45amps pulling the torch up until it lost the arc.

    So far I have just been playing with an old printer using an arduino and adafuit motor shield. I have not hooked it up to the cutter yet, waiting on the cpc plug to arrive but im *adjusting* the voltage with a potentiometer and its working quite well now but no idea how it will work with the actual nema steppers. I will have to sniff out the signals and make the arduino output them since I wont be using the motor shield anymore.

    If anyone is interested this is the code. This is running on a Arduino UNO using a Potentiometer on the 5v, Ground, Analog Input 0, and an Adafruit Motor Shield with a Bi-Polar 4-wire stepper motor hooked to M1 on that shield. None of the serial code is required, I was just using it to verify what was happening.

    Code:
    #include <AFMotor.h>
    
    
    AF_Stepper motor(48, 1);
    
    void setup() {  
      
     Serial.begin(9600);
     Serial.println("Serial Started");
     
    }
    
    void loop() {
      
      analogRead(0);
      Serial.println(analogRead(0));
      if (analogRead(0) < 550 && analogRead(0) > 450)
      {
        Serial.println("Torch In Range");
      }
      if (analogRead(0) > 550)
      {motor.step(1, FORWARD, DOUBLE); 
      }
      if (analogRead(0) < 450 && analogRead(0) > 75)
      {motor.step(1, BACKWARD, DOUBLE); 
      }
    }




  13. #13
    Registered
    Join Date
    Oct 2010
    Location
    USA
    Posts
    317
    Downloads
    0
    Uploads
    0

    Default

    And I just knocked out the initial height sensing. If I got this right...

    1/2-10 5-Start Acme

    That would equal 2 turns per inch

    if the stepper is 200 steps that equals 400 steps per inch

    each step = .0025"

    I believe pierce height is .160 so that would mean 64 steps

    and now the code...

    When this is started it will lower torch indefinitely until a switch is activated, once switch is activated it will then back the torch up .160". This will need modified to account for the spring movement of the torch until it hits the microswitch. So if you allow .250" of movement up before triggering the switch you would need to change the number of steps to 164 and then after trigger the switch it will back it up .410" which will make the torch .160" above the material. This was really quick and I may just do it this way instead of an ohmic sensor because that would require filtering of the signal and I honestly have no idea how to do that.

    The "mybit" variable is just used to insure the program runs once, I may change this so that when Mach3 or whatever sends out the Arc Start, the arduino will intercept it, perform the initial height setting and then send the arc start out. Maybe keep the mybit to run it once and use the Arc Start to reset it.

    Code:
    #include <AFMotor.h>
    
    
    AF_Stepper motor(48, 1);
    
    int mybit = 0;
    
    void setup() {
      pinMode(2, INPUT);
      motor.setSpeed(150);
      
    }
    
    void loop() {
      if (bitRead(mybit,1) == 1){
      }
      else if (digitalRead(2) == LOW)
      {motor.step(1, BACKWARD, DOUBLE);
      }
      else {motor.step(64, FORWARD, DOUBLE);
      bitSet(mybit,1);
      }
    }




  14. #14
    Registered
    Join Date
    Oct 2010
    Location
    USA
    Posts
    317
    Downloads
    0
    Uploads
    0

    Default

    Here is my edited Initial Height Sense.

    Pin 3(INPUT) is the Arc Start from mach3 or what ever controller you use. Pin 5(OUTPUT) is the Arc Start command that gets sent out once the arduino finishes its program. Once I get enough money I am going to buy the motor kit right away and try to get this working with the Gecko G540. I should be able to just take the Z-step and Z-direction and HIGH or LOW the direction and just pulse the step until the conditions are met.

    Code:
    #include <AFMotor.h>
    
    
    AF_Stepper motor(48, 1);
    
    int mybit = 0;
    
    void setup() {
      pinMode(2, INPUT);
      pinMode(3, INPUT);
      pinMode(5, OUTPUT);
      motor.setSpeed(150);
      
    }
    
    void loop() {
      if (digitalRead(3) == HIGH){
      bitClear(mybit,1);
      digitalWrite(5, LOW);
      }
      else if (bitRead(mybit,1) == 1){
      }
      else if (digitalRead(2) == LOW)
      {motor.step(1, BACKWARD, DOUBLE);
      }
      else {motor.step(64, FORWARD, DOUBLE);
      bitSet(mybit,1);
      motor.release();
      digitalWrite(5, HIGH);
      }
    }




  15. #15
    Registered
    Join Date
    Mar 2007
    Location
    UK
    Posts
    534
    Downloads
    0
    Uploads
    0

    Default

    I think I have a way to do it with a DC motor. DC motors are light, cheap, fast, can't miss steps, don't get confused.

    I call it my firemans's pole. Basically, the pole goes up and down with the plasma head and the fireman is tied to it.

    When the torch goes up, pole and fireman go up with it. Soon his head hits the ceiling and the pole slides through his grip.

    When the torch goes down to touch metal, pole and fireman descend with it. Soon his boots hit the floor and once again the pole slides through his grip. The pole stops it's descent when the nozzle hits the metal you want to cut.

    When you lift, it doesn't matter how thick the metal below is, the firemans boots always start at floor level. The distance between the fireman's boots and the floor is the same as the height of the nozzle above the metal surface.

    On top of the plasma control box are two levers, one for pierce, one for cut. What they do is raise and lower sensors that detect the presence of boots. The levers have scales graduated in mm or inches, whichever you prefer.

    If you set the pierce sensor 1/2" above the floor, the boots will arrive when the plasma head is 1/2" above the metal.

    Simples.



  16. #16
    Registered
    Join Date
    Oct 2010
    Location
    USA
    Posts
    317
    Downloads
    0
    Uploads
    0

    Default

    Removed circuit so I can test it first.

    Last edited by tjb1; 06-22-2012 at 03:08 AM.


  17. #17
    Registered
    Join Date
    Oct 2010
    Location
    USA
    Posts
    317
    Downloads
    0
    Uploads
    0

    Default

    Circuit did not work so I will not be posting it here. I did hook it direct to arduino and it sampled the voltages fine after going through a 2k-5k divider.



  18. #18
    Registered
    Join Date
    Oct 2010
    Location
    USA
    Posts
    317
    Downloads
    0
    Uploads
    0

    Default

    Good news and bad news. I have the table up and running now, it has cut parts successfully without a THC. I have Initial Height Sense working and it has done flawlessly since setup.

    The good: I have a C10 breakout board I just got and I am going to begin the THC code this week/weekend and maybe have it working this weekend at least...it wont be put in the enclosure, just setup and tested. For the beginning I will be using the Arduino serial monitor to change tip voltages. If it works out, I will be using a pot to adjust voltage and a lcd display that will be attached to my enclosure to adjust the voltage...maybe I can use the VFD output on the G540 to set the voltage that arduino adjusts the torch to?

    The bad: This will require LinuxCNC, it might be able to be done in Mach3 using the code I have but im not sure. I can post the version that uses the Arduino serial to adjust it once I get it working and that is easily adaptable to a pot and lcd display using off the internet code. If it moves to a VFD output that is pretty simple for the arduino too, probably even simple to LinuxCNC and Mach3 to output that signal but im not sure at this point how to use the VFD...if I do get that working I will throw that up here also but my version will use a G540.

    This also only may work with a Powermax 45(my unit), I hooked the arduino up to the voltage outputs through a divider and it sampled voltage decently...I have not tried it yet with the cnc control to see if it maintained a voltage and doesnt see any noise. I do know it doesnt fry the arduino and if noise does become a problem I will first try to eliminate it with software by probably averaging 3 or 4 runs through the program and then I will move to a hardware solution(the last one did not work).

    The LinuxCNC code I have is not tested and I will not post it yet, I want to test it first so people dont find it and start using an incorrect code. The code takes two inputs, torch up and torch down. It then pulls Z axis location, current velocity and requested velocity from LinuxCNC. If current velocity is within 80% of requested it will continue to do what the inputs state. If torch up input is activated, it checks the velocity, arc on and arc ok. If those all check out it will then tell the torch to move a set distance every time the thread runs. This variable is adjustable in the HAL file. I have it set so it will be activated with M codes so it can be started after a pierce and if using SheetCAM you could place this in the post processor. Once I get the full version of SheetCAM I will be adding my IHS and the THC activation.

    The arduino code will have safe guards so sudden voltage drops will set a safe value so it wont crash the torch. The input is from a 2k-5k voltage divider, arduino will perform internal math so bring that back to a "real" number. Serial input will be a "real number also and then it will use the above math to bring that into the 0-1023 range. Ex...enter 118 in the serial and that will make it adjust the torch until at 118 volts.


    Thats all I have right now. I am going to work on the arduino code right now and possibly get it working tonight assuming I dont have any problems getting the new BOB working with LinuxCNC.



  19. #19
    Registered
    Join Date
    Oct 2010
    Location
    USA
    Posts
    317
    Downloads
    0
    Uploads
    0

    Default

    Some more updates...

    Math is done for converting from the input back to the plasma output, also converts the 0-1023 back to the voltage and then converts it to the actual plasma arc voltage. Read up the PWM spindle control in linuxcnc and it looks pretty easy so after testing is done with the serial monitor I will be adding the voltage control using the VFD outputs.



  20. #20
    Registered
    Join Date
    Oct 2010
    Location
    USA
    Posts
    317
    Downloads
    0
    Uploads
    0

    Default

    Here is another update...the arduino actually sampling the voltage and converting it. This is through a filter and you can see one is averaging the past 7 and the other is averaging the past 8. I think the top one(the lastest one) is jumping because I have done tons of testing on these consumables. Im going to work on putting this with linuxcnc now and see if I can get something to happen!

    Forgot to add picture...

    https://dl.dropbox.com/u/3090951/1660k.png

    Last edited by tjb1; 11-17-2012 at 01:11 AM.


Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

DIY Torch Height Control

DIY Torch Height Control