1 button for 4 activations

Status
Not open for further replies.

jakelewgher13

Newbie
Joined
Apr 7, 2022
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
14
I really need help trying to build a cool multiple LED circuit. The circuit has 3 LEDS. It has only 1 button with the following activations when pushed. 1st activation (1st button push) : turns on all LEDS at max intensity, 2nd activation : reduces light intensity for all LEDS, 3rd activation : stroboscope effect and finally 4th activation : turns off the circuit.
//Ideally, after the 4th activation, the series shown before should repeat.
 

On the software side, a simple state machine will handle the push button sequence.
Don't forget to debounce the switch.
Susan
 

Code could look something like this -



The above is mBlock which uses blocks configed by user to control Arduino.
When upload to Nano board, after edits/changes, is done mBlock translates blocks into Arduino
code. Here is code above produced -



Uses Arduino Nano Board. You would add a couple of transistors to handle the LED current
external to board and the disable, simple interface.


Regards, Dana.
 
Last edited:

Hi,

The description is so vague, it could be any circuit (microcontroller, PLD, bare logic..)
Also the problem is not clear: hardware, software, or just simulation or a school project?
If PLD or microcontroller: which device exactly, what development software, what language...

Klaus
 

Some questions :

1. Drive leds as a series string or in parallel ?
2. LED current needed when on ?
3. Strobe rate ?

Here is a rough lashup for driving all LEDs together, as shown in post #4, Nano Board. You can use ATTINY85 to do this, would need a Nano or UNO board to program it. Nano board ~ $3.

Note the Nano board is directly programmed from mBlock over USB cable.



Regards, Dana.
 
Last edited:

Hi there,

"I really need help trying to build a cool multiple LED circuit. The circuit has 3 LEDS. It has only 1 button with the following activations when pushed. 1st activation (1st button push) : turns on all LEDS at max intensity, 2nd activation : reduces light intensity for all LEDS, 3rd activation : stroboscope effect and finally 4th activation : turns off the circuit.
//Ideally, after the 4th activation, the series shown before should repeat.
"

Questions need to be:

Power supply? ... A 1.5V battery or a 5V regulated supply or a nuclear power station or what?
Are you a person interested in a (old-fashioned and 'large' PCB real estate) simple analog circuit or in a (small-sized PCB) microcontroller circuit for this?
Are you a beginner or an expert?

My solution is not 'cool' but it is a very typical (and simple) way of doing the one pushbutton = several outputs sequentially. "4th activation : turns off the circuit" is presumably meant to mean 'standby mode'. If you look for counter circuits that use e.g. CD4017 or HC4017 there should be lots of examples/variants of this theme. It's been around forever. Excuse me if you already know all of this.

I put five LEDs as I didn't remember you only want three, same difference. Parallelling LEDs is not a good thing, but LEDs in series is not a good thing either unless you parallel a diode around each one, but in series = much higher supply voltage needed.
I only used logic-level MOSFETs instead of NPN BJTs to save on supply current. I would use the SE555/SA555/LMC555 but the TLC555 will do (it is the least ugly/pins in unhelpful places 555 model in the simulation tool, no other reason for using it).
I assumed standard LEDs with a maximum current of 30mA, so also note I did the LED current intensity reversed to your wishes (1st press of button = 10ma, 2nd press of button = 15mA, then 3rd press of button = 20mA for the flasher) so the resistors between each MOSFET and the supply voltage would need to be swapped around, and made smaller if you want to get the full 30mA out of the LEDs (not recommended, but that's your business).

Hope you have been able to make your LED flasher.

 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…