Connect with us

Simple Phototransistor switch circuit

Discussion in 'General Electronics Discussion' started by BlinkingLeds, Feb 23, 2013.

Scroll to continue with content
  1. BlinkingLeds

    BlinkingLeds

    180
    0
    Feb 23, 2013
    Hi, i have a matching pair of ir led/phototransistor that i want to use as an light switch. The problem is that the phototransistor's output is proportional to the strength of the ir light that it receives, so the mosfet that it drives has a dimming effect. How can i make it so that it only turns off or fully on?
    Best regards.
     

    Attached Files:

  2. BobK

    BobK

    7,682
    1,686
    Jan 5, 2010
    Hi blink, welcome to the forum.

    A comparator will sense the difference between two voltages and then switch quickly when one exceeds the other.

    Bob
     
  3. BlinkingLeds

    BlinkingLeds

    180
    0
    Feb 23, 2013
    Thanks for the welcome

    So how do i wire it up then?
    I'm a newbie sorry. :)

    PS. After a quick search i found that those ic's are relatively big, i was hoping for something small that will not make my circuit much bigger. Is there no other way?
     
    Last edited: Feb 23, 2013
  4. duke37

    duke37

    5,364
    769
    Jan 9, 2011
    1. You do not have anything to limit the current through the leds.
    2. You do not have anything to distribute the current to each led.
    A resistor in series with each led will do the job.
    3. The convention is that lines at a cross do NOT connect. Use two Ts.
    4. An added transistor could provide some positive feedback to give some hysteresis.
     
  5. BlinkingLeds

    BlinkingLeds

    180
    0
    Feb 23, 2013
    oops sorry, forgot to draw the resistors, i do have a 1k resistor in series with each led sorry.
    where should i add the transistor?
     

    Attached Files:

  6. duke37

    duke37

    5,364
    769
    Jan 9, 2011
    Here is the idea, when the fet turns on it turns on the pnp which provides current to turn on the fet, there is therefore a tendancy to latch. The amount of feedback is controlled by the variable resistance, this will need to be found by experiment without data on the output of the detector.
     

    Attached Files:

  7. EinarA

    EinarA

    28
    0
    Feb 11, 2013
    I created a circuit very similar to Dukes last year that is less likely to latch up. The NPN transistor , Q1, forms a simple current sink that pulls down the gate voltage until the current in the phototransistor exceeds it. Now the gate voltage rises until the MOSFET turns on, which reduces the drive to Q1 ensuring the FET turns on completely. The 1 M pot adjusts the sensitivity; you will probably find it will work without, just connect the 10M resistor to the junction of the 470R and thevLEDs. It helps to select an NPN transistor with low gain.
    This circuit is easily adapted to switch on in the dark or to work with different output voltages.
     

    Attached Files:

  8. duke37

    duke37

    5,364
    769
    Jan 9, 2011
    EinarA

    That looks like a good start, however, I would drive the base from the drain of the fet so it is turned fully on or off.
    In order to avoid the problem of npn gain, I would put a resistor in its collector to set the hysteresis.

    Duke
     
  9. EinarA

    EinarA

    28
    0
    Feb 11, 2013
    The point is to create dueling current sources. This gives the combination very high gain. The NPN should be biased so it is only partly on at all times. I have already tested the circuit and know it works. Using a slightly more complex biasing method will allow switching at very low photo currents. Hysteresis is created by having the NPN switch between two set points.
     
  10. duke37

    duke37

    5,364
    769
    Jan 9, 2011
    The two set points should be the npn fully on of fully off.
    The amount of hysteresis sould be set by a resistor in the collector. Too much feedback (too low a resistance) will latch the circuit in one direction permanently.
     
  11. EinarA

    EinarA

    28
    0
    Feb 11, 2013
    NO. You do not understand how to create a positive positive feedback circuit. To have the output switch form off to fully on in one instant, positive feedback must exceed any negative feedback at ALL values of the output voltage. This requires it be continous and reasonably linear. None of your circuits achieve this.
     
  12. duke37

    duke37

    5,364
    769
    Jan 9, 2011
    The Op does not want a linear circuit, he wants to switch the output fully on or off.
    The positive feedback alters the set point to give a dead band.

    Perhaps *steve* or Harald could adjudicate on this.
     
  13. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    A 555 makes a decent Schmitt trigger

    Chris
     
  14. duke37

    duke37

    5,364
    769
    Jan 9, 2011
    Yes, a 555 would do the job with a feedback resistor. It would replace the fet also if he only wants to drive a couple of leds.
     
  15. BlinkingLeds

    BlinkingLeds

    180
    0
    Feb 23, 2013
    Thanks for the answers.
    If it works with a 555 i could get pin 3 to a fet's gate and get the job done right?
    The only problem is... I don't know how to make a 555 a schmitt triger.
    It would be good if it had some sort of adjustment.
    regards
     
  16. BlinkingLeds

    BlinkingLeds

    180
    0
    Feb 23, 2013
    ok found some small comparators like LM311 or LM393
    The questions is, what's better? Schmitt or comp?
     
  17. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    Why would a feedback resistor be needed? The trigger pin needs <=1/3 Vcc to trigger the output high. After that event occures it requires >=2/3VCC to trigger it low again. That's plenty of hysteresis. ;)

    Chris.

    Edit: I think I have at least two errors in my statement. I'm working it out and will correct any mis-speaks.

    Edit2: Yes, I made an error. The Trigger pin doesn't have the >=2/3VCC characteristic. The Threshold pin does. The 555 will operate as a Schmitt Trigger if the Trigger & Threshold pins are tied together.
     
    Last edited: Feb 27, 2013
  18. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    Here's some curves for you.

    Chris
     

    Attached Files:

  19. BlinkingLeds

    BlinkingLeds

    180
    0
    Feb 23, 2013
    Why VF1 splits in 2 and part of it continues to be high and the other part goes low? confused
     
  20. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    This is a DC Transfer Characteristic Analysis with Hysteresis included. Hysteresis (if any) is analyzed by the following....

    VF2 sweeps from 9V to 0V. VF2 then sweeps from 0V to 9V. So, the VF1 plot you see reflects U1's output going High when the Trigger pin voltage (VF2) falls below 3V. This is the left VF1 transition from 0V to 8.79V. The transition you're questioning occurs when the VF2 sweep reaches 6V on the ramp's up slope the output (VF1) switches back to 0V. This happens because the Threshold pin responds to voltages >= 2/3 VCC. Since the Trigger and Threshold pins are tied together we get the output pin response of both pin's characteristcs. In short it's hysteresis that you see there and that's what's confusing you.

    Chris
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-