Archive for the ‘Designing basic digital circuits/circuit wizard’ Category

BCD counter

The 4510 chip is a BCD, or Binary Coded Decimal counter with four outputs capable of counting up or down, following the BCD pattern, according to the logic states of various inputs, when a source of pulses is connected to the CLOCK input.

BCD stands for Binary Coded Decimal. A BCD counter has four outputs usually labelled A, B, C, D. By convention A is the least significant bit, or LSB. The easiest way to understand what a BCD counter does is to follow the counting sequence in truth table form:

pulses output D output C output B output A
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
10 0 0 0 0
11 0 0 0 1

The sequence then continues.

When pulses are delivered to the CLOCK input (and all the other connections needed for basic operation are made), the outputs of the 4510 follow a sequence starting from 0 0 0 0 up to 1 0 0 1, the binary equivalent of the decimal number 9. The next pulse causes the 4510 to RESET and counting starts again from 0 0 0 0.

In other words, the counter outputs follow a binary sequence representing the decimal numbers 0-9…. this is why the 4510 is called a binary coded decimal counter.

To make the 4510 work, I need lots of connections. Every input of a CMOS integrated circuit has to  be connected to something. The CLOCK input, for example, will be connected to the output of source of pulses such as an astable.  I will also need to connect all the load inputs, the carry in/enable and the up/down input.

Again I have included a 47 uf capacitor across the power supply as it is a CMOS circuit.

The 4093 Schmitt trigger NAND gate provides one of the easiest ways of making an astable. When I have constructed this part of the circuit, the LED next to the 4093 should flash at approximately 1 Hz, possibly a little faster.

LOAD input
normally held LOW, 0 V
output D, Q8
output, bit 3
load input D, L8
connect LOW
load input D, L1
connect LOW
carry in/enable
normally held LOW, 0 V
output A, Q1
output, bit 0
carry out
no connection needed
power supply 0 V
RESET input
normally held LOW, 0 V
UP/DOWN input
output B, Q2
output, bit 1
load input B, L2
connect HIGH
load input B, L4
connect HIGH
output C, Q4
output, bit 2
CLOCK input
pulses in from astable
power supply +9 V (range 5-15 V)

The final part of the circuit allows you to see the logic states of the counter outputs. When I have built the circuit correctly the LEDs will illuminate following the truth table for BCD counting.  The BCD counter I constructed has been submitted with this work.

4000 series (logic gates)

Now I have had a play with one IC in the 555 timer I decided to have a look at some different integrated circuits.  When doing my research the 4000 series integrated circuits kept getting mentioned and seemed to be popular.  We had many different ones at University but I bought the 4011 as this is comprised of NAND gates and you can use NAND gates to make any other type of gate.  This is the schematic for the circuit I constructed.


4011 data sheet

I have also included the breadboard with this project (as I did pay for the chip, unfortunately the 555s had to go back!).  Notice that in the print screen both inputs are high 1 and the led is off this is because as I know from the NAND truth table featured in logic gates

input A    input B   Output

0                    0                 1

0                    1                  1

1                     0                 1

0                    0                 1

Another interesting thing about this little circuit is the inclusion of the two 10 k resistors.  These are actually known as pull down resistors.  They are included in the circuit because CMOS gates are sensitive to static electricity and can actually be damaged by high voltages.  If they are left to ‘float’ they can assume any logic level.  For example if I had a switch connected to a CMOS chip through to ground, if I pushed the switch, ground is connected to the input pin.  When the switch is open however the signal to the pin is open to static and interference and is known to be in a ‘floating’ state.  This can lead to damage to the chip and cause the circuit to malfunction.  To combat this I have to include a pull down (or pull up) resistor.  The pull up resistor surprisingly pulls the signal up. It will keep the pin in a high state and prevent it from floating and will remove any unwanted inaccurate signals.  The pull down resistor does the same but pulls it down.  The other thing to note about this circuit is that I had to get my fault finding hat on.  At first the circuit didn’t work and I couldn’t understand why, everything seemed to be in the right place and it was confusing me a little.  It wasn’t until I took a closer look at the transistor that I realised the problem.  I needed a BC547 transistor but the young gentleman at maplins had given me a BC557 one.  Sometimes the components can be swapped as they will function in a similar manner, but when I checked the data sheets for the two resistors the 557 is actually a PNP and the 547 is an NPN  hence the reason it wouldn’t work!  On a final note about CMOS circuits, I was informed that it was good practice to include the 47uf de-coupling capacitor across the power supply because it helps to prevent the transfer of spikes along the power supply rails.

