Measuring welding machine's current and voltage - Page 1
Forum section: electronics / beginners

author: Manx
author_rank: Contributor
timestamp: July 09, 2019, 10:58:13 pm
content: I'm a noob and I got myself into a project (way?) over my head; but well... The idea is to measure welding machine's current (using a low side shunt that goes up to 75 mV), and voltage (20-odd volts). In addition I want to be able to detect when the electrode touches the work. Also, I want to be able to electronically "press" the trigger.Simple digital projects allow to mask my lack of knowledge (at least for some time, in favorable working conditions). But this one, with an ADC, it was a total mess. There was a static voltage drop because of dupont wire resistance, there was some mysterious fluctuation with a dozen or so seconds period, there were voltage drops related to RS485 and (i think) ADC operation, there was high frequency noise from a DC-DC converter. And it was all visible in the measured values. One huge mess. And in the end I fried the device by applying 20 volts to power pins. So now I finally have an opportunity to learn to draw schematics and lay out pcbs. (The first version was an universal PCB, Arduino modules and wrapping wire. Lots of wrapping wire. This thing was unmaintainable. I attached pictures so you get the idea of the device).The new, pcb-to-be version is obviously based on the first one, but I also want it to be an improved version, based on what I was able to measure before I fried the old one, and based on your input. (Oh, and in general, this is an example of a situation when I curse Dave for his "I hope your next project won't work"But well, I certainly hope to learn something..).There is a AVR chip (it will be Atmega 328p in the new version) that communicates with the outside world, via MAX485 and otherwise. And there is the "outer" part of the device, doing the actual measurements. I call it outer since it is behind an isolated DC-DC converter. The ADC (ADS1115) is supplied from it. I2C signals go through 6n137 optocouplers and p82b96 I2C driver. This part actually works. I attach the schematics in case anyone is interested.So now to the problematic parts. Before I was trying to use 5V from USB. Now I want to make something better. Would this circuit with a regulator, based on Arduino schematics, be ok?Then the isolated DCDC converter. Originally I used only the converter itself (Mornsun B0505S-1W), but I guess that was the reason for a lot of noise. And since the ADC and I2C driver should work with a lower voltage, I thought of using a 3.3V regulator and a couple of caps. Does it make sense?For completeness I attach also schematics of the ADC module, but this is based on an Arduino module so I guess nothing unexpected there. So now to the part I guess I know the least what I'm doing: connecting to the things we actually measure in the outside world.I plan to use inductors and capacitors as filters. I think MIG welders don't have HF arc ignition, but I thought it won't hurt to protect against such things. In my mind it makes sense. Also, In my mind it makes sense to use a few Schottky diodes and a Zener diode as an overvoltage protection. I also use a couple of resistors (R19,20,21) since I thought this would increase the protection... Do these things resemble a way this should be done?Proximal shunt end (GND-) is connected to ADC's ground. One ADC channel measures (rather: is supposed to measure if this goes to the next stage of tests) between this ground an the distal shunt end (GND+). Another ADC channel measures the welding voltage that went through a 220k/1k voltage divider made by R16 and R17. And there is a third part, with 220 ohm R18 and D3, that is supposed to detect contact between the electrode and the work. Line labelled TO_COMP goes to a comparator which will compare this voltage with some voltage made by a voltage divider, and this way the comparator is supposed to detect contact between WELDER+ and GND-.Do these things make any sense?Additional thing is that the lowest ADC range is up to 256 mV, that are covered by 15 bits. So my max. 75 mV wastes a lot of range. It is recommended in the datasheet / application note to use an op-amp. But honestly I'm a afraid to add another level of complexity, at least at this moment.Also, is it a problem that I tie ADC's ground to the shunt? In general it would be possible to use differential input mode, but not in my case when I want to do the contact detection. And since I use the isolated DCDC converter, my thinking is that this shouldn't be a problem.So, any thoughts? Do my ideas make any sense?