Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Photocoupler Issues

  1. Jun 2, 2009 #1
    Hey All,
    I am working on developing a current source which utilizes photocouplers (PC817s) on the connection between a digital potentiometer and a PC. I have the photocouplers (not the digital pot yet) so I am trying to verify that the photocouplers are working as expected. The way the circuit is setup, the PC would send data into the ELD side of the coupler and the output would run to the digital pot. I was instructed to hookup a function generator to where the PC would be connected and send a simple square wave through. I am probing with an oscilloscope on the output of the photocoupler. This is my first time working with photosouplers but I was told that the input signal should match the output signal very closely. However, when I put in say a 5V peak-to-peak square wave into the LED side through a series 33K resistor (from the schematic I'm working from), what I read at the output is not a 5V square wave but a square wave more on the order of ~20-30mV. Why is my signal damping so much? Is it my setup or are the photocouplers blown. I thought maybe I was runnign them at too high of a voltage so I used a new one and started at 1V but observed the same results. I don't think there is anything wrong with the devices so am I expecting the wrong behavior. I also tried scaling down the 33kOhm resistor to lower values but even as low as 150 Ohms I am seeing significant damping.
    EverythingInvsbl (6:00:46 PM): So I am working on developing a current source which utilizes photocouplers on the connection between a digital potentiometer and a PC. I have the photocouplers (not the digital pot yet) so I am trying to verify that the photocouplers are working as expected. The way the circuit is setup, the PC would send data into the ELD side of the coupler and the output would run to the digital pot. I was instructed to hookup a function generator to where the PC would be connected and send a simple square wave through. I am probing with an oscilloscope on the output of the photocoupler. This is my first time working with photosouplers but I was told that the input signal should match the output signal very closely. However, when I put in say a 5V peak-to-peak square wave into the LED side through a series 33K resistor (from the schematic I'm working from), what I read at the output is not a 5V square wave but a square wave more on the order of ~20-30mV. I ramped to a 10V ptp wave and saw equivalent damping. Why is my signal damping so much? Is it my setup or are the photocouplers blown? I thought maybe I was running them at too high of a voltage so I used a new one and started at 1V but observed the same results. I don't think there is anything wrong with the devices so am I expecting the wrong behavior? I also tried scaling down the 33kOhm resistor to lower values but even as low as 150 Ohms I am seeing significant damping. Any suggestions?
     
  2. jcsd
  3. Jun 2, 2009 #2

    dlgoff

    User Avatar
    Science Advisor
    Gold Member

    Welcome to PF quantumnano. Looking at the PC817 datasheet, the output is from a phototransistor. You will need to forward bias it like a typicial LED inorder to get a good output.
    http://en.wikipedia.org/wiki/Photodiode" [Broken]
     
    Last edited by a moderator: May 4, 2017
  4. Jun 2, 2009 #3

    vk6kro

    User Avatar
    Science Advisor

    You haven't said anything about a load for the phototransistor.
    You could try a 1K resistor from the collector of the phototransistor to +5 volts or so.
    Take the emitter to the -5 volt line.

    The input resistor to the LED should probably be about 330 ohms but this needs to be adjusted so that you can turn the phototransistor full on or fully off with an input going from 5 volts to zero.

    A square wave is not a suitable input for this. A square wave varies about a zero line with positive and negative voltages.
    A function generator will have a pulse mode where it gives an output that is square shaped but always positive.
     
  5. Jun 3, 2009 #4
    Hey, thanks for the info so far. Dlgoff, thanks for the welcome, I used to post on here awhile ago but I lost my password and I made it on an old email ugh! Anyways, I did what was suggested: I ensured the photocoupler was forward-biased and used a positive pulse rather than a square wave. I decided all my questions would be more easily facilitated, and I could address vk6kro’s questions , if I showed you the schematic itself so I have attached it (I apologize now that it is really small but it had to be to meet the limit for this website). The schematic shows three photocouplers connected to a digital pot (MCP41XXXX) and powered by an AD586 5V Reference. In the final product, the right hand side of the image will run to an RS232 and to a PC, however, for testing, and since I do NOT have the digital potentiometer yet, the function generator is connected between one of the lines going into a photocoupler’s LED side through the 33k resistor and GND 3 putting the signal across the LED. I’m not sure where to probe the output so I tried connecting the output ground to GND2 and the other lead to either the line into the phototransistor and the other to the line coming out of the phototransistor. Neither is showing any improved results even taking into account the suggestions. Given the schematic here what do you think I am still doing wrong? I am running the 5V Pulse in and still seeing only ~20mV pulses out. I’ve replaced the photocoupler with new ones to get the same results. The only thing I see that I haven’t changed would be to “Take the emitter to the -5 volt line” though I am not sure how I would do that with this setup.
     

    Attached Files:

  6. Jun 3, 2009 #5

    berkeman

    User Avatar

    Staff: Mentor

    It looks from the schematic like you are hooking up the phototransistor outputs as emitter followers. You will not get good gain that way. They should be connected in the common emitter configuration, with the emitter grounded, and the collector going through the load resistor to the + supply. The collector is the output of a phototransistor. The signal will be inverted in polarity from your current emitter follower configuration, BTW.
     
  7. Jun 3, 2009 #6

    berkeman

    User Avatar

    Staff: Mentor

    Actually, in the special case of a phototransistor (where the base is not connected to anything), maybe you get the same gain in either configuration. The current is the same in the collector and emitter for the most part, and the base can rise up in a phototransistor... So maybe that configuration is okay after all. Interesting.
     
  8. Jun 3, 2009 #7

    dlgoff

    User Avatar
    Science Advisor
    Gold Member

    From your schematic, it looks like the 33kohm resistor is the problem. The diode needs more current to give enough light to saturate the phototransistor. The forward voltage of the diode at a forward current of 20mA is 1.2volts. So to get a 20ma current, you need a resistance; R=(5.0 - 1.2)/.02=190ohm.
     
    Last edited: Jun 3, 2009
  9. Jun 3, 2009 #8

    vk6kro

    User Avatar
    Science Advisor

    You would measure the output across the 1 K resistor. If this has zero volts across it, then the phototransistor is not turning on.
    Increase the LED current by reducing the series resistor. 33K is way too big. When you can get 5 volts across the 1K resistor by applying +5 V to the input, then it is working and you can apply pulses.

    Incidentally, if you convert your image to JPG, you can probably send a much clearer picture.
    Use the free program "Irfanview". Just load as BMP and save as JPG. You might still have to reduce the size, but the image will probably be clearer.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Photocoupler Issues
  1. Transformer Issue (Replies: 1)

  2. Noise issues (Replies: 13)

  3. Switch issue (Replies: 4)

  4. Grounding issue (Replies: 7)

  5. Photosensor Issue (Replies: 0)

Loading...