Using TIMM pot with 2 pins - Page 1
Forum section: electronics / beginners

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 10, 2018, 07:47:48 pm
content: Hey All,Not sure if a trimm pot can be used with only two pins as a variable resistor. I tried as per schematic but i don't see any change in voltage with a DMM at pins 1 and 2 of the optocoupler.Would appreciate if somebody could advise.

author: JS
author_rank: Frequent Contributor
timestamp: July 10, 2018, 08:37:06 pm
content: Using a trim with 2 terminals as a variabke reaistor is fine, you usually want to connect the unused pin to the wiper so it doesn't go open if wiper fails or skips but no problem in your app.I've used an H11AA1 in an aplication similar to yours with a fixed 1W 100k resistor to detect 220V mains active. No external diodes. Success and reliable so far, I have 15 of them working for a few years. It does take some power but this is an industrial application so a few mW isn't a real concern for efficency sensing a 50kW installation. Kind of hard to work it to archive any sort of threshold like it looks like you want with the variable trim, if you want to know if there is under or over voltage you should probably go a different way. I've also got it to work with 3 resistors as a zero crossing detection.Maybe you can get it to work with a resistive divider and a zenner, then to the optocoupler. Also load on the other side of the optocoupler would change your results as current in both sides has a relationship and you will get some little current even if your voltage is much lower.JS

author: vk6zgo
author_rank: Super Contributor
timestamp: July 11, 2018, 03:33:43 am
content: Quote from: anishkgt on July 10, 2018, 07:47:48 pmThe voltage across pins 1 & 2 will be clamped at the forward voltage of the two back to back diodes.

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 11, 2018, 03:39:03 am
content: Tried without the diodes as well, nothing happened.Www.Georgehobby.wordpress.comEquipments: DSO104z, Hakko FX888D, Brymen BM869s

author: JS
author_rank: Frequent Contributor
timestamp: July 11, 2018, 04:35:21 am
content: I don't know what the soldering iron has to do with this projectAs I said, I wouldn't expect the voltage to change much at the input of the optocoupler, the current will, they are diodes after all, use a transformer to insulate from mains and have a look with your scope so you understand what's going on, I know what you will see... If you don't have a mains insulation transformer you can take two 9V transformers, hook the 9V windings together, plug the mains side of the first to mains, do your measurements using the second one as insulated mains.JS

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 11, 2018, 06:13:59 am
content: i don't see me mentioning about a soldering iron other than those mentioned in my signature.The input voltage is 31vac, i thought it was about the floating pin i had but i connected the wiper to the floating pin, that did not change the voltage either.

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 11, 2018, 06:32:11 am
content: The diode is to clamp voltages above 10vac, as the voltage would increase to 240vac in short pulses. The application here is to detect a voltage drop at the primary when the secondary are shorted during a spot weld. This circuit would go in parallel with the primary of a Microwave Oven Transformer.

author: JS
author_rank: Frequent Contributor
timestamp: July 11, 2018, 06:43:49 am
content: Quote from: anishkgt on July 11, 2018, 06:13:59 amYes, it wasn't on the first post, I thought you where telling what you could use...QuoteThat shouldn't make anything other than improved reliability, as I said, quite important when you are trimming the feedback resistor of an opamp, if it goes open the feedback loop opens and can bring some troubles, in your case isn't needed, and maybe you could detect a failure easier without connecting it, if the pot starts to act up without it connected it will be quite evident.What is you reading? you should probably be reading about 1.2V, at least with a true RMS meter as yours, as you will have something like a 1.2V square wave. Voltage shouldn't change much while you change that resistor. You should probably put a limiting resistor of at least 600Ω as that will make the maximum current the 50mA the optocoupler is rated for, if you don't have it and you set your pot to minimum it will blow the optocoupler, probably open, making your reading that 31V you have from the source.If you measure the current at pin 1 or 2 you will see some changes while turning the pot. fig 5 of this datasheet shows the transfer ratio of that current, so after some multi point calibration considering the final resistance you can do some measurements in the output current and determine the input voltage.http://www.mouser.com/ds/2/239/S_110_LTV-814%20824%20844%20(M,%20S,%20S-TA,%20S-TA1,%20S-TP)%20Se-337200.pdfYou should use a much higher resistor, at least 5k6 would keep the current low enough for the optocoupler to manage by it self, you could go even higher. If you use 10k resistor you will have at the output 30mA at 240V, (that's over 5W! on the resistor) and about 0.7mA at 10V. 5W would fry a small resistor or potentiometer even if it lasts a few ms, if you connected this and made it run you had likely burned the pot.The datasheet only shows currents down to 1mA, it should work a bit under that but the drop could be quite steep, so you should set your minimum useful sense voltage to that point. I'd probably would put the transistor from VCC to a resistor to ground and measure the voltage across the resistor, as the transistor is floating there's nothing wrong doing that.JSSorry, I hadn't seen the last schematic, I saw the last post while posting, you have the optocoupler input shorted in that schematic, you should have it between there and the neutral. Also, the fuse should be right into the live input, in case something goes wrong with the triac, like it shorting to ground while a screw driver went in contact with the PCB.

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 11, 2018, 07:23:44 am
content: connected the neutral to pin 2. So probably the pot may have blown or the optocoupler. i could see 32vac at the pins 1 and 2. But do these trimm pot fail short ?

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 11, 2018, 07:27:22 am
content: attached schematic

