1
\$\begingroup\$

I'm trying to design a circuit that uses a momentary switch/push button to turn on an LED, then it turns off after 1 sec if the switch is held in the ON position longer than that. Below is a diagram of what I've attempted but it doesn't work and I'm not sure what I need to do to fix it.

D1 = an indicator LED just to let me know the switch works. This should be on when switch closed, off when switch open. This is working as expected right now.

D2 = the LED I want to turn on immediately when switch is closed, but I want it to turn off after 1 second if the switch is kept closed. So if switch is closed for 3 seconds, this LED should only be on for the first 1 second.

RLY = I'm using AZ943-1CH-12DE. If I'm reading the datasheet correctly, it seems this is a 12VDC relay, but the coil activates around 9VDC?

Power source = 12VDC laptop-style power brick, which actually supplies closer to 12.5VDC, rated @ 8A.

I have D2 connected to the RLY's "normally closed" output, so when I turn on the switch, D2 also turns on, but it never turns off like I want it to.

I thought the RC time constant would be 1 sec since C1*R2 = .001 * 1000 = 1, but using the setup below, the relay never engages. I used a multimeter to measure voltage drops across R2, RLY, and C1 and the C1/RLY only seem to use 0.8V or so which explains partially why the RLY isn't turning on. R2 drops the voltage by 11.5V.

Is my problem that the R2 resistance is dropping the voltage too much before it even hits the capacitor and relay?

Appreciate any advice!

schematic

simulate this circuit – Schematic created using CircuitLab


Thank you everyone for the informative replies! After reading, I decided to try this using a 555 IC instead of just the R-C circuit to trigger the relay. The below seems to work, where closing the switch turns on the relay (closing the relay switch and powering the load -- a motor in this diagram), then it turns off after a short time. I can of course change the time before shutdown by increasing R1 to create a longer delay before it shuts down.

This seems to work practically, but if there is any feedback on this I'm of course open to hearing. The one question I had is regarding the flyback diode that @Piotr suggested -- is the diode D1 in the correct position and orientation for this? What does this actually do? Does it protect my 555 in this case from getting increased voltage on the output pin when the relay is shut off?

@Kuba, I still want to use the relay here in addition to the 555 because the DC motor pulls a higher current from the stop-to-start and I wasn't sure the 555 could handle something that might be a very brief 4-6A draw -- so I figured using the 555 to trigger the relay might be the safer way to go?

schematic

simulate this circuit

\$\endgroup\$
18
  • \$\begingroup\$ Abstracting from the topic, don't forget to add a flyback diode at the relay, I don't see it on the schematic. On the board it should be as close to the relay as possible. The relay has too little current to be switched on via resistor R2, which limits it (12 V / 10 kohm = 1.2 mA). \$\endgroup\$
    – Piotr
    Apr 30, 2022 at 20:16
  • \$\begingroup\$ So, if the switch is released in under a second, the LED is supposed to stay on? \$\endgroup\$
    – user173271
    Apr 30, 2022 at 20:24
  • \$\begingroup\$ If RLY1 can be driven with a voltage then why is R2 and C1 needed? as @Piotr sad R2 limit the current, and you need the current to generate the magnetic filed which will move the switch of the relay. Without R2 & C1 the relay will establish a connection for R4 and D2, and D2 will shine. \$\endgroup\$ Apr 30, 2022 at 20:32
  • 1
    \$\begingroup\$ @calikw - Hi, You posted an "answer" but it still asked for help. As you are the OP, you would only write an answer if you solved the problem yourself & the topic can be closed with no more help needed. If you ask for more advice in an "answer" then it becomes a question again! For the Stack Exchange "model" to work, we must not ask other people for help in an answer - it is supposed to be a clear solution. Therefore I have moved your post to become an update in the question. When there's a final solution, you can post it as an answer & "áccept" the best answer to close the topic. Thanks \$\endgroup\$
    – SamGibson
    May 1, 2022 at 8:26
  • 1
    \$\begingroup\$ @SamGibson Thank you for the help. Wasn't sure how to post my additional question & diagram. Appreciate you lending a hand. \$\endgroup\$
    – calikw
    May 1, 2022 at 23:29