Bistable circuit using a 555 timer

April 5, 2011 Leave a comment

This circuit is called a bistable or a ‘flip flop’ circuit as it has two states output high and output low.  It has two inputs SW2 and SW1.

bistable print screen

SW1 makes the output high so the LED comes on (555 pin 2) trigger is active low it functions when less than 1/3 VS

SW2 (555 pin 4) makes the output low and so switches the LED off.  Reset is active low and it resets at less than o.7 V

This was a simple circuit to construct and it functioned efficiently .  I made two switches simply using wire one which switched the led on the other switched the led off, these are the 2 logical states hence the name bistable

Astable circuit using a 555 timer

April 5, 2011 Leave a comment

This is a simple astable circuit using a 555 timer.

Astable print screen

An astable circuit will produce what is known as a square wave.

This digital waveform has sharp movements between low (0v) and high (+Vs).  The durations of the low and the high states may be different hence the reason this is an astable circuit.  It is astable as it is not stable in any state and the output (led) is continually changing between low and high.

The time period (T) of the square wave is the time for one complete cycle, but it is usually better to consider frequency (F) which is the number of cycles per second.

T = 0.7 x ( R1 + 2R2) x C1


F = 1.4 divided by (R1 + 2R2) x C1
The time period can be split into two parts: T = Tm + Ts

T   = time period in seconds (s)
F   = frequency in hertz (Hz)
R1 = resistance in ohms (ohm)
R2 = resistance in ohms (ohm)
C1 = capacitance in farads (F)

Mark time (output high): Tm = 0.7 × (R1 + R2) × C1
Space time (output low): Ts  = 0.7 × R2 × C1

Many circuits require Tm and Ts to be almost equal, this is achieved if R2 is much larger than R1.

For a standard astable circuit Tm cannot be less than Ts, but this is not too restricting because the output can both sink and source current. For example an LED can be made to flash briefly with long gaps by connecting it with a resistor between +Vs and the output. This way the LED is on during Ts, so brief flashes are achieved with R1 larger than R2, making Ts short and Tm long.

I had a little trouble with this circuit, it wasn’t the actual reading of the schematic that was the problem it was more myself trying to remember how the tracks ran on the breadboard.  The problem turned out to be my led, I had inserted it in such a way both terminals were on the same track vertically and so the current was going nowhere.  After getting the circuit working I introduced a potentiometer and was able to control the speed in which the led was flashing.

Monostable circuit using a 555 timer

March 27, 2011 Leave a comment

This is a simple monostable circuit designed using circuit wizard.  As explained in the section ‘ What is a digital circuit’ the monostable circuit produces a single output pulse when triggered.  It is monostable because it is stable in just one state which is output low or 0.  When the switch is pressed the LED comes on changing the state to output high or 1.  In this instance the LED would shine for approximately five seconds.  This has been determined by the resistor R2 and capacitor C2.

The time period (the time the LED is switched on) = 1.1 x R2 (resistance in ohms)  x C2 (capacitance in farads)

1.1 is used as the capacitor charges to 2/3 which is 67% so it is a little longer than the time constant which is the time taken to charge 63% which is R2 x C2

  • Beware that electrolytic capacitor values are not accurate, errors of at least 20% are common.
  • Beware that electrolytic capacitors leak charge which substantially increases the time period  if I am using a high value resistor – use the formula as only a very rough guide!