WeldingWeb - Welding Community for pros and enthusiasts banner

DIY wireless TIG foot pedal?

90K views 135 replies 20 participants last post by  Ololowa  
#1 ·
Did some searching online and on this forum and haven't seen much about this topic. I've been thinking about this project for a while now, even started collecting parts here and there to make this happen. Just wanted to see if anyone has already started down this road. I know Miller and Lincoln have these but for $500-$600 there's gotta be another option. I mean, they make remote control helicopters/quadcopters for like $30 or less that run off your phone. I have a 2014 AHP Alpha TIG that I just rigged up with a CK WP-20 torch and chiller, so now I'm looking to make this thing plush with a wireless foot control.

I've got Arduinos, Xbees, pot and digital pot and have even sent an analog pot value via Xbee to the other Arduino, but it was not stable at all, i.e. the analog pot value froze up on the Rx Arduino after about a minute or less. I have a feeling the hard part, for me, is going to be the software/programming portion, but eventually I'll get it. But there's really not much going on in the foot pedals, momentary push switch and a pot (10kohm on mine). Also, I've got the 5-pin plug on my machine side (3 wires for the pot, 2 for the switch).

I do have access to a Miller wireless foot pedal at work. I recall they run at 2.4GHz, which is the common RC frequency, much like my RC plane. I have more details on a sticky note at work. Can post more if needed, even the schematic of the foot pedal, which is again, just a pot and a switch, but I do recall some capacitors in there but it's likely that's to smooth out any noise/interference.

I'd like to make some progress on this over the summer, but projects be stacking up like crazy! Let me know if anyone is thinking about doing the same and let's compare notes.
 
#2 ·
Here are some pictures and specs I found on the big blue wireless foot control.

Picture 1 shows the foot pedal schematics, which is basically the same wiring in my corded foot control of my AHP Alpha TIG 200x (2014 model), minus the whole RF transmitter thing. I haven't taken the foot pedal transmitter apart, since it's at work, so not sure of the values of the electrical components.

Picture 2 is the Rx (receiver) module that plugs into the machine. When I took if off the machine, it only had 3 pins sticking out of the module. So not sure exactly what's going on there since the tables lists many more pins. I'll try to get the picture of the module disconnected from the machine so pins are visible.

Picture 3 shows the spec table for both wireless foot control (foot pedal transmitter) and receiver, etc.
 

Attachments

#3 ·
The first thing I would do is check to see it is the program on the rx Arduino that hangs up or if the transmitting one stops sending it the values.
 
#8 ·
Thanks Iain P. Like I mentioned, I've played around a bit with this project only to get distracted by something I could finish, read easier or more urgent. The code that I had written was sending the analog pot values, which varied as the pot turned. Perhaps I'll start at the more basic level of just the 2 position push button/switch, either open or closed. Then once I get some solid code, go from there. I've also mentioned this project to an EE (electrical engineer) friend of mine and he started talking about checksums to make sure that the correct data value that is sent out of the TX unit is the same one read by the RX unit. I understand the basics of it, but will definitely need to dig into this a bit. Thanks for the interest.
 
#5 ·
RF remote control in the vicinity of electric arc welding?

Does the concept of massive RFI mean anything anymore?

How about HF startup?

I'll stay shielded wired for the time being.
 
#6 ·
It's definitely not the ideal situation but Lincoln and Miller have done it so it is possible.
 
#7 ·
@ mike837go - what's your point? You realize that the Miller wireless Tx/Rx unit is a proven, successful, supported products among industry pros and welder enthusiasts. The 2.4 GHz signal won't do $heet to the HF component of TIG. Same carrier freq used on some wireless home phones. Several members here use the wireless and the {verbal} feedback has been excellent.

Can't wait till we cut the cord and go wireless.
 
#10 ·
@ mike837go - what's your point? You realize that the Miller wireless Tx/Rx unit is a proven, successful, supported products among industry pros and welder enthusiasts. The 2.4 GHz signal won't do $heet to the HF component of TIG. Same carrier freq used on some wireless home phones. Several members here use the wireless and the {verbal} feedback has been excellent.
Can't wait till we cut the cord and go wireless.
My point is about the amount of Radio Frequency Interference (random radio signals) that are generated during arc welding (especialy square wave AC and HF starting) that will wreak havoc on the low power signal coming off the transmitter.

If they can get the signal through reliably and quickly enough. And have a decent battery life then, maybe, it'll be a long-term solution. Right now, it's just a cool accessory.

As welders, we deal with wires and hoses ALL THE TIME. What's the big deal with the little wire to the pedal?

Next thing you'll want is wireless SMAW. Mr. Tesla had the blueprints for that worked out almost 100 years ago. Any of those still on the market?
 
#9 ·
If you are using XBee's they have basic error correction built in to them so your Arduino code never has to worry about that.
 
#12 ·
Just thought I should update my first post a bit by mentioning that I do have access to a Dynasty 350 at our work's machine shop. They use the Miller wireless pedal transmitter as well. I've used it a few dozen times for small, shop based projects and haven't had any issues with the pedal transmitter. I just think that this would be a sweet project to work on, and if I can not spend $500-$600 on it, then even better. I also like the idea of one less cable on the ground to get tangled up. I suppose there's an option to get a Miller or Lincoln wireless unit and hack it to make it work with someone's current machine, but again, too much $.

