need to know the resistance value

Discussion in 'Homework Help' started by kamel2913, May 18, 2015.

  1. kamel2913

    Thread Starter New Member

    Mar 6, 2015
    15
    0
    [​IMG]

    can somebody help me to know how much is the value of all the resistance linked to the CNY70?
     
  2. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,802
    832
    From what point to what point? What is the purpose of your question?
     
  3. MrChips

    Moderator

    Oct 2, 2009
    12,440
    3,360
    Your circuit wouldn't work.
    There is no current path to ground.
    The receiver in the opto coupler is wired incorrectly.
     
  4. DerStrom8

    Well-Known Member

    Feb 20, 2011
    2,428
    1,328
    Also what is the purpose of using an opto-isolator if you're just going to connect the inputs and outputs together? There is no isolation!
     
  5. ericgibbs

    AAC Fanatic!

    Jan 29, 2010
    2,503
    380
    Its a Reflective opto coupler.
    E
     
    DerStrom8 likes this.
  6. MrChips

    Moderator

    Oct 2, 2009
    12,440
    3,360
    My mistake. CNY70 is a reflective sensor.
     
  7. kamel2913

    Thread Starter New Member

    Mar 6, 2015
    15
    0
    upload_2015-5-18_16-33-4.png

    sorry it was my bad I forget to put the ground, I have made this ciruits in Proteus it did work with any value of resistance, but in the real it works only with the resistance which has a value close or egale to 180, 250 and 2K2 ohm, I wanted to know why, I tried to do some calcul but I couldn't solve it.
    sorry for the ground J ust add it.
    this circuit is a sensor of black and white grounds, if he get a black ground he gives 0V if it's white he give 5V.
    thanks for intresste.
     
  8. MrChips

    Moderator

    Oct 2, 2009
    12,440
    3,360
    Circuit is still wrong.
    Receiver is wired wrong.
    Why do you need Q11?
     
  9. kamel2913

    Thread Starter New Member

    Mar 6, 2015
    15
    0
    because if I don't put it in real, the output will be less than 5V ( around 2V or so), however you're right because in Proteus it's work fine without the transistor.
    upload_2015-5-18_16-45-36.png
     
  10. MrChips

    Moderator

    Oct 2, 2009
    12,440
    3,360
    Connect resistor between 5V and collector.
    Connect emitter to GND.
     
  11. panic mode

    Senior Member

    Oct 10, 2011
    1,320
    304
    this photocoupler is not "sealed" unit - it is used for sensing (there are lenses on sender and receiver).

    by the way schematic is wrong, C and E of CN70 are swapped... (C need to be at higher potential than E). also bottom side of Acquisition stage need to be at zero VDC.

    to size your resistors, you need to read data sheet and make some assumptions.
    resistor on the left (controls input current of opto), is

    R1U=Vr/Ir = (5V - Vf)/If=(5V-1.25V)/0.020A = 187.5 Ohm.
    So 180 Ohm resistor is good choice here...

    R3U=Vr/Iopto=(5V-Vbe)/Ib = (5V-0.7V)/0.001A = 4300 Ohm
    R2U= ... just make it 2-5x R3U, for example 10-22K

    R4U= .... need to look at gain of 2N2222, load current etc. but...
    load current is small (input of MCU). Also Ib=1mA, hfe is at least 100 so Ic could be 100mA. now we don't want analog operation, saturation mode is fine for switching so usually we assume hfe=10, and therefore Ic_max=10mA (approx.)
    5V/10mA = 500 Ohm. Almost any larger value will work, for example 1K.
     
  12. kamel2913

    Thread Starter New Member

    Mar 6, 2015
    15
    0
    I sincerely thank you for sloving my problem.
     
  13. DerStrom8

    Well-Known Member

    Feb 20, 2011
    2,428
    1,328
    Woops! My mistake--should have checked the datasheet :p
     
  14. kamel2913

    Thread Starter New Member

    Mar 6, 2015
    15
    0
    I have tried to understand myself why R2U has to be more than R3U, but I couldn't, can you explain to me please.
     
  15. panic mode

    Senior Member

    Oct 10, 2011
    1,320
    304
    transistor is an amplifier and - it has gain. any leakage current (if there is no R3U) would be amplified and output voltage (on collector of BJT) would perhaps be something you don't want (or your microcontroller). having R3U provides path to sink any small leakage current without triggering transistor. once the optocoupler is conducting, you would get "big" current of 1mA or so. small fraction of it would go through R3U but bigger fraction would drive BJT.
     
Loading...