6 Answers 6

2
\$\begingroup\$

One problem is that you are taking the power for the LED from after the 10K resistor R2, so it would never get enough current.

That aside, as the rest of the circuit is in question as well, you could do it with a sort of comparator circuit. Here is an idea for one using a zener diode as a reference. When the voltage on the capacitor reaches the zener voltage plus Vbe Q3 will turn on, pulling the base of Q1 low turning it on, which pulls the base of Q2 high, turning it and the LED off.

I've used a current source to charge the capacitor instead of a resistor so that it can be a much smaller value. You could make R6 variable to adjust the time.

enter image description hereenter image description here

\$\endgroup\$
5
  • \$\begingroup\$ This answer although it provides a solution to the issue it is so much more complicated than what the OP asks so -1. \$\endgroup\$
    – Miss Mulan
    May 1, 2022 at 15:13
  • 1
    \$\begingroup\$ @MissMulan It's not complicated, it's actually a very simple circuit. It's 5 transistors, a zener and some resistors, altogether it would cost less than a relay and using surface mount parts would take up little room. If you use a large capacitor instead of the current source it's only 3 transistors. The OP didn't say how complicated he wanted it anyway. It does what they originally asked for (although this has since changed). \$\endgroup\$
    – GodJihyo
    May 1, 2022 at 15:46
  • 1
    \$\begingroup\$ @GodJihyo I agree. This circuit is about 5x simpler than the internal circuit of a 555, if you look at the transistor and resistor counts. It is also a rather classic and dependable solution. \$\endgroup\$ May 1, 2022 at 16:15
  • \$\begingroup\$ If you want the crisp response and constant brightness of a comparator, the same thing can be done with 3 transistors and no diode, or 2 transistors and one diode. \$\endgroup\$
    – AnalogKid
    May 1, 2022 at 17:08
  • \$\begingroup\$ @AnalogKid Do you have any links? I'd be interested in seeing that. Would this be using a differential amplifier? \$\endgroup\$
    – GodJihyo
    May 1, 2022 at 17:19
2
\$\begingroup\$

As requested, this is a first pass at two alternate solutions. Neither have been simulated or built, and all component values are approximate, pending more information from the TS.

Both circuits transition when the timing capacitor voltage reaches approx. Vcc/2, for a period of approx. 0.7xRxC. For more crisp snapping between the two output states, both circuits can be expanded to include some hysteresis.

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ this works great in everycirctuit.com simulation, how do I convert it to sharp delayed on? Did search SO... I can easily add p-ch mosfet, but fewer components must be better \$\endgroup\$
    – Tjunkie
    Aug 20, 2022 at 16:51
1
\$\begingroup\$

Probably not good design practice to switch the 555's supply voltage, it'll probably give the poor little thing a headache!

You could give the following circuit a whirl.

555 circuit

At power-up and at rest the reset pin (pin 4) is pulled low by R3 keeping the output (pin 3) low.

When the switch is pressed, the reset pin is pulled high and the trigger pin (pin 2) follows it after a short delay caused by R2 & C3. So the trigger pin is held low for a short time after the reset pin is disabled. This triggers the timer, the output goes high and C4 starts to charge through R1. After about 1 second, pins 6 & 7 reach a voltage equal to about 8 V causing the output to go low even though the switch is still pressed.

It is necessary to take the Trigger pin high after triggering. If it were to be below 4 V at the end of the 1 second output pulse (and the switch was still pressed holding the reset pin high) then the timer's output would remain high.

If the switch were to be released before the end of the 1 second timed period then the reset pin is pulled low forcing the timer's output to go immediately low. The Trigger pin is also taken low at this time but the reset pin (pin 4) overrides the Trigger pin (pin 2).