I'm getting back to the basics for my coding and will start very simple and build up from there. Simple as in, gotta get the algorithm down for what I want the micro-controllers to do. Still need to work on language and details, obviously.


Here's my rough outline of how I think the code should work, off the top of my head. Wasn't planning on writing this out now, but why not:

- If/While foot pedal contact switch is closed (NO, Normally Open), send signal to Rx unit to close circuit (relay) and transmit analog pot values at some rate (delay..?)

-On the Rx side; If/While data stream is available and signal is received that contact switch is closed, then start reading analog pot values and turn them into values to control the digital pot which is connected to the machine.

-If/While contact switch (on foot pedal) is open (either send a value or not...) , do not send analog data. Rx unit will open relay, clear Rx buffer just in case, and do nothing until the data bits starts flying again.


Right now I've got a bunch of Arduino UNOs and pots/wires/sensors etc., should be enough to get a prototype going if I can get the code dialed. End product would likely be Arduino Micros for both Tx and Rx. Will likely have to come up with or buy a plastic foot pedal housing as to allow RF transmission. I got some digital pots (8-pin DIP) from Sparkfun, can't remember the specs, but I may need to get a different one that will be able to handle the volts and amps from the machine. But I got 4 b/c they were cheap and can burn one or two up if need be.
 
#13 ·
One suggestion would be to make the switch so it is normally closed. This way you could take advantage of the pull up resistors built into the Arduino. They have built in pull ups but no pull downs. To activate the internal pull up resistor on a pin named switch you would do

void setup()
{
pinMode(switch, INPUT); //sets the switch pin to input

digitalWrite(switch, HIGH); //enables internal pull up
}

If a pin is set as an input setting it high enables the pull up resistor where setting a pin to output then setting it high connects it straight to 5v.
 
#15 ·
Roger dodger, thanks for the tip Iain P. Had some extra time today after a short work day to get back into the Arduino language. Took a little bit to ramp up again, but looks like I'm getting some skills back. I actually just found the example sketches not too long ago with the built in pull-up resistors. I believe this is a newer command in Arduino: http://www.arduino.cc/en/Tutorial/InputPullupSerial

It's been over a year since I've dug deep into this stuff.

I'm basically hacking that code up now, with the basic SETUP below:

void setup ()
{
pinMode(pushButton, INPUT_PULLUP);
}

The example mentions a NO (normally open) contact switch from digital pin to ground so when the switch is open it is actually HIGH, and when the contact switch is closed, the value goes LOW. This basically flips the logic for the contact switch. No biggie yet. I think I can wrap my brain muscles around it...:dizzy:

So far I've got the Xbee's talking (1 way) by sending data when I push the button. I'll try to explain...

-Xbee 1 (Tx) has a NO push button between digital pin and ground, and 10k pot on it with power at 5V, ground and wiper at A0 (Analog pin 0), and is powered by wall wart.
-Xbee 2 (Rx) has just the Xbee and is connected to computer for power and serial.
-Xbee 1 sends data only when button is pushed, data is the digital state of the switch when closed (0), followed by comma, a space, then the value of the analog pot reading (0-1023) then will go to a new line.

So one line on the serial monitor will show '0, 133' with 0 being the state of the switch when closed, and 133 or whatever being the value of the pot.

I can hold the button down and turn the pot and will consistently get those types of lines. But every once in while, even if I haven't pushed the button recently, I'll get the message 'OK' in the serial monitor. Not sure what that is. :confused: Guess that's what the interweb is for. :rolleyes:

But still, just stoked to get this think spitting out data bits. I remembered that the Xbees are basically just like the serial comms on the Arduino, except they fly through the air instead of copper. So that may make things a bit easier.
 
#14 ·
@ redbeerd - thought Arduino's pins 3,5,6 & 9-11 are set to output PWM. Is your concept to use PWM control to vary voltage/amperage/contact (Miller pins C, D, E, F, and H)? Not sure if the sampling frequency is set or variable on the Arduino. Surely it follows Nyquist protocol.

This is really cool!
 
#17 ·
You are correcto about the PWM pins. I was not planning on using those, but a digital potentiometer instead, connected to an Arduino on the TIG machine side. They're fairly cheap, the ones I got from Sparkfun were about $2 I believe....ha...just looked, only a buck fifty. https://www.sparkfun.com/products/10613

I'll have to check the spec sheet again to see the voltage ratings, but these guys might be at the limit if connected to the TIG machine. Just checked. The pots are model #4131 which are rated for 1.8-5.5 Vdd. And only have 129 steps. So...these probably aren't the best option out there as far trying to emulate or even map to a 10k pot like the one in my foot control, but I figure they'll be good to practice with. And no harm if I fry one chip. They've got the SPI interface, which the Arduino can handle with built-in libraries. A few months ago when I was playing around with the pot I was able to map the analog pot value to the 129 steps of the digital pot and control the digital pot with the analog pot, although this was all on the same Arduino. Pretty freakin (geekin) cool and funny really, controlling a digital pot, and thus voltage, with an analog pot. :laugh: I'm almost an electrical wizard, in my mind. Almost.

I'll have to look into the Nyquist protocol as far as sampling. I may be able to take a peek inside the Rx unit on the machine at work to see what chips they use, or heck, maybe the Miller folks have that online....they do not. http://www.millerwelds.com/wireless/foot.php

But $760?:eek: Fo-get that! A thank you-no. So yea, back to that whole looking into it. That may be the better option if I can open it without breaking it, or my bank account. Where's the hammer emoticon when you need it?

Glad to hear there are some folks out there interested in this. If you woulda asked me 5, shoot..3 years ago to write code and hack electronics like this it woulda been a dumb-stare response from me. But once you get over that initial learning curve (*which can vary), things just start to make gooder sense. So if anyone else has thought about this problem/project and don't think you can do it. You can. I know there's some smart people on this forum. I ain't no engineer, but what I lack in smerts, I can make up for in perseverance-ness. If you've got any ideas on how to make this thing better, have a hack at it, and let me know. Seriously, I've never done this before. I need answers! :laugh: I must say though, the interest and feedback has motivated me to put on my "put in work" hat. Thanks again.

Typing be work. Time for a beer.
 
#19 ·
Got some code working last night. Can vary the voltage on the digital pot via wireless magic from another arduino and analog pot. Picture is of block/schematic diagram to get an idea. I drew some internals of the MCP4131 digital pot for ref. I did manage to fix the problem with the "OK" string showing up randomly, that was a delay issue on either the Tx or Rx, can't remember now. Also, had a problem with the voltage jumping around while holding a steady analog pot setting and also while varying the pot. That was also due to timing. I set the delay in the Tx loop to 20 millisecs and the delay in the Rx loop to 10 millisecs. I read online that you need to read the bits faster than they are being sent. This seemed to do the trick as I do not have any random/sporadic values jumping in the stream.

So now I can take the Tx (Transmit) unit across the room and control the voltage output of the Rx (Receive) unit by turning the pot on the Tx unit. There is a N/O (normally open) switch in there so that data is only transmitted when I push the button. I had the o-scope hooked up to the digital pot's wiper so I could see the voltage vary from across the room.
 

Attachments

#20 ·
Nice! One thing you could do to get the voltage out of the digital pot to match the voltage range expected by the tig machine is to use a basic non inverting op amp circuit after the "wiper" of the digital pot. Just set the gain of the amp so that when the pot outputs 5v you're op amp is at the top value of whatever the machine expects.
 
#23 · (Edited)
Here's some more info on the pin outs. I've also posted this on a forum that Louie1961 made about the inside of an AHP foot pedal.

Just an update for the connector pinout. I measured some voltages FROM the AHP TIG side, "control" connector, GX20-5 bulkhead, male pins.


Foot Pedal ------>-------GX20-5 connector (female) -------->------- AHP "Control" (GX20-5 bulkhead)

switch ------------- brown -------pin 1 ----------------------------- ground
switch ------------- yellow -------pin 2 ----------------------------- + 11.8 VDC (w/ respect to pin 1)
pot (leg, pin1) --------blue --------pin 3 ------------------- + reference voltage (0.134 - 8.40 VDC, varies with Main Amps)
pot (wiper, pin 2) ----- green ------pin 4 ---------------------------- wiper
pot (leg, pin 3) ------- black -------pin 5 ---------------------------- ground

NOTE: This is for the 2014 AHP Alpha TIG 200X. 5 pin connector.

So, it looks like I'll need a digital pot that can handle up to 9.0 VDC. The one I have right now is only rated for 5.5 VDC on the pot legs. But...since the reference voltage on pin 3 is directly proportional to the Main Amps (voltage varies with "Main Amps" control knob) I may be able to test out the torch control if I don't exceed the 5.5VDC on pin 3, which is roughly equal to 120 Amps. Also, the digital pot I've got now, MCP4131, only has 129 "steps" of resistance (7-bit, 0-128), so this ain't ideal and may lead to some rather large bumps in amperage when I press the pedal, I'll want a pot that has 1025 steps (10-bit, 0-1024). I think they're out there, just gotta check some spec sheets. :dizzy:

I compared the Main Amps reading on the LCD display to the voltage on pins 3 and 5 (positive probe on 3), and came up with a table. Which, when plotted out gives straight line with a positive slope. My interpretation of the graphed line makes me think that it's just a linear pot on the Main Amps knob that adjusts the voltage on pins 3-5. Could be off there, but a stab in the dark. My behind-the-scenes electrical know-how is a work in progress.

Main Amps | Voltage (VDC), pins 3-5
-----------------------------
12----------0.134
20----------0.509
40----------1.427
60----------2.317
80----------3.195
100---------4.07
120---------4.96
didn't do 140 amps
160---------6.71
180---------7.59
198---------8.40
 
#24 ·
As noted in the previous post, I mentioned I may be able to test the foot pedal at a relatively low amperage. I found my relay module and have incorporated it into the code. I also wired up a GX20-5 bulkhead connector to the Arduino where I originally had a push button and 10k pot. This allowed me to plug in my AHP foot pedal to the Tx Arduino. The code seems to work, most of time, so that I when I push down on the foot pedal it sends the moment contact switch signal as well as the analog pot value. I can see that the Rx Arduino is receiving the signals, and it sends the mapped values to the digital pot so that the voltage across the pot varies from 0 to 5 VDC. The Rx unit is still hooked up to the computer and o-scope at this time. I do have the GX20-5 male connector (end of foot pedal) that will need to wired up to the Rx Arduino and plugged into the AHP "Control" port. I may get to this today.

