LM339 Latest Circuit - More Questions

Discussion in 'General Electronics Chat' started by CoachKalk, Oct 5, 2011.

  1. CoachKalk

    Thread Starter Member

    Sep 20, 2011
    139
    2
    My sensor circuit has evolved from using a 555 to 741 to now a 339. All of the versions were "borrowed (read copied)" from circuits I had located that were similiar to my need or at least used the same "main" IC.

    Based on the suggestion of several experienced posters, my lastest version is using the 339. I have attached the circuit I have currently set up and I would like to ask a few questions. I have blindly followed suggestions that have been given in many other threads and I am trying to understand what is going on before I add even more.

    [​IMG]

    I do know the circuit is rough. I have tried to locate freeware and the Smartdraw let me do 1 whopping file before locking me out. I have found and am currently using EZ Schematics. I couldn't find several symbols I needed so I just tried to label everything so you could see what I did.

    The +9V is a 9V battery that is actually providing approx. 8.6V. The V(ref) at the + pin (my 10K Pot. dialed in to 3K) and a V(input) at the - pin (my resistor/LDR combo) are "compared" by the 339. I had been reading up as much as possible on the 555 before the switch to the 339 so I am getting confused on what is actually "happening" when the input voltage exceeds the ref voltage. Based on my meter measurements, the voltage at the output pin when the buzzer/light are off is 8.6V. When I kill the light, the buzzer/light turn on and the voltage at pin 3 reads .144V? When "on", both the LED and buzzer voltage values are 7.45V.

    I have a pull up resistor and a resistor at the PNP base because advice/other threads have spelled their need out. I have looked at several threads discussing both and all I can say is it hasn't sunk in yet. I am hoping if I can get a handle on what the 339 is doing/what is actually happening at the output pin, I can get a better understanding of the other components.

    Because I want to keep truckin' on, I will ask a few question about the circuit and other options, even if I do not completely "get" it all yet. I know I had asked this question in a different thread, but now that I have a circuit with a 339, you can clearly see my question. Since the 339 is a quad comparator, can I just feed the R3 Pot into all of the reference voltage pins? Then can I copy the resistor/LDR setup (a total of 4) feeding into the 4 input voltage pins? I am still just using a protoboard, but I would then have the ability to have 4 different "sensor" stations looking for the light to be blocked, correct? If I am still good so far, would I then just tie all of the outputs together and have 1 pull up resistor feeding the the 1 3906? I would want the same "buzzer" to sound regardless of which sensor is blocked.

    Thanks again.
     
  2. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    I'm assuming you want 4 independent LEDs and only one buzzer. The buzzer and an LED will come on when light to an LDR is blocked.
    You are on the right track, and you are correct about using a common pot, with the caveat that LDRs are not well matched from unit to unit, so they will not all switch at the same light level if you use a single pot. If you have a large change in light levels, then this shouldn't be a problem.
    Do you know how much current the buzzer draws?
     
    Last edited: Oct 6, 2011
  3. crutschow

    Expert

    Mar 14, 2008
    13,023
    3,236
    For the supply polarity you show, the transistor needs to be an NPN not a PNP. A PNP needs a negative base-emitter voltage to turn on and your circuit can't provide that. (A bipolar transistor's base-emitter arrow indicates the direction of forward bias current flow)

    The LED also needs to be reversed (again the direction of the arrow indicates forward bias current flow). And connected where you show, it would glow all the time. If you only need one LED, then you can place it and its series resistor in parallel with the buzzer.

    Your schematic is so fuzzy I can't quite make out the input polarity markings on the comparator, so don't know whether that's correct.
     
  4. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    You can use NPNs (with some circuit changes), but my circuit with the PNPs should work.
     
  5. crutschow

    Expert

    Mar 14, 2008
    13,023
    3,236
    Yes, it should. I didn't look at your schematic before posting my reply.:rolleyes:
     
  6. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Coach,
    Just so you don't get confused, only one 0.1uF/100nF capacitor is required across the supply pins of each LM339.

    Ron_H's circuit should work great as long as your buzzer needs less than ~50mA current. If it needs more than that, you really should tell us.

    Ron_H and myself (along with a number of other members) are using Linear Technology's LTSpice, which is good, free, and allows an unlimited number of components in a schematic/simulation.

    The LTSpice download page is here:
    http://www.linear.com/designtools/software/

    You should also join the Yahoo! LTSpice Users Group:
    http://tech.groups.yahoo.com/group/LTspice/
    You will need a free Yahoo! account to join the group. There are lots of Spice models and symbols available for download, along with a help forum.
     
  7. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    SgtWookie, thanks for pointing out that I inadvertently showed power pins and a decoupling cap on both instances of the LM339 (copy and paste strikes again), which is, of course, a quad comparator, and only has one set of power pins for the 4 comparators.

    I have edited the schematic in post #2 to correct this.
     
    SgtWookie likes this.
Loading...