Help calculating needed resistances

Discussion in 'The Projects Forum' started by Netwaves, Feb 9, 2015.

  1. Netwaves

    Thread Starter Member

    Feb 9, 2015
    44
    1
    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.
     
  2. crutschow

    Expert

    Mar 14, 2008
    12,991
    3,227
    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?
     
  3. Netwaves

    Thread Starter Member

    Feb 9, 2015
    44
    1
    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: Feb 9, 2015
  4. crutschow

    Expert

    Mar 14, 2008
    12,991
    3,227
    Does that mean you can make the suggested changes or not?
     
  5. Netwaves

    Thread Starter Member

    Feb 9, 2015
    44
    1
    I can remove R1 but I can not connect R3 directly to power without R2 and S1 being in parallel. R2, R3, and S1 are a lighted doorbell pushbutton. They are remote to the circuit.
     
  6. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,969
    744
    Can you connect the opto across R2, what are r2 and r3 doing?
     
  7. Netwaves

    Thread Starter Member

    Feb 9, 2015
    44
    1
    R2 is keeping S1 from being a short and removing current/voltage from R3. R3 is a 9V light and needs to stay energized even when S1 is closed.
     
  8. crutschow

    Expert

    Mar 14, 2008
    12,991
    3,227
    Ok, to calculate resistance values need to know the current drawn by R3.
     
  9. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,969
    744
    So connect the opto across R2 then.
     
  10. crutschow

    Expert

    Mar 14, 2008
    12,991
    3,227
    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.
     
    Netwaves likes this.
  11. Netwaves

    Thread Starter Member

    Feb 9, 2015
    44
    1
    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.
     
  12. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,969
    744
    You need to give a better explanation,with drawings, of what you want?
     
  13. Netwaves

    Thread Starter Member

    Feb 9, 2015
    44
    1
    R3 is (30mA) thirty milliamps.
     
  14. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,969
    744
    R3 is a resistor not a current source,do you mean 30 mill ohms, or ohms?
     
  15. Netwaves

    Thread Starter Member

    Feb 9, 2015
    44
    1
    No. Crutschow asked for current drawn by R3.
     
  16. Netwaves

    Thread Starter Member

    Feb 9, 2015
    44
    1
    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?
     
  17. wayneh

    Expert

    Sep 9, 2010
    12,093
    3,031
    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Ω.
     
    Netwaves likes this.
  18. Netwaves

    Thread Starter Member

    Feb 9, 2015
    44
    1
    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.
     
  19. wayneh

    Expert

    Sep 9, 2010
    12,093
    3,031
    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.
     
  20. crutschow

    Expert

    Mar 14, 2008
    12,991
    3,227
    Below is a simulation with some resistor values that appear to do what you want.
    R3's current is around 27mA
    The opto's input current [Ix(U1:A)] is 16mA when ON.

    Door Bell.gif
     
    Netwaves likes this.
Loading...