Reading pot from other circuit

I’ve done a semi-fancy (not at all) pulser for my tig-welder based on a design I saw on YouTube. The pulser is an Arduino Pro Mini 5V but the welders potentiometer is at 3,3V so I am keeping it separate from the arduino gnd and vcc and switching it with a multiplexer.
It is this design but the “Tig pedal” and “background current” gets gnd and vcc from the welder instead.
It is working fine but I would like to display the values from “tig pedal” and “background current” somehow on another arduino but since it is on a separate 3,3V circuit I’m not really sure how I could read it from the Arduinos 5V circuit that doesn’t share vcc and gnd.
Any ideas would be appreciated :slight_smile:

Why? Why not the same one that's already connected to the pots in question anyway?

Err...connect their Vcc and GND's together...?

Can you show a schematic of what you have in mind?
Can you explain where the need arises from to add an Arduino instead of using the one you've already got in there?

It can all be accomplished with the Arduino. However first we have to understand what you mean buy "welders potentiometer is at 3,3V"

I don't know what type of display you are considering. If a small very readable display would work I would suggest a 1.3" OLED display. They are a little small but VERY readable.

I’d like to separate the signal generating arduino from the “displaying” one to get a cleaner signal from it. Might not be really necessary but the code I’m using has delays in so updating the displays is a bit slow when
using the same one.

I might have a bit unfortunate mindset here but what do you mean by connecting them together?

I’ll try to whip something up :grinning:

Basically, I’m using the schematic shown in the picture but the Arduino is powered by a separate 5V power supply and the output from the welder where the “tig pedal” is, is at 3,3V instead of 5V. I should have shown it better. Like this:


I’ll post a proper schematic in a while :grinning:

Can't do that. Muxer inputs/outputs must stay within the boundaries of it's supply/ground.
So grounds must be shared.

You could make the whole pot setup (local and remote) 3.3volt, by setting Aref to EXTERNAL in setup(), and connecting the Aref pin to the 3.3volt pin (WARNING, must do both otherwise you will fry Aref), and powering all pots from 3.3volt.
The Nano has eight analogue inputs, so no muxer needed.
Leo..

OK to the TIG pedal is a 3.3V device. Good!

Can we assume the 3.3V comes from the "Welder Pedal Input"

The biggest issue is to be sure the ground of the 5V supply to the Arduino can connected to the ground of the welder pedal input

The Arduino is very capable or measuring a 3.3V input signal.

My proposal (assuming the 3.3v Gnd and Arduino Gnd can be connected together), is:

  1. All 4 pots will be independent had measured by the Arduino.
  2. We will suggest capacitors at the inputs of the Arduino analog pins for noise.
  3. We will limit the output of the Arduino to 3.3V for safety into the welder pedal input.
  4. We can put the display on the same Arduino. There is a trick using Millis() to eliminate "delay(1000)" but still get the same timing.
  5. With all this going on, we've still only touched on the capabilities of the Pro Mini Board.

BTW the board you've shown is not an Arduino Pro Mini. Is the illustration the board you have? If so it is an Arduino Nano. Still more than capable of what you need.

Don't feel bad that we are going to tell you how to make some changes. You got it going and functioning already. I guessing your better at electronics than I am at welding. Besides I've been doing this for > 20 years and still learning.

I don't understand what you mean - or rather, I think you're misunderstanding how this works.

Ah, I suspected something like this. I would suggest fixing the actual problem (i.e. streamlining the code) instead of bodging it up (add an Arduino).

Precisely.

I'm very happy to receive this much help and I certainly do not mind :grinning:
Regarding whether if my welding is better than yours, well that will remain unknown but your electrical skills are certainly better than mine :laughing:
Here is a "schematic" i joddled together:


I know it is not a real schematic but only my scratchup. The green is supposed to represent the welder input and the black a separate 5V power supply. Of course, they are connected to the same electrical grid in my house so technically they do share the same ground if that is what the previous question was.
Here is my Arduino code:


//TIG Welder pulse control

#include <TM1650.h> // sub-class of TM16xx
#include <TM16xxDisplay.h>

TM1650 display1(2, // byte dataPin
3, // byte clockPin
4, // byte numDigits=4
true, // boolean activateDisplay=true,
7 // byte intensity=7,
);

TM16xxDisplay displayA(&display1, // TM16xx *pTM16xx
4 ); // byte nNumDigits
//Vars

int PWM_DutyCycle=0;
int PWM_DutyCycle_Pin=A0;

int PWM_Period=512; //period in ms
int PWM_Period_Pin=A1;

//Scale the time of the period or duty by N*1024 milliseconds.
//e.g PWM_PeriodScale=5 will allow a maximum PWM period of 5120 milliseconds, or ~.195Hz
int PWM_PeriodScale = 4;
int PWM_DutyScale = 4;

int PWM_Out_Pin = 9; //31250 base frequency (Timer1)
bool SimpleMode = 1; //NOTE - Other mode is not implemented!

int ADC1Vals[] = {0,0,0};
int ADC2Vals[] = {0,0,0};

unsigned long HighTime=1;
unsigned long LowTime=0;

void setup() {
//Set up PWM output
pinMode(PWM_Out_Pin, OUTPUT);
}

