Author Topic: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code  (Read 24812 times)

0 Members and 1 Guest are viewing this topic.

Offline Falcon69Topic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #50 on: November 29, 2018, 05:47:17 am »
hmm, that sounds good.

I am headed over to a friend's tomorrow night. he's much better at TIG then I am. I'm bringing this circuit and my machine to test for an hour or so.

The thing I'm worried about is that the Arduino I bought is a 5v one, and the machine outputs 3.3V.  From what I read, the Arduino will still work But may have problems as it is running out of spec.

Now on the bread board, switching the FTDI module to output 3.3v, the circuit still works as intended, just, the LED's are not as bright as they are with the 5 volt.

What I may try is to steel the power from the switch (the one that is in the foot pedal and sends signal back to machine to tell it that the foot pedal is activated), and see if I can use that. I think I may be able to. But will try it and see if it works.

Does the Arduino 3.3v, also work if the Power Supply is 5volts?
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #51 on: November 29, 2018, 06:49:22 am »
The "Arduino Pro Mini 3.3V" from Sparkfun is a 3.3V CPU with a regulator on board.  You can power the board from 5 to 12V using the onboard regulator or you can disconnect the regulator and power the board with 3.3V

https://learn.sparkfun.com/tutorials/using-the-arduino-pro-mini-33v#powering
« Last Edit: November 29, 2018, 06:51:53 am by rstofer »
 

Offline Falcon69Topic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #52 on: November 29, 2018, 07:08:15 am »
okay, so that solves the problem with my friend's machines, if their output is 5volts and I have the 3.3v Pro mini on the circuit board.  But, right now in my case, I made this circuit to test, with a 5V Pro Mini, but my machine only puts out 3.3V.  The only thing so far that I read, is that the crystal doesn't like the low voltage.  So It may work, but not like it will, since the Pro Mini will be operating out of it's spec. 

Regardless, I think if it can work on this, it should work fine once I get the 3.3v in (I ordered some, but you know China, takes a month-2 months to get anything from there.)

I can then put a selectable jumper on the Raw pin and the VCC In, so if they have 5v or even 12v, they can select the RAW pin and connect to it.

I know, china has fake Arduino, but they are really cheap.  I may just order the real ones, after this is done.  Depends on if I can get my friends to shell out the extra cash for those parts or not. But, they are cheap, like me. :P

