Pages: [1] 2 3 4   Go Down
Author Topic: Analog switch IC behavior  (Read 4370 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
God Member
*****
Karma: 17
Posts: 522
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My welder uses continuity between two pins in the remote plug to detect whether or not it should let the remote control the output, or whether it should let the dial on the front of the panel control the output. In the foot pedal supplied by the manufacturer, these pins are jumpered together so that plugging in the foot pedal immediately turns control over to the pedal, and un-plugging the foot pedal turns control back over to the front panel.

Instead of jumping these pins, I have pulled them back to my board so that I can pass control back and forth between my device and the front panel without having to un-plug the connector. I considered using several different components to switch this connection, including a MOSFET, an opto-isolated solid-state relay, and a 4066 analog switch IC. I am currently using the 4066, because 1) I accidentally ordered a power MOSFET with a 10-volt activation threshold, and 2) my relays are NC, and I need NO, because I want the contacts to be open when the Arduino is powered down so that the front panel has control in that state.

The 4066 appears to fit the bill. Between pins AIN and AOUT, there is no continuity when the chip is powered down, and there is about 168 ohms when the chip is powered up. Attached is a schematic of my circuit. You will see that I have bridged the control pin directly to the Arduino's 5v supply so that whenever the Arduino powers up, the switch should close. And readings with a multimeter confirm that this is working.

However, the results are not as I would expect. Whenever I plug the board into the welder, the welder acts as though there is continuity between the pins and disables the front-panel controls. This is even with the Arduino powered down, when no continuity should exist. Additionally, if I pull the 4066 from its socket, then the welder detects open between the pins and the front panel controls work. So there must be some signal path between pins 1 and 2 when the 4066 is plugged in, but I can't for the life of me imagine what it could be. Suffice it to say that things work fine if I install a manually-operated NO switch between the two pins of the welder's receptacle.

I have ordered some optically-isolated NO solid-state relays, which really should work, but I would like to have a better understanding of what is happening in this situation. I realize that not knowing what exactly is happening inside the welder is a bit of an impediment, but maybe some insight could be gleaned anyway.


* 2013-09-13 15.12.11.jpg (36.18 KB, 800x600 - viewed 47 times.)
Logged

Offline Offline
God Member
*****
Karma: 17
Posts: 522
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I should mention that I am using two inputs on the 4066, but the other two are floating right now, in case that matters. Also, I have not tied the switch-detect circuit to the Arduino's ground, but there is another, parallel circuit that is used to detect the pedal position, and that one is tied to the Arduino's ground. The pedal-detect circuit is not running through the 4066. Not sure if that matters.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Could you show us the entire pin out of the chip?
(how its currently wired)
Logged

Offline Offline
God Member
*****
Karma: 17
Posts: 522
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here's the pinout of the 4066. Note that I have not yet hooked up control line B, because I haven't finished wiring up the board yet. Control lines C and D, and in/out C and D are not currently used in the project. Pins labeled "WPinX" indicate that they are connected to Pin X in the welder's remote socket. Pins 1/2 of the remote socket are used to detect the presence of the remote device. Pins 6/7 are used to indicate that the torch switch has been pressed and an arc should be initiated.




* 2013-09-13 15.35.09.jpg (52.07 KB, 1067x800 - viewed 51 times.)
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33296
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The 4066, like all other analogue switches does have some leakage and it looks like that is what is triggering your system. I would try putting a pull down resistor on the output side of this switch to short out any leakage. Something between 1K and 10K should be good enough if that is indeed the problem.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33296
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Note that I have not yet hooked up control line B, because I haven't finished wiring up the board yet. Control lines C and D, and in/out C and D are not currently used in the project.
You can't leave the inputs floating, you have to connect them to ground if there is no other form of input.
Logged

Offline Offline
God Member
*****
Karma: 17
Posts: 522
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would try putting a pull down resistor on the output side of this switch to short out any leakage. Something between 1K and 10K should be good enough if that is indeed the problem.

So (and pardon my ignorance) a 1k-10k resistor, between the negative side of the circuit and the ground bus. Is that right? This will pull any leakage to ground without letting it "slip through" and be detected by the welder.

Quote
You can't leave the inputs floating, you have to connect them to ground if there is no other form of input.

Here, you're talking about the 4066's control inputs, right? Those I can easily just jump to ground.

Thanks.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33296
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
between the negative side of the circuit and the ground bus.
Yes the pin 2 of the welder signal and ground. I assume you also have the ground of your welder connected to the ground of the arduino, if not you need to do that as well.

Quote
Here, you're talking about the 4066's control inputs, right?
Right.
Logged