void loop() {
ReadPots();
HighTime = PWM_DutyCyclePWM_DutyScale;
LowTime = PWM_Period
PWM_PeriodScale;
displayA.setDisplayToSignedDecNumber(HighTime, // signed long number
B0000, // byte dots
false ); // boolean leadingZeroes = true
// const byte numberFont[] = TM16XX_NUMBER_FONT);
// delay(1000);
//turn on the out pin
digitalWrite(PWM_Out_Pin,HIGH);
delay(HighTime);

ReadPots();
HighTime = PWM_DutyCyclePWM_DutyScale;
LowTime = PWM_Period
PWM_PeriodScale;

//turn pin off
digitalWrite(PWM_Out_Pin,LOW);
delay(LowTime);
}

void ReadPots()
{
ADC1Vals[0] = ADC1Vals[1];
ADC1Vals[1] = ADC1Vals[2];
ADC1Vals[2] = analogRead(PWM_Period_Pin);
PWM_Period = (ADC1Vals[0] + ADC1Vals[1] + ADC1Vals[2]) / 8;

ADC2Vals[0] = ADC2Vals[1];
ADC2Vals[1] = ADC2Vals[2];
ADC2Vals[2] = analogRead(PWM_DutyCycle_Pin);
PWM_DutyCycle = (ADC2Vals[0] + ADC2Vals[1] + ADC2Vals[2]) / 8;
}

I am just displaying one of the items i want to.
The Millis() tip was good though cause that would probably help with the issue of not having to wait for the delay

NO!!!!
Typically all power supplies involve a transformer of some kind*, which means there's no galvanic connection between the input side (your wall socket) and the output side. Hence, two power supplies plugged into the very same socket may (will) float at different absolute potentials. So you need to connect their GNDs together for them to share the same absolute GND reference.

(*) if you have a power supply that doesn't have galvanic separation, for the love of God, chuck it into the bin.

I am struggling to find some reason why I said they where "technically sharing the same ground". You are of course 100% corrrect. Please pretend I never said that :grin:

This is probably very easy for those who read this, but could you please explain how 5V and 3,3V can share the same ground without causing some kind of interference or anything? This might be bordering to some other topic but I take my chances :wink:

:shushing_face:

I'm not sure how I can explain this to you - in a system, you can have any arbitrary number of voltages; in fact, you can have literally infinite voltages, and they can still share the same ground. For instance, in a tube amplifier (I like the example because it's quite extreme) I may have 6.3V DC to glow the heaters (let's not go into the necessity of DC for heaters for a bit) and 450V on the anodes of the tubes. Everything will work nicely together, as long as I (obviously) don't connect 450V to 6.3V. That would result in some nasty fireworks.
Same with your 5V vs. 3.3V logic - they'll work together nicely as long as only their GNDs are connected and as long as you make sure 5V does not connect directly to 3.3V. That also explains what @JohnRob said about ensuring the Arduino never puts out anything above 3.3V as it might damage the logic in your TIG welder.
But as to their GNDs, you can (and should!!) connect them together just fine.

1 Like

I have a Arduino Pro Micro, the picture was borrowed from the original YouTube video. And writing Pro Mini was just a mental typo :laughing:

If you think of the 3.3V as a battery and the 5V as another battery, when you connect the two (-) (aka Ground or common) you have them sharing the same ground.

Here I'm using 3.3v ground = Welder ground.

Now the concern is something else is connected to the 3.3V ground that we aren't aware of.

If you have a 5k to 20k resistor (value is not important. Connect it between the 3.3V ground and the 5V ground. Measure the voltage across that resistor. If zero or near zero then everything is fine and the two can be connected together. If you have a small 1/4 watt or less 10 ohm or 20 ohm resistor, I would use it to connect the 3.3v ground to the 5V ground. This is incase something changes (another control??) the 10 ohm will protect the respective power supplies from damage.

What is that supposed to do. Act as a fuse?
Any ground voltage difference will add to the VCC differences, and will fry things anyway.
Leo..

Yes and will provide some compliance for any differences. We don't know what is in the welder and making a solid connection in my mind has risks. For instance, as unlikely as it is, lets say the 3.3v is referenced to the neutral instead of the equipment ground. A heavy load on the neutral will cause a difference that will likely burn out the 10 ohm or at least the 10 ohm will reduce any fault currents.
I've seen a lot of strange things on production machines IMHO it is worth the 10¢

Besides, with the currents involved, the 10 ohms will not effect the signals.

That sounds like a really good idea. I will do that.
I think I have read the explanation 10 times now and it is good, thank you! Although I must admit (embarrassingly) that I don’t understand how the 5V electron fellows know how to run back to their home and not get lost and walk into 3,3V hoods :grin:

I'm with Leo on this; the 10R resistor may reduce the extent of the fireworks, but won't prevent it.

Its simple.
The 5V guys leave the + terminal of the 5V supply.
The 3.3V guys leave the + terminal of the 3.3V supply.

The become combined in the ground lead (wire).
As they go back to their respective supply source, the 5v supply - will only accept the same number that has left.
Same for the 3.3V supplies.
It doesn't matter if those that left the 5V enter the 3.3v on return, only that the total number match.

I've made some simplifications but the above is essentially correct.


Regarding the 10 ohm resistor (I sometimes use a 100 ohms if I know the currents are low enough). This is a design decision, not everyone will make the same decision (else the world would boring and less creative). For a home project the addition of a resistor worth pennies that may save you from having to repair your equipment is a home run for me.

And without know exactly what the welder input circuit is and what may go wrong it is impossible to know if the added 10 or 100 ohm resistor will help in any or all cases.

1 Like

Thank you for bearing with me! I think I am (slowly) beginning to understand :smiley: