While the circuit is disconnected. There is no charge in the capacitors. When initially switched on. Unbalances in the 2 NAND gates make sure that one output goes high (logic 1).
Assume NAND gate Y output becomes logic 1. This means the input to NAND gate Y must be logic 0, therefore NAND gate X must be Logic 0. So the input to gate X must be logic 1, the capacitor now charges through R. The circuit is now semi-stable.
As capacitor C charges, V1 decreases until it is just less than half of the supply voltage. So the input to gate X has become a logic 0, the output of gate X will become logic 1. This in turn makes the input to gate Y logic 1, so the output of gate Y becomes logic 0. The voltage that was across the capacitor, as a result of it partly charging, will now be moved down by the supply voltage.
The capacitor then charges up in the other direction, through R, until V1 is just greater than half the supply V. This makes the input of gate X is logic 1, so making its output a logic 0, which in turn will make the output of gate Y logic 1 again. The capacitor will have a voltage of ½Vs across it and so when the output of gate Y becomes logic 1, the voltage levels of the capacitor will be shifted up by the supply V, making
V1 = 1½supplyV. The capacitor then starts to discharge through R until V1 falls to just less than ½supplyV, and so the whole process repeats.
The initial pulse is shorter than every pulse after. Because the capacitor is initially discharged. Also, a non electrolytic capacitor has to be used. As it must charge up in both directions. This limits the max value of the capacitor to roughly 1F.
The frequency of the NAND gate astable can be found by this formula.
F= frequency (Hz)
R = Resistor Value (Ώ)
C = Capacitor Value (f)
I will use this formula later to find a frequency to run my number generator at.
Research (II):
How fast can the human eye register?
To find how fast the human eye can register a number counting, I am going to set up a circuit with a varying clock pulse. This will have a range of roughly 1 Hz, to 1000Hz.
The out put of the clock will be connected to a multi meter which measures the frequency.
I will connect this to a counting circuit. And see what frequency my fellow pupils can see until.
I gave the students a small sheet to fill in with answers on
With 2 main categories… easily definable… and the point they lose recognition of it.
From this investigation, I have found that the average human eye can register frequencies up to around 35Hz.
So to create a generator to meet my spec, the tens units must be counting at this frequency.
I must use the following resistor and capacitor network to gain that frequency…
Counter:
The 4510 BCD (Binary Decimal Counter) counter. Usually has 4 outputs A, B, C and D. A being the least significant bit.
Output values are stated below…
The chip can be set up to count up or down. Pin 11 connected to +ve for upwards counting. And connected to 0ve for down counting.
To reset the count, the reset pin needs a short high pulse. The reset can be at any decimal number. To do this the binary output pins are connected to reset. (through an AND gate normally).
EG
Reset ON 5…
Pin A (1)
Reset (5)
Pin B (4)
The carry out pin is used to power the next 4510 in a series. Is also called a Divide by ten. The pulse from this pin is the clock pulse divided by ten. Used to create the clock for the next counter in a circuit.
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
This truth table can be used to find which pins create the correct reset.
EG’s.
Reset on 3 -
A+B = 3
Reset on 9 -
A+D = 9
………
Decoder:
This chip Is called a 4511 BCD to 7 seg Decoder.
This chip converts the logic states of the outputs of the 4510, to a display.
This chip only powers common cathode displays, as the output pins go high.
The A, B, C, and D output pins of the 4510 are connected to the A, B, C, and D inputs of the 4511.
The pins, a, b, c, d, e, f, and g are then connected to the corresponding pins on the 7 seg display.
I have got the table below from http://www.doctronics.co.uk/4511.htm
If the input goes above “1001” The output pins all go low… and the 7 seg doesn’t light.
Simple 4510 & 4511 Circuit Diagram:
7 Seg Display:
This is what will display the numbers. Has 7 LED sections, available in many colours (most commonly red). I will be using a common cathode display. As a common anode will not work with the 4511 decoder.
Common cathode means all the 0ve connections of the LED’s are joined, there for having one negative connection for all the LED’s.
Different LED’s are lit to display different numbers. The diagram above shows this.
4000 CMOS series Overview:
Supply: 3 to 15V
Very high input impedance, so the chips don’t affect parts of the circuit they are connected to. This also means the chip uses almost no power commonly a few µW. But when frequencies are being used, the power can creep up to mW. They have a maximum output current of about 10mA with a 9V supply. For larger currents, a transistor, of MOSFET is needed. One output can drive up to 50 inputs. This is known as a fan out of 50. They have a gate propagation of about 30ns with a 9V supply, smaller supplies mean a longer propagation time. The chips can handle frequencies up to about 1MHz. As the input impedance of the chips is high, I wont have to drive the inputs with transistors, or watch that output current is drained via other sources.
7 Seg Overview:
Supply: 2V
Each LED consumes around 10mA when lit. but this can be lowered, by putting higher value resistors in the inputs. If all the segments are lit, expect the current to be around 70mA.
Power Supply:
I will be using a PP3 9V battery. These are available from most shops, and can be bought from around £1. PP3’s are commonly referred to as simple “9V batteries”.
PP3 is the type of connection on the top of the battery. The smaller round connection being positive.
The batteries are available with different internals. Some longer lasting than others, or with a different discharge curve.
Below are typical mAh for each type
Alkaline 565
Lithium 1200
NiCd 120
NiMh 300
Carbon Zinc 400
The most common batteries are alkaline. Lithium has the longest lifespan, but is a lot more expensive than the others.
I stated in my spec that I wanted the total current to be no more than 200mA.
With these numbers I can work out how long I would expect the battery to last, running the circuit.
Call the alkaline 560mAh for calculation purposes.
The circuit consumes 200mA.
…
System Development & Drawing:
Finished Circuit Board:
In this diagram I am using a slow pulse system to check the counting system. For the final testing and use I will replace resister X with a series of resistors, with a total resistance of 14.2kΩ. To get this resistance, I will use the following resistors (from the E24 series) in series.
12 kΩ + 2.2 kΩ = 14.2 kΩ
Testing My System:
To test my circuit, I am going to do the following things…
I will use the counter to select 100 numbers, write them down. And see if there Is any correlation in the numbers I get.
When I have done this, I will get 5 pupils to create 20 numbers each with the generator. And see if there is any correlation then. In my spec I have also stated it must be impossible to choose a number. So I will get a class mate to try and get the number 00. I will give him 5 goes.
I will also leave the circuit running to see how long it will run for with continuous use.
I will compare this to the estimate sum I did before.
My Results:
47 20 36 32 49
4 30 35 4 13
29 46 18 26 14
7 44 25 28 49
28 24 20 16 11
32 24 12 0 28
30 21 37 36 39
21 49 33 12 6
14 38 42 9 43
13 44 33 16 35
7 23 41 33 8
22 41 6 46 2
18 41 11 34 14
14 39 42 43 23
14 21 27 1 44
45 1 17 46 22
18 4 28 27 3
13 0 11 5 4
42 34 27 42 4
5 1 5 41 40
The numbers have a nice wide spread, and no particular range stands out more than another. I got the number 0 twice. Which isn’t to bad. But if I could find a way, I would like to remove the number 0 from the counter.
I will now show the students results.
Student 1 41,45,11,32,7,24,10,27,21,24,27,17,23,13,17,12,45,41,48,9
Student 2 6,14,20,5,30,17,33,21,0 ,11,39,6,31,33,43,44,39,37,48,13
Student 3 37,41,39,32,44,40,31,20,2,1,45,38,16,40,39,18,32,13,25,27
Student 4 30,26,47,14,31,4,29,37,36,21,0,11,38,23,37,22,23,16,32,7
Student 5 11,48,28,29,17,19,12,27,28,3,44,33,38,21,48,24,37,41,24,48
Again the spread of numbers is nice. Again with 0 showing twice. This shows the counter is working well. Out of 100 numbers generated, with a range of 0 – 49. In theory each number should have showed roughly twice. This shows the counter is working well.
Now a student will try to get the number 00.
First attempt 26
Second attempt 12
Third attempt 46
Forth attempt 37
Fifth attempt 48
00 did not show up. This is the result I wanted. This shows that numbers cannot be chosen. And the circuit is performing how I intended.
Measurements:
I have made some measurements to see how the circuit performs, and have come u with the following results…
Total current = 110Ma
Frequency = 320Hz
I also left the circuit running to see how long the battery would last with continuous use.
Battery life = 5 hours and 10 mins.
The displays got very dull after about 3 hours, but was still visible until about 5 hours. After that the display diminished very quickly.
Assessment of the Circuit:
The circuit works very well, and almost meets all my specification.
Has a total current sap of 110mA which is under the specified 200mA.
Is impossible to choose numbers.
The counting and display system is accurate, and shows random numbers as specified.
But shows the number 00.
Has a long battery life of over 3 hours.
Limitations and Modifications:
My circuit wasn’t perfect as the number 00 was shown. I have tried to think of ways this could be removed. But I couldn’t think of a way to do it. Unless I used PIC’s. A program could be written to remove the 00 signal. But as I have no experience in PIC program writing. I am not going to look further into this idea. Like I say I have no knowledge of PIC systems. But if I could remove the binary signal (A,B,C,D corresponding outputs) 0000 from the string of codes, the number 00 wouldn’t show. And would skip to 1000. This would show 01.
Other than that I wouldn’t change the circuit. It met all my specifications. And worked well.
Evaluation Of Final System:
Again what I said in my assessment and modifications sections. The circuit works very well. Has met all of my needs. And I can think of only one thing that could be improved. I cannot follow the modification through. As I don’t know anything about PIC programming.
Specification:
Must generate a number and show
Generate numbers from 1 to 49.
With the numbers showing faster than the human eye can see to choose them.
Therefore making it impossible to choose numbers.
Must operate from a 9V battery, as these are commonly available.
Must consume as little power as possible, otherwise battery life will be short. So have current consumption of less than 200mA.
Report:
Some information used from…
Ian Kemps - coursework guidelines
– chip layouts, and 4511 logic truth table.