Solving Photocoupler Issues with Digital Potentiometers

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

The discussion centers on troubleshooting issues with photocouplers (specifically PC817s) in a circuit involving a digital potentiometer (MCP41XXXX) and a function generator. Users reported that inputting a 5V peak-to-peak square wave resulted in an output of only 20-30mV, indicating significant signal damping. Key solutions included ensuring proper forward biasing of the photocoupler, using a lower series resistor (around 190 ohms), and configuring the phototransistor in a common emitter setup to achieve better gain. The importance of using a positive pulse instead of a square wave was also emphasized for optimal performance.

PREREQUISITES
  • Understanding of photocouplers, specifically PC817 functionality
  • Basic knowledge of digital potentiometers, such as MCP41XXXX
  • Familiarity with function generators and their output modes
  • Experience with circuit design, particularly with phototransistors
NEXT STEPS
  • Research proper biasing techniques for phototransistors in circuits
  • Learn about common emitter configuration for phototransistor applications
  • Explore the impact of resistor values on LED current in photocoupler circuits
  • Investigate the differences between square wave and pulse inputs for signal integrity
USEFUL FOR

Electronics engineers, hobbyists working with analog circuits, and anyone involved in designing or troubleshooting systems using photocouplers and digital potentiometers.

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
7K
  • · Replies 20 ·
Replies
20
Views
7K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
138
Views
26K
  • · Replies 41 ·
2
Replies
41
Views
7K
Replies
4
Views
7K
Replies
37
Views
6K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
4
Views
4K
  • · Replies 7 ·
Replies
7
Views
6K