Non- Programming Led hold on with button press and turn off with secondary button

Thread Starter

ggillcrist

Joined Jul 25, 2019
2
HI,

Im a mechanical engineering student working on a project and am having difficulty nailing down the electronics portion. Any help will be greatly appreciated.

Need:
When first button is presses, LED turns on and stays on. LED only turns off with push of secondary button.

We have created a solution using arduino and a short code but are looking into how to do this without coding.
Current (nonworking) attempt:
upload_2019-7-25_9-57-51.png
input is first button
master input is secondary button that turns the circuit back off
output is the led

any tips or ideas how to get this done?
 

Alec_t

Joined Sep 17, 2013
14,280
Welcome to AAC!
A D-type latch with preset and clear inputs, such as the CD4013, should do the logic bit; but can't source or sink much current. If the load is just a high-efficiency low-current LED that won't be a problem. But if the load draws a lot of current a buffer stage (e.g. a logic-level FET) would be needed at the latch output.
 

crutschow

Joined Mar 14, 2008
34,281
As Alec noted, you don't need those gates.
Just use the (pre)set and (clear)reset inputs of the flip-flop for the two push-button inputs.
 

WBahn

Joined Mar 31, 2012
29,976
HI,

Im a mechanical engineering student working on a project and am having difficulty nailing down the electronics portion. Any help will be greatly appreciated.

Need:
When first button is presses, LED turns on and stays on. LED only turns off with push of secondary button.

We have created a solution using arduino and a short code but are looking into how to do this without coding.
Current (nonworking) attempt:
View attachment 182429
input is first button
master input is secondary button that turns the circuit back off
output is the led

any tips or ideas how to get this done?
Your schematic indicates that you are holding the clock to the flip flop in a static HI condition. Unless the flip flop is level-triggered (which few are), that won't work.

What are the actual parts you are trying to use?

What should happen if both buttons are pressed at the same time?

Depending on that answer, a simple NAND or NOR based RS latch should work for you.
 

dl324

Joined Mar 30, 2015
16,841
any tips or ideas how to get this done?
Post the complete text of the problem so we can see what the instructor had in mind.


Was this post always in Homework Help? Doesn't seem like giving solutions is going to help a student in the long run.
 

Thread Starter

ggillcrist

Joined Jul 25, 2019
2
Ok so we have changed to just the d flip flop, right know we are still using the arduino to run the clock of the flip flop. If we are still looking to eliminate the arduino, i know there is a way we can set up the clock without it just not sure how. Here is the current diagram which works with one button/led and a master button. We havent set up a second succedful led/button pair yet but any advice would be great. Thanksupload_2019-8-1_9-7-26.png
 

dl324

Joined Mar 30, 2015
16,841
we have changed to just the d flip flop
What is this the part number for this D FF?

The circuit doesn't make sense. You have an LED connected directly to a (presumably) output with a resistor in parallel that serves no useful purpose.

Pin 10 is the typical place for ground. If you close both switches at the same time, you'll have a short on the power supply.
 

crutschow

Joined Mar 14, 2008
34,281
Never leave an input pin floating as you do with pin 3 in your schematic.
The logic level of a floating pin is indeterminate.

Connect the set/reset pins separately to its push-buttons, with pull-up or pull-down resistors to establish a proper logic level.
 
Last edited:
Top