Need simple circuit toggle between two LED's

Discussion in 'The Projects Forum' started by cardstroker, Jan 10, 2019.

  1. cardstroker

    Thread Starter New Member

    Jan 10, 2019
    2
    0
    I need to use a watch battery or two, one membrane button, two LED's. One LED will always be on, push the button, one goes off, the other comes on. This is a dishwasher status indicator (clean/unclean) that hopefully I can package small enough to attach to the edge of the counter top above the dishwasher.
     
    Last edited: Jan 10, 2019
  2. cardstroker

    Thread Starter New Member

    Jan 10, 2019
    2
    0
    Another option would be to have one LED that changes color between red and green or a pushbutton that changes color.
     
  3. Bernard

    Expert

    Aug 7, 2008
    5,225
    600
    Battery life might be short with one LED always on. Use a toggle flip-flop built up or IC.
    Something like CD4013BC, dual D FF. Two transistor LED drivers or 4049.
     
    Last edited: Jan 10, 2019
  4. dl324

    AAC Fanatic!

    Mar 30, 2015
    8,723
    2,107
    Welcome to AAC!

    I'd do something like this:
    upload_2019-1-10_8-31-22.png

    Circuit also debounces the switch.

    I'd set LED current as low as possible because button cells don't have much capacity.

    EDIT: CD4049 will only be able to sink/source a couple mA at Vdd=3V, and you can't use white or blue LEDs (forward voltage too high).
     
    Bernard likes this.
  5. Bernard

    Expert

    Aug 7, 2008
    5,225
    600
    @ 5 Volts sink 5 mA, source 1.6 mA, maybe parallel I C 1- A, D, E, & F ?
     
  6. MrChips

    Moderator

    Oct 2, 2009
    19,114
    6,145
    Or use a SPDT switch. You can get such a switch with a push-button action.
     
  7. dl324

    AAC Fanatic!

    Mar 30, 2015
    8,723
    2,107
    My Wife said they sell magnets for that purpose.

    On our dishwasher, there's a lever used to lock the door. Unlocked means dirty, locked means clean.

    Me, I'd just look at what's in the dishwasher to determine whether they're clean or dirty. I never liked home dishwashers anyway, I get them cleaner the old fashioned way.
     
  8. iONic

    AAC Fanatic!

    Nov 16, 2007
    1,650
    95
    Honestly, this is a job for a tiny micro-controller and your button cell batteries might last longer than a few days.
     
  9. iONic

    AAC Fanatic!

    Nov 16, 2007
    1,650
    95
    Actually, even simpler would be a three position switch where left is LED1, right is LED2, and center is "battery saver mode!"
    Parts:
    (1) 3-position switch
    (2) 2 LED's
    (2) resistors
    (1 or 2) button cells
    Really, just an LED throwie with a switch!

    Capture.JPG

    Well better still. In my experience, once you begin to get used to seeing an LED on you will forget what it's for and disregard it's message, just like the little flip signs that spell out CLEAN and DIRTY.

    In order to conserve battery time use a single blinking red LED powered by the button cells and a simple on/off switch. turn it on and the LED flashes, turn it off and dishes are clean. And when you find that the dishwasher keeps geting more and more full of "clean" dishes you know it's time to change the battery!!
    One fourth the power. Don't forget the current limiting resistor!
     
  10. dl324

    AAC Fanatic!

    Mar 30, 2015
    8,723
    2,107
    The original requirements included a membrane button (switch).

    Personally, I'd just use the door latch on the dishwasher.
     
  11. iONic

    AAC Fanatic!

    Nov 16, 2007
    1,650
    95
    First and foremost, the button cell batteries are really not going to work, even two of them in parallel you will be lucky to get a week out of them. He will be adding new coin-cells like depositing quarters at a car-wash!
     
  12. crutschow

    Expert

    Mar 14, 2008
    23,089
    6,849
    The LM3909 is a low-power LED flasher, but it's no longer being manufactured.
    Below is the LTspice simulation of a circuit using a micro-power 555 CMOS timer configured as an astable multivibrator to perform a similar function.
    C4 acts as a voltage-doubler to generate a 6ms, 10-20mA LED pulse once per second.
    It should operate for at least six months on one AAA or a year on an AA alkaline cell.
    I suggest using an alternate-action PB switch to switch between LEDs (not shown).

    Edited to correct C4 polarity.
    upload_2019-1-18_11-31-52.png
     
    Last edited: Jan 18, 2019
    absf likes this.
  13. MisterBill2

    Distinguished Member

    Jan 23, 2018
    3,691
    723
    One thing to know is that the yellow high brightness LEDs that have been around for years will perform very well driven directly from 5 volt CMOS, such as a 4017 or a 4098. Not nearly as bright as with the full 20 MA but bright enough to be noticed inside, not in bright sunlight. And the dishwasher solution is to never rinse the dirty dishes, so that a dirty load is obvious and so is a clean load. And if the dishwasher will not clean without rinsing first, it is junk, replace it.
     
  14. eetech00

    Senior Member

    Jun 8, 2013
    1,616
    333
    Hello

    It could also be designed so that the LEDs are off until the button is pushed, then the appropriate led is lighted...

    eT
     
  15. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    7,815
    3,716

    Not to hijack the TS's thread but can you explain how the doubler works and how you determined the value of C4 to get the required voltage?
     
  16. crutschow

    Expert

    Mar 14, 2008
    23,089
    6,849
    R2 charges the left side of C4 (and the LED anode) to 1.5V between pulses.
    C4's right side is then pulsed to 1.5V, which adds 1.5V to the LED anode, giving 3V total.

    C4's value is just the same as showed in the LM3909 data sheet, so I figured it was a good value. :rolleyes:
    Its value determines how much the LED voltage decays during the pulse period (which you can see in the yellow trace).
    Simulations showed you could probably go as low as 100μF and still get a reasonably good light pulse.
     
    Last edited: Jan 18, 2019
    absf and spinnaker like this.
  17. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    7,815
    3,716
    And the purpose of C3?
     
  18. crutschow

    Expert

    Mar 14, 2008
    23,089
    6,849
    Power supply decoupling. :D
     
  19. Tank Circuit

    New Member

    Mar 5, 2017
    24
    3
    Perhaps a switch to move which colored LED is attached to a Joule-Thief. This would allow many days of operation with tiny cells.
    Start here is your research on how to add life to spent batteries:
     
  20. Phil-S

    Member

    Dec 4, 2015
    125
    11
    Quite agree. There are lots of reasons not to like dishwashers. One of them is the fire risk. I have seen several fires started from dishwashers (more so than washing machines). A lot of dishwashers have power cables in the drop-down door and the constant flexing leads to failure. A smoke detector is more important than knowing whether it is clean or or whatever - your nose tells you that.
    There is something quite satisfying about going through a manual wash. A hot water (plus Marigolds) pre-wash, a pause, manual scrub, pause, clean water rinse with a dash of distilled vinegar. For really good results, use rainwater, no dissolved solids, streak-free and best of all, no build-up of scale in your underground soil pipes. After the last dishwasher fire, would never use them again.
     
Loading...