Position: Index > Unclassified >

Build The Decision Maker(BC548 )

2017-08-03 08:34  
Declaration:We aim to transmit more information by carrying articles . We will delete it soon, if we are involved in the problems of article content ,copyright or other problems.

This article briefly describes the Build The Decision Maker (BC548). This principle is easy to understand, but also very practical. Depth understanding of circuit elements, you can better grasp this principle. In this circuit, you can learn about and purchase these components: BC548.

Can’t make a decision? Worried that if you make the wrong choice you’ll get the blame? Well, here’s your saviour: press the button and the decision is made for you. Instantly. And if that decision turns out to be the wrong one, you can always say to your mum / dad / teacher / partner / boss / etc, “Look, it’s not my fault. That was the decision the box made . . .”

Figure:1

Figure 1 

How it works

There are two main parts to this project – an oscillator (based on IC1) and aLEDdriver (based on IC2). In a nutshell, when you press the pushbutton, power is supplied to the circuit and the “reservoir” capacitor on the main supply rail charges to the battery voltage (3V). At the same time, the resistor and capacitor around one of the SchmittNANDgates (IC1c) cause it to oscillate.

The wordNANDis a contraction ofNOT&AND. The “AND” part means that both inputs to the gate need to be a logic “high” for the gate to operate and the “NOT” means the output is opposite, or inverted, to the input. There is a “truth table” shown in Table 1 which shows what happens to the output, depending on what is occurring at the input.

The “Schmitt” part of the name refers to a feature of the threshold points, or triggering, of the gate. The voltage levels at which it triggers, either low or high, are quite precise but more importantly, are widely separated. This makes a Schmitt trigger more immune to noisy triggering waveforms.

As you can see, the two inputs to the gate are connected together, effectively turning it into an inverter. As such, the input and output can never be the same state – when the input is high, the output must be low and vice versa.

Figure:1

Figure 2 

When you press and hold the button, the IC is powered up but at that instant the inputs are in a low state (because the 1μF capacitor is not charged). Therefore the output is high. The capacitor then starts to charge via the 68kΩ resistor from output to input. When the capacitor voltage passes the gate’s upper threshold voltage (ie, the input goes high), the output goes low.

The capacitor then starts to discharge, the voltage eventually dropping below the gate’s lower threshold voltage. The output then goes high again. This keeps happening as long as power is applied to the circuit. It’s called a “relaxation oscillator” and is a very easy way to make any form of pulse generator.

How fast?

The frequency at which it operates is determined by the values of the resistor and capacitor. The formula is 1/0.55 x RC, where R is in ohms and C is in Farads (note that – Farads, not microfarads). Therefore if the resistor is exactly 68,000 ohms (unlikely!) and the capacitor is exactly 1μF (even more unlikely!), the frequency of this oscillator circuit will be 1/ 0.55 × 68,000 × 0.000001, or 1/0.0374, or approximately 26Hz (actually 26.7Hz).

Why did we say it was unlikely that the resistor and capacitor wouldn’t be exactly what their marked value said? If the resistor has a 1% tolerance, its actual value could be anywhere from 99% of 68,000 ohms (67,320Ω) to 101% (68,680Ω). And capacitors normally have a much wider tolerance – as much as 20% or more. So you can see we are not talking exact values in a simple circuit such as this.
Kept up so far?

OK, here’s a quick quiz to see if you’ve kept up with us so far. If we increased the resistor to 100kΩ and decreased the capacitor to 470nF, what would the oscillator frequency be? If you answered about 36Hz, well done. If you had the right digits but were out by several factors of 10, it’s time to brush up on your nanofarads, microfarads and Farads! (1nF= 0.000000001F; 1μF = 0.000001F).

So we have an oscillator running at 26Hz or thereabouts. Its output is a square wave with a “duty cycle” of 50% – that means its “high” state is the same length of time as its “low” state.NANDgates The square wave is fed into a secondNANDgate, IC1d (also connected as an inverter) which ensures it is nice and clean. This acts as a “buffer”, making sure that any load connected to the gate won’t interfere with the charging/discharging cycle of the capacitor in the oscillator.

It is then fed into yet anotherNANDgate, IC1b, this time wired as a trueNAND. In aNANDgate, the output will be low only if both inputs are high. If either or both inputs are low, the output will be high. Here, one of the inputs (pin 6) is connected to the pushbutton switch via a 4.7kΩ resistor. Normally this input is at a logic “low”, courtesy of the 100kΩ resistor to earth. But when the pushbutton is pressed, it is taken to a logic “high”. When a logic “high” is also present at pin 5 (when the output of IC1d goes high), IC1b’s output will go low.

Conversely, when either input goes low (because the pushbutton is released or when IC1d’s output goes low) the output goes high. But IC1d’s output (and IC1b’s pin 5 input) continues to go high and low, courtesy of the oscillator. While that pushbutton remains pressed, IC1b allows the pulse train through. Finally, the pulse train is put through yet anotherNANDgate (IC1a), again wired as an inverter. To be truthful, this final pulse inversion is not necessary but we had a spare gate in the IC anyway (it’s a “quad”NANDgate).

Figure:1

Figure 3 

Into the counter

The square wave output from this series of gates is fed to a 4017 decade counter. Now you might be thinking, “how come a decade counter – doesn’t that mean ten?” And you’d be right. But the 4017 is a clever device – it can count to one, to two, to three . . . and so on, all the way up to ten. All you have to do is “reset” it when it gets to the number you want it to count to.