There will be some switch bounce when the switch is pressed which will probably last for 10 or 20 milliseconds. This may cause some rapid output pulses when the switch is pressed but is probably unimportant on the time scale of starting a motor.

You have several options when it comes to designing the output motor drive stage:

  1. Relay. Probably best to drive the relay coil via a transistor such as a BC337 rather than direct from the 7555's output. The 7555 may struggle to provide enough current to drive the relay coil directly. The drive transistor would require an appropriately sized base resistor.

  2. Bipolar power transistor or Darlington, again with an appropriately sized base resistor.

  3. FET with a small gate resistor to limit the gate capacitance charging current when the 7555's output switches.

\$\endgroup\$
1
  • \$\begingroup\$ This answer although it provides a solution to the issue it is so much more complicated than what the OP asks so -1. \$\endgroup\$
    – Miss Mulan
    May 1, 2022 at 15:14
0
\$\begingroup\$

The following changes are to be carried out to make the circuit workable:

  1. The LED D2 is to be sourced directly from the 12 V supply (not through R2).

  2. The value of R2 is to be much lower than 400 Ω.

Here's the altered schematic.

enter image description here

Trials may be required to optimize the values of R2 and C1.

\$\endgroup\$
-1
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

This won't work because the coil resistance is 400 and that attenuates any chance of making a one (1) second timer as the 10k limits the coil current to only 1.2 milliamps.

The solution is to use any high impedance active device to make your momentary latch and timer one shot to control the coil.

Logic Latch options: (2 of 4) NAND gates, or (2 of 4) NOR gates or (1 of 2) D flip flops

Timer 1 shot options: 1 Schmitt trigger (CMOS) or 2 Inverters with 2R,1C or 2 NAND or NOR gates.

  • Since you are using 12V the 4000 series CMOS is suitable for this unless you preferred some other low voltage logic like 74HCxx (5V)

You would start by making a timing diagram or logic map, so I'll wait to see what you know but you need a Latch and a timer to set/reset the relay. The LEDS are easy.

\$\endgroup\$
2
  • \$\begingroup\$ This answer although it provides a solution to the issue it is so much more complicated than what the OP asks so -1. \$\endgroup\$
    – Miss Mulan
    May 1, 2022 at 15:13
  • 1
    \$\begingroup\$ @MissMulan The Answer is simply to observe the modified schematic , but don't you believe in the skills needed to learn are more important than the obvious without spoonfeeding an answer. Sorry you thought it was too complex. I just gave Socratic clues. capiche? \$\endgroup\$ May 1, 2022 at 17:19
-4
\$\begingroup\$

You are describing a simple RC circuit as a control circuitry:

schematic

simulate this circuit – Schematic created using CircuitLab

This should work.The potentiometer allows you to select the time period of on/off of the led

\$\endgroup\$
5
  • 2
    \$\begingroup\$ Well it's certainly not 'complicated', but it also doesn't work very well. It would need a very large capacitor to get 1 second, the pot wouldn't vary the time, it would vary the LED current, and the LED wouldn't be constant brightness, it would come on bright and then quickly fade out. The OP has also updated to say that they are not just turning on an LED but a relay, so this wouldn't work at all in that scenario. Doesn't provide a solution, -1. \$\endgroup\$
    – GodJihyo
    May 1, 2022 at 16:17
  • \$\begingroup\$ The pot changes the RC costant [] [Edited by a moderator.] \$\endgroup\$
    – Miss Mulan
    May 1, 2022 at 16:18
  • 1
    \$\begingroup\$ It would barely change it. Take a good look at the circuit, what happens when the pot is at maximum, what happens when it is halfway? \$\endgroup\$
    – GodJihyo
    May 1, 2022 at 16:30
  • \$\begingroup\$ Yes I made a mistake I will edit. \$\endgroup\$
    – Miss Mulan
    May 1, 2022 at 16:37
  • \$\begingroup\$ @GodJihyo there you go! \$\endgroup\$
    – Miss Mulan
    May 1, 2022 at 16:39

Your Answer

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

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