Solving Photocoupler Issues with Digital Potentiometers

  • Thread starter Thread starter quantumnano
  • Start date Start date
  • Tags Tags
    Issues
Click For Summary

Discussion Overview

The discussion revolves around troubleshooting issues with photocouplers (PC817s) in a circuit designed to connect a digital potentiometer to a PC. Participants are exploring the expected behavior of the photocouplers, particularly in terms of signal output when driven by a function generator, and addressing concerns about circuit configuration and component values.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Experimental/applied

Main Points Raised

  • One participant is experiencing significant damping of the output signal from the photocoupler, questioning whether the issue lies in the setup or potentially faulty components.
  • Another participant suggests that the output from the photocoupler is from a phototransistor that needs to be forward biased to function correctly.
  • A different participant points out the absence of a load for the phototransistor and recommends connecting a resistor from the collector to a positive voltage to improve output.
  • One participant emphasizes that a square wave may not be suitable for the input and suggests using a positive pulse instead.
  • Another participant notes that the current configuration of the phototransistor outputs may not yield good gain and recommends a common emitter configuration instead of an emitter follower setup.
  • There is a suggestion that the series resistor value (33kOhm) is too high, which could be limiting the current through the LED and thus affecting the output.
  • One participant mentions that measuring the output across a specific resistor can help determine if the phototransistor is turning on properly.

Areas of Agreement / Disagreement

Participants express differing views on the correct configuration and component values for the photocouplers. There is no consensus on the best approach to resolve the damping issue, and multiple competing suggestions are presented.

Contextual Notes

Participants have noted various assumptions regarding the circuit configuration, including the need for proper biasing and load conditions for the phototransistor. The discussion also highlights potential limitations in the current setup and the need for adjustments to component values.

quantumnano
Messages
4
Reaction score
0
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?
 
Engineering news on Phys.org
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.
Phototransistors also consist of a photodiode with internal gain. A phototransistor is in essence nothing more than a bipolar transistor that is encased in a transparent case so that light can reach the base-collector junction. The electrons that are generated by photons in the base-collector junction are injected into the base, and this photodiode current is amplified by the transistor's current gain β (or hfe).
http://en.wikipedia.org/wiki/Photodiode"
 
Last edited by a moderator:
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.
 
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.
 

Attachments

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.
 
berkeman said:
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.

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.
 
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:
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.
 

Similar threads

  • · Replies 14 ·
Replies
14
Views
8K
  • · Replies 20 ·
Replies
20
Views
7K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
138
Views
27K
  • · Replies 41 ·
2
Replies
41
Views
8K
Replies
4
Views
7K
Replies
37
Views
7K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 6 ·
Replies
6
Views
8K