I want to design a circuit for glowing two leds for alternate intervals for different input voltages. For example: Consider two LEDS Red and Green. When the input voltage to the circuit is 0-5Volts then the two LEDS should glow for 50:50 time and when the input voltage is 5-10Volts the two LEDS glow for 20:80(RED:GREEN) time. I just need a basic circuit to implement this task.

I was thinking of using 555 timer IC but no solid configuration seemed working.

  • \$\begingroup\$ A comparator or two and a 555 timer ought to work, but your life would be a lot easier if you used a microcontroller. \$\endgroup\$
    – uint128_t
    Apr 2, 2016 at 20:23
  • \$\begingroup\$ Can u please explain the circuit. And I need this without MCU as using only digital ICs. \$\endgroup\$ Apr 2, 2016 at 20:26
  • \$\begingroup\$ This site is not a design service. Do your own homework but feel free to come back with specific questions showing you've actually tried something. \$\endgroup\$
    – user65586
    Apr 2, 2016 at 20:32
  • \$\begingroup\$ Try to build something yourself, and when you have a specific issue, you can ask a more refined question here. \$\endgroup\$
    – uint128_t
    Apr 2, 2016 at 20:43

1 Answer 1


I'm not going to give you the whole circuit, but here's something to get you started.

There are hundreds of 555 astable timer circuits on the net, here are a few. You can compute the resistor and capacitor values for your circuit using a calculator like the one here which lets you input a duty cycle.

Pick values of C, RA and RB (also labeled C, R1 and R2) such that the capacitor and one of the resistors are the same for the two duty cycles you want, and only one resistor needs to change value. Then use the circuit below to dynamically change the resistor value based on the input voltage:

enter image description here

The reference voltage of 5V for the comparator assumes a supply voltage of 12V; adjust as needed. Use a voltage reference if you need something more precise. When the input voltage is greater than 5V, R3 is selected into the circuit; otherwise R4 is used.

The analog switch will have some internal resistance, so you will need to subtract that from the calculated values to get the required values of R3 and R4.

  • \$\begingroup\$ +1 Don't forget a pullup resistor on the comparator output. \$\endgroup\$ Apr 2, 2016 at 23:14
  • \$\begingroup\$ @SpehroPefhany Thx. Since this was just a suggested circuit to get started, I was leaving out details like the power supply pins and decoupling caps for the chips, but it would be easy to forget the pullup so I added that. Thx. \$\endgroup\$
    – tcrosley
    Apr 2, 2016 at 23:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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