Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

LM339 comparator as solar panel switch

  1. Jul 20, 2008 #1
    Hello folks,

    I have been trying to make a circuit that would light up an LED when a small solar panel develops a certain voltage. My LED does not light up no matter how I hard I think about the circuit design. I would appreciate any help and suggestions.

    Thanks to all.
     

    Attached Files:

  2. jcsd
  3. Jul 20, 2008 #2

    Redbelly98

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    From your circuit, it looks like you want the LED to light up if the solar panel drops below 75 mV. Is that right?

    Have you checked the obvious, such as:

    Does the LM339 output go high/low when the +input is above/below the - input?

    Does the LED work, and is installed with the correct polarity?
     
  4. Jul 21, 2008 #3

    berkeman

    User Avatar

    Staff: Mentor

    Your polarity is inverted on the inputs to the comparator. Your circuit will only try to light the LED for voltages below the reference, not above.
     
  5. Jul 21, 2008 #4
    Piezo buzzer

    I figured it out and include the updated circuit here. Instead of LED, I got a piezo buzzer. I did not understand LM339, so I used LM741 opamp as comparator instead. The circuit reacts to luminescence within the room and will start piezo buzzer should the light level go over a certain (small) limit. So now I will be waking up with the rise of sun.

    However, I had a tough time figuring out how to link the piezo buzzer. Essentially I simply tried different resistor values until the buzzer made audible noise (at 150 Ohm.) I bought the buzzer from Radio Shack (cat. # 273-0053.) On the label, it says: 1.5V-3.0VDC, 15mA and nothing else. In order to calculate the resistor that I have to place in series with the buzzer (to lower the voltage from 6.17V to an acceptable value), I have to know the resistance of the buzzer (load) and/or its power consumption. I have tried using the multimeter for resistance measurement of the piezo buzzer, but it shows "0L." I cannot compute the power consumption of the buzzer or its resistance because only the voltage range (1.5-3.0V), not a single value was given.

    So my new question is: suppose you have a device (whatever it is) that you have to link to a DC source of known voltage. The device label gives only a current rating, does not specify the power dissipation and gives a voltage range without specifying the kind of voltage. How should I go about figuring out the resistance of the load and/or power dissipation in order to calculate the resistance that (if placed in series) will allow to drop the supply voltage to an optimal value for the device to operate?

    Thanks to all again.
     

    Attached Files:

  6. Jul 21, 2008 #5
    Piezo buzzer

    I figured it out and include the updated circuit here. Instead of LED, I got a piezo buzzer. I did not understand LM339, so I used LM741 opamp as comparator instead. The circuit reacts to luminescence within the room and will start piezo buzzer should the light level go over a certain (small) limit. So now I will be waking up with the rise of sun.

    However, I had a tough time figuring out how to link the piezo buzzer. Essentially I simply tried different resistor values until the buzzer made audible noise (at 150 Ohm.) I bought the buzzer from Radio Shack (cat. # 273-0053.) On the label, it says: 1.5V-3.0VDC, 15mA and nothing else. In order to calculate the resistor that I have to place in series with the buzzer (to lower the voltage from 6.17V to an acceptable value), I have to know the resistance of the buzzer (load) and/or its power consumption. I have tried using the multimeter for resistance measurement of the piezo buzzer, but it shows "0L." I cannot compute the power consumption of the buzzer or its resistance because only the voltage range (1.5-3.0V), not a single value was given.

    So my new question is: suppose you have a device (whatever it is) that you have to link to a DC source of known voltage. The device label gives only a current rating, does not specify the power dissipation and gives a voltage range without specifying the kind of voltage. How should I go about figuring out the resistance of the load and/or power dissipation in order to calculate the resistance that (if placed in series) will allow to drop the supply voltage to an optimal value for the device to operate?

    Thanks to all again.
     
  7. Jul 21, 2008 #6

    berkeman

    User Avatar

    Staff: Mentor

    Most likely that buzzer is meant to be connected directly to a power supply with an output voltage of 1.5V to 3.0V, and when connected like that, it will draw no more than the 15mA current consumption advertised. If your power source is 6.17V, the easiest thing is to use a 3.0V 3-terminal linear voltage regulator IC to drop the voltage for the buzzer.
     
  8. Jul 21, 2008 #7
    But if I have a power supply higher than 3V, then how should I go about figuring out the resistance to drop the voltage from the supply to 3V?
     
  9. Jul 21, 2008 #8

    berkeman

    User Avatar

    Staff: Mentor

    I'd suggested using a voltage regulator. Just using a resistor would not be reliable enough. The simplest way would be to put a 3V Zener diode in parallel with the buzzer to limit the voltage, and use the dropping resistor to supply the 15mA plus several mA for the Zener. Call it 20mA total, and size the dropping resistor accordingly. Check the standard Zener diode voltages to find a value in the 1.5V to 3.0V range of the buzzer, and then do the resistor calculation.
     
  10. Jul 22, 2008 #9

    Redbelly98

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    Re: Piezo buzzer


    The given specs (eg. 15 mA) could be a just a nominal or maximum value, it's hard to say if they don't say. To figure the resistance, use Ohm's law as a starting point, and then to play it safe try a resistor that gives even lower current or voltage to the device. See how that works, then experiment with other resistors until things work.

    You can measure the voltage across the 150 ohms, this will tell you the current through the piezo. ( i=V/150) Might be good to actually measure the resistance of the "150" ohms too, and the piezo voltage.

    It's also possible 15 mA is too much for the op amp, so the actual current is less than what you are expecting.
     
  11. Jul 22, 2008 #10
    New idea: suppose I want the buzzer to stay on once it is switched on. In other words, once the light level in the room goes higher than the threshold, the buzzer goes on and the only way to switch if off is to power-off the whole circuit. What simple modification would allow me to do that?

    Thanks to all the folks who respond.
     
  12. Jul 22, 2008 #11
    There are lots of different ways to hold the state of the circuit. In general though, the technique is called "latching." Wikipedia has a decent article on digital logic latches: http://en.wikipedia.org/wiki/Latch_(electronics)

    One easy way is to do it with relays, as described in this thread: https://www.physicsforums.com/showthread.php?t=123692

    Here's a page on how to do it with pictures: http://www.eleinmec.com/article.asp?24 (scroll down till you get to the part on Latching Relays)

    The term "Latching Relay" can either mean the technique described in the post, or a special kind of relay that holds state mechanically even with the power off (you don't want that one). See Wikipedia's relay page if you're interested though.

    If you want to do it with solid-state digital logic latches, see second half of this PDF: http://www.discovercircuits.com/PDF-FILES/4013oneshots.PDF

    It doesn't do exactly what you want (i.e. if it gets bright, then dark, then bright again, the buzzer will go off (and you'll have to reverse the polarity on the inputs to your op amp comparator), but it's a good starting point.

    Here's something more like what you want, though, using a 555 timer: http://www.eleinmec.com/article.asp?5

    Leave the reset button out of the circuit, and replace the trigger button and the 10k resistor above it with the output of the op amp (i.e. hook up the op amp's output to pin 2, and don't include the pullup resistor or the switch). That ought to do what you want, you can leave your current circuit pretty much the same, but you might need to unity-gain buffer the output of the 555 if you don't get enough current (I haven't looked at a 555 datasheet as of late so I don't know what kind of current sourcing you can expect). It's good practice anyway.

    Hope this helps.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: LM339 comparator as solar panel switch
  1. Solar panel (Replies: 8)

  2. Solar panels. (Replies: 1)

Loading...