author: krish2487
author_rank: Frequent Contributor
timestamp: July 11, 2018, 07:51:32 am
content: As I understand it, the entire section to the left, starting from the fuse is what is your power switch. A triac based static switch, driven by the VOM IC to connect and disconnect the primary of your transformer..The optocoupler section to the right of the fuse is serving as a opto zero crossing detector, nothing more. when the line voltage, in either cycle goes beyond the diode forward drop voltage, the diodes conduct and the opto secondary transistor conducts.To answer your question,1. Yes, a trim resistor can be used with only two terminals as shown. Yes, they do fail open. There are also fakes of bourns trim resistors that are spectacularly horribleAnd I don't understand the objective of your exercise in varying the trim resistor and expecting the voltage across the opto input to change. the resistor is for only limiting the current through the opto input diodes.Irrespective of what voltage you apply at the input of the resistor-opto combination, the voltage you see across the opto inputs will be the same ALWAYS.Why, you ask.. because the input of the opto is nothing but a pair of anti parallel diodes. The rest of the voltage is dropped across the trim resistor, which, depending on the wiper position decides the opto diodes current.Set the trim wiper to too low a resistance and you risk blowing out the diodes in the optocoupler and/or the trim resistor itself. Thats what JS meant by including a current limiting resistor.2. The opto circuit in question cannot be used to detect a sag in the input voltage. its a zcd circuit. plain and simple.If you are seeing 32VAC at the input terminals of the opto, chances are high you set the wiper position to short and thus most likely blew out your opto input diodes.<rant>So, the question now is, what is it exactly that you want??Please be coherent, simple and succinct in what your end objective is and how you plan to achieve it. Open ended questions do not help us, nor you.If you need someone to critique your work, then don't paste the entire work and ask the other members to spend time sieving through the rest of non important parts. highlight the area in question and be specific.</rant>

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 11, 2018, 08:07:11 am
content: What am trying to acquire is to detect a voltage drop at the primary when the secondary is shorted. The opocoupler is just an isolation for the microcontroller.A resistor in series with the optocoupler is all that i would need but not sure of what value. The resistance should be low enough for the optocoupler to light up and activate the transistor hence the microcontroller at pin 4 would read a "HIGH" and large enough to drop the voltage when the secondary is shorted which would read "LOW" continuously at pin 4.The circuit was in its simplest form in my first post. Thought i could give a clearer picture if i posted the remaining.

author: krish2487
author_rank: Frequent Contributor
timestamp: July 11, 2018, 08:38:31 am
content: The opto data sheet is your best friend. Look under the absolute maximum ratings and try to decide a resistors values which does not violate the parameters for the diode current ratings.Voltage drop of what value?? do you want to detect a 5v drop or a 50v drop??And after how long since the drop do you want to trigger an output??As I mentioned, the circuit is a zero crossing detector. it will not be useful for anything otherwise without substantial changes..Please go through this excellent linkhttp://www.bristolwatch.com/ele2/zero_crossing.htmYour original circuit is the second image in that page.Now, do you understand how the circuit works?? and why it is not an appropriate solution for the problem what you are trying to solve??Please look at comparator applications, specifically a threshold detector which is more appropriate in your case.And then see how you can isolate the mains from the low voltage circuits section and still achieve the same result.(Assuming you actually mean that you need to detect when the primary voltage sags during the spot welder on time..)

author: JS
author_rank: Frequent Contributor
timestamp: July 11, 2018, 08:45:50 am
content: Quote from: anishkgt on July 11, 2018, 07:23:44 amNo, it wouldn't fail short, check with your DMM for resistance... In this case your optocoupler's magic smoke went first.JS

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 11, 2018, 09:16:27 am
content: QuoteYes i first thought of a peak detector then i was lost with no help on it. Second was the comparator again lost with no help. I guess i would need to give the peak detector a go again.

author: JS
author_rank: Frequent Contributor
timestamp: July 11, 2018, 09:20:38 am
content: Why not to measure in the secondary, very little voltage of course but you are insulated, pot an opamp and go, you can even measure at the electrodes making the highest dynamic range to measure from.JS

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 11, 2018, 09:41:31 am
content: Not sure how it could be done at the secondary. The secondary would have large current flow as well how can it be bypassed ? I was thinking of the below peak detector.

