I have been working on a project/learning exercise of understanding and creating a funtional SMPS TIG welder. My electronics knowledge is pretty "DIY", so I have had to research and learn almost every individual system needed to make this work. What I realized i would need and am currently working on is current sensing/feedback and current control. I have hit a wall and am looking for some guidance. If possible, please keep in mind that I am limited in my knowledge and am trying to keep this as simple as possible to start.
I will try to explain my current test setup.
I have a large 20v 18650 battery pack. From there it goes to a very large inductor which I recently added in an attempt to keep current spikes under control. It is just a 50 ft spool of wire purchased from the hardware store with a steel rod as the core(I also have a 100' roll I have been switching in and out). Then it goes to my load which is just some resistance wire from a heater with a resistance of ~2ohms. Then to my IGBT collector(g50n60). Emitter to negative.
For control I have an Arduino Mega. It is powering 2 optocouplers to protect my arduino and step the voltage up to 20v to the base, which is just feed from the same battery. In an attempt to increase switching speeds I added the second optocoupler to short the base directly to ground in between pulses.
I have been trying to control the current with a shunt. I use the voltage drop as an analog input to the Arduino. First I used a 100amp shunt I had laying around. But, the voltage drop was too low so I felt the resolution was too low for low amperage accuracy. So, I switched to using the voltage drop across my inductor which worked out to be within 0-5v. I have included the simple sketch I have been working with. It is a work in progress and just for testing. It basically just works like a thermostat. If it above a certain value turn off, if below turn on. My goal is to have the current rock steady to within no more than 1 amp variance.
The problem is although the current is steady when I power the circuit, it cannot handle changes. So, when I move the wire to different locations on my load, decreasing the resistance, the current will increase. I have tried changing the frequency as low as 50hz and as high as +1khz. I added the inductance to try to prevent sudden current changes. But, I am not having any success.
Any advice would be greatly appreciated and Thanks in Advance!
invertor_working.ino (1.44 KB)