Connect with us

Night sensor

Discussion in 'Sensors and Actuators' started by stonefox, Dec 26, 2013.

Scroll to continue with content
  1. stonefox

    stonefox

    5
    0
    Jul 8, 2011
    I have an aquarium where I've made a Nightlight, with a number of blue LED diodes. View picture.

    My desire is that it turns on automatically when it starts and gets dark in the evening, how can I fix it?

    Are there components I can use on my plus wire which has this feature?

    [​IMG]
     

    Attached Files:

  2. Harald Kapp

    Harald Kapp Moderator Moderator

    9,540
    1,967
    Nov 17, 2011
    Last edited: Dec 26, 2013
  3. Arouse1973

    Arouse1973 Adam

    5,164
    1,078
    Dec 18, 2013
    Forgive me if I am wrong but I didn't think LEDs needed to be supplied with a constant current, I thought they needed a current source. This is different. For standard 5mm LEDs a resistor in series and a battery will provide a current source but the current will start to fall as soon as the LED is connected, it may only be by a few uA but it will still fall. Constant current source changes it's voltage to maintain a constant current
    Thanks Adam
     
  4. Harald Kapp

    Harald Kapp Moderator Moderator

    9,540
    1,967
    Nov 17, 2011
    A current source is a source of a constant current (or at least of a controlled current which may change in time). I see no conflict there. The idea of a current source is that the voltage across the load is determined by the load resistance and the current.

    With a voltage source the current through the load is determined by the load resistance and the voltage across the load.

    For an ideal ohmic resistor these are synonymous behaviours. With non-linear characteristics (as for an LED) they are not.

    Only as an approximation. The voltage drop across the LEd changes the voltage across the resistor, thus changing the current through the LED. A true constant current source needs a controlling circuit to maintain a stable current regardless of the voltage drop across the load.
     
  5. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,267
    Nov 28, 2011
    Not necessarily.

    An LED needs to be driven with a current, not a voltage.

    If you connect a red LED (for example) across a voltage source, for example an adjustable voltage regulator, and set the voltage to 1.5V, the LED will light dimly, or not at all. If you slowly increase the voltage from 1.5V to 2.0V, you will see the LED get brighter and brighter until it burns out, and emits a nasty smell.

    This is what Harald means when he talks about LEDs having a non-linear V-I (voltage vs. current) characteristic. Yes the LED will draw more current with a higher voltage across it, but the relationship is not linear, it's a steep curve.

    It's better not to have to worry too much about the voltage across the LED, because that can vary with temperature, from brand to brand, from batch to batch, and from part to part, for a given current. The ideal way to drive one or more LEDs is using a current source.

    A current source can be a circuit containing transistors that regulates the current to a specific value. This is called a constant current source, and it's what you're referring to when you say that it "changes its [output] voltage to maintain a constant current". This kind of current source produces a fairly stable (constant) current.

    A battery and a resistor is also a current source, although the current through the load you connect to it is not regulated or constant. The current through the load will depend on the voltage across the resistor, and can be calculated by Ohm's Law, I = V / R, where
    I is the current in the load, in amps;
    V is the voltage ACROSS THE RESISTOR, in volts, and
    R is the resistance of the resistor, in ohms.

    The voltage, V, is equal to the battery voltage minus the voltage across the load. Therefore, even if the resistance is constant, changes in the battery voltage and/or the voltage across the load will cause the current to change.

    You may already be familiar with this idea. I'm restating it clearly here because I'm not sure that you understand it properly:
    That's not how I would explain it. If you have a series circuit consisting of a battery, a current limiting resistor, and one or more LEDs in series, the current at all points in the circuit will be the same, because the same electrons are (sooner or later) flowing through all parts of the circuit.

    If you mean that as you add more LEDs in series, the current will drop, you're right. That happens because the voltage across the load (the LED string) increases as you add more LEDs in series.

    If you already understood this, then you didn't explain it very well.

    EDIT: The rest of this post is directed at the OP, user stonefox, not Arouse1973.

    Now to get back to your actual question.

    In your first post, you show three diodes connected in parallel across a power supply, with no current limiting resistor.

    The power supply appears to be a Govena (http://www.govena.com) model YT60. This is described as an "electronic transformer" and it is designed to power halogen lamps at 11.5V DC. It "works with dimmers" so I assume it handles thyristor phase angle control dimmers by turning its output ON and OFF with an equivalent duty cycle. It has a microcontroller inside it.

    The documentation is poor, and doesn't state whether the output is isolated from the mains or not, but I suspect it isn't. This is dangerous. I will not be involved in a project like this using a low-voltage non-isolated power supply.

    It's also not clear whether that power supply is suitable for those LEDs anyway, and whether they should be connected to it in parallel without a current limiting resistor. Unless they are designed for direct connection to +12V and they include current limiting. This is possible, but we don't know, because you didn't tell us what type of LED they are.

    The characteristics of the power supply and the LEDs are important because they determine whether the LEDs should be turned OFF by interrupting the power supply output (which is appropriate for a voltage supply) or by shorting out the LEDs (which is appropriate for a current supply). Another option would be switching the mains supply at the input of the power supply, using a relay, but then another power supply would be needed for the control circuit.

    In answer to your specific question about switching based on ambient light level, as Harald said you need more than just a component. An LDR (light dependent resistor) can be used to monitor ambient light, but you need an adjustable comparator to detect when a certain light threshold has been passed.

    The comparator also needs a characteristic called hysteresis, which I won't bother describing here - search my posts for an explanation on another thread; I've explained it many times, along with the reason that it's needed.

    Then you need some kind of switching device, such as a relay or MOSFET, depending on how you control the power to the LEDs.

    I have drawn up control circuits for similar projects. Here's one you can look at: https://www.electronicspoint.com/thread-t258206.html#post1536817

    If you're surprised by the lack of helpful posts so far, you shouldn't be. We are all volunteers here. We help because we like to help, and we like to teach. We are doing you a favour.

    When someone is doing you a favour, it is appropriate (unless you want to be considered rude and arrogant) to ask nicely, and to provide plenty of information about what you want to do, and what you have to work with.

    This information would include the brand and model of the power supply, a link to the data sheet for it, and the brand and part number of the LEDs and a link to the data sheet for them as well. Your diagram is a start but it's not enough.
     
    Last edited: Dec 28, 2013
  6. davenn

    davenn Moderator

    13,424
    1,803
    Sep 5, 2009
    and the occassional appreciative thankyou doesnt go amiss either :)

    Dave
     
  7. Arouse1973

    Arouse1973 Adam

    5,164
    1,078
    Dec 18, 2013
    Hi Kris
    I think we might have our wires crossed here. I am not the original poster but you were lecturing me as if I were. It was an incorrect statement to say an LED needs a CONSTANT current source to work. It does not. The LED needs a source of charge to work and this can come from either a voltage or current source.

    As already pointed out in Steve's very comprehensive article about driving them it is imperative that they have a current source to protect them from thermal runaway. The simplest current source is a resistor across a voltage source this is a passive dependant voltage source. this mean the current is dependant on the voltage, if the voltage remains constant you will have a constant current through the resistor (ignoring PSU fluctuations and any temperature effects).

    If you are using a battery and a dependant current source then the current will change as soon as the circuit is powered up, as my original statement said. I said this to prove the dependant nature of this source which is on the battery.
    Example
    9V battery, 1K series resistor, 1.5V LED. Current is 7.5mA
    8.9V battery , 1K series resistor, 1.5V LED. Current is 7.4mA

    Now if I were driving more than one in series for lighting purposes then yes I would use a CONSTANT current source(independent) to ensure the photo-metric properties of the LEDs differ as least as possible
    Hope this clears things up
    Adam
     
  8. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,267
    Nov 28, 2011
    You're right. My apologies. I was correcting your explanation, and lecturing the OP. I thought you were the OP.
    Not "a resistor across a voltage source"; a resistor IN SERIES WITH a voltage source. I think you KNOW what you mean; you just need to make sure that you SAY what you mean :)
     
  9. Arouse1973

    Arouse1973 Adam

    5,164
    1,078
    Dec 18, 2013
     
  10. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,267
    Nov 28, 2011
    The battery and the resistor are in series with each other; the load is also connected in series with them. Battery, resistor, and load all in series. But you obviously understand this.
     
  11. Arouse1973

    Arouse1973 Adam

    5,164
    1,078
    Dec 18, 2013
    Hi Kris
    Yes quite. But If I asked 50 engineers to connect a single resistor in parallel with a battery I bet they all connect it across the battery. Lol. This is why we tend to ignore the battery as a component and just look at the components after the battery as being in series or parallel.
    Thanks
    ADAM
     
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.
Similar Threads
Loading...
Electronics Point Logo
Continue to site
Quote of the day

-