1
\$\begingroup\$

I am trying to construct a circuit to control an LED in a bike light kind of circuit. This circuit must be designed so that a button press can change the current setting of the light.

So for instance first click turns on the light on slow blinking, one more click goes to fast blinking, a third click to continuous light and a fourth to turn it back off.

I have been trying to Google my way to an answer, but can't seem to find any reasonable circuitry or inspiration to design such circuit.

Hope someone can be of help pushing me in the right direction.

Thanks in advance

\$\endgroup\$
  • \$\begingroup\$ You don't appear to have enough experience for this type of design which requires a microcontroller, and the question should be closed. \$\endgroup\$ – Leon Heller Oct 22 '14 at 11:42
  • \$\begingroup\$ @LeonHeller I've never heard of that as a reason to close before. He seems to have quite a bit of programming experience. Have you seen his other question? If he's willing to tackle an Arduino, this isn't much more complicated. \$\endgroup\$ – tcrosley Oct 22 '14 at 13:27
  • \$\begingroup\$ @LeonHeller I have plenty of programming experience, and I have experience with most types of embedded systems - I was simply wondering if this would be possible using only analog/digital ICs without any kind of micro processor behind. The reason for not going directly at Arduino is, that this is a project for interns at the university, and we would like to do some simple electronics circuitry and soldering with them. \$\endgroup\$ – Simon Oct 22 '14 at 16:49
  • \$\begingroup\$ @Leon: Why does "this type of design" require a microcontroller? \$\endgroup\$ – EM Fields Oct 23 '14 at 6:51
  • \$\begingroup\$ It's by far the easiest way to make it. \$\endgroup\$ – Leon Heller Oct 23 '14 at 8:12
2
\$\begingroup\$

Here's a circuit which should accomplish what you want. It uses a dual 555, namely a 556 with two different rates. A CD4022 is used to count the button pushes. A pair of NAND gates debounces of the push button input, so the counter doesn't advance erratically.

The first two outputs select one of the two rates using AND gates. The third output is steady on. The fourth output resets the counter. The outputs for states 1, 2, and 3 are diode-OR'ed together, to operate an N-channel MOSFET Q1 which turns on the LED.

enter image description here

Right click and select View Image for a large picture.

Since this is a battery-operated circuit, battery life must be taken into account. While the LED is off, the 4022 counter, AND gates, and NAND gates draw only a few µA of current, so they have little effect on battery life. However the 556 is actively generating two different pulse trains and drawing up to 500 µA (assuming a low-power 556; standard ones can draw several mA). So there is a high-side P-channel MOSFET Q2 that supplies power to the 556 only if the counter is on count 1 (slow flash) or 2 (fast flash). If either input to the NOR gate is 1, the output is 0, turning on the FET.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ This is exactly what I was looking for - makes perfect sense, and seems simple enough for the project we are working with. Thanks \$\endgroup\$ – Simon Oct 22 '14 at 18:42
3
\$\begingroup\$

The easiest way to do this in small quantity is to use a microcontroller, such as a Microchip PIC10F or 12F series. There will be only a few parts in the circuit and a page or two of code. The micro should be under a dollar in single quantities.

The best way to do it in production quantity is a COB CMOS die designed for just that function, a microcontroller would be too expensive.

It could also be done in small quantities with a counter-decoder chip (eg. 4017) and debounce circuit and a CMOS 555, but it would be substantially more complex (perhaps ~20 parts including 3 chips) than with the micro- so only for those suffering from extreme code aversion.

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

Shown below is a circuit that simulates nicely, and the LTspice files needed to run it are here

If there's a need for a circuit description, let me know and I'll edit my answer. Not right now though, my brain feels fried...

enter image description here

| improve this answer | |
\$\endgroup\$

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.