author: JS
author_rank: Frequent Contributor
timestamp: July 11, 2018, 09:42:51 am
content: Not bypassed, in parallel. Measure the voltage at the secondary.JS

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 11, 2018, 09:46:08 am
content: I mean there would be a huge current during a spot weld so wouldn't that damage the opamp and those underlying circuitry ?

author: JS
author_rank: Frequent Contributor
timestamp: July 11, 2018, 09:49:00 am
content: No, it would connected in parallel, current wont touch it, not much protection required, the usual to ensure reliability but even without any it should work.JS

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 11, 2018, 10:23:53 am
content: Thank you. I am not sure how to go about it with am opamp. So it would compare the voltage from the electrodes at the invtering and non-inverting pins when the electrodes are open. So how would the output look like from the opamp when the electrodes are open and closed ? I don't have any at the moment. Which one would i need to test this on a bread board and what other components would i require ?

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 11, 2018, 02:32:56 pm
content: I was thinking of getting this Diff amp (https://www.digikey.com/product-detail/en/on-semiconductor/LM393N/LM393NFS-ND/458695) Would any resistors be required ? i've got couple of 1k, 10k 39R, 360R bunch of 0.1uf ceramic caps.

author: JS
author_rank: Frequent Contributor
timestamp: July 11, 2018, 03:25:48 pm
content: Ok, I see where this go. Build a non inverting stage, I don't know the voltage at the point where you measure, but that dividing the reference voltage would be the desired gain and define resistance values.Now, 393 aren't differential amplifiers, are comparators.If you don't really know what you are doing this isn't a good project, high energy and low knowledge are a bad mix, some of the questions seems like that. To starts, it's always recomended to use an insulation transformer while working at mains projects, you are not using one for what I've seen, there are a ton of safety issues with this and I can't make them into a post, you should learn that starting with small projects and build up confidence and experience befor going to something like this... Sory dude, but that's the way it is.JS

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 11, 2018, 03:50:35 pm
content: Well thanks for the heads-up. I am pretty sure about what am doing but just don't how to use opamps. Comparators are something i can understand. I tried using a configuration at the primary to set a dc reference and compared it against the voltage at the primary when the secondary are shorted. Well it did not work actually they were beyond my knowledge about comparators.If you could quide me i could get it done or suggest me an opamp to test on a bread board and i will try learn as i go building it. Would a general pupose opamp like MCP6002-I/P (http://ww1.microchip.com/downloads/en/DeviceDoc/21733j.pdf) or the LM358 (http://www.ti.com/lit/ds/symlink/lm358.pdf)help me begin with ?

author: JS
author_rank: Frequent Contributor
timestamp: July 11, 2018, 04:47:13 pm
content: I would say the lm358 should do, they are quite situable for working ih micro cobtrollers projects. What micro are you using? In particular... What adc? What voltage range?From a single rail you should ac coupke your signal to an inverting stage and feed 0.5 Vcc to the non inverting input. The gain will depend on other factors. What voltage do you see on the secondary for the 3 states you are interested?JS

author: anishkgt
author_rank: Frequent Contributor
timestamp: July 11, 2018, 04:53:20 pm
content: Thought this would be somehing beyond i can learn from. I did try reading several app notes and examples but they were just silly application that were not applicable in the real world. If it was something i am doing perhaps i could grasp it better. I was thinking of working at the AC side hence looking at peak detectors.My project is based on ar arduino. The open voltage at the secondary is 8vpp if i remember it correctly ( at work now) and 700mV rms. How is the voltage at the said "2 stages measured" ?

author: JS
author_rank: Frequent Contributor
timestamp: July 11, 2018, 05:00:54 pm
content: Just measure the voltage at the secondary when open, idle, when open and triggered and when idle and closed. This would determine the detection you are after and the peak handling it should have. You might not need amplification at all or even attenuation, before plugging the opamp you need to measure all of this.JS

author: ArthurDent
author_rank: Super Contributor
timestamp: July 12, 2018, 02:02:59 pm
content: I believe that the following modifications to your original circuit would work, although I haven't actually tried it. In your original circuit, as others have pointed out, the pot is just changing the current through the optocoupler but it will be either on or off and you will not be adjusting a voltage point where it turns on or off. Also there is no safe current limit to the optocoupler so it is very possible to burn out the LEDs in the optocoupler. Also note that if the clamping diodes are regular diodes they will probably clamp at 0.6 volts but the LEDs require maybe 2 volts to turn on. A couple of back to back zeners in series across the pot might work but these diodes probably aren't necessary if the current limiting resistor limits the current to a safe value.If you connect the 3rd pin on the pot to neutral, the pot will now become a true voltage divider which is what I believe you want. Now to protect the optocoupler when the pot is set to max, choose a series resistor that will limit the max current through the LEDs to a safe value. As a guess I would think it would be 1500+ ohms but that depends on the LEDs, the value of the pot, and whether the input voltage is measured as RMS or peak.