Thanks for that Info RSTofer
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6253
  • Country: fi
    • My home page and email address
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #53 on: November 29, 2018, 10:37:27 pm »
Call me an idiot (because I'm talking out of turn here, and am a hobbyist myself), but why not a circuit something like the following?

The idea is to use the four potentiometers (one of them the actual pedal) as inputs to the microcontroller (I like the Pro Micros more than the Minis), and use a DAC and a push-pull output stage to control the voltage the welder sees.

That way you could do some really interesting stuff, like allow adjusting the duty cycle as well as the maximum current with the foot pedal.  The microcontroller is in full control of the "pedal state" the welder sees.  I'm not certain if my output buffer is correct, but the idea is to use a current amplifier stage to ensure the welder gets enough current at low voltages.

I would use an additional rotary encoder with a switch for the mode control.  The DAC is a cheap MCP4912, and the wiring is for an I2C OLED (since MCP4912 uses SPI) for displaying the values.  RXO, TXI, 4, 5, 6, 8, 9, 10 (LED), and MISO are available for the rotary encoder (two digital I/O pins, plus one for the push switch) and other uses. You could use pin 5, 6, 9, or 10 (which has the LED already) to control the intensity of an indicator LED via PWM (which is much more linear than trying to control it via voltage or current). You only need a current-limiting resistor (to limit the LED current to about 15mA maximum).

The pro micro would be powered from an USB power bank. (I like them more than the minis, because they have native USB interfaces, rather than a USB-to-serial chip.)
« Last Edit: November 29, 2018, 10:44:00 pm by Nominal Animal »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #54 on: November 30, 2018, 12:25:46 am »
Call me an idiot (because I'm talking out of turn here, and am a hobbyist myself), but why not a circuit something like the following?

Your solution is far more elegant, no question! 

In the beginning there was an Internet project, suspected to work, with some missing code.  Then the current related LED intensity came along and, pretty soon, you get to 'feature creep' and the starting point is inadequate.  The variation in supply voltages can be an issue and I'm still curious about the foot pedal current - it seems far too high for a 10k pot.   Nevertheless, here we are...

Your solution could support an OLED display, some kind of quadrature encoder menuing screen and a host of features.  Even digital readout of the settings which would be really nice when it came time to replicate a weld.

It assumes capabilities in construction and coding.  And a lot of work!

More feature creep:  Use a bargraph for the heat level display.  That would provide far better feedback than a single LED.  Then the question becomes:  Do you want the display to 'jump' between the high and low bars or do you want it to scroll smoothly?  Technically, the torch is 'jumping' but, actually, the puddle is forming more smoothly.  Is jumping the best answer for the torch if the goal is nickels?  Never thought about it!

« Last Edit: November 30, 2018, 01:55:09 am by rstofer »
 

Offline Falcon69Topic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #55 on: November 30, 2018, 03:27:18 am »
Nice Nominal Animal.

Where is the output to the welder? D9? Like I have it now?

Also, I didn't really wanted to use an encoder switch, like the Jattus design in the video I linked earlier.  That means you have tot kinda scroll through a menu system to select the different pulses, etc. of the torch. I want to be able to adjust quickly, on the fly.

I like your circuit idea much better, and can understand most of it.  but I'm new to the coding of the Arduino, I mean really knew. Hard for me to understand much, as I'm mostly a visual person and need to actually see and understand it as it is drawn up on paper, or assembled in real life. To just read abouot something, I have trouble with.



So, tonight I went over to a friends to test it.  I don't understand what is going on.  The wire that was reading 3.3v to the pedal input of the 10k Pot inside the potentiometer, was only reading 1.96 volts with the circuit hooked up, and therefore was not even powering up the Arduino. Nothing was working.  I have a 5V Arduino, and was hoping it would work. It works on the breadboard with 3.3v supplied to it (I used the 3.3v jumper on the FTDI board and had that plugged into the computer USB), but, not in real life I guess.  I don't understand why the voltage was only reading 1.96v when I put the DMM across the positive and negative of the breadboard, which was hooked to pin 1 and 3 of the Potentiometer, with pin 2 being the wiper going into the Arduino. Pin 1 being the power and Pin 3 being ground.

I just can't understand why the machine was only reading 1.96volts then, when last night with just the pedal hooked up, it was reading the 3.3V.  *shrug*

I like your circuit Nominal, but I'd need some help with it to implement it, and some help to fully understand it.  It seems like it would eliminate the problem with the LED on the out pin of the 74HC4051 I was trying to do?

the LED wouldn't even be seen when you have your helmet on and face down in the weld watching it.  It's just there for visual effect.  Nothing more, just as a guide to see as you press the pedal and turn the knobs, before you start welding.

The 'Pedal In' wire would have to be spliced (that is the wiper of the Potentiometer) and then one end into the circuit (from Pedal), and the other end out to the machine from some output of the Arduino?


oh!  Wait, I think I understand now......

In the Diagram, my machine would be on the right side. The R4 would be connected to the potentiometer in the Pedal itself, actually, R4 WILL BE that potentiometer.

Okay, this makes sense.  So the LED for visual effect would come off one of the free Digital Pins off the Micro, and then using code, scale it down from the 1024 to the 255 for PWM.

So, what about mixed voltage in?  My machine is 3.3v out to the pedal. I'm not sure what my friend's are, I need to go over there and measure it (Not the friend from tonight, he has a nice Everlast TIG welder, already has Pulse built in).  What voltage range in does this circuit accept? Is it still dependant on the Arduino?  rstofer was saying the Adafruit one will do 3.3v to 12v in.
 

Offline Falcon69Topic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #56 on: November 30, 2018, 03:53:16 am »
Just looked on Arduino site. The Micros they have, say they need 7-12 volts to work.  I guess if I have to, I can use a 9volt battery, but, what about the power from the machine and feeding into the potentiometer pedal?  Maybe that Pedal Pot has to be larger than 10K?  If the welder puts out 3.3V, and has a 10K pot on the pedal, then having 5volts supplied (The Arduino Micro has onboard regulator), may be too much for the machine to operate the pulse current correctly?

Now, searching on eBay, they have Chinese PRO Micros, that do 3.3V, and operate up to 12vdc input.
 

Offline Falcon69Topic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #57 on: November 30, 2018, 03:55:26 am »
The "Arduino Pro Mini 3.3V" from Sparkfun is a 3.3V CPU with a regulator on board.  You can power the board from 5 to 12V using the onboard regulator or you can disconnect the regulator and power the board with 3.3V

https://learn.sparkfun.com/tutorials/using-the-arduino-pro-mini-33v#powering

ya, was looking at that too the other night when you posted that.  Nominal said to look into the Micros, because of the on board USB, no need for the FTDI. but I guess it doesn't matter, since I already have that FTDI to Serial board to program with.  How do you disconnect the regulator? Just unsolder it?

EDIT: Nevermind, I'm an idiot. Voltages larger than 3.3v, use the RAW pin instead of the VCC IN pin.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #58 on: November 30, 2018, 04:55:00 am »
Why not save some grief and use a wall wart to provide power.  If you're going to use the 3.3V Mini, why not use a 5V wall wart for all applications.  Use the onboard regulator to get the 3.3V.  Don't even bother trying to get power from the welder because all welders will be different.

The new schematic, with the totem pole output, can use the 3 footpedal leads with only the GND common to the electronics; that's nice!  What's not clear to me is what happens if the footpedal is 5V and the DAC output is only 3.3V.  Or, what if the footpedal is 48V and the DAC output is 5V.  I'm almost of the opinion that an opto-isolator would be a way to get complete autonomy from pedal voltage.  But I would have to think on it...

That's the problem with trying to come up with the "general solution", the design gets out of hand pretty quick.
 

Offline Falcon69Topic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #59 on: November 30, 2018, 05:12:16 am »
Ya, gets confusing, at least to me.

The problem with the walwart is that the machine is 220V and I would have to run another extension cord to use the walwart.  It would be easier to probably run a 9 volt battery and just replace it every now and then.  But, I could just run a walwart as well, and forget about the regulator and 9 volt battery, i guess that would be simpler.

SO I redrew it, but I may totally be wrong here... Since I won't be using an encoder to switch the modes. Is this correct?  The totem pole output coming off of the machines pedal input, probably needs to be an analog pin and not a digital pin?


And yes, that has me concerned as well, if the pedal is 42 volts (I know some machines are), then is there another resistor inside the machine to drop the voltage so it reads it differently, then my machine? I don't know. How would an optoisolator work though, with the back ground current on? I know ON/OFF isn't a problem..
 

Offline Falcon69Topic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #60 on: November 30, 2018, 05:35:23 am »
Okay, nevermind about that circuit.  I reread what Nominal wrote. You need that DAC for this circuit.  The Encoder can be added if so be, using the MISO Pin and 2 digital pins.

I'm guessing the coding would be similar to what is already written.  Except, now we ad a 4th ADCVals3[] but do we average that in with all of them?  ADCVals2 is a percentage of the foot pedal's (which will be ADCVals3) voltage. Which is the background current.

I'm guessing there will need to be code for the DAC? Or is it just like before, where the Arduino just sends the signals to an output Pin, which is then connected to the DAC?
 

Offline Falcon69Topic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #61 on: November 30, 2018, 05:47:34 am »
Sorry, just trying to understand what is happening here.

So there will need to be code for the DAC as well, SPI.

I like the idea you were thinking of rstofer of using this circuit, but completely isolate the machines Pedal input from it, yet, still send the correct ininfo to the machines Pedal Input.

That would completely solve the problem with different machines voltages.  One friend owns a Miller machine, another owns another older Lincoln like mine that has MIG and TIG.  Another one owns an older Lincoln TIG only, but no pulse feature.

Pulse features are available nowadays on most dedicated TIG welders, but they aren't cheap for those.  My friend tonight told me that one of the guys he works with, just bought a Miller Dynasty with the chiller, and cost him $4200.
« Last Edit: November 30, 2018, 06:02:31 am by Falcon69 »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #62 on: November 30, 2018, 06:39:47 am »
When I think about TIG welding I go back to my youth.  I worked in a machine shop that did a lot of work for NASA and, among other things, a lot of precision welding.  The welders worked in air conditioned workspaces, sitting on comfortable work chairs with parts mounted in positioning tools.  They even had wrist supports.  These guys were the artists of precision welding.  The machines were 400A AC/DC Millers.

The point is, they weren't very far from a wall outlet.

Not true for MIG and stick arc.  That kind of welding might very well  be somewhere awkward.
 

Offline Falcon69Topic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #63 on: November 30, 2018, 06:46:21 am »
yes, but, sometimes I have to take my welder outside and work on truck, 50 feet away (I have a 60ft 220volt extension).

So it would be nice to have to not string another 110V extension cord, but, it would make things simpler, using a walwart, instead of a battery.  I could try and impliment a rechargeable battery inside the case, that can be taken inside after a hard day of welding and thrown on a charger.  Just unplug the unit from the elder, and the footpedal, and off we go to the charging station.

Ya, I seen some of the stuff NASA does. It's crazy what their standards are, yet, didn't a valve fail, because they went cheap, and exploded the challenger?  I may have that wrong. I was just a kid in 7th grade watching it happen in school. The teacher brought in the TV, and we watched it live. :/

They don't do that anymore for the kids.
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6253
  • Country: fi
    • My home page and email address
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #64 on: November 30, 2018, 09:47:22 pm »
Where is the output to the welder?
PedalIN, PedalVCC, and PedalGND.

Also, I didn't really wanted to use an encoder switch, like the Jattus design in the video I linked earlier.  That means you have tot kinda scroll through a menu system to select the different pulses, etc. of the torch.
No, I meant that the pots would control the pulse rate (pulses per second), duty cycle (pecentage), and off current (percentage); and the encoder switch only when changing the rarer settings, like if you wanted the pedal to also affect the pulse rate. (Say, you might want 1 pulse per 2 seconds normally, reach full current at pedal halfway, with half to maximum changing just the pulse rate; with pedal in the floor giving you 1 pulse per 1 second, or something like that.)

I'm new to the coding of the Arduino, I mean really knew.
I already have a couple of microcontroller projects I'm helping with; otherwise I'd get some MCP4912s and wire it up and write the code.

I'm pretty sure it would be easy to make the Arduino software so that after wiring it up, you could upload a test firmware, and measure the output with a DMM (between WelderIN and WelderGND, comparing to normal pedal), and read the pot ranges from the debug output; then fill those numbers into the proper firmware sources, and upload it, and use it.

Like I said: just right now I don't have the time.  Also, before I'd wire it up, I'd like a real engineer to look at the current amplifier/push-pull stage, to see if it makes sense.  (I haven't yet built anything that incorporates such, because I mostly play with sensors that use very little current, so I don't know for sure if it works.)

I do like to use Hammond die-cast aluminium enclosures. The circuit does not include the ferrite beads you'd need for the pedal (3) and welder (3) wires.
If you use a big enough box, the powerbank fits in, and you can use modeling clay to put the OLED outside the enclosure, with just four tiny wires poking through, and short and tiny enough to probably not need ferrites.

It seems like it would eliminate the problem with the LED on the out pin of the 74HC4051 I was trying to do?
For sure.  The idea is that the three potentiometers, and the welder pedal, are wired to the Pro Micro, and only to the Pro Micro microcontroller.

The Pro Micro is programmed and powered via the USB connector. For welding, you'd use a small USB powerbank. (Using a powerbank also means we can use the welder ground, without risking any kind of ground loops or such.)

The "pedal state", or the voltage the welder sees at its pedal input, is completely controlled by the microcontroller, via the MCP4912 digital-to-analog converter and the push-pull output stage.  (The DAC can only output something like 10-20 mA. The push-pull output stage is a current amplifier, keeping the voltage the same (up to WelderVCC) as the output from the DAC.)

The microcontroller controls the DAC by sending it the new voltage level (0-5V) via SPI. (Currently, I have the LDAC pin tied to ground, which means it should change the output voltage as soon as the transmission completes, but it might have to be wired to an I/O pin instead, if there is signal noise which makes that unreliable.) This particular one is 10 bit, referenced to the microcontroller voltage, so a value of 0 causes 0V to be output, 1023 gives 5V, and 512 gives 2.5V.  Even for 3.3V welders, it should have enough resolution to play with.

The LED is controlled via PWM. In the Arduino code, whenever a value is sent to the DAC, the duty cycle of the LED is set at the same time, with a fixed linear correction. (So that if DAC output of say 423 on this particular machine gives full current, that value gives 100% duty cycle for the led also; at 0, both are completely off.)

The 'Pedal In' wire would have to be spliced (that is the wiper of the Potentiometer) and then one end into the circuit (from Pedal), and the other end out to the machine from some output of the Arduino?
Well, no; I was thinking of having two of those connectors your welder uses for the pedal. One to connect to the welder (connected to the WelderIN, WelderVCC, and WelderGND on the other end), and the other to connect the pedal to (which would be connected as a potentiometer).

Each potentiometer acts like a voltage divider, so they don't need to be linear 10k. Anything between 1k and 100k should work equally well, except for noise and such. (A 1k linear potentiometer will consume 5mA whenever connected, producing 25mW of heat. A 10k, half a milliamp and 2.5mW, respectively.)

So, what about mixed voltage in?  My machine is 3.3v out to the pedal.
Welder voltage and ground go to WelderVCC and WelderGND. The microcontroller gets a steady 5V from a rechargeable USB power bank.

Because the pedal is almost certainly a voltage divider configuration, the welder voltage might not be very stable at all.  If its own circuitry is such that it measures the pedal input voltage with respect to the output voltage, then any fluctuation in it would not matter at all to the welder -- but it would to the microcontroller.

If that is the case, then my circuit can be amended *and isolated* by having the right side (MCP4912 and the output stage) connected to WelderVCC, and the SDI, CS, and SCK signals (all outputs from the microcontroller, inputs to MCP4912) use optoisolators or a digital isolator.  Then, it'd be pretty universal, because the MCP4912 output (0 to 1023) would be relative to the welder's pedal voltage.

There does not seem to be a lower limit to the SPI data rate, and each setting is just 16 bits, so at 10000 baud (using dirt cheap ILD213T optoisolators) it would incur a delay of less than 2 ms, which is well below human detection threshold, and also fixed, so no problem there.

If we could get one of the actual EE's to review the design, I could whip up a board design in EasyEDA ($2 for 5 boards).  Also needs checking if there is a DAC with a wider input voltage range (MCP4912 is only 2.5 to 5.5 VDC), whose reference is/can be tied to its input voltage, that is easily available.
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6253
  • Country: fi
    • My home page and email address
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #65 on: November 30, 2018, 09:52:02 pm »
It's crazy what their standards are, yet, didn't a valve fail, because they went cheap, and exploded the challenger?
It was a rubber O ring that failed. They knew there was a problem, but it was deemed an acceptable risk.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #66 on: November 30, 2018, 10:35:42 pm »
It's crazy what their standards are, yet, didn't a valve fail, because they went cheap, and exploded the challenger?
It was a rubber O ring that failed. They knew there was a problem, but it was deemed an acceptable risk.

Page 99 here:
https://www.gpo.gov/fdsys/pkg/GPO-CRPT-99hrpt1016/pdf/GPO-CRPT-99hrpt1016.pdf

This was an institutional problem.  Just because the o-ring had never failed before was accepted as an answer to whether it would fail the next time.  Near failures had been observed on previous flights.
 
The following users thanked this post: Nominal Animal

Offline Falcon69Topic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #67 on: December 01, 2018, 09:49:13 pm »
Thank You Nominal.

Yes, the idea would be to have  the input from pedal to the machine completely isolated. That would make it easier for different voltage machines. Wouldn't have to worry about designing (and possible re-coding the processor) a completely new board with voltage regulators installed. However, would be nice that if the batteries for the Arduino/DAC chip die, that the machine would revert back to normal pedal input if it happens.

I don't mind running a battery or a rechargeable battery bank.  If it's a rechargeable battery bank, I could see it lasting for months before having to recharge it.

I really do appreciate your guys help in this.  I can't afford to go out and buy a $4000+ machine that has the feature built in.

Nominal, if you do buy boards to make test on, or whatever, please let me know, I can PayPal the cash to you for that. I could draw the boards up and have them made too. I'm pretty good with DipTrace, and I'm a perfectionist, so it will be pristine looking too.

The encoder switch, controlling the pedal position to change pulse rate, that's just too fancy for me.  Keep it simple works for me. It's a cool idea, maybe figure out how to design it, with a switch or something that can select that feature to be off? Then when I get better at TIG, I could switch it on and learn it.  Mostly, for now while learning, I'll probably just smash the pedal to the floor, and adjust knobs for pulse rate and background current.

You talked about the potentiometer being a voltage divider and that's how the machine changes the current in the TIG Torch. I'd have to agree with this. So far, both the miller and the older Lincoln welders my friends and I have, the pedals are almost identical. Switch inside for on/off, and a single potentiometer.  The only difference I saw is at the PIN.  Some machines have 7 pins, only 6 are utilized, and one pin coming off the potentiometer in the pedal, is connected to another PIN, at the connector to the Welder (Not in the pedal, pedals are almost identical).  So, for those I need to try and figure out why they jumpered the wire at the connector, but for this application, since the pedals are identical (5 pins - 2 for switch, 3 for potentiometer), I don't think it matters?

Just so I try to understand, to isolate the welder inputs, because of pssible voltage differences, the SDI, CS, and SCK signals can work off an optocoupler/optoisolator? What about the steady on background current? Doesn't optocouplers/optoisolators basically work off an on/off state? Or do they also measure the LED light input as well, and turn the transistor (or mosFET) on partially, allowing current to go through during the on/off cycle?

I just did a search on Mouser.  I did not see any serial SPI DAC chips that had more than 6.5v max supply voltage. Most of them were all 1.8v-2.5v to 5.5v - 6.5v.  There is a parallel -5.5v - 16.5v, 8bit with an external reference. This was the ONLY one.  Everything else seems to be max voltage of 6.5v.  https://www.mouser.com/ProductDetail/Maxim-Integrated/MX7224KCWN%2b?qs=%2fha2pyFaduggQWm%2fHwmWYqavbQTXwpz%2fWuZ3oQTpSmI%3d   https://www.mouser.com/datasheet/2/256/MX7224-111350.pdf

That ILD213T chip is 70v collector emitter breakdown voltage. That should be more than enough. but what amount the current going through that transistor?  Remember, I measure 296mA, when only the pedal connected to my machine (there may have been something wrong with my DMM also).

I wasn't planning on using modeling clay for the display. I was going to take my dremel tool to the enclosure, and cut out a square, and use double stick tape (I have some of that tape that is used on cellphones to attach the screen and digipad to the case left over from repairing the broken screens of my niece's phones) and stick the display to it from the inside of the enclosure.  Make it a complete unit, with the board, display, and the potentiometers.  Only have a wire coming out one side with a connector, and another out the other side with a connector. That way, no cutting of the pedal wires. Just plug and play. Then I can return it back to stock (Just pedal and machine), easily.

Again, thank you all for your help. It is much appreciated.



 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6253
  • Country: fi
    • My home page and email address
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #68 on: December 02, 2018, 05:19:57 am »
Keep it simple works for me.
True.

Perhaps something even simpler might work. Say, two high-speed optoisolators, two transistors (logic level MOSFET, say a FQP30N06L) to PWM the welder voltage at say 25 kHz, followed by a simple RC filter to smooth it? (No DAC. The other one of the pair would be for the "foot switch"; I forgot about that in my above schematic.)

Just so I try to understand, to isolate the welder inputs, because of pssible voltage differences, the SDI, CS, and SCK signals can work off an optocoupler/optoisolator? What about the steady on background current? Doesn't optocouplers/optoisolators basically work off an on/off state?
The DAC is an intelligent device. When CS is pulled low, it starts listening on SCK and SDI lines. On each rising edge (low to high transition of SCK), it looks at the SDI state. If it is low, it received a zero bit; if high, an one bit. Sixteen bits form one command. Each command can set the output voltage of one of its outputs. (If LDAC is tied low, then the voltage changes immediately when the 16th bit has been received; otherwise the next time LDAC goes low.)

Thus, if you send the DAC 16 bits telling it to set the first output to 511 (50% of reference voltage, since this is a 10-bit DAC), it keeps the output voltage at that for as long as it is supplied power.  Essentially, the DAC replaces the foot pedal the welder sees.  (And the actual foot pedal and its switch are just inputs to the microcontroller.)

but what amount the current going through that transistor?  Remember, I measure 296mA, when only the pedal connected to my machine (there may have been something wrong with my DMM also).
Your foot pedal is Lincoln K870, I believe. As it happens, Arc-Zone HotFoot PDF shows its configuration, which is basically a microswitch, 2 watt 10kOhm linear potentiometer, and two 3kV 4700µF (I think) capacitors connected between the wiper and the ends of the potentiometer (to filter out any spikes and noise).  It does not say what the actual voltage is, though; probably because it does not matter that much for a microswitch and a potentiometer voltage divider.

If the voltage is 5 V, then the current must be less than 400mA, to not exceed the potentiometer rating.

Anyway, considering those capacitors, I think the optocouplers-PWM-MOSFETs would work just fine, with even smaller filter capacitors.  I'm not sure which optoisolator would be best, though; I was thinking of 6n137s, but as its output side is powered from the welder, I'm not sure if they work with 3.3V pedal voltage. (It really is just an optocoupler controlling a MOSFET, with the optocoupler output and MOSFET using the welder VCC. The IR LED side of the optocoupler is driven at 5V, max. about 15mA current, preferably 5mA or so; with 25 kHz pulse rate but preferably higher bandwidth.)

That means you'd need the Pro Micro, the potentiometers, the welder and pedal connectors, two optocouplers (or a dual one), two current-limiting resistors for the optocouplers, two MOSFETs, two pull-down resistors, and two beefy high-voltage capacitors (for filtering the VCC from the welder, and the output from the PWM'ing MOSFET; the other is the "switch", so it does not need filtering).

