Manipulating welder output with Arduino

   / Manipulating welder output with Arduino #1  

joshuabardwell

Elite Member
Joined
May 6, 2012
Messages
2,728
Location
Knoxville, TN
Tractor
Bobcat CT225
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.
 
   / Manipulating welder output with Arduino #2  
joshuabardwell said:
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.
I think you could just use an LCR filter to intergrate the PWM pulses.
 
   / Manipulating welder output with Arduino
  • Thread Starter
#3  
I think you could just use an LCR filter to intergrate the PWM pulses.

Oh, yes, of course. Sorry--I'm still pretty much a rank beginner at electronic circuit design, and I often overlook obvious things. Someone had previously suggested a capacitor to me, but when I tested the circuit, it didn't work, either with or without the cap, and I started thinking along the lines of a digital pot. Later, someone pointed out an error in my code that was the cause of the not-working, and the video you see here is the result. But I forgot about the capacitor in the meantime.
 
   / Manipulating welder output with Arduino #4  
joshuabardwell said:
Oh, yes, of course. Sorry--I'm still pretty much a rank beginner at electronic circuit design, and I often overlook obvious things. Someone had previously suggested a capacitor to me, but when I tested the circuit, it didn't work, either with or without the cap, and I started thinking along the lines of a digital pot. Later, someone pointed out an error in my code that was the cause of the not-working, and the video you see here is the result. But I forgot about the capacitor in the meantime.

you might need more than just a cap., as that could store the max voltage from the PWM output. You will need an input resistor, and a discharge resistor.

You should look for an old book titled 'the forrest mimms circuit scrapbook' or something like that.
Used to be published by Radio Shack. They also had little notebooks on certain types of circiuts.
 
   / Manipulating welder output with Arduino
  • Thread Starter
#5  
I think what you're describing is basically a low-pass filter, isn't it?
 
   / Manipulating welder output with Arduino #6  
joshuabardwell said:
I think what you're describing is basically a low-pass filter, isn't it?

Simmilar. But the componants are arranged a little diferent.
You want the PWM signal to charge the cap. to the average voltage. But you need to have a diode to isolate the cap. from the PWM input, and that will make the cap. charge to the highest voltage of the PWM output. So then you need a drain resistor to load the cap. so thinner pulse widths can't keep the cap. fully charged. You also need to consider how much the output will be loaded down by the welder. So you need to find out what the impedance of the welder is.

Now that i think about it, it IS a low pass filter.

http://en.wikipedia.org/wiki/Passive_integrator_circuit
 
   / Manipulating welder output with Arduino #7  
So if I am understanding correctly, it is technically a square wave output?
I am guessing that is how it would look hooked up to an oscilloscope.
 
   / Manipulating welder output with Arduino
  • Thread Starter
#8  
So if I am understanding correctly, it is technically a square wave output?
I am guessing that is how it would look hooked up to an oscilloscope.

Yes, exactly. With an average duty cycle equal to the desired percent of output, from 0 to 5 volts. So a target of 2.5 volts would produce 50% duty cycle. The base frequency is something like 31 kHz, so many analog devices won't notice the difference.
 
   / Manipulating welder output with Arduino
  • Thread Starter
#9  
You want the PWM signal to charge the cap. to the average voltage. But you need to have a diode to isolate the cap. from the PWM input, and that will make the cap. charge to the highest voltage of the PWM output. So then you need a drain resistor to load the cap. so thinner pulse widths can't keep the cap. fully charged. You also need to consider how much the output will be loaded down by the welder. So you need to find out what the impedance of the welder is.

Yeesh. I am so out of my depth with this stuff. So far, the PWM output seems to be working, and I hope it stays that way. With software, I can usually slog through it until I get it working, but the electronic stuff is a whole new world.
 
   / Manipulating welder output with Arduino #10  
joshuabardwell said:
Yeesh. I am so out of my depth with this stuff. So far, the PWM output seems to be working, and I hope it stays that way. With software, I can usually slog through it until I get it working, but the electronic stuff is a whole new world.

Yah, it can be a little abstract at first.

Think of the PWM output of your circiut as bursts of water from a fast acting valve. And the cap. as a tall tank. The level of water in the tank is the charge of the cap. Now if the tank has no drain, it will fill up no matter how breif the bursts of water from the fast acting valve are. Now if the tank has a hole in the bottom of the tank that lets the water out slowly then the level in the tank will vary with the pulse width.
But if the hole in the tank is too big, you may never get the tank all the way full. And if the hole in the tank is too small, it may not go low enough. And if the tank is too big, the response will be too slow.

So you need to restrict the bursts of water going into the tank to a level that will fill it in the time you would like (20 cycles? 100 cycles?) and then restrict the drain to the level that will keep the tank half full when the PWM is at 50% duty cycle.

Clear as mud?
And the welder connection adds to the drain. How much i can't say.
 

Tractor & Equipment Auctions

2016 Chevrolet Caprice Sedan (A50324)
2016 Chevrolet...
McDon 75s 40' Flex Draper Head (A52349)
McDon 75s 40' Flex...
2016 John Deere TS Gator Utility Cart (A48082)
2016 John Deere TS...
2003 International 4300 Flatbed Truck w/ Liftgate - Inoperable - 7.6L DT466 Diesel Engine (A52128)
2003 International...
2010 POLARIS RANGER 4X4 4 SEATER UTV (A51222)
2010 POLARIS...
71065 (A49346)
71065 (A49346)
 
Top