On the circuit diagram, you will note that Q4 (pin 10) and MR (pin 15) are connected. Q4 goes high on the fifth count (after Q0, then Q1, then Q2, then Q3). When Q4 goes high, it tells the reset pin (15) to reset the counter to zero and start all over again.

Those other outputs we mentioned (Q0-Q3) are each connected, via a transistor, to aLED. As each goes high in turn, it turns the associated transistor on, which causes itsLED, between emitter and earth, to light. Because of the speed of the oscillator (26Hz, remember), the fourLEDs flash much faster than the eye can follow, so all look like they are permanently on.

How fast do they flash? That’s easy: 26/4 or about 6.5Hz. That means that there are six-and-a-half cycles of the lamps each second, faster than the eye can follow. Incidentally, IC2 has its pin 13 input tied low and its pin 14 input used as the clock input. What this does is make the IC respond to low-to-high logic transistions.

Now, what happens when you let go of the pushbutton?

The battery is no longer connected to the circuit. While there is still a supply line to the counter circuit (courtesy of the charged “reservoir” capacitor), one of IC1b’s inputs is isolated from the supply by the series diode. So the pulses stop.

But as we said, the counter section still has a supply, as do the collectors of the four transistors. So that section of the circuit continues working. Whatever output of IC2 that was high at the instant that the pulses stopped remains high, holding on its particular transistor and of courseLED, at least for a short time while the capacitor discharges.

So oneLED– and only oneLED– remains lit. And which particularLEDis lit is completely random, depending entirely on when you released the pushbutton.

Due to the fact that the oscillator is running at 26Hz, it is impossible for you to let go the button to achieve a particular result. You would have to be able to not only accurately judge periods of 40 thousandths of a second but also release the button at the exact point in time required. The person who can do that hasn’t yet been born!

About that capacitor

We mentioned before that a “reservoir” capacitor connected to the supply line charges when the pushbutton is pressed and discharges through the circuit when it is released. Eventually, the point is reached where the charge is too low to push enough current through theLED, so it dies. You can see this happen: theLEDdoesn’t suddenly go out but gradually gets dimmer.

The time it takes to go completely out depends entirely on the size of the capacitor used to hold the charge. With a 3300μF capacitor, it lasts for a little over a second – just long enough for you to get an answer – but it could be longer! How? You’re probably one step ahead of us by now – with a larger capacitor, of course.

How long? How does 30 seconds sound? We replaced the 3300μF capacitor with a so-called supercap-acitor, rated at 0.5F. Yes, that’s right – half a Farad, or 500,000μF. These capacitors are usually used for much the same reason as we use it here – to hold a charge for a short time in the absence of power (eg, when there is a power supply dropout or glitch).

They’re not as cheap as “ordinary” electros – probably about $4 each or so – but they really do hold a charge. Whether you want to use one of these or go for the much cheaper 3300μF is entirely up to you – and your pocket. There is one other “little” problem with using a supercap – it’s not so little. You may need to use a slightly larger case to fit it in. But we’ll look at this further on.

The 3300μF will normally be rated at 16V while the supercap is much lower – 5.5V is common. But with a 3V supply rail, 5.5V is plenty. Another thing you could do is use some superbrightLEDs in place of the standardLEDs. These are more expensive – perhaps three or four times the price as standardLEDs – but are much more efficient at converting current into light so they are brighter.

Checking it out

The only easy way to check it out is to use it! Pop the batteries into their holder (the right way around). Hopefully, absolutely nothing happens (ie, noLEDs light). If they do, you have a short somewhere.

Now press the push-button switch – all theLEDs should come on together. So far, so good. Let the switch go and hopefully oneLEDis on and all others are off. Wait a while (depending on which capacitor you’ve used) and theLEDshould dim and die.

If so – it’s finished, apart from mounting it in its case.

Decision time . . .

Now, there’s a decision to be made. Do I use the supercap or smaller capacitor?

Gee, I wish I had something to help me decide!

Parts List – Decision Maker

1 = PC board, 46 × 63mm
1 = plastic utility case, either 83 × 54 × 31mm (eg, Jaycar HB6015) or 85 × 56 × 40mm (egDSEH2874) – see text
1 =SPSTmomentary action pushbutton switch, PC mounting (Jaycar SP-0720, Altronics S1094 or similar)
1 = 2 x AA battery holder (with battery snap if required)
2 = PC stakes

Semiconductors

1 = 4093 quadNANDgate (IC1)
1 = 4017 decade counter (IC2)
4 = BC548 transistors (or similar general purposeNPN) (Q1-Q4)
1 = 1N4001 power diode (or similar general purpose power diode) (D1)
4 = RedLEDs, 5mm (normal or ultrabrite – see text) (LED1-LED4)

Capacitors

1 = 3300μF 16VW electrolytic or 1 0.5F 5.5VW supercap
1 = 1μF 16VW electrolytic
1 = 100nFMKTpolyester

Resistors (0.25W, 1%)

1 = 100kΩ
1 = 68kΩ
5 = 4.7kΩ
4 = 100Ω

 

 


Reprinted Url Of This Article:
http://www.eeweb.com/blog/extreme_circuits/build-the-decision-maker