3 LEDS, 1 button for 4 activations

AnalogKid

Joined Aug 1, 2013
10,987
A good way to compare the complexity and assembly effort of competing designs in a one-off situation is to count the number of soldered pins. All of the circuits have switch debouncing, a one-transistor LED driver, a CD4017, and two decoupling capacitors. If you factor out the common parts, here are the numbers.

#9 is the winner with 25 soldered pins but has a possible power consumption issue. The possible issue can be reduced greatly by changing to a CMOS 555.

#6 solves the power issue, but has 38 soldered pins and needs three additional resistors.

#18 has 29 pins.

#19 has 26 pins.

Changing to a CD4015 shift register reduces the pin count even more.

ak
 
Last edited:

MrSalts

Joined Apr 2, 2020
2,767
A good way to compare the complexity and assembly effort of competing designs in a one-off situation is to count the number of soldered pins.
if that is your clearly defined criteria, a 6 or 8-pin microcontroller with nano-power sleep will be the simplest and best.
That being said, I assume you'll change your grading scale.
 

crutschow

Joined Mar 14, 2008
34,284
AK, The only suggestion I would make for your post #19 circuit is to add a small resistor in series with the PB to avoid any possibility that the surge current through the capacitor will pit/weld the contacts (of course that will add another soldered pin ;) ).
 

AnalogKid

Joined Aug 1, 2013
10,987
Same as the last 42 threads you poked me about this. At 5 V, the total energy in a 0.1 uF capacitor is 2.6 microwatts. In my experience (electronics is not a faith-based discipline), that's not very much.

ak
 

AnalogKid

Joined Aug 1, 2013
10,987
Still trying to get rid of that last diode, I took a look at using a real shift register instead of a decoded one. It makes the circuit even more simple, but there still has to be a DC-disconnect for the larger cap. Grrr . . .

The CD4015 does not have a Schmitt trigger clock input as the 4017 does, but the last 4093 gate covers that with no extra parts.

In the variable part ofthe circuit, only four 2-lead parts. I think that's the limit.

ak
LED-Flashlight-4-c.gif
 

AnalogKid

Joined Aug 1, 2013
10,987
it charges to the max value and then stops.
Nothing stops; it is an oscillator.

The chip and the diode switch the anode of the capacitor between (Vcc-0.6) V and open circuit. In your circuit, the FET switches the capacitor cathode between GND and open circuit. In terms of the operation of the oscillator, there is no difference. In both cases, the other end ofthe cap is not a fixed potential, so the cap does not just charge up and sit. The oscillator will run at the same frequency no matter what DC potential is on the other end of the cap. The diode is acting as a switch, just like your FET, or two of the transistors (reference designators - !!) in #6.

ak
 
Last edited:

AnalogKid

Joined Aug 1, 2013
10,987
Do you really think this makes a difference?

1. What is the voltage waveform on pin 1 with D1?
2. What is the voltage waveform on pin 1 without D1?

With or without D1, pin 1 sees the came capacitance. As long as (Vcc - Vf) is greater than the positive peak voltage at pin 1, U1 doesn't care.

ak

!Osc-2-c.gif
 
Last edited:

AnalogKid

Joined Aug 1, 2013
10,987
Note that in the #28 circuit, there is no explicit reason for C2 to be connected to Vcc. I'm pulling C3 high to eliminate the need for an inverting switch, swapping a FET for a diode, but this has no impact on the reference potential for the other timing cap. Connecting C2 to Vcc eliminated crossed nets in the drawing. Also, I thought that having both caps referenced to (almost) the same voltage would make the circuit easier to understand. Again, I was incorrect.

ak
 

crutschow

Joined Mar 14, 2008
34,284
The diode is acting as a switch, just like your FET,
No.
The diode is a one-way switch.
The FET conducts in both directions, so the AC can flow through the capacitor.
Since when can AC current go through a diode?
With or without D1, pin 1 sees the came capacitance. As long as (Vcc - Vf) is greater than the positive peak voltage at pin 1, U1 doesn't care.
No you can't see the capacitance and yes, U1 does care.
I'm really surprised you think otherwise.
The diode only allows the capacitor to charge in one direction so it charges to some DC voltage and then stops acting as an AC capacitor.
To act as an AC capacitor, its current needs to freely flow in both directions.
The diode prevents that.
 

MrSalts

Joined Apr 2, 2020
2,767
#34 has an image, but no text. Was there supposed to be a question or comment?

ak
I thought it was obvious when I highlighted that a cap on the distal end of a diode makes a peak detector and no way to discharge the peak in your circuit. No path to ground after the cathode of the diode. Note the highlighted portion of my photo.
 
Top