Date of Birth Project - March 2015
Project Overview
Problem Conception via Truth Table
The truth table serves two purposes in the project: to demonstrate what switches will display which digit and to determine what segments need to be displayed to create each number.
The letters X, Y, and Z are the switches. They have "0" to represent when the switch is off and "1" to represent when the switch is on. For each combination, a certain digit will be displayed. Letters a-g are the segments in the seven-segment display. When a "1" is present in those columns, that segment will be lit. Otherwise, it remains off. Combinations of the segments will display different numbers. The "X"s in the table are don't-care functions, meaning that display doesn't matter. These can be counted as "0" or "1" when K-Mapping.
K-Mapping and Simplified Logic
K-Mapping is an alternative to Boolean Algebra. It is used to find the minterms of a logic expression from a truth table quickly and efficiently. Each of the above tables is a K-Map for a certain term. Each term is actually a segment in the seven-segment display. The numbers in the table come from the column of each letter in the truth table. To form a K-Map, the numbers from the truth table are transferred over in a certain order. From left to right starting with the top row, the order is 1, 2, 3, 4, 7, 8, 5, 6. The last two groups of two switch orders. This is because of the way the columns and rows are named. As you can see, they are named X'Y', X'Y, XY, XY' for the rows and Z', Z for the columns. Between each set of two rows or two columns, only one input is changed. So between the first two rows, Th "Y" goes from Y' to Y, but the X' remains the same. Naming the rows and columns like this allows the 1s to be grouped. Groups are made from adjacent number 1s in the table. These can be in groups of 8, 4, 2, or 1. These groups become the minterms depending on what rows and columns they're in. The bigger the group, the better. As you can see, B and C are all 1s, forming a group of 8 and giving both B and C a logic expression of 1. Letter F has three groups of 4, giving it the logic expression X+Y+Z. The logic expressions are in Sum of Product form and are in their simplest form, giving it an advantage over Boolean Algebra.
MultiSim Circuit
First thing after forming the K-Maps, I designed my circuit in MultiSim. I used a Bus to connect my switched to the seven inputs. I lucked out in that two of my inputs were 1, meaning I could connect them straight from power to the display. Also lucky was that two of my inputs, A and D, were the same expression.
I used four inverters, four AND, five OR, and three NAND gates, which is a total of five chips. Unfortunately, my NAND circuit was actually less efficient to used than if I'd used AOI. It used three gates, where as AOI would have only used two. But that would have happened for any of the segments I could have used NAND or NOR for. It wasn't really efficient to use for that segment, but in the long run, I didn't have to use another AND gate, instead using the NAND gate.
The seven-segment displays works in that each section of what looks like an 8 is a different segments A-G. Each segment can be wired separately so that certain numbers are displayed at different times. This circuit uses a common cathode seven- segment display. It's different from a common anode in that it's wired to the ground rather than to the power. This allows it to read and respond to the input 1 rather than the input 0, like the common anode does. The resistor limits the amount of power flowing into each segment, keeping the lights from getting too bright and blowing out.
The seven-segment displays works in that each section of what looks like an 8 is a different segments A-G. Each segment can be wired separately so that certain numbers are displayed at different times. This circuit uses a common cathode seven- segment display. It's different from a common anode in that it's wired to the ground rather than to the power. This allows it to read and respond to the input 1 rather than the input 0, like the common anode does. The resistor limits the amount of power flowing into each segment, keeping the lights from getting too bright and blowing out.
Bill Of Materials
The materials for this project were fairly simple- a circuit board, chips, and wires.
The breadboard we used for this project was quite handy- all the components we needed (resistors, power, switches, seven-segment display) were built into the circuit board. Additionally, I used five gates to build my circuit, along with a BUNCH of wires. Wiring the circuit was somewhat difficult because the board was so big and everything was so far apart, longer and more wires were needed.
BreadBoarding
Unfortunately, my second breadboarding experience did not go as well as my first. As I was absent for days during the project, I was in somewhat of a Panic Mode while building my circuit. After being able to take it home, I was able to relax a little, but my hasty work had to be redone. Once I completed my circuit a second time, it worked just fine, but was very messy and not color coded like was asked. So, I redid it and that's when everything started to go wrong. My circuit wouldn't work the third time I built it. It wouldn't display anything most of the time, and when it did, it was stuck at 4. After looking for a mistake and finding nothing, I pulled it apart and started over. I worked carefully on the circuit and it was working fine until the fifth digit when it displayed a 9, but now the display was stuck at 9, no matter what I switched on and off or disconnected. Frustrated, I restarted. Again. This time, I checked each segment as I built it, trying to find where I went wrong. Everything was going great...until I reached the last segment and the display stopped working altogether. I stopped working and came back later. Now the circuit was working fine, except for the very first number, when a 1 was showing, the F segment was also on. After going back and redoing that segment, I found no error and decided the board was malfunctioning and stopped work. Everything else works fine. Just the one extra segment on the 1.
COnclusion
In this project, I learned the lesson of "quit while you're ahead". If I hadn't tried to go back and fix what wasn't broken (other than aesthetic, the second time I built the circuit it was perfectly fine), I would have been saved a lot of trouble. Trying to fix the circuit and make it look nicer backfired on me so badly. It cost me probably three hours to get the circuit to work again, and not even properly. Next time, I definitely won't put aesthetic above how the circuit works and leave it alone once I get it to work.
K-mapping is useful in that it is so much less time consuming than using Boolean logic. I like it a lot better than Boolean logic. It is very procedural, but being a step-based person, it's easier for me to go through a procedure than to have to try and figure out how something can be simplified. It's harder to make mistakes using K-mapping, and the mistakes made are smaller. You can't end up on the totally wrong track like you can using Boolean logic.
K-mapping is useful in that it is so much less time consuming than using Boolean logic. I like it a lot better than Boolean logic. It is very procedural, but being a step-based person, it's easier for me to go through a procedure than to have to try and figure out how something can be simplified. It's harder to make mistakes using K-mapping, and the mistakes made are smaller. You can't end up on the totally wrong track like you can using Boolean logic.