How to use a trim pot with AC voltage [SOLVED]

Thread Starter

anishkgt

Joined Mar 21, 2017
549
Hi All,

i have a fairly simple circuit where i need to have control of the AC input voltage. peak to peak at 2vac.

The trim pot controls the voltage to the optocoupler which is fed into a mcrocontroller. Is the attached schematic correct ? Here CS-1 & 2 are input voltage terminals. CS goes into a Microcontroller.
Capture.PNG
 

sghioto

Joined Dec 31, 2017
8,633
The circuit looks OK depending on the max input voltage. Are you saying you need to adjust the input to 2vac across pins 1 and 2 or the input is 2vac ?
SG
 

Sensacell

Joined Jun 19, 2012
3,768
If "CS" goes directly to an IO pin input, It will always read ~ 0V.

Connect "CS" to Vdd, connect the junction of R30 and pin 4 to the IO pin- then you will get a voltage.
 

Thread Starter

anishkgt

Joined Mar 21, 2017
549
The circuit looks OK depending on the max input voltage. Are you saying you need to adjust the input to 2vac across pins 1 and 2 or the input is 2vac ?
SG
Yes that is correct. I need to vary the input voltage into the opto but at the lowest resistance R6 would add some resistance.
 

Thread Starter

anishkgt

Joined Mar 21, 2017
549
You still have not stated the purpose for R30.
Did you read the response in post #4?
Show the circuit on how the opto-coupler is interfaced to the MCU pin.
I had replied to it in post#6.

The resistor is there so that, with the current config. The pin does not make a dead short to GND.

The pin internally pulled up hence the schematic. The pin oscillates between HIGH and LOW as the input on pins 1 and 2 is an ac voltage.
 

Thread Starter

anishkgt

Joined Mar 21, 2017
549
The circuit is part of a spot welder design where the opto pins 1 and 2 are connected in parallel to the weld electrodes. So when the electrodes are not in contact the pins would sense a small ac voltage, this is to know when the electrodes are not in contact.

when in contact the pin 4 would be pulled to GND which would be sensed by the arduino.
 

Thread Starter

anishkgt

Joined Mar 21, 2017
549
Oh sorry if i seemed a bit rude. I was just mentioning that i did notice your post and had replied to it. I did not post the schematic because i would be a bit more than something am asking about.
 

MrChips

Joined Oct 2, 2009
34,628
The reason I ask is because R30 = 1kΩ appears to be overkill. It could make or break your design.
I cannot say for sure until I see the rest of the circuit that connects to R30.
 

sghioto

Joined Dec 31, 2017
8,633
The circuit is part of a spot welder design where the opto pins 1 and 2 are connected in parallel to the weld electrodes.
I still don't think a pot is required. The input of the opto can handle 60ma where 10ma is considered typical to switch. To figure the value of R6 you need to measure the ac voltage across the probes when not in contact. From what I've read the voltage could be as high 30 vac. So even a 1K for R6 would be safe.
SG
 
Last edited:

Thread Starter

anishkgt

Joined Mar 21, 2017
549
I still don't think a pot is required. The input of of the opto can handle 60ma where 10ma is considered typical to switch. To figure the value of R6 you need to measure the ac voltage across the probes when not in contact. From what I've read the voltage could be as high 30 vac. So even a 1K for R6 would be safe.
SG
Thanks. The voltage is 2vac. The transformer is a microwave oven transformer wound with 2 turns of 2 AWG wire as the secondary.
 

sghioto

Joined Dec 31, 2017
8,633
The voltage is 2vac.
OK, now we have the full story :cool:.
Edit: after reading post #1 you mentioned the voltage was 2 vac peak to peak. Since the opto only activates on the positive side of the wave that only leaves 1vac which may not be enough.
SG
 
Last edited:

Thread Starter

anishkgt

Joined Mar 21, 2017
549
Ok. So the reason i wanted a pot was because the wire would be connected via a copper clamp that would go inside its housing and part of it protruding outside to clamp on to the wires that holds the electrodes. Due to the resistance in the clamp, if any, the pot would be able adjust the voltage.
 
Top