Anyway, if that was sorted out and works, the next step would be to write a minimal Arduino firmware, that just duplicates the pedal and switch state to the welder.  That should be relatively easy and quick to write. Then, when that works, the firmware is enhanced to actually implement the pulsing, according to the potentiometers' settings (frequency, duty cycle, and off current).  Anyone interested in those odder control modes, could easily go on from that. The OLED display control stuff is trivial; the hardest part is choosing which font to use, how large, and where on the screen.
« Last Edit: December 02, 2018, 08:15:44 pm by Nominal Animal »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #69 on: December 02, 2018, 03:06:19 pm »
but what amount the current going through that transistor?  Remember, I measure 296mA, when only the pedal connected to my machine (there may have been something wrong with my DMM also).
Your foot pedal is Lincoln K870, I believe. As it happens, Arc-Zone HotFoot PDF shows its configuration, which is basically a microswitch, 2 watt 10kOhm linear potentiometer, and two 3kV 4700µF (I think) capacitors connected between the wiper and the ends of the potentiometer (to filter out any spikes and noise).  It does not say what the actual voltage is, though; probably because it does not matter that much for a microswitch and a potentiometer voltage divider.

If the voltage is 5 V, then the current must be less than 400mA, to not exceed the potentiometer rating.

2W seems like a very big pot.  P = E2/R so E2 = 20,000 or E = 141V.  It takes a pretty high voltage across the pot to get anywhere near 2W.

To get nearly 300 mA through a 10k pot: E = I * R = 3,000V  I can believe 300 uA, equivalent to 3V, but I have a bit of a problem with 300 mA.

I can see overdesigning the potentiometer but I'll be darned if I see how there can be nearly 300 mA flowing through it!  If the measurements are right, something else is going on.  Or there is something wrong with the measurements!

From the beginning, I have wondered about those current readings.
« Last Edit: December 02, 2018, 03:09:04 pm by rstofer »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #70 on: December 02, 2018, 04:59:02 pm »
If the current is 300 uA, I wonder how a digital potentiometer would play into this.  There is some degree of isolation between the digital and the potentiometer making it somewhat immune to pedal voltage (within some limits) and it replaces the DAC and the totem pole structure.  It also doesn't limit pedal voltage to somewhere around logic voltage as the totem pole does.

ETA:  I haven't found a digital pot where the upper end of the pot isn't somehow related to logic voltage.  Unless such a device can be found, there's no point in pursuing this.  OTOH, I only looked at one...

There are some that will handle 15V on the pot side:
https://www.intersil.com/content/dam/Intersil/documents/an11/an1158.pdf

The one I was looking at used step pulses to increase or decrease the setting.  Not the most useful interface but not truly awful either.
« Last Edit: December 02, 2018, 05:12:25 pm by rstofer »
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6253
  • Country: fi
    • My home page and email address
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #71 on: December 02, 2018, 08:28:23 pm »
I'll be darned if I see how there can be nearly 300 mA flowing through it!
You're right: me neither, thinking about it.  Perhaps the huge caps connected to the pot are buggering the measurements?

I think the pot is designed to handle DC voltages up to 120 V or so. This is because P = V I = V2 / R, and with R = 10 kOhm, that yields V ≃ 141 V, as you already noted.

141 V over 10 kOhm yields 14 mA, so I think we can safely assume the DC current is less than 15 mA or so, or the potentiometer rating would be exceeded.  Because of the capacitors (being that high capacity must be polarized), I think we can also safely assume DC is used.

At 5 V, the current over the pot is half a milliamp, (I = V / R); and at 3.3 V, a third of a milliamp.

Still, I like the filtered PWM via an optoisolator and a MOSFET idea better. Actually, I think there are some optoisolators with MOSFET (totem-pole) output, so it would be something like the following:

The capacitors above are a pure guess, so their values are bogus.  I just stuffed some in, to emphasize that this needs some caps for filtering.
« Last Edit: December 02, 2018, 09:49:59 pm by Nominal Animal »
 

Offline Falcon69Topic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #72 on: December 02, 2018, 10:02:01 pm »
Nominal,

That's exactly the pedal I have, the K870.

And yes, there are two caps on them, One leg of each connected to the Wiper, and the other legs connected to the Poistive and negative, respectively.

I will redo my measurements.  but I'm not moving my dryer again to plug in the 220V. I'll just use the 110v. But, I don't think that matters for this.