Again, "most of the time" is not always. It seems to be an issue with the Rx Arduino. Sometimes it takes a few resets to get going. Also, there is about a 1 second delay from the time when the foot pedal comes all the way up (OFF) which opens the moment switch circuit on the foot pedal to the time when the Rx Arduino opens the relay circuit, which will be connected to the TIG machine. I think (there I go again) that if this is the case, then it will leave the torch ON for a bit longer than wanted. I'm not sure why this is happening, but I think it's in the code and how the wireless serial data is being read by the Rx unit. Obviously, no delay on that signal would be ideal.
 
#25 ·
@ redbeerd - your tenacity is refreshing. Looks like your hard work and methodical problem solving skills are yielding fruit.

@ MikeGyver - right on. Nothing trumps the brutal facts of reality. :cool:
 
#28 ·
Thanks ManoKai. Based on some of your responses, it sounds like you may have some electrical/coding skillz as well. :cool:

Today turned out to be a scorcher here in Oregon. A little beat from the heat, so more is effort going in to staying cool. Also forgot about a killer softball game I'm supposed to play in tonight. Likely won't get to hooking up to machine until tomorrow hopefully.
 
#26 ·
It's funny that I came across this post this afternoon, since I started putting my own wireless foot pedal together about 2 weeks ago. It turns out I'm using the same approach with an Arduino and XBee, only I'm not using a digital pot. Instead I'm using a noninverting opamp and supplying my own voltage to the signal wire on our miller syncrowave.

I just skimmed over this post and will give it a better read and offer more insight into my design when I get home from work. I prototyped everything on my workbench the last two nights and everything seems to work great. Just waiting for an external antenna which should be here Friday. Hoping to get everything running next Monday or Tuesday on the machine.




Jevon
 
#29 ·
It's funny that I came across this post this afternoon, since I started putting my own wireless foot pedal together about 2 weeks ago. It turns out I'm using the same approach with an Arduino and XBee, only I'm not using a digital pot. Instead I'm using a noninverting opamp and supplying my own voltage to the signal wire on our miller syncrowave.

I just skimmed over this post and will give it a better read and offer more insight into my design when I get home from work. I prototyped everything on my workbench the last two nights and everything seems to work great. Just waiting for an external antenna which should be here Friday. Hoping to get everything running next Monday or Tuesday on the machine.

View attachment 1147151
View attachment 1147161

Jevon

Dude, sweet!
I figured someone else had to be working this same thing. Your setup looks ta ta ta tight! Really, tight fit. But even better if it fits in the stock foot pedal. :cool2:

I think my first mock up will be the foot pedal bolted to a piece of wood, along with all the other gadgetry outside of the pedal, also on the board. :laugh:
 
#27 ·
redbeerd,

I had a chance to read over your posts and can offer a little more to the discussion now. Unfortunately I'm about a week late to the party but hope to catch up. First I have a couple of questions...

My transmitting circuit is very similar to yours and the code (sketch) is extremely simple at the moment. The only thing I want to add in the future is to put the Arduino and XBee into sleep mode after a period of inactivity. As it stands now they draw a little over 50mA while transmitting. So you said you're using Arduino Uno's to prototype this. These are 5 volt boards, the XBee is 3.3V, are you using a board such as the Sparkfun Explorer Regulated to power the XBee's? If so you're covered. If not this could be an issue. You can easily power the XBee with the Uno's 3.3V output but that doesn't take care of the Tx and Rx between the Arduino and XBee. The Arduino logic goes high at 3V so the XBee transmitting at 3.3V should be enough (and usually is) to switch the logic state high. However, as I understand it, there is a tolerance on the XBee's logic that could lead you to an issue with a signal that is only 2.7V and unable to switch the arduino high. Again if you are using the Sparkfun Explorer Regulated you shouldn't have issues...However, their earlier boards used diodes to do the level shifting and may not reliably result in a low logic level because of the voltage drop across the diode. Their new version uses two mosfets for level shifting which should work great.

Sorry this is getting lengthy.

On to your receiver. Do you have the XBee hooked up to your Uno's Tx and Rx pins? Do you also have your computer plugged into the USB? Are you also sending data to the computer and reading it on the serial monitor in Arduino sketch? If so this can cause problems because the Uno only has 1 hardware serial port that is shared between the UART for the USB and the Tx and Rx pins. Sending data to the console will also get sent out of the XBee on what should be strictly a receiver. Your foot pedal will be receiving this data as well. If you attempt to send data through the console you could end up with data colliding. That's why I prototyped my receiver on an Arduino Mega to take advantage of the 3 extra serial ports. You could also use a library call SoftSerial that will emulate a serial port on one of your DIO pins.

There could still be other problems with the serial communication and how you're reading it in. Are you using the default of 9600 bps? You don't want to send too much data otherwise you can fill up the buffer. Causing a delay as the processor goes through each byte. I also don't like using a delay on the receiver end of things. If the data is there read it in. Are you using if (Serial.available()). If not you should be. Then you don't need any delay. Once data comes in from the XBee it is processed right out.

Finally, I looked at using a digital potentiometer and have the same one you have listed sitting in my parts bin. I'm connecting to a Miller Sychrowave 200 which uses 10 volts as the reference voltage. Meaning I have to be able to output 0-10V based on the foot pedal. I liked the idea of the digital potentiometer, but the ones I found can only take 5V and the resolution is just not there as you've seen. Instead I am using the PWM from my 3.3V Arduino Mini Pro. I am then sending it through a low pass filter to get an analog 0-5V output dependent on the duty cycle. I am then using a LM324 Op-amp in a non-inverting configuration with a gain of 2.6 or so (still need to finalize it) this will give a 0-10V that I'll then feed into the welder and it won't care that it came from a potentiometer or my arduino circuit.

I'll get into my design and code more at some point. This post is long enough and a little dry, but hopefully informative and can help you through some of the problems I've tracked down so far.

Jevon
 
#31 ·
Alllllrighty then, I'll try to get all the ?s in here. Thanks for input. It's all good.

I agree with you about the "sleep mode". That's definitely in the plan down the road. I recall seeing a lot of Arduino forum chats regarding the same thing some time ago so I plan to look into that once....I get this thing kicking.

For the Xbees, I've got Xbee S1, and the board kit from Adafruit. I wasn't sure exactly what those did so thanks for shedding the light.

On the Tx Arduino, the Xbee's Tx goes to the Arduino's D3, which is setup with the SoftwareSerial library as you mention. Totally saves the time of having to unplug/plug that pin every time to upload/update the sketch. Yes, the Rx Arduino is hooked up to the computer, which is providing power and serial data out from the Rx unit for debugging. I actually tried it without the SoftwareSerial library and running through the Arduino Tx, but still had the same issue with the slight delay on the relay shut off.

I am using the Serial.available function, as well as a "while" loop inside of that. I'm sending two numbers separated by a comma. The state of the moment switch and the analog pot reading. Then it gets parsed once the Rx "sees" the state value. Basically I thought it might help the receiver from receiving any erroneous messages. I may need to re-think this, as I don't really think I need that. My electrical engineer buddy mentioned that I could send the analog value twice and if those weren't the same, then to reject the values. I guess that would also work. What I really need to do is just make a super simple serial string that sends one value and see if that makes a difference in this delay issue I'm having. The delay function on my Rx unit is only 10 millisecs, and I threw it in there b/c I saw some other codes/examples that did the same, as well as I read that you need to read faster than data is being sent. So the Tx has a small delay function value too, at 20 millisecs.

I was originally thinking about the analog pot route on the Rx, specifically a motorized pot. I hadn't even heard of a digital pot until I started this thought process a few months ago. It sounds like there are a lot of flavors of digital pots out there. I did some, key word being "some", research earlier this week and found some from Analog Devices that looked promising...except they weren't. Their AD5291/AD5291 are the 256/1024 position resolution pots and can operate at +9V to +33V but aren't available as a 10k pot like my foot pedal. The AD529, 256 position, can operate +20 to +30V on single-supply operation, but again, only 256 position. So I like to think that there is something out there somewhere that has the specs I think I need. Who knows, maybe this thing will work with the 128 positions? I'd just like to get something going and working and then hopefully tweak it from there. Plus the fact that I don't really know much about op-amps, which would require some home skoolin on my part. I just thought it would be easier, for me, to make a remotely controlled pot. We'll see how that plays out....:dizzy:

Thanks again for posting all this. It's good stuff really. Hopefully we can drag some more people into the mix and see what folks are doing.

From your first post, sounded like it was GTG (Good to Go)....ah...just read it. Waiting on an external antenna, I presume for the foot pedal portion since it looked like it was made out of metal. I'd like to get mine going here soon too. Maybe tomorrow, after I triple check all the connections. I should probably get rid of the bread boards too, and at least solder up some proto shields for the Duino. :laugh: Right now it's just a bunch of wires to bread board to Arduinos.

Well, I'll try to keep this post short....ahhahaahah. Hopefully it made sense.
 
#30 ·
If low power and long battery life is what you're after there are a bunch of things you can do to this set up. First the Atmega 328 chip on the Arduino board is setup to run on a crystal oscillator at 16MHz however the Atmega 328 can be removed from the Arduino Uno board and run at 8MHz. The running current drops down to about 6ma vs 20ma for the 18MHz mode. The issue with this is that the boot loader on the chip has to be changed but it isn't too hard to do. The big power waster are the two linear voltage regulators on the board. Their efficiency is horrendous and they draw a fair amount of current all the time. I would suggest going with a couple switching regulators if you want long battery life. Another thing I would do is connect the pot to one of the digital pins on the Atmega 328 instead of 5v so when you don't want to check the pot you set the pin low and no current flows through the pot. Finally both the Atmega 328 and the XBee can go into sleep mode. The Atmega 328 can be woken up using the switch on the pedal and then it could wake up the XBee.

Sorry for the long post but I just spent the better part of a year designing/building wireless window shade circuit boards and had to wring every last drop of power out of those batteries so this stuff is fresh in my mind. They were escentually the same thing, Atmega 328 running the 8MHz Arduino boot loader, high efficiency vreg, everything running at 3.3v, low power transmitter and receiver.
 
#34 ·
Thought I'd throw up some diagrams to save me from the novel size posts....in theory. This is what my Arduino hardware looks like. Top picture is Tx unit, bottom picture is Rx unit. Red wires are power, black wires are ground. Pictures were made with an older version of Fritzing, 0.7.6. I have not actually hooked up the Rx unit to the TIG machine yet... The Tx unit GX20-5 connector is shown with a generic 5-pin connector, numbered 1-5 from top to bottom. On the Rx unit (bottom picture), there is 11.8 VDC on pin 2, which is why the relay is in there. I also have an LED and 220 ohm resistor on the Rx (not shown) used for testing the portion of code with the relay, which was put in before the relay. Also not shown are the Adafruit Xbee S1 shields/boards connected to the Xbees. On the Xbees, I'm only using power (+5V), ground, and Tx (on Rx unit) and Rx (on Tx unit). Yes, seems back-a-wards, but it's the communication between Xbee and Arduino. Xbee Tx goes to Arduino Rx, and vice versa. Using the SoftwareSerial library which allows me to use Arduino pins 2, 3 for Rx, Tx respectively, instead of built-in pins 0, 1.

Again, this is using the digital pot MCP4131 which has a limited operating voltage of 1.8-5.5 VDC for VDD (chip power supply). I still need to wire up the the GX20-5 bulkhead connector to go from the TIG machine to the Arduino before I can hook it up and test on a limited amperage range on TIG machine (50A-120A) due to varied voltage on pins 3 and 5 on the "Control" port. And since today looks to be another scorcher in the valley, may head to the coast where it's about 30 degrees F cooler. :blob2:

Also, I recall seeing a schematic for a foot pedal which shows a couple capacitors in parallel with the analog pot legs and wiper, I may do the same and test that out. I think it's to smooth out the signal...:confused: Looks like Jevon's foot pedal also had them in there, not sure of his capacitor values, but the value that comes to mind is 0.1 micro Farads. Actually, can't remember where I saw that...back to the interwebs!

So much for keeping this post short. :rolleyes:



 
#36 ·
0.1 uF would work fine across the pot and the wiper. It's there to get rid of any RF noise that could make the A/D values jump up and down. Given that the foot pedal has an RF transmitter on it and it's for a tig machine that will be generating RF noise I would say it would be a very good idea to have them there.
 
#39 ·
Thanks for the info Ian P. Unfortunately I think there are some other factors that will need to be addressed. As Mike837go mentioned, HF/RFI interference! :laugh:

I'll get to the point quickly, then will lay out some details...stand by for that! :rolleyes:

Basically, I hooked it all up, eventually it worked 2 times where I had control of the amperage with the wireless foot pedal (Tx) and Rx unit hooked to the machine! :cool2: But only twice. Still pretty stoked! The machine is fine, still works fine and all that.

Gritty details...

I decided to stick it out here in the valley today and charge through the last bits of this project as I felt close to testing it on the machine. I soldered up a proto-shield for the Arduino with the Rx circuit. This made it a little less messy. Tested it on my computer and it worked as expected. I then wired up the pigtail for the GX20-5, female, connector, the one that plugs into the "Control" port on the machine with 5 wires back to the Arduino (3 wires) and relay (2 wires).

Times are local, approximate and military.

~1500
At first I just wanted to test the relay on the Rx unit hooked to the machine. These are pins 1 and 2, which have a measured 11.8VDC between them. ( Both Tx and Rx ARduino unites were powered by wall warts supplying 9VDC). Both the Tx and Rx units were about 2 feet away from each other, with the Rx unit about 2 feet from TIG machine and Rx unit 3-4 ft. away. So I only hooked up wires 1 and 2 from the machine to the ARduino controlled relay. I set the machine at 60A so the reference voltage on the digital pot was between ground and 5V. When the pedal pressed, the relay closed (normally open), and the machine sounded like it was letting gas flow, though that may have been the HF circuit now that I think about it? Thoughts anyone? The only problem was, that the relay wouldn't turn off (open) when I let go of the pedal. The red LED on the Adafruit Xbee board would light up, as well as the small LED on the relay module when pedal was pressed, they just didn't turn off when the should have. The only way to get the relay to close was to reset the Arduino.


~1510
Moved the Tx unit about 8 feet away from Rx unit and TIG machine. I also plugged in pins 3, 4, and 5 from the machine to the digital pot pins. I know, changing 2 variables at once, not good. But, held the torch away from the scrap metal to be welded, hit the pedal, relay closed (lights on), then let up on the pedal and the relay opened! Although, there was still about a 1 second delay from pedal up to relay circuit open (off). So I decided to try it on some metal, 1/4inch plate, mild steel, just to see if it would spark and be controlled wireless foot pedal. It took a few attempts to get the arc started (metal was a bit rusty) but the arc finally fired up! I was able to control the amperage via the wireless foot pedal. I was only at 60A, which wasn't enough to really weld, but was just trying the arc control. :cool2: Felt vindicated! And laughed and hooted to myself in my garage.

~1520
No change in welding setup, but when I would pres the pedal, the gas would flow for about a second, then stop, and the relay would not open (turn off).

~1539
Just wanted to check the machine to make sure it still worked, so I hooked up the foot-pedal cable to the machine, no wireless anything hooked up, though still powered....And this is when I saw it. The Rx Arduino unit, which was powered on, started to react when I was welding with the cabled foot pedal. The red LED for the Xbee and the relay indicator LED would turn on when I was welding with the cabled foot-pedal! There was nothing plugged into the Tx unit Arduino, other than power and it was on. So the Rx Arduino/Xbee was getting some sort of interference when I would start the arc, which is HF start.

~1550
This didn't really hit me at first, until I was about to change out the control lead. Then a few moments later, it dawned on me, so I went back and double checked the setup that I just tried. And sure enough, same thing happened again. The Rx unit was plugged into the machine, nor was the foot pedal plugged into the Tx unit, but the Rx ARduino/Xbee would react (lights on, relay closed) when I first hit the pedal. Another key here, when I started the arc the Rx unit would light up and relay close, but a few seconds after the arc start, the Xbee LED would turn off, and the relay would open (turn off). So this really made me see it....finally! :laugh:

Looks like it's back to the think tank for me. :dizzy:

The good news is that it's been done and therefore possible...by someone with more experience. Talking bout them Miller folks of course.
 
#38 ·
Redbeerd,

Are you still struggling with the delay you were experiencing? If so, you may be sending too much over the serial line. Are you using Serial.Print or Serial.Write to send data?

If you are using Serial.Print (and depending how) you are converting your number into ASCII text and sending each digit as an ASCII encoded character. This could be up to 4 bytes of data for your pot position and another 2 bytes for your comma and 1 for the switch. That's 6 bytes of data where you only need to send 1!

All I do is when the switch is closed I send a byte (0-255) using Serial.Write. On the receiving end, if Serial.Available() exists that means I'm receiving from the transmitter (foot pedal), hence the switch has to be closed. The analog inputs are 10 bits (0-1023) but the analog outputs on an arduino are only 0-255, so there is no point in sending more.

I get no noticeable delay sending this way, and as a bonus, its much simpler to implement. I also included a counter in the receiver arduino that after it has not received a serial message for 0.1 seconds it turns the outputs off. This is a failsafe for if/when the pedal losses connection.

The transmitter (foot pedal) also has a timer that increases while the foot pedal is not pressed (the switch). After 10 seconds of inactivity it then puts the XBee to sleep (Pin 9 of XBee HIGH after configuration of XBee). This drops the current of the foot pedal from 53mA to 3mA. This will greatly extend battery life.


Scope showing the voltage ranging from 0-10V (I cheated and used a 12V supply to the Op-amp). That's me pressing the pedal on and off very rapidly at some spots.


Finished circuit to go into the foot pedal. I'm also going to switch to 3 AA batteries as they'll last much longer than the 9V.

Finally, my only concern I have is how much current the TIG's 10V can supply. I need about 100 mA to power the Arduino, XBee, and Relay. I may look into solidstate relays.

I can post my code if you wish, and schematics (when I get around to making them). Just let me know.

Jevon (new guy who can't write short posts)
 
#40 ·
Redbeerd,

Are you still struggling with the delay you were experiencing? If so, you may be sending too much over the serial line. Are you using Serial.Print or Serial.Write to send data?

If you are using Serial.Print (and depending how) you are converting your number into ASCII text and sending each digit as an ASCII encoded character. This could be up to 4 bytes of data for your pot position and another 2 bytes for your comma and 1 for the switch. That's 6 bytes of data where you only need to send 1!

All I do is when the switch is closed I send a byte (0-255) using Serial.Write. On the receiving end, if Serial.Available() exists that means I'm receiving from the transmitter (foot pedal), hence the switch has to be closed. The analog inputs are 10 bits (0-1023) but the analog outputs on an arduino are only 0-255, so there is no point in sending more.

I get no noticeable delay sending this way, and as a bonus, its much simpler to implement. I also included a counter in the receiver arduino that after it has not received a serial message for 0.1 seconds it turns the outputs off. This is a failsafe for if/when the pedal losses connection.

The transmitter (foot pedal) also has a timer that increases while the foot pedal is not pressed (the switch). After 10 seconds of inactivity it then puts the XBee to sleep (Pin 9 of XBee HIGH after configuration of XBee). This drops the current of the foot pedal from 53mA to 3mA. This will greatly extend battery life.

View attachment 1148581
Scope showing the voltage ranging from 0-10V (I cheated and used a 12V supply to the Op-amp). That's me pressing the pedal on and off very rapidly at some spots.

View attachment 1148591
Finished circuit to go into the foot pedal. I'm also going to switch to 3 AA batteries as they'll last much longer than the 9V.

Finally, my only concern I have is how much current the TIG's 10V can supply. I need about 100 mA to power the Arduino, XBee, and Relay. I may look into solidstate relays.

I can post my code if you wish, and schematics (when I get around to making them). Just let me know.

Jevon (new guy who can't write short posts)
Yea, it's kinda hard to keep these technical posts short. :laugh: You should see the one I just posted. I think I'm going for a record.

Thanks for the Arduino code serial tip. Don't know how I wasn't doing that. Actually I do, I still have a lot to learn about coding and all things in life. I'll try that out and see what happens. Unfortunately, as in my last post I mentioned, the Arduino/Xbee was going crazy when I was welding with the cabled foot pedal. So you may want to check that before you plug anything in to see if it might be a problem. Now that I think of it, I'm gonna go grab my RC airplane and see if I can't fly it at the same time I'm welding. :laugh:

But it sure looks like you got yo shiz together with that build, coding and hardware wize.

Keep up the great posts.
 
#41 ·
I decided to comment, cleanup, and add my code in here too. I'm relatively new to Arduino and haven't programmed C in 8 years. So there could be better ways to go about some things, but I think it's pretty efficient.

Code for the foot pedal
Code:
/*
  TIG Foot Pedal Transmitter
  
  When the switch is closed send the potentiometer signal over the serial link.
  If the switch has not been closed for some period of time put the XBee to sleep.
 */

const int buttonPin = 13;    // The number of the pushbutton pin
const int XBee_sleep = 9;    // Arduino pin used to sleep the XBee
const int sleepTime = 10000; // The time is milliseconds of activity until we should put XBee to sleep
int sleepCounter = 0;        // variable for the sleep counter
int buttonState = 0;         // variable for reading the pushbutton status

void setup() {
  Serial.begin(9600); // initialize serial communication at 9600 bits per second:
  pinMode(XBee_sleep, OUTPUT);
  pinMode(buttonPin, INPUT);
  digitalWrite(XBee_sleep, LOW); // wake up xbee on power on
}

void loop() {
  buttonState = digitalRead(buttonPin);

  // check if the pushbutton is pressed. if it is send the potentiometer value over the serial port.
  if (buttonState == HIGH) {
      digitalWrite(XBee_sleep, LOW); // wake up XBee or keep it awake   
      int sensorValue = analogRead(A2);   // read the potentiometer on analog pin 2:
      
      byte analogSend = map(sensorValue, 0, 1023, 0, 255); //cast the uint10 to an uint8 (single byte) and send over serial
      Serial.write(analogSend);
      sleepCounter = 0;      // button was pressed -> reset sleep timer
      delay(10);        // delay to keep from sending a crap load of data over serial
  }
  // else if the button is not pressed increase sleep counter 1ms at a time
  else {
    if (sleepCounter < sleepTime) {
      sleepCounter = sleepCounter + 1;
      delay(1);
    }
    // if the counter has been exceeded put the XBee to sleep
    else {
      digitalWrite(XBee_sleep, HIGH); // put XBee to sleep
    }

  }

}
Code for the receiver
Code:
/*
  Foot Pedal Receiver

  Receives a byte (0-255) sent over XBee from the TIG foot pedal transmitter.
  Outputs a PWM (490Hz) on digital pin 3 to be converted to 0-10V for the welder.
 */
 
const int analogOutPin = 3; // Analog output pin
const int relay = 7;        // Digital pin of relay
int counter = 0;            // Counter to keep track of how long it's been since receiving data
int idleTime = 100;         // Timeout in milliseconds to determine how long its been since we last received a pot position

void setup() {
  Serial.begin(9600);    // initialize serial communication at 9600 bits per second:

  pinMode(analogOutPin, OUTPUT);    // Set Pin3 as analog output
  pinMode(relay, OUTPUT);           // Set Pin7 as output
  
  analogWrite(analogOutPin, 0);     // Initialize to 0
  digitalWrite(relay, HIGH);        // Initialize to HIGH (relay open)
}

void loop() {

  // If there is data in the serial buffer -> read it!
  if (Serial.available()) {
    byte potPos = Serial.read(); // read the potentiometer position (0-255)
    analogWrite(analogOutPin, potPos);   // output the potentiometer position (0-255) as a duty cycle
    digitalWrite(relay, LOW);  // close the relay for the welders contactor
    counter = 0;   // zero the counter since we just received a message.
  }
  // else if there is no serial data available increase the counter and wait 1ms
  else {
    if (counter < idleTime) {  // we don't need the counter going above the idleTime -> so only increment it until we reach it.
      counter = counter + 1;
      delay(1);
    }
  }
  
  if (counter >= idleTime) {
    
    // If this is true we haven't received a message for a bit of time (100 milliseconds or whatever idleTime is set to
    // This is how we turn of the relay and PWM output. Instead of receiving an extra byte over the serial representing
    // the switch in the pedal. This also acts as a failsafe if the pedal transmitter stops receiving data from the antenna.
    // This does imply that there is a 1/10 of a second delay between when you remove your foot from the pedal and the welder stops.
    // I think it's a reasonable tradeoff for the increased responsiveness of the pedal.

    analogWrite(analogOutPin, 0); // turn off output
    digitalWrite(relay, HIGH);    // turn off relay
  }

}
Jevon
 
#45 ·
Thanks for post. I think I'm about beat for today. Been at it pretty much all day and it's still about 90 degrees F in my house. Gonna take a break and find some A/C somewhere. I'll take a closer look at your code soon. But from a glance it looks pro. Way better than mine, I know that.
 
#42 ·
Is the relay wired just like you show in the diagram? If it is that could be your problem with it not turning off, and if you're not carefull it will kill the Arduino! The pins on the Arduino can't drive inductive loads because when you try to shut the current to the inductor (relay coil) it generated a huge voltage spike that will wipe out semiconductors! That is why at the very least it needs a freewheeling diode on it and a better way would be a a freewheeling diode and using a transistor to switch the relay coil on and off would be the better way to go.
 
#46 ·
Iain P, thanks for schematics. Looks like I'll have to break open a book here in the near future to get me learned up on this. I don't think I killed the Arduino...yet! Gotta take a break here today. Will get back after tomorrow, unless the weather is blazing again.

And yes, that was how the relay was wire up. Oops!

Thanks again. I still wanna make something that works! Hopefully Jevon has better luck with his build.
 
#43 ·
Here are some pictures to hopefully help with the electronics. The thing to note is the current required to turn on the relay. Then just choose a transistor and a freewheel diode with a current rating greater than that current. Just plug the values into the handy base resistor calculator equations and choose what ever standard resistor is the next size smaller than what the equation spits out.

 
#48 ·
Jevon,
Yes, I got sloppy in my description there when I said the Rx unit was "reacting". The Rx unit was powered by a wall wart at the time, and it wasn't plugged into the TIG machine. The red LED on the Xbee Adafruit board would light up, when I was welding with the cabled foot pedal, as well as the relay indicator light, which would then close the relay.

Good luck next week. I'm gonna stay tuned fo sho. I'm definitely closer now than I was last week!