Offline Offline
God Member
*****
Karma: 17
Posts: 522
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes the pin 2 of the welder signal and ground. I assume you also have the ground of your welder connected to the ground of the arduino, if not you need to do that as well.

Yes--or at least, I have tried to do that. The welder uses three pins to detect pedal position via a potentiometer (which I am replacing with the Arduino). The pins are +, wiper, and - (obviously). I have tied the - pin to the Arduino's ground, and I expect that this will have tied to two devices' ground to each other, but I can't be 100% sure about this, since I don't know what-all is happening inside the welder.

I suppose I could check for voltage between the pin 2 (the - pin of the "detect" circuit) and pin 3 (the - pin of the pot circuit).

If I was to use an opto-isolated, solid state relay, would these issues be circumvented?
Logged

Offline Offline
God Member
*****
Karma: 17
Posts: 522
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I suppose I could check for voltage between the pin 2 (the - pin of the "detect" circuit) and pin 3 (the - pin of the pot circuit).

There is about 70 mV between these pins (and, therefore, between pin 2 and the Arduino's ground bus), so I think this means that pin 3 is an acceptable source of ground reference for the pin 1/2 circuit.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33296
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
If I was to use an opto-isolated, solid state relay, would these issues be circumvented?
Could be but you would have to know about the welder circuit to be sure.
See how it goes with the pull down.
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 223
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I would choose either a normally-open reed relay or an opto isolator for that application. The reed relay is simpler because it is polarity-independent.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
God Member
*****
Karma: 17
Posts: 522
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried putting pulldown resistors on both of the switch connections (pin 1/2 and pin 6/7) going to the welder. No change in behavior. Additionally, with the analog switch IC plugged in, the "manipulate the welder's output" function doesn't work.

To elaborate, the welder's jack has seven pins, as follows:

1 - Pedal detect -
2 - Pedal detect +
3 - Pedal position (potentiometer) Vss
4 - Pedal position (potentiometer) wiper
5 - Pedal position (potentiometer) Vcc
6 - Torch switch -
7 - Torch switch +

Pins 1/2 and 6/7 are run into the analog switch IC. Pin 3 is connected to the Arduino's ground bus. Pin 4 is connected to a digital output pin that is putting out a voltage between 0 and pin-5 Vcc. Pin 5 is disconnected. The idea is to emulate the effect of the potentiometer by changing the voltage that the welder sees on pin 4. (For those who are going to now say, "Why don't you use a digital potentiometer?" let's just say that's another story, and I've been down that road six ways to Sunday. So far, this is the best option.)

When the analog switch IC is removed, manipulating the welder's output works correctly. When the analog switch IC is plugged in, the welder's output range changes from 0-96 amps to something like 30-60 amps. In other words, the voltage between pins 3 and 4 is changing from 0-2.7 volts to some other narrower-ranged value when the analog switch IC is plugged in.

Mind you, this is with the pulldown resistors installed.

The only way in which the analog switch IC or welder pins 1/2, 6/7 could be affecting the "welder output level" logic (pins 3/4) is via the ground bus, which leads me to believe that something more than just analog switch leakage is occurring.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33296
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Pin 4 is connected to a digital output pin that is putting out a voltage between 0 and pin-5 Vcc
I assume that is with PWM. You can not get that directly, you will have to filter the PWM first. PWM is a digital signal that goes from 0 to 5V all the time. The analogue write just controls the ratio of high to low.

As to the two other switches then an opto isolator with FET output stage looks like what is needed either that or a reed relay.
Logged

Victoria, Australia
Offline Offline
Edison Member
*
Karma: 46
Posts: 1372
Electronics Engineer/Industrial Control
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, having had experience with repairs to welders of various types.
I would suggest that all lines that you want to cut and insert a switch of some sort, or switches you want to parallel you do with a relay.
Any series switching resistance means you are open to noise being included on the switched signal, and a welder of any sort has a lot of noise.
This ensures no worries low resistance connection and isolation between controller and machine and no ground reference problems.
I gather these connections are low voltage low current so small a number of relays built on an interface board would do the job.

I understand that you want to control the wiper input to the welder, have you found the ground of the welder control board that you are trying to control.
What is the voltage on Pin 3 and Pin 5 with respect to the welder ground? This very important.
As Grumpy_Mike says, you will have to filter the PWM output to get a smooth DC voltage that is the same as what is supplied by the potentiometer.
But you must find the welder controller ground first because the arduino cannot be isolated from it if you can get the analogue control to work.
Tom. smiley-cool
Logged

Everything runs on smoke, let the smoke out, it stops running......VK3DMK

Pages: [1] 2 3 4   Go Up
Jump to: