1
\$\begingroup\$

I am looking for a circuit which can turn ON/OFF 10 LEDs based on the switch pressed (push to ON, release to OFF). It is like an LED graph.

My requirement is: - Initially no LED is ON. - If switch 1 is pressed then LED 1 turns ON LEDs 2 to 10 turns OFF - If switch 2 is pressed then LEDs 1 to 2 turns ON and LEDs 3 to 10 turns OFF - If switch 5 is pressed then LEDs 1 to 5 turns ON and LEDs 6 to 10 turns OFF - If switch 4 is pressed then LEDs 1 to 4 turns ON and LEDs 5 to 10 turns OFF - If switch 3 is pressed then LEDs 1 to 3 turns ON and LEDs 4 to 10 turns OFF and so on...

The components can be ICs or transistors, doesn't matter as long as this can be achieved. But no Arduino please. Should be simple.

Thanks

Update 1: Forgot to mention that the state of the LEDs should be maintained even after switch is released unless other switch is pressed. I hope this makes sense.

\$\endgroup\$
  • \$\begingroup\$ When you say "LED 1-3 turns ON and rest are OFF", do you mean that LEDs 1 through 3 turn on, and LEDs 4 through 10 are off? \$\endgroup\$ – Daniel Griscom Oct 22 '15 at 0:15
  • \$\begingroup\$ Yes that is correct \$\endgroup\$ – Amit Kumar Oct 22 '15 at 0:21
  • \$\begingroup\$ You might want to clarify this in the question body, rather than in these comments. \$\endgroup\$ – Daniel Griscom Oct 22 '15 at 0:30
  • \$\begingroup\$ I thought 1-3 generally means 1 to 3. Anyways I have edited my question. Thanks for pointing out. \$\endgroup\$ – Amit Kumar Oct 22 '15 at 0:33
  • \$\begingroup\$ get a 10-gang radio-button set :) \$\endgroup\$ – Jasen Oct 22 '15 at 1:40
1
\$\begingroup\$

Here is a sketch for my solution. This is just an abstraction, and but you can use your imagination to see how more channels are chained toward the bottom. Be sure to put some base resistance in there!

Not 100% sure this will work, but it's a place to start.

Edit: Fixed the schematic

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
  • 1
    \$\begingroup\$ If you edit your post, then underneath the image of the schematic in the preview is a small font text saying "edit the above circuit". If you click this you can modify your schematic. \$\endgroup\$ – Tom Carpenter Oct 22 '15 at 1:03
  • \$\begingroup\$ 12V is not ehough for 10 leds in series. \$\endgroup\$ – Jasen Oct 22 '15 at 1:41
  • \$\begingroup\$ Example circuit is example. \$\endgroup\$ – Daniel Oct 22 '15 at 4:48
0
\$\begingroup\$

There are a lot of ways you could accomplish this. Using an ATMEGA328 microcontroller chip you can provide up to 40ma per pin, however you cannot source more than a total of 200ma.

This means that if you want to directly drive 10 leds then they need to draw less than 20ma each. Green LEDs appear the brightest for a given amount of power. Try running a single green led at 15ma and see if it is bright enough. If so you can run it directly off an ATMEGA328 doing all the hard work in software. With 23 IO pins the ATMEGA328 has enough pins to run all 10 LEDs and the 10 buttons.

If you need more power for you LEDs then you can use an external LED driver chip. The only one I am familiar with is the MAX7219. It is designed for up to 64 LEDs so it may be more than you need, there are probably drivers better suited to your task.

A microcontroller may be overkill but it will get the job done. I am sure someone here knows how to do this with logic gates.

\$\endgroup\$
  • \$\begingroup\$ Thanks. Yep that looks complex. I am looking for simple solution. \$\endgroup\$ – Amit Kumar Oct 22 '15 at 0:38
  • 1
    \$\begingroup\$ I think you will find that using a microcontroller for a task like this is not so complex after you see the alternatives. \$\endgroup\$ – Daniel Oct 22 '15 at 1:05
  • \$\begingroup\$ So, on power-up you want all of the LEDS to be OFF and, thereafter ,anytime you press a pushbutton you want all the LEDs from zero to the one corresponding to that pushbutton to turn on and the rest to turn OFF? \$\endgroup\$ – EM Fields Oct 22 '15 at 3:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.