Help calculating needed resistances

Thread Starter

Netwaves

Joined Feb 9, 2015
44
test_circuit_1.png

I am new to electronics and I need help calculating the values of R1, R2, and R3. I need this circuit for a project that I am working on. I don't even know if the above schematic is correct, the battery may be in backwards in respect to the optoisolator/diode.

O1 is a ps2501-4 optoisolator. I've tested O1, anything at .9VDC and below on the LED side is OFF. Anything 1VDC and above will make it ON/Active.

I need O1 to to be active when S1 is closed and inactive when S1 is open. R3 needs at least 9VDC at all times. You can imagine that R3 is a light that needs to be lit at all times.

I'm using R1 to allow the current to flow and keep R3 at or above 9V even when O1 is at or below .9V

Any help would be greatly appreciated.
 

crutschow

Joined Mar 14, 2008
38,503
Your circuit is too complicated.
Remove R1.
Connect R3 directly across the 12V (you said you wanted it on all the time).
The value of R2 determines the opto current when the switch is closed. Typically you want that below 20mA so R2 should be no smaller than 600 ohms.
What is the opto output load?
 

Thread Starter

Netwaves

Joined Feb 9, 2015
44
Your circuit is too complicated.
Remove R1.
Connect R3 directly across the 12V (you said you wanted it on all the time).
The value of R2 determines the opto current when the switch is closed. Typically you want that below 20mA so R2 should be no smaller than 600 ohms.
What is the opto output load?
I can remove R1 but R2, R3, and S1 are all about 100' away from main circuit, and they can be changed but not dropped. The opto output is driving an I2C MCP23017.
 
Last edited:

Thread Starter

Netwaves

Joined Feb 9, 2015
44
The op would have to run an extra 100' wire to do that since R2, R3, and S1 are all about 100' away in the doorbell pushbutton.
Correct. There are 32 of these and all have a single pair running to each, ancient wiring, 18 gauge, stranded. I can't run a second wire to each.
 

Thread Starter

Netwaves

Joined Feb 9, 2015
44
OBSERVATIONS: I've started guessing at values at this point. I'm using two 10K pots. One for R1 and one for R2. I've left S1 open and turned R1 down until O1 becomes inactive, then I turn it slightly back up until inactive again. Then I closed S1 and turned R2 down until O1 becomes active again. At this point I can open and close S1 and make O1 active or inactive. This is exactly what I want but it has a flaw, It's not consistent. It works 70% of the time and the other 30% O1 seems to oscillate between active and inactive? Very frustrating. I've measured the pots and R1 is at 330 ohms and R2 is at 4 ohms. Any suggestions?
 

wayneh

Joined Sep 9, 2010
18,104
Get pots with lower nominal values. You are very near the end of the range and a minuscule movement of the pot will drastically change the value. You need fine adjustment near the values you cited. Note that you can use fixed value resistors in series or parallel with a pot to fine tune how it behaves. For instance you could use a 500Ω pot in parallel with a 470Ω resistor to get pretty good sensitivity at ~330Ω.
 

Thread Starter

Netwaves

Joined Feb 9, 2015
44
Get pots with lower nominal values. You are very near the end of the range and a minuscule movement of the pot will drastically change the value. You need fine adjustment near the values you cited. Note that you can use fixed value resistors in series or parallel with a pot to fine tune how it behaves. For instance you could use a 500Ω pot in parallel with a 470Ω resistor to get pretty good sensitivity at ~330Ω.
Yea, I have thought about this. I also have a 43 value resistor kit and I'm thinking about pulling 1 of each and trying them. I really wish I had the math down so I could calculate the needed values.
 

wayneh

Joined Sep 9, 2010
18,104
Well I assume you know how to make the series calculation - you simply add them. For resistors in parallel, do the same thing with 1/R. Once you have the sum, it will be in 1/Ω so just invert it to get back to R in ohms. For combined series and parallel, break up the problem so you can solve the parallel combinations first, then add up all the series resistances.

I'm a little confused which schematic we're talking about. Perhaps you could post your current status.
 
Top