I will take measurements again, with and without the capacitors. I think you guys are on to something, and they are contributing to a false reading on the DMM

So the new circuit you drew completely isolates the welder inputs. I like that idea much better.

I will be back in a few. I'll go test those measurements.
 

Offline Falcon69Topic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #73 on: December 02, 2018, 10:38:06 pm »
I retook the measurements with the DMM.

I must have been reading it wrong last time.

Now, it is reading voltage of 3.295v on the VCC pin output of the welder that goes to the potentiometer pin of the pedal (Blue wire or 'A' of the k870 Pedal Schematic)

Amperage does NOT change with or without the Caps. I actually unsoldered them from the pedal to check.

The Amperage I am reading now on the DMM is 296.3µA on the VCC output pin of the welder (again, the blue wire or 'A' on the pedal schematic) This reads this amount, whether the pedal is pushed to the floor or not, capacitors connected or not.

The Amperage I am reading now on the DMM on the Wiper of the potentiometer going back to the welder (or Brown wire or 'B' on the pedal schematic) reads 0.3-0.4µA. My DMM won't drop down anymore to get an accurate measurement. It reads 0 when pedal is NOT pushed at all. My DMM isn't that good, but I did see the number slowly going up from 0.0 to 0.4 when pedal pressed down slowly.

Here is a pic of that footpedal schematic


SO, not very much amperage draw at all.

Do these numbers sound more correct now?  I must have been looking at the DMM wrong when reading before, it is in fact NOT milli-Amps, but Micro-Amps instead.

EDIT: Oh, I think the capacitors are high voltage ceramic disc capacitors. They read 472, 3kV on them and are blue. So you they are not 4700µF like you were thinking, but rather they are 4700pF 3kV High Voltage Capacitors.
« Last Edit: December 02, 2018, 11:19:14 pm by Falcon69 »
 

Offline Falcon69Topic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: us
Re: Programming Arduino Pro Mini, TIG Pulse Add-On, missing some code
« Reply #74 on: December 02, 2018, 11:16:35 pm »
Oh, another friend has an AHP welder. His foot pedal is 7 pins.  But, still, has same number of wires going to the pedal itself.  It's just that pin 6 and 7 are connected together. He bought a pedal like mine (he broke his and had trouble getting a replacement), and we tried to make it work per this schematic, but couldn't get it working. I wonder, now that i think about it, if the capacitors were wrong size for his welder.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf