LED Blinking for Two Minutes - Page 1
Forum section: electronics / beginners

author: TerraByter
author_rank: Contributor
timestamp: December 27, 2020, 07:07:24 am
content: Hello everybody and Merry Christmas,i make a schematic using two 555 timers, One monostable and one astable, i want one led blinking (one second on, one second off) for two minutes.please check my schematic and told me your opinion, changes, correction etc.I have two things i need your help :How i can calculate the output power on pin 3 on each 555 Timer.I don't know how to calculate the Base Resistance on the transistor.

author: Ian.M
author_rank: Super Contributor
timestamp: December 27, 2020, 07:26:33 am
content: Just *NO*!Instead, power both 555s all the time and use the two minute timer 555 to hold the LED flasher 555 in reset before and after the two minute on time.There are other simplifications and improvements that can be made - e.g. a CMOS 555 can generate a reasonably accurate 50% duty cycle waveform with only a single resistor and capacitor for the timing network

author: Doctorandus_P
author_rank: Super Contributor
timestamp: December 27, 2020, 07:34:09 am
content: Quote from: TerraByter on December 27, 2020, 07:07:24 amThe 555 delivers a voltage on it's output, not a "power". The current flow through the output is dependent on the external circuit connected to it.The output of the 2nd 555 will be at most 12V, and assume 2V over the LED, that will be 10V over the 390R resistor, and thus: 10V / 390R = 25mA.Some conservative calculations for the NPN transistor:It will never have to conduct more than twice the LED current, so assume a 50mA maximum current.Hfe of a 2N3904 is probably much bigger then 200 (I have not checked it), and assume 200 is OK.The current through the base of the NPN should then be 50mA / 200 = 250uA.The base resistor has a voltage of around 11V over it, and 11V / 250uA = 44k Ohm.You want to make sure you have enough current through the base, so I would start with 39kOhm, which is in the E12 table. But it's not ritical. 10k is also OK.But Ian.M's use is much more common and needs less components. Just keep the second 555 in reset when it's not needed.If you want to make a 555 oscillate with just one resistor and capacitor, then connect the resistor between the output and the timing capacitor, and don't use the the discharge pin. Then the capcitor will charge and discharge though that resistor.Also:Build it on a breadboard.Have some fun with it.

author: Ian.M
author_rank: Super Contributor
timestamp: December 27, 2020, 08:30:57 am
content: Doctorandus's comments about the base drive don't go far enough. When driving a BJT as a switch, you almost always want it to saturate to minimize the Vce voltage drop and thus minimize its dissipation. Any noob can take a 2N3904 and calculate a base resistor that provides *just* enough current for an ideal 2N3904 to saturate, and a slightly more savvy noob will know that hFEdrops off at high collector currents so will use the use the min. hFEfrom the datasheet, and if multiple values are listed pick one at a collector current similar to their application, but due to component tolerances and other factors its advisable to have at least DOUBLE the mimimum calculated base current, and you will find that most datasheets that give data for the transistor in saturation do so with the condition that Ib shall be 10% of Ic to guarantee hard saturation. If you can afford the excess base current, this is a good rule of thumb to follow for your own designs, so for a 50mA load on Ic, you'd want 5mA Ib. The output of a 555 IC built of BJTs rather than MOSFETs (i.e. a clone of the original NE555) doesn't swing rail-to-rail, and under load is typically about 2V less than the supply, so your base resistor is probably only going to have about 10V across it when on. Therfore choose an E24 series 2.0K resistor or if all you've got is E12, choose 2.2K. The base current will probably be a bit under 5mA unless you use a CMOS 555 which do have rail-to-rail outputs, but the Ib=Ic/10 rule of thumb has plenty of safety margin.

author: sleemanj
author_rank: Super Contributor
timestamp: December 27, 2020, 08:55:45 am
content: Is there a reason you want to use 555's at all?You can simplify the schematic considerably, make it cheaper and easier to manufacture, less of a PITA to design, and far more flexible by replacing pretty much all of that design with a 20 cent microcontroller.One AtTiny, a decoupling cap, and if the LED is high power then a BJT or FET to do the switching.

author: TerraByter
author_rank: Contributor
timestamp: December 27, 2020, 09:29:31 am
content: Thanks for the replies.Quote from: Ian.M on December 27, 2020, 07:26:33 amPlease check the updated schematicQuote from: Ian.M on December 27, 2020, 08:30:57 amBefore found that forum i found a article and i try to make an excel for resistor base calculation, can you help me to make it work ?2N3904 Datasheethttps://www.onsemi.com/pub/Collateral/2N3904-D.pdf

author: Ian.M
author_rank: Super Contributor
timestamp: December 27, 2020, 10:22:00 am
content: Your revised schematic looks better, but the left 555 Trig pin wiring is wrong. It needs a pullup to Vcc and the switch should connect it momentarily to Gnd to start the 2 minute timer.You can simplify the circuit, getting rid of the diode in the right 555's timing network, by either reducing the discharge pin pullup to 4.7K which will get you within 1% of a 50% duty cycle, or use a CMOS 555 and connect the timing resistor to Output, leaving Discharge unused. If using CMOS 555 chips, you can reduce the Vcc decoupling to 100nF, and share it between both of them if they are right next to each other with the cap in-between. You can also parallel their Control voltage pins, sharing one decoupling cap, - I suggest 100nF. Its less advisable to share Vcc decoupling caps with bipolar 555 chips as they pull a large 'shoot-through' transient current spike whenever the output switches, but you could use a NE556 (dual 555 chip).On base current calculation:Take a good hard look at fig.1 of the datasheet you linked. Note that at -40 deg C you loose approximately 1/3 of the hFE, so if your design's ever got to work in arctic winter conditions or in a walk-in freezer, simply using hFE(min)from the datasheet without a >2:1 safety margin isn't good enough!Assuming normal room temperature (nom. 25 deg C) the datasheet says hFE(min)=100 @If=10mA, dropping to 60 @If=50mA, so interpolating gives approx. 90 @If=20mA. Therefore, set your spreadsheet's 'current gain' to 90 and see what pops out for Rb.

author: Zero999
author_rank: Super Contributor
timestamp: December 27, 2020, 11:52:17 am
content: Why not simply use a flashing LED and one 555 timer? That would simplify the design a lot!And why have a 187R and 309R resistor in series? The tolerance of a 220µF capacitor will be +/-10% at best, so you might as well use a 510R resistor.

author: Picuino
author_rank: Super Contributor
timestamp: December 27, 2020, 12:19:57 pm
content: Quote from: TerraByter on December 27, 2020, 07:07:24 amHave you thought about using a microcontroller like the Arduino UNO board?PD. Or an Arduino Nano:https://www.ebay.com/sch/i.html?_from=R40&_trksid=p2380057.m570.l1313&_nkw=arduino+nano&_sacat=0

author: Ian.M
author_rank: Super Contributor
timestamp: December 27, 2020, 02:42:09 pm
content: Quote from: Picuino on December 27, 2020, 12:19:57 pmGreat idea! Using sledge hammers to crack tiny nuts is so much fun.Heck, you might as well upgrade to cracking them with asteam hammer, by using a ESP8266 based board e.g.ESP-01, for a WiFi enabled IoT controlled two minute flashing LED!

author: Picuino
author_rank: Super Contributor
timestamp: December 27, 2020, 03:39:46 pm
content: TerraByter seems to have little experience with electronics, hence my advice on the Arduino.for Ian.M, I challenge you to explain to me the advantages of using two 555s compared to an ATTINY202 in this case

author: Picuino
author_rank: Super Contributor
timestamp: December 27, 2020, 03:44:27 pm
content: Another simple solution (not so flexible) is to use logic gates. A quadruple nand 74HC132N. You can use one Nand as an oscillator and another Nand as a 2 minute timer.https://www.allaboutcircuits.com/technical-articles/how-to-design-schmitt-trigger-oscillators/

author: Ian.M
author_rank: Super Contributor
timestamp: December 27, 2020, 04:00:55 pm
content: The main advantage of two 555s or a 556 to newb hobbyists is the absence of *ANY* programming. They barely have to be computer literate and don't have to own a PC or tablet! (O.K, its *technically* possible to run a 3rd-party Arduino IDE as an Android app, but you'd have to be pretty desperate before being forced into developing code on an average Android phone would be a reasonable choice!)I wouldn't use an ATtiny202 as the supply is 12V. Instead, I'd use a PIC12HV609, as it has a built-in 5V shunt regulator that can handle up to 50mA, so the whole project becomes the PIC, two resistors, a 100nF decoupling cap + the LED and switch.However if you are stuck in 'Arduinoland' an ATtiny with a 5.1V Zener in parallel may be a reasonable alternative.For the logic gate idea, a CD4093 quad Schmitt NAND would be a better choice due to the 12V supply requirement.

author: Zero999
author_rank: Super Contributor
timestamp: December 27, 2020, 04:08:26 pm
content: Quote from: Picuino on December 27, 2020, 03:39:46 pmThe 555 timer is available in a through hole package, which is easier for a beginner to solder and can easily be used on a breadboard, whist the ATTINY202 is surface mount. It's a lot more sensible, than an Arduino, though.If I were to go down the MCU route, I'd probably use an old 12F509, simply because I have a few lying around gathering dust. It's also available in a through hole package.

author: Picuino
author_rank: Super Contributor
timestamp: December 27, 2020, 05:15:04 pm
content: For a beginner an Arduino is better.For a experimented guy, a tiny microcontroller with only 8 pins and internal oscillator is better than 2 555s.Costing just few cents, today a microcontroller can replace many older analog and digital circuits.https://www.nutsvolts.com/magazine/article/December2016_Replacing-555-with-PICshttps://www.nutsvolts.com/magazine/article/a-digital-analog-part-2https://www.nutsvolts.com/magazine/article/a-digital-analog-part-3https://www.nutsvolts.com/magazine/article/a-digital-analog-part-4https://www.nutsvolts.com/magazine/article/a-digital-analog-part-5

author: themadhippy
author_rank: Super Contributor
timestamp: December 27, 2020, 05:55:07 pm
content: QuoteAnd the cost of the programing device,the cost of your time writing and rewriting the code,the cost of another chip as you ballsed up,compared to a couple of pence to use discrete components that actually teach you how circuits work.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: December 27, 2020, 06:32:53 pm
content: What for a silly remark is this:Quote from: Picuino on December 27, 2020, 05:15:04 pmCalling something "better" in this context is completely irrelevant.My best guess is that this thread is mainly about experimenting a bit with a 555 and some analog electronics. microcontrollers are just another kind of beast.OP is the only persoen who know why he wants to build this particular circuit.If the goal is to learn more about electronics in general, then I recommend to also build the oscillator with the classical 2 transistors, 2 capacitors and 4 resistors.I did make a bad assumption. in my first post. I doubled the collector current and assumed to have a strong enough base drive with that to get it into saturation. A closer look at the datasheet of the 2N3904 reveals that Hfe can be as low as 40 (Even 30 for 100mA collector current). I am more familiar with transistors such as BC549C (Which is the "default" transistor for starting with electronics here in europe since maybe the '70-ies) and it has a Hfe of >400.An important part of electronics is to learn how to read datasheets, and also to make mistakes, analyse why it did not work and make changes until it works. This will give you more understanding than just posting questions on a forum and building a circuit from an example schematic.

author: Gyro
author_rank: Super Contributor
timestamp: December 27, 2020, 06:56:59 pm
content: For an LED flashlight with PWM dimming SOS modes etc. where you're building 10s or 100s of thousands in China, A 'zero cost' micro and a mosfet is the way to go.For a one-off to flash a simple LED, no chance. Cost for cost, anyone who can't put together a through hole 556 (or two 555s) or equivalent and a few passives is unlikely to manage a micro (including managing to power it without tethering a USB port). It's good practice of basic design and soldering skills anyway.

author: Zero999
author_rank: Super Contributor
timestamp: December 28, 2020, 11:15:46 am
content: If you want old analogue, then you could use the classic cross-coupled monostable, with a couple of transistors. As the time delay is so long, the one driving the LED will need to be a MOSFET, as BJTs don't have a high enough current gain.The circuit works as per described in Wikipedia. D2 is added to prevent the switch from discharging C1 and the BJT's base voltage from going negative.https://en.wikipedia.org/wiki/Multivibrator#OperationThe LED can be a blinking LED, with a built-in oscillator, or a discrete astable.https://en.wikipedia.org/wiki/Multivibrator#OperationNote the different values for R2 & R2, and C1 & C4, and that R4 is a much higher value than R3. It's because the circuit is only flashing one, rather than two LEDs. R4 can be high, as it's not driving an LED, R1 drive's Q2's base and as its collector current is lower, the base current can be reduced, hence the higher resistor value. C1 is smaller than C2 to compensate for the different values of the timing resistors R1 & R2, but the duty cycle is still slightly under 50%, i.e. the LED is off for longer, than it's on.

author: TerraByter
author_rank: Contributor
timestamp: December 29, 2020, 01:51:33 am
content: New Schematic with NA556N, your opinion?

author: Ian.M
author_rank: Super Contributor
timestamp: December 29, 2020, 02:33:27 am
content: No good. Disch2 will short the supply when it activates. To fix it, remove the link to Vcc and transfer the top end of the associated resistor to Out2, leaving Disch2 n/c. You can also link the two Cont pins and save a capacitor.

author: BravoV
author_rank: Super Contributor
timestamp: December 29, 2020, 03:49:36 am
content: Just learn how to use LTSpice, maybe it takes few days (or even hours) just for basic, up to you can comfortable use 555 chip, once you're there, you can easily simulate all of this rather thantrial&error... guessing&error cycles we've seen here.Its all pointless and its going no where.And once you know this LTSpice kungfu, it will be a valuable skill and asset for life.Unless this is just one off project and you're not interested in electronics at all.

author: Ian.M
author_rank: Super Contributor
timestamp: December 29, 2020, 03:54:08 am
content: Also, when posting schematics here, make sure each component has a unique reference designator. Multiple resistors and capacitors all labelled 'R?' and 'C?' is useless as when we need to refer to a specific part of your circuit, and more than one also has the same value, its ambiguous.

author: TerraByter
author_rank: Contributor
timestamp: December 29, 2020, 06:40:41 pm
content: Quote from: Ian.M on December 29, 2020, 02:33:27 amQuote from: Ian.M on December 29, 2020, 03:54:08 am

author: Ian.M
author_rank: Super Contributor
timestamp: December 29, 2020, 06:45:29 pm
content: Thanks for fixing the designators.I said "remove the link to Vcc". That's the wire going straight up from the top end of R4, above the T junction. Once you've removed that, it should be O.K.

author: TerraByter
author_rank: Contributor
timestamp: December 29, 2020, 06:52:07 pm
content: Quote from: Ian.M on December 29, 2020, 06:45:29 pm

author: Ian.M
author_rank: Super Contributor
timestamp: December 29, 2020, 06:58:35 pm
content: Looks reasonable. I haven't checked the pin numbers against the datasheet so double-check them. Otherwise its time to breadboard it and see if it works.