Kevyn Vital
A compilation of work of digital logic design and embedded systems projects, including supporting evidence of the project (link to the simulation, photos/videos/schematics of a breadboarded project), complete design documentation (expressions, state tables, part numbers, etc.), and full description of the project and how it demonstrates the topic.
This project was wired using breadboards, and coded in C language. The code is available below.
https://github.com/kevynvital/Smart-Car-2025
Project Description:
For this project, I worked in a team of three to design and program a smart car on the Arduino Uno (ATmega328P). The car used ultrasonic sensors for barrier detection, line-following sensors, and wheel encoders for distance feedback. I developed interrupt-driven motor control with PWM signals through an H-Bridge, enabling the car to autonomously navigate a maze in 12.68 seconds and follow a track using sensor feedback. We also added enhancements such as an LCD odometer and a three-point turn routine, while experimenting with proportional control for more accurate line following.
This project was completed on a breadboard.
Project Description:
For this project, I wanted to create a dice roller circuit that would generate a "random" unsigned binary number (1-6) each time a user would push and let go of a pushbutton. My design includes a debounced pushbutton PCB, the output of which acts as a clock signal for a D Flip-Flop. My reason for using this D Flip-Flop was that I needed some sort of logic to inhibit the dice roller from continuing to scroll through numbers. I found connecting the output of the Flip-Flop to the VCC of a 555 timer in astable mode was adequate for my design. Unfortunately, generating a random number is not truly possible. To counter this, I decided to use 47 Ω resistors so that the clock signal would go faster, making it nearly impossible for the user to react quick enough to guess the same number repeatedly. Then, I used a Schmitt inverter to clean up the output of my clock signal. Since my range of numbers was 1-6, I needed to use three D Flip-Flops in my design. I used the clock signal of my 555 timer as the clock input for my next three D Flip-Flops. Ground and preset were not used in any of these Flip-Flops, so I connected them to VCC. After making a state diagram, and then a transition table, I came up with expressions for each Flip-Flop (shown below), and I wired each FF accordingly. To display the user's number after rolling the dice, I opted for 3 LED's. The MSB LED connected to the output of the A Flip-Flop, and the LSB LED connected to the output of the B Flip-Flop.
Parts Used:
(10) AND Gate
(5) OR Gate
(2) NOT Gate
(5) D Flip-Flop
(1) Switch
(12) LED
(1) Clock Signal Performing at 50ms
(3) 7-Segment Display
This project was completed on a breadboard.
Project Description:
For this project, I programmed a 27C1024 EPROM Chip with a truth table. This truth table I designed to translate all unsigned 4-Bit binary numbers (decimal 0-15) to Greek Acrophonic numerals. The truth table corresponded with a 16-segment common anode PCB display created by Doctor Pasquale. My procedure for this truth table was to figure out which values were 0 = ON, and 1 = OFF for each segment A-U on the display. After I filled out my truth table, I divided the truth table into 4 sections. A-D, C-H, K-P, and R-U. The 4-Bit binary numbers of each of these sections would be condensed into a single hexadecimal letter, in order for the EPROM program to accept such a large amount of data for each decimal number 0-15. After translating each 4-Bit binary number from each section, I programmed my EPROM chip to display a certain numeral when given a specific 4-Bit binary input.
Schematic:
Input A3
= MSB
Output Ao
= MSB
Parts Used:
(4) 220-Ohm Resistor
(1) 4-Bit DIP Switch
(1) 27C1014 EPROM Chip
(1) 16-Segment Display PCB
Jumper Wires
5V Power Supply
This project was completed on a breadboard.
Project Description:
For this project, I designed a circuit that serves two different purposes: adding/subtracting 2 4-Bit binary numbers. This circuit design is capable of signed addition/subtraction. It uses a full adder which receives a 4-Bit binary input (A) from a DIP-Switch, and another 4-Bit binary input (B) that goes through a 74LS86 XOR Logic Chip. The purpose of this XOR Logic Chip is to invert the B inputs. In order for this adder to have the ability to toggle to subtraction, I used the CIN pin from the full adder, and connected it to my "B" values on the XOR chip. This CIN pin was then wired to a pushbutton, which when pressed and held down allows the user to perform subtraction. Essentially what happens when the pushbutton is pressed and held down is the B values are inverted and 1 is added to the end of the 4-Bit binary number, successfully turning the operation from A+B to A + (-B). Since this design is capable of signed addition and subtraction, we must include overflow logic. The way I implemented this into my design was by using the equation: O = A4E4'(B4⊕ T) + A4'E4(B4⊕ T)'. This equation allowed me identify overflow when the result exceeded the maximum representable value [-7,7], when the sign-bit and MSB are not the same, or when positive + positive yields negative/negative + negative yields positive. In all of these cases, an LED will light up on my circuit board indicating overflow.
Schematic:
Parts Used:
(14) 220-Ohm Resistor
(2) 8-Bit DIP Switch
(1) Pushbutton
(1) 74LS283 Full Adder
(1) 74LS86 XOR Logic Chip
(1) 74LS08 Quad 2 Input AND Chip
(1) 74LS04 Hex Inverter
(1) 74LS32 Quad 2 Input OR Chip
(5) LED
Jumper Wires
5V Power Supply
This project was completed on CircuitVerse. Click here for the link.
Project Description:
For this project, I designed a circuit that can multiply two unsigned 2-Bit binary numbers (A1A0 * B1B0) and display it as an unsigned 4-Bit binary number on a series of 4 LED's (Sum 3= MSB & Sum 0 =LSB). This circuit uses four AND gates, which are essential for performing multiplication in the circuit, and two half adders composed of 2 AND & XOR gates which add both of the partial product terms together to obtain the result. The XOR gates are essential because inside our half adder, the sums 1 & 2 are produced by the XOR gates. When designing my circuit, I had to reflect this reasoning onto my equations for sums 1 & 2 by simplifying them into XOR equations.
Parts Used:
(6) AND Gate
(2) XOR Gate
(4) LED
This project was completed on Logisim.
Project Description:
For this project, I optimized a circuit that would decode each segment a-g on a common anode (active-LOW) 7-segment display. I used a 4-bit unsigned binary input for this circuit because I chose to use logic gates with a fan in of 2, in accordance to our restrictions in lab. This circuit has been optimized to use 35 gates total - 16 AND gates, 15 OR gates, and 4 NOT gates.
In order to begin minimizing and decoding each segment, I needed to make a truth table for numbers 0-15 on my common anode display. Decimal numbers 10-15 are don't cares, but I labeled them "1" for OFF, since they were never used on the display. This would enable me to minimize each segment completely.
My next step was to use K-Maps for each segment a-g, using the minterms so that I could find minimum expressions. Below will be all of my K-Maps and minimized expressions.
Segment E & F
Segment A & B
Segment C & D
Segment G
Circuit Optimization
Once I calculated all of the minimum expressions for each segment, I was able to start looking for common terms in each expression, which would decrease the number of gates I use in my circuit.
A'B', C'D, BC', AB, AC, CD', CD and B'C were the 8 common terms I shared between all 7 segments. To the left is my final product.
In essence, what I was able to accomplish with circuit optimization is an implementation of a BCD to 7 segment 7447 IC decoder chip. This circuit demonstrates the intricacies of the logic that goes into a decoder chip such as the 7447 IC.
Parts Used:
(16) AND Gate
(15) OR Gate
(4) NOT Gate
(1) 7-Segment Display
This project was completed on Logisim.
Project Description:
For this project, I utilized two 4 to 16 decoders in order to check for two equal 4-Bit binary numbers. A decoder is great for this type of situation because of its functionality. The decoder accepts an unsigned 4-Bit binary input (0-15), which is represented by A, B, C, and D on the truth table below. The 16 output lines (X0 to X15) correspond to all of the combinations of the input lines. Each output line is HIGH (1) for a specific input combination. Essentially, the decoder decodes the binary input into one specific output. This logic enabled me to use the two decoders in conjunction with 16 AND gates to cover every possible binary input combination. Each output pin on the decoder was connected to an AND gate with a fan-in of 2 that corresponds to each possible decimal number in order to compare the two 4-bit binary inputs. If both 4-Bit inputs are equal, a signal will be sent to an OR gate with a fan in of 16, which sends a HIGH signal to active HIGH 7-segment displays that will read "EQUAL". If both inputs are not equal the 7-segment displays will remain off. You could use this logic for however big of a binary number you'd like, you would simply have to increase the decoder size, and your amount of AND gates.
Parts Used:
(2) 4 to 16 Decoder
(16) AND Gate
(1) OR Gate
(5) 7-Segment Display
This project was completed on CircuitVerse. Click here for the link.
Project Description:
For this project, I wanted to create a more realistic elevator circuit than the one we did in class. I drew inspiration from "Dr.B Explains - Finite State Example 2" for this circuit's conditions, expanding upon it and making a 3-floor elevator that goes up and down.
This circuit was made using a finite state machine. More specifically, a Moore Machine. This could be implemented as a Mealy Machine, but I figured debugging and just designing overall would be easier using a Moore Machine for this circuit. I opted for D-Flip flops since I figured they'd be the simplest to find expressions for.
For my inputs I decided on U (UP) and D (DOWN).
For my outputs, two blue LED's determine which floor the elevator is on. It displays the floor in unsigned 2-bit binary. Ie) 01 = Floor 1, 10 = Floor 2, 11 = Floor 3
A green LED will indicate when GOING UP, and a red LED will indicate when GOING DOWN.
For my conditions:
The elevator can only move up/down if the door is closed. The elevator can only open the door after it has stopped at a floor with the door closed. An LED will indicate whether or not the door is open or closed. When moving, the door will close, and a red LED will indicate this. When stationary, the door will open, and a green LED will indicate this. If the doors are already open, then they'll stay open.
When DOWN is pressed:
The elevator should close the door (if open) and move down one floor. Because this is a realistic elevator circuit, once the elevator reaches the bottom floor, if down is pressed it should stop, but not open the door until the button is released.
When UP is pressed:
The elevator should close the door (if open) and move up one floor.
The same realistic logic applies to going up. Once the elevator reaches the top floor, if up is pressed it should stop, but not open the door until the button is released.
When UP & DOWN are pressed:
The elevator should freeze. The floors and the state of the door should remain the same.
My next step was to determine my state assignments. Those can be shown in the design page below.
After determining all of my conditions and state assignments, I was able to design a state diagram (shown below), and a state table/transition table.
Using this binary transition table, I was able to find my expressions for A+, B+, and C+ (all corresponding to their respected D Flip-Flop). After finding my expressions and designing my circuit, my process was concluded.
This elevator circuit could be designed using the same process if you wanted to increase the number of floors. For this circuit, I needed 3 Flip-Flops because I had 6 states. If you were to increase the number of states, you would in turn increase your binary values and make the process for finding Flip-Flop expressions longer.
Parts Used:
(12) AND Gate
(5) OR Gate
(2) NOT Gate
(3) D Flip-Flop
(2) Pushbutton
(6) LED
(1) Clock Signal Performing at 500ms
This project was completed on CircuitVerse. Click here for the link.
Project Description:
For this project, I used the logic of a bidirectional shift register to make an arcade game circuit. This game is similar to arcade games where you have to push a button to stop a display once all LED's are lit up, or one LED is specifically lit up.
For Reference:
Below Q4 will be the output Q of the leftmost Flip-Flop. Q0 will be the output Q of the rightmost Flip-Flop. I used D Flip-Flops
Description continues in the slides below
Instead of having a pushbutton controlling "DL Shift Right", I had the signal of Q0 (rightmost FF) run through an inverter and connect to this wire.
Instead of having a pushbutton controlling "DL Shift Left", I connected this wire to Q0 (rightmost FF).
Full-Scale Bidirectional Shift Register with left/right control
I then connected the output of Q0 to the rightmost LED (cyan). This same signal was connected to the leftmost LED (purple). I continued this process going right to left until all LEDs were connected. Sharing the signal from my D Flip-Flop outputs like this gave an affect where the LEDs would light up starting from the middle. The LEDs remain on until the last LED is on, then they will start to reset. I displayed "100" on three 7-Segment displays just for entertainment purposes.
In order to play the game, your goal is to press the button to stop the LED's when they are all on. You cannot play when the "resetting" LED is on. The reason I created this rule is because when playing while "RESETTING" LED is on, the player will always win, defeating the purpose of the game. To try and counter this, I made it a rule to where the player can only play when the green "PLAY" LED is on. This signal is inverted and is a direct opposite to the red "RESETTING" LED. This design choice came with drawbacks, however. Since the clock signal is performing at 50ms to make the game difficult enough for the user, there is a gray area where if you are not paying close attention, it may seem like you have won when the game was resetting itself. Unfortunately, due to time constraints I was not able to figure out logic to make it so that the user is not able to play at all while the game is resetting itself. This is something I'd like to come back to in the future.
Bidirectional Shift Register
Parts Used:
(2) 47-Ohm Resistor
(3) 220-Ohm Resistor
(1) Debounced Pushbutton PCB
(1) 74LS08 Quad 2 Input AND Chip
(1) 74LS14 Schmitt Inverter
(1) 74LS32 Quad 2 Input OR Chip
(3) LED
(1) LM555 Timer
(1) 10uF Capacitor
(1) 1nF Capacitor
(4) 74LS74A Dual D Flip-Flop
Jumper Wires
5V Power Supply