Help calculating needed resistances

crutschow

Joined Mar 14, 2008
34,408
Thank you. What software are you using for the simulation? Is it open source?
It's LTspice as RG noted, but it's not exactly open-source (i.e. the source code is not posted) although it's free from Linear Technology.
If you download it you can run the .asc file I posted.
 

Thread Starter

Netwaves

Joined Feb 9, 2015
44
It's LTspice as RG noted, but it's not exactly open-source (i.e. the source code is not posted) although it's free from Linear Technology.
If you download it you can run the .asc file I posted.
Thanks. I used to Electronics Workbench, about 20 years ago, but it's way overpriced now. I'm still working with the specs you gave me. Once I get this working, I'll update this thread with all information and conclusions.
 

Thread Starter

Netwaves

Joined Feb 9, 2015
44
I'm trying to understand the relationships within the circuit. I've made the following assumptions and I am working on a spreadsheet. Does the following seem correct, so far?

R1 is parallel to O1
R2 is parallel to R3
R1/O1 are in series to R2/R3
Need to calculate for 0.5VDC on O1 when switch S1 is open

Need to calculate for 1.5VDC on O1 when switch SA is closed
 

Attachments

crutschow

Joined Mar 14, 2008
34,408
The way I calculated (it's an approximate calculation, not rigorous):

S1 open -- Calculate the value of R1 to give about 0.5V across it ( I assumed 0.9V) with 30mA current through R3.

S2 closed -- Calculate the value of R2 to give around 20mA through the opto input plus the additional current through R1 from the voltage across it going from 0.5V to 1.1V (my simulated opto ON voltage was about 1.1V).
The opto input is a diode so its operating voltage does not change much with a change in current once the diode starts to conduct.
Since the voltage across R3 does not vary much between S1 open and S1 closed the current through R1 also does not vary much and its change can be ignored.

Using your opto voltage numbers I calculated about 17 ohms for R1 and 200 ohms for R2 with 400 ohms for R3.
Simulation can be used to tweak those values, if necessary.
 
Last edited:

Thread Starter

Netwaves

Joined Feb 9, 2015
44
The way I calculated:

S1 open -- Calculate the value of R1 to give about 0.5V across it ( I assumed 0.9V) with 30mA current through R3.

S2 closed -- Calculate the value of R2 to give around 20mA through the opto input plus the additional current through R1 from the voltage across it going from 0.5V to 1.1V (my simulated opto on voltage was about 1.1V).
The opto input is a diode so its operating voltage does not change much with a change in current once the diode starts to conduct.
Since the voltage across R3 does not vary much between S1 open and S1 closed the current through R1 also does not vary much and its change can be ignored.

Using your opto voltage numbers I calculated about 17 ohms for R1 and 200 ohms for R2 with 400 ohms for R3.
Thanks. I'm using this project as a opportunity to learn. So the more I understand, the better. :)
 

Thread Starter

Netwaves

Joined Feb 9, 2015
44
I've finally found the resistances that work. They are:
R1 100 ohms
R2 161 ohms
R3 372 ohms
R4 is 1920 ohms at 6.25mA

With the above. The circuit works great. When S1 is open then the optoisolator is essentially OFF, when S1 is closed then the optoisolator is essentially ON. The voltage/amperage stays high enough on R4 to it to always stay active/ON. The only change I had to make was adding a 100uF electrolytic cap to the circuit to cut down on noise. Once I've finished with the complete circuit then I will upload all information for future reference for others.
 

Attachments

Top