Push button flashing light circuit

eetech00

Joined Jun 8, 2013
4,709
Pretty much a simillar circuit right? although it flashes differently?
Yes. Except I'm using a chip series HC that can provide much more output drive than the CD4000 series.
However, its supply voltage is nominally 5v (max 7v) so I used a 5.1 zener to reduce the supply voltage.
But since we're not building rocket ships :D, we could probably get away with a low ohms divider (two 330 ohm resistors=6v) and eliminate the zener.

I fixed the output so the LED is normally on.

1699030196968.png
 

AnalogKid

Joined Aug 1, 2013
12,164
I'm just a hobby guy that uses cheap cheap LED's from aliexpress. Not sure if they even put out a datasheet.
OK, how many do you want to flash at the same time?

For example, a standard 5mm red LED has a forward voltage (Vf) of around 1.8 V. Five of these in series would need at least 9 V across the string for them to light. With a 12 V source, a current limiting resistor of 150 ohms will limit the current through the string to 20 mA, a very common value for this type of part.

If things look a little dim, your LED's Vf might be a bit higher. To determine the correct resistor value, measure the voltage across the 150 ohm part. With Ohm's Law we can calculate the optimum resistor value for your particular LEDs.

ak
 

Thread Starter

christiannielsen

Joined Jun 30, 2019
389
I have been soldering a PCB with this circuit (from #28) and I have run into trouble. I thought I was finish but when I power it up the LED is not lit. When I push the switch the LED is flashing as it is suppose to but the LED ends up OFF.

If have been checking the soldering for continuity for 1 hour now and I just cant find the problem.

Is it possible for you to point out where to troubleshoot?
 
Last edited:

Thread Starter

christiannielsen

Joined Jun 30, 2019
389
How can I connect a relay to the push button without having it affecting the flashing?

I need the relay in order to control an external alarm signal from a CCTV. The grounds cannot be connected.
 

AnalogKid

Joined Aug 1, 2013
12,164
Just one LED. I have been soldering PCB and I put in a 5K trimpot instead of a fixed value.
Which circuit? For example, if you are referring to the circuit in post #28, say "in schematic #28 ..." or "in circuit #28 ..."

AND, which resistor? Always refer to components by their reference designators. You said "instead of a fixed value." but this doesn't tell me which resistor you changed.

ak
 
Last edited:

Thread Starter

christiannielsen

Joined Jun 30, 2019
389
Ooops I understand. Hard to understand what I am talking about.

I solderend a PCB from #28 schematic. And I have switched R3 with a 5K trimpot. But I actually still can't dim down the white LED. The white LED lights up at 2.6 volts and only draws 1.1 mA. I measured it with my multimeter.
 

AnalogKid

Joined Aug 1, 2013
12,164
It measures 73.5 mV
That's a good number. That means that the LED current is not too great for the IC to handle.

So, what next? If the LED is too bright, increase the value of R3. For example, you can add a fixed resistor in series with the trimpot. If you want it brighter, reduce R3. However, the total resistance for a pot plus a resistor should always be greater than 470 ohms. This is the value for approx. 20 mA, a very common safe value for LED current. For example, a combination of a 470 ohm fixed resistor plus a 5K to 10K trimpot will give you a brightness adjustment plus protection against overcurrent.

ak
 

Thread Starter

christiannielsen

Joined Jun 30, 2019
389
Thats good to hear. I'll put in a 470 ohm fixed and a 10K trimpot as you suggest. Thank you.

So my next challenge is to put in a relay that is switched on for a short moment when SW1 is pushed without screwing up the nice looking LED flashing.
I thought I'd connect SW1 to the relay but it seems that the relay draws all the capacitance U1 uses for the timing? I am not sure if I am right on this. I can see that the LED stops flashing as soon as I lift my finger from SW1 when the relay is also connected to SW1.
 

AnalogKid

Joined Aug 1, 2013
12,164
Yes, if you connect a relay coil between the bottom of SW1 and GND, the relay coil's resistance will discharge C1 very quickly.

The answer is to add a small diode between SW1 pin 1 and the top of C1. Now, when the button is released, the relay coil pulls the anode of the diode to GND. This reverse-biases the diode so it does not conduct, effectively disconnecting the relay coil from C1.

Do you have data on the relay? Website / datasheet / coil voltage / current / resistance / wattage?

If not, what is the circuit you want the relay contacts to control? Operating voltage, an estimate of the current through the contacts, etc?

ak
 

Thread Starter

christiannielsen

Joined Jun 30, 2019
389
Thanks. I'll try to add a diode tomorrow.

The relay is this one from ali:
https://www.aliexpress.com/item/328....order_list.order_list_main.71.b6931802piLGgn

The relay is going to control a CCTV camera alarm input.
This picture shows the connector from the camera. When IN and G is shorted the alarm is triggered in the camera and I will receive a push message on my phone. (1A and 1B is alarm output and is not being used)
alarm wire.jpeg
 

AnalogKid

Joined Aug 1, 2013
12,164
Your link is to a 5 V relay, which should not be used in a 12 V circuit. Also, while its contacts are OK, they are way overrated for this application. Any small SPST or SPDT relay will work, such as a small reed relay.

https://www.aliexpress.us/item/3256...908492!sea!US!0!AB&curPageLogUid=CuYHx7gZM8ba

Here is an updated schematic with a small reed relay and the disconnect diode D2. The relay will close when the button is pressed, and remain closed as long as the button is held. When the button is released, the relay contacts will open immediately, and the LED will continue to flash for the timeout period.

That is a generic relay symbol; the pin numbers are not for any specific part.

Note that including D2 in the C1 charging path will reduce the peak voltage across the cap. This will shorten a little bit the time the LED is flashing after the button is released.

Where are you located?

ak


LED-Blinker-Doorbell-4-c.gif
 
Last edited:

Thread Starter

christiannielsen

Joined Jun 30, 2019
389
I do have a 12v relay. Dont think it is possible to link to a specific variant of the relay.

Anyway, thank you for introducing me to reed relay. I will definitely order some of them.

I am located in Denmark which means that orders from aliexpress is not so express at all. I'll have to wait 3-6 weeks for orders to arrive in the mail. But we do have danish suppliers not far from where I live. I can pick up a reed relay here

Thank you for updated schematic! I really appreciate your help. Plus I am learning something new.
 
Top