Share
Page 1 of 3 123 LastLast
Results 1 to 20 of 169

Thread: Manipulating welder output with Arduino

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Manipulating welder output with Arduino

    My "foot pedal mods" thread went off into a pretty detailed discussion of potentiometers and stuff, and I suspect some people may have checked out. Since those people might be interested in this development, I'm making a separate post for it, even though it is on a similar topic. The attached video shows the (apparently) successful result of using an Arduino microcontroller to manipulate the output of the welder, in place of the pedal.



    The welder puts 2.7 volts through the pedal, and a potentiometer in the pedal redirects some of that voltage to pin 4 of the connector. In other words, as voltage on pin 4 goes from 0 to 2.7 volts, the welder's output goes from 0 to 100%. Therefore, by using the Arduino to put a voltage from 0 to 2.7 volts onto pin 4, we can simulate the effect of the pedal. This, in and of itself, would be completely boring, since the pedal does a fine job of it already. But the Arduino can be programmed to do much more interesting things. The main thing that got me started down this road was the desire to have a proper max-output limitation on the pedal. But I quickly realized that I could do other things, like implement 4T functionality, or... well, really anything I want. Want to practice travel speed? Okay. Set an arc timer where the arc will run for 10 seconds and you try to do exactly so many inches in that time. Whatever you can think of, really...

    One possible kink in the plan is that the Arduino doesn't have a true analog output. Rather, it uses pulse width modulation to emulate analog outputs. So the output pin is capable of being at either 5 volts or 0, and the Arduino cycles very rapidly between those two values to create a desired average voltage. The cycling is so fast that, in many cases, the difference between PWM and true analog is irrelevant, but the possibility of undesired effects can't be ruled out. If PWM turns out to be an issue, the workaround will be to use a digitally-controllable potentiometer chip instead of the Arduino's output pin.

  2. #2

    Default

    You could throw a cap in the mix or cap and zener and get a more of an analog looking signal?

    I've never used the Arduino's, but do they have a 3.3VDC version?

    You also might want to look at the Microchip 12F675 or 12F683. That would drop the cost to under 50 cents minus a cheap cell phone charger. But you would need a PIC programmer, but they can be had for probably what a single Arduino cost.

    What language does the Arduio use?
    Mike R.
    Email: admineverlast@everlastwelders.com
    www.everlastgenerators.com
    www.everlastwelders.com
    877-755-9353 x203
    M-F 12 - 7PM PST
    FYI: PP50, PP80, IMIG-200, IMIG-250P, 210EXT and 255EXT.

  3. #3

    Default

    Arduino uses an AVR microcontroller, and is programmed in C++. The main advantage over PIC, as I understand it, is that Arduino has been wrapped in many layers of fluffy padding, to make it more accessible to beginners. Those looking to "roll your own" can buy an AVR chip with Arduino bootloader sans the surrounding hardware for about $5 and still use the same code. I don't know what a plain AVR chip goes for.

    The Arduino does have a 3.3v signal that can be used with sensors or ICs that expect 3.3v supply, but the digital output pins are always referenced to 5v as far as I know. It would be nice if I could come up with a way to use the full 5v resolution and then step it down to 2.7v reference in analog, but practically speaking, I seem to have sub-1-amp resolution even going between 0 and 2.7 volts natively, so I'm not sure it's worth the effort.

    How is a PIC chip programmed? Native assembly, or high-level like C? Are there pre-constructed PIC packages that include support hardware like a regulated supply and so forth, or is that all DIY?
    Last edited by joshuab; 08-25-2013 at 09:29 PM.

  4. #4

    Default

    PS: Mike, is there any reason to believe the PWM output from the Arduino will cause any distress to the welder? I really wouldn't think so, but there can sometimes be issues with HF transients when you feed an HF digital signal into an analog input, and I figure as long as I have the ear of someone who would know, I may as well ask.

  5. #5

    Default

    Only pre-wrapped little machine I use is the Raspberry PI, looking and a Beagal bone black to try next.

    On microcontrollers, I like PIC and Atmel. You can get a programer for the AVR and program it on the cheap too (no arduino requaired). But $5 is pretty cheap, what model Arduino is that?

    C is free for all pretty much. If you like simple, Rob Vun Kannon has RVKBasic (I talk to him about 6 months ago, old friend, do not think he is adding new chips anymore). For the pic, cheap as you can get, you can use GCBASIC (free again) and DOES PIC AND AVR. So you can pick (no pun) the chip you like. AVR has less quirks though.

  6. #6

    Default

    Quote Originally Posted by everlastsupport View Post
    You can get a programer for the AVR and program it on the cheap too (no arduino requaired). But $5 is pretty cheap, what model Arduino is that?
    There are a couple of different levels you can get into. For $12, you can get an AVR microcontroller in a DIP receptacle on a pre-printed board.
    http://www.adafruit.com/products/174

    Here's the microcontroller chip alone, with bootloader pre-loaded, for $5.95.
    http://www.adafruit.com/products/123

    You know, you say you like Atmel and PIC, but correct me if I'm wrong--isn't the AVR chip made by Atmel? Are we actually talking about the same thing here?

  7. #7

    Default

    Quote Originally Posted by joshuab View Post
    You know, you say you like Atmel and PIC, but correct me if I'm wrong--isn't the AVR chip made by Atmel? Are we actually talking about the same thing here?
    Yes, I like PIC and AVR chips (companies are Microchip and Atmel). Not into arm, moto, etc. ARM in OK on the Raspi using C though

    So arduino is preloaded software on the AVR and a sometimes a PCB? Why not just write the AVR code and burn it into the chip? Been doing it to long, I still have a STK-500 and a more current Dragon.
    Mike R.
    Email: admineverlast@everlastwelders.com
    www.everlastgenerators.com
    www.everlastwelders.com
    877-755-9353 x203
    M-F 12 - 7PM PST
    FYI: PP50, PP80, IMIG-200, IMIG-250P, 210EXT and 255EXT.

  8. #8

    Default

    BTW, I realize that it's still more expensive, but you can get the cheapest Arduino boards for around $20-$25, and given that they come with power supply and serial-to-USB and other niceties all wired up and ready to go, I'm not sure it's actually worth it for most hobbyists to fool around with plain chips. Ultimately, you're still going to have to build a power supply, and maybe add a clock, and so forth, so you're going to end up adding back half the things you took out, and when you're done, you'll have spent $12-$15 perhaps, so for a cost savings of maybe $5-$10, you get to build all that stuff by hand? Meh.

    For example: Arduino Micro for $25
    http://www.adafruit.com/products/1086

    Here's the Teensy for $20, although it's rev. 2.0, and current rev. is 3.0 (that one goes for closer to $30).
    http://www.adafruit.com/products/199

    If I was building 1000 units, a cost savings of $5-$10 per unit would add up, but I'm not.

  9. #9

    Default

    When you are ready to start testing with an actual arc, I'd flip it to lift start at first. That way you can at least see if it is functional and deal with the HF as a seperate issue.
    Everlast 200DX
    Everlast PT185
    Shoptask 3-in-1 (not currently in my garage, but I own it...)

    Any day on a motorcycle like this that ends just needing parts and labor is a good day.
    4.82, 158.67mph 1/8th mile 7.350, 200.35mph 1/4 mile

  10. #10

    Default

    How fast is the PWM output from the Arduino?
    You could do a simple RC filter to get the signal to be a better analog approximation.
    Everlast 200DX
    Everlast PT185
    Shoptask 3-in-1 (not currently in my garage, but I own it...)

    Any day on a motorcycle like this that ends just needing parts and labor is a good day.
    4.82, 158.67mph 1/8th mile 7.350, 200.35mph 1/4 mile

  11. #11

    Default

    Use this calculator to estimate what the cutoff frequency and the voltage ripple would be.

    http://sim.okawa-denshi.jp/en/PWMtool.php
    Everlast 200DX
    Everlast PT185
    Shoptask 3-in-1 (not currently in my garage, but I own it...)

    Any day on a motorcycle like this that ends just needing parts and labor is a good day.
    4.82, 158.67mph 1/8th mile 7.350, 200.35mph 1/4 mile

  12. #12

    Default

    You could make up a pulse feature fairly easily as well. Even make the high current, low current, and pulse frequency adjustable with Pots as analog inputs to the Arduino if you wanted.

    downslope or upslope could also be programmed into it if desired.

    Could get creative adn put a very low cost, microcontroller inline with the signal from a foot pedal. Put two or three switched on it for digital inputs, one being "no modification", one being one setting of pulse, and the third being another setting of pulse. Could be a $10 modification to make the PT185 a pulse capable machine.

    Hmmm...I have a PT185 sitting in the basement...hmmm...
    Everlast 200DX
    Everlast PT185
    Shoptask 3-in-1 (not currently in my garage, but I own it...)

    Any day on a motorcycle like this that ends just needing parts and labor is a good day.
    4.82, 158.67mph 1/8th mile 7.350, 200.35mph 1/4 mile

  13. #13

    Default

    Quote Originally Posted by sportbike View Post
    You could make up a pulse feature fairly easily as well. Even make the high current, low current, and pulse frequency adjustable with Pots as analog inputs to the Arduino if you wanted. downslope or upslope could also be programmed into it if desired.
    That's exactly the direction I'm going. I don't think that high-frequency pulse would be a good idea, because the machine isn't designed for it, so who knows what kind of stress might be put on the circuitry by yanking it up and down very quickly, but doing pulses maybe up to 30 Hz would probably be okay. Certainly no problem with an automated 1 Hz pulse to help the welder time their filler-rod dips. Also, 2T/4T functionality could easily be added.

    Currently, I'm building a box with pots on the front that basically mimics the front panel of a welder: upslope, downslope, pulse frequency, pulse balance, and so forth. My goal is to implement all of these functions using the Arduino's microcontroller.

  14. #14

    Default

    Quote Originally Posted by sportbike View Post
    Could get creative adn put a very low cost, microcontroller inline with the signal from a foot pedal. Put two or three switched on it for digital inputs, one being "no modification", one being one setting of pulse, and the third being another setting of pulse. Could be a $10 modification to make the PT185 a pulse capable machine.
    Yup. This is exactly where I'm going, although I think $10 modification may be a little ambitious. The real challenge is in writing the software to handle managing the output. If you were to go with static settings, it would be a little easier, because you could just program in a fixed output profile and run with it.

  15. #15

    Default

    A small update. The bugs seem to have been worked out of the output ramping algorithm.



    I spent a lot of time tracking down a bug wherein I mixed up the units of two variables. I track output internally as a percentage of max, so that the changes in output are independent of the welder's actual output range. But I also have to keep track of the actual voltage that I'm outputting, and somewhere in there, I mixed up a variable that holds one value for a variable that holds the other. Instead of setting output to 0.1 (10%), I tried to set it to 12 (1200%). Fortunately, my "set output" routine has bounds checking, and any value over 100% gets set to 100%. Any time you're sending voltage directly to hardware, put a lot of error checking in your code, kiddies...

    The ramping algorithm takes as an argument two variables: a target percentage to move to, and a time period over which to move. I originally had a start and end value for the "ramp", but I realized that the start value should always be whatever the welder was currently set to. There should never be an abrupt jump in the signal that is being fed to the welder, even though the welder probably would handle such a thing gracefully. If a specific output value is required as a starting point, the right thing to do is to elect to move the welder's output to that value over a chosen, short period of time. Then, you're forced to input the short period of time explicitly; you can never inadvertently move the welder's output without specifying over what time period the move should happen.

    Of course, you could always just specify 1 ms if you really wanted to, making the change effectively infinite.

    The algorithm you see demonstrated here will form the backbone of the entire program. Every change in welder output will be done via this algorithm: upslope, downslope, pulsing, etc... At least that's the plan so far. So even though it's kind of boring in a way, it's also kind of exciting. It's like looking at the block of an engine and thinking about the car that's going to be built around it.

  16. #16

    Default

    According to this link: http://arduino-info.wikispaces.com/A...-PWM-Frequency
    It appears the PWM output may only be 1khz.

    I happen to be working on an IR temperature sensor that outputs a PWM duty cycle variant signal at 1kHz and am looking at analog conversion options.


    I found this article with links to a schematic for using a 74HC4053 chip to pretty much eliminate ripple. The output update rate seems to match the input PWM update rate. Would be plenty for a pulse feature. I haven't really looked into it too much but I do have interest in trying to get the PWM output of the sensor I am working with into a usable analog output.

    http://www.edn.com/design/analog/432...most-no-ripple
    Everlast 200DX
    Everlast PT185
    Shoptask 3-in-1 (not currently in my garage, but I own it...)

    Any day on a motorcycle like this that ends just needing parts and labor is a good day.
    4.82, 158.67mph 1/8th mile 7.350, 200.35mph 1/4 mile

  17. #17

    Default

    Quote Originally Posted by sportbike View Post
    According to this link: http://arduino-info.wikispaces.com/A...-PWM-Frequency
    It appears the PWM output may only be 1khz.
    And it may be as high as 32 kHz. Thanks for the links to the ripple-removing filter. Very helpful.

  18. #18

    Default

    Quote Originally Posted by sportbike View Post
    According to this link: http://arduino-info.wikispaces.com/A...-PWM-Frequency
    It appears the PWM output may only be 1khz.

    I happen to be working on an IR temperature sensor that outputs a PWM duty cycle variant signal at 1kHz and am looking at analog conversion options.


    I found this article with links to a schematic for using a 74HC4053 chip to pretty much eliminate ripple. The output update rate seems to match the input PWM update rate. Would be plenty for a pulse feature. I haven't really looked into it too much but I do have interest in trying to get the PWM output of the sensor I am working with into a usable analog output.

    http://www.edn.com/design/analog/432...most-no-ripple

    The circuit in the link in the quote should give you a pretty stable output. I bought the chips and then realized it needs a balanced clocking input on one of the channels rather than just the varying duty cycle PWM signal. My sensor application only has the varying output signal and no clock signal running at the same frequency.
    Everlast 200DX
    Everlast PT185
    Shoptask 3-in-1 (not currently in my garage, but I own it...)

    Any day on a motorcycle like this that ends just needing parts and labor is a good day.
    4.82, 158.67mph 1/8th mile 7.350, 200.35mph 1/4 mile

  19. #19

    Default

    32kHz should allow for a pretty smooth analog output.
    I wasn't suggesting altering the signal at a high rate, just using the high rate input to get a smooth signal. The Capacitor damping slows down the rate of change considerably so a higher input makes a better output.
    Everlast 200DX
    Everlast PT185
    Shoptask 3-in-1 (not currently in my garage, but I own it...)

    Any day on a motorcycle like this that ends just needing parts and labor is a good day.
    4.82, 158.67mph 1/8th mile 7.350, 200.35mph 1/4 mile

  20. #20
    Join Date
    May 2012
    Location
    Disneyland
    Posts
    2,662

    Default

    One thing you need to take into consideration, is that you will need the shield your circuit and verify that it is not affected by the HF and AC. Remember you have a rather powerful spark gap generator running right near your micro controller. Static tests will not tell you anything about that. HF TIG machines are known for messing up all kinds of electronics. I even had to replace a wired shop phone once, because it was unusable due to welding.
    Long arc, short arc, heliarc and in-the-dark!

Similar Threads

  1. DIY Arduino THC - Video
    By EmptyNester in forum Everlast Plasma Cutters (PAC)
    Replies: 129
    Last Post: 09-26-2015, 06:49 AM
  2. DIY Arduino THC - Pass 2
    By EmptyNester in forum Everlast Plasma Cutters (PAC)
    Replies: 14
    Last Post: 12-06-2013, 12:58 AM
  3. PP256 goes high and low with output
    By BlownBlueZ06 in forum Everlast Plasma Cutters (PAC)
    Replies: 15
    Last Post: 01-29-2012, 06:04 AM
  4. Thermal Arc 400GMS max output?
    By welderdude in forum General Welder Questions
    Replies: 2
    Last Post: 12-31-2011, 05:23 PM
  5. Power I-MIG 160 output on 120?
    By welderdude in forum MIG Welding (GMAW/GMAW-P/FCAW)
    Replies: 1
    Last Post: 06-21-2011, 03:08 AM

Posting Permissions

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