Electronics Project - Making a control panel that has push button and toggle switches with led lights on it

Reloadron

Joined Jan 15, 2015
7,501
Here come the uC harpies… :)
No, not at all. Most will just point out there are several ways to accomplish what the thread starter wants to do. Go with discrete components or just use a uC. The idea being to provide options. More than one way to get from point A to point B. The thread starter needs to find his own comfort zone as to making the box. Nobody is "harping" on using a uC but pointing out it's feasible as is going with discrete components.

Ron
 

sghioto

Joined Dec 31, 2017
5,379
or just add a small inexpensive sound chip, the kind used in greeting cards
Interesting you mentioned that. I recently wired up a sound module so I recorded this off Youtube for a demo. This module will record up to 120 seconds and is easily micro controlled.
1644890515205.png
 
Last edited:

sparky 1

Joined Nov 3, 2018
756
The quad bilateral switch called CD4066 along with an arduino is an outstanding school demonstration.
Because we are so used to electronic devices demonstrating switching some may feel it lacks pizazz, so only a few might really appreciate the effort.
The project might inspire something. If you use 3 CD4066 chips the project will be more robust, the arduino can add timing, sequence and control to 12 switches altogether. Without an arduino the CD4017 and CD4066 makes a good an analog sequencer. The traditional panel board.
 
Last edited:

AnalogKid

Joined Aug 1, 2013
10,986
Of the discrete digital approaches discussed, I like the shift register the best. One CD4093 gate as the clock oscillator, one 8-bit and one 4-bit SIPO shift register, and the other three 4093 gates to manage the load and recycle.

But I like the LM391x idea better. I've never tried this, but it seems to me that a simple R-C ramp driving the LM3915 logarithmic bar graph device will produce linear bar movement, Looks good on paper. One LM3915, one LM393 dual comparator to manage the ramp and reset the ramp capacitor. Overall, around 40 soldered pins.

Rethinking that, it might work only as a ramp-up, not as a ramp-down as requested.

If you can't find a 3915, the same approach will work with a 3914 if you replace the R in the R-C ramp generator with a 1-transistor current source. this will work as either a ramp up or a ramp down.

ak
 
Last edited:

eetech00

Joined Jun 8, 2013
3,859
Of the discrete digital approaches discussed, I like the shift register the best. One CD4093 gate as the clock oscillator, one 8-bit and one 4-bit SIPO shift register, and the other three 4093 gates to manage the load and recycle.

But I like the LM391x idea better. I've never tried this, but it seems to me that a simple R-C ramp driving the LM3915 logarithmic bar graph device will produce linear bar movement, Looks good on paper. One LM3915, one LM393 dual comparator to manage the ramp and reset the ramp capacitor. Overall, around 50 soldered pins.

If you can't find a 3915, the same approach will work with a 3914 if you replace the R in the R-C ramp generator with a 1-transistor current source.

ak
Don't know if you saw it but I have something similar in post #10..
 

AnalogKid

Joined Aug 1, 2013
10,986
Don't know if you saw it but I have something similar in post #10..
I know. When I said I liked the 391x approach, I was referring to posts 9 and 10.

In #10, I don't see a feedback path to cause the circuit to cycle automatically for a continuously changing display.. Am I missing something?

ak
 

eetech00

Joined Jun 8, 2013
3,859
I know. When I said I liked the 391x approach, I was referring to posts 9 and 10.

In #10, I don't see a feedback path to cause the circuit to cycle automatically for a continuously changing display.. Am I missing something?

ak
It isn't supposed to cycle automatically and continuously (not what the TS wants). You have to press the button to start the ramp. The TS will use a toggle switch in place of the button.
 

MrSalts

Joined Apr 2, 2020
2,767
E6866738-3484-413B-8B81-02F9443FE33A.gif
17 lines of code. It could be optimized down to about 12 or 15.
Top button is reset, bottom button is start.
Code:
void setup(){
  byte outputs[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13};
  for (byte i=0; i<sizeof(outputs); i++){
    pinMode(outputs[i], OUTPUT);
    digitalWrite(outputs[i], HIGH);
  }
  pinMode(10, INPUT); //start
  pinMode(12, INPUT); //reset
}
void loop(){
  while (digitalRead(10) == 1){
    delay(1);
  }
  for (int i=9; i>-1; i--){
    digitalWrite(i, LOW);
    delay(1000);
  }
  while (digitalRead(12) == 1){
    delay(1);
  }
  for (int i=0; i<10; i++){
    digitalWrite(i, HIGH);
  }
}
 
Last edited:

Ya’akov

Joined Jan 27, 2019
9,070
Given the raging discrete vs. MCU controversy I hesitate to comment, but perhaps I can outrage both camps by suggesting WS2812 addressable LEDs. They have the advantage of requiring fewer pins, offering a very wide color palette, and enabling effects.

With this high density strip, there is enough for the countdown indicator and other displays on the console.

To the TS, these can be cut and used in groups or individually. Because they are not panel mount, I would probably used an acrylic front panel, painted on the back to reveal the LEDs however you would like them. The possibilities are, if not endless, certainly prodigious.

1644924049415.png
[EDIT: Added controversy. Umm… what I mean is, I added the word controversy to my first sentence,]
 
Last edited:

MisterBill2

Joined Jan 23, 2018
18,176
The stack of LEDs, switching off one by one, iis to simulate a count-down before the take-off. Not sure what age group but I had been thinking to present a numerical count down as an interesting alternative.
 

AnalogKid

Joined Aug 1, 2013
10,986
Given the raging discrete vs. MCU controversy I hesitate to comment, but perhaps I can outrage both camps by suggesting WS2812 addressable LEDs. They have the advantage of requiring fewer pins, offering a very wide color palette, and enabling effects.
Oh, great - ratiional thought. Who the **** let you in here? Someone call the mods!
 

AnalogKid

Joined Aug 1, 2013
10,986
It isn't supposed to cycle automatically and continuously (not what the TS wants). You have to press the button to start the ramp. The TS will use a toggle switch in place of the button.
You are correct. I misinterpreted the description in post #4 as a continuous loop.

But this makes things even easier. The R-C ramp generator doesn't need a reset circuit, just a diode or resistor across the capacitor.

ak
 

ElectricSpidey

Joined Dec 2, 2017
2,758
I'm curious...

In post 33...

The choice to use nested "for" loops in "while" loops to poll for the button states, instead of "if" statements for example?

Is that a critical decision or just a preference?
 
Last edited:
Top