Connect with us

Comparator LED Circuit

Discussion in 'LEDs and Optoelectronics' started by heberjm8, Oct 11, 2010.

Scroll to continue with content
  1. heberjm8


    Oct 11, 2010
    I'm just a newbie circuit designer, which I'm sure is apparent to those of you who see the above circuit and are not. At any rate, I'm trying to create a simple circuit that compares the voltage being delivered from the solar panel to a reference voltage of 15V to the comparator (provided by the 18v battery supply). If the solar panel is NOT delivering a minimum of 15v, the red LED should illuminate. If the solar panel IS delivering above 15v, the yellow LED should illuminate. Rather than making it over complicated by using two seperate comparators (one for each LED), I was trying to simply use an inverter but I don't know if what I'm trying to accomplish is possible with these components. This probably goes without saying, but we obviously intend to use the 18v battery supply to power the LEDs since it is the solar panel we are interested in comparing. The LEDs are your typical 2v ones.

    If someone would be kind, please take a look and let me know what things are wrong with my circuit. If you want to be a saint, please provide a circuit diagram of one that might work or resolve whatever issues exist with my current circuit. We are using an LM339 for the comparator and I don't remember the number of the invertor off the top of my head but it is a cmos if I recall. I'll post again with more details regarding the inverter name once I check (the breadboard and circuit is currently at a buddy's house, so I can't check it right this minute). Also worth noting, we use an NTE956 instead of an LM317.

    P.S. I have attached the circuit I designed and built but it does not work.

    Your help is highly appreciated.

    Attached Files:

  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    Jan 21, 2010
    Oh, where do I start....?

    It appears you completely fail to understand how a comparator work, and also by having an 18V battery across the solar panel, you'll never see less than 18V. Having a diode between them is the right idea, but in this case you have it pointing exactly the wrong way. I'm not sure where your +/- 18V power supply is coming from, but I'll assume you have one.

    The strict answer to your question is that you need to connect both LEDs in parallel, but pointing in opposite directions. these are connected in series with a current limiting resistor between the comparator's output and the 0V rail. When the comparator's output goes high, one LED is turned on, when it goes low, the other is turned on. Beware though, many comparators have what is essentially an open collector output so they can only sink current.

    For the input, you need the connect the solar panel (probably via a voltage divider) to one comparator input, and a reference voltage to the other. When the voltage on the + input is higher than the voltage on the - input , the output will go high, when the conditions are reversed it will go low.
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