Friday, February 24, 2017

Week 7

Digital Circuits

1. Force sensing resistor gives a resistance value with respect to the force that is applied on it. Try different loads (Pinching, squeezing with objects, etc.) and write down the resistance values. (EXPLAIN with TABLE)

Table 1.1: show the measurement of Force sensing resistor with different loads
As seen in the table the force sensor decreases resistance as the force applied to it increases. The multimeter is unable to read the resistance when no force is applied to the sensor because the resistance is to high.

2. 7 Segment display:

a. Check the manual of 7 segment display. Pdf document’s page 5 (or in the document page 4) circuit B is the one we have. Connect pin 3 or pin 14 to 5 V. Connect a 330 Ω resistor to pin 1. Other end of the resistor goes to ground. Which line lit up? Using package dimensions and function for B (page 4 in pdf), explain the operation of the 7 segment display by lighting up different segments. (EXPLAIN with VIDEO).
Video1 explains how 7 segment display works

By applying a 5V charge to pin 3 or 14 and running a resistor to a certain pin and ground lights up a certain segment on the display. By doing this we can display numbers 0-9 on the display.

b. Using resistors for each segment, make the display show 0 and 5. (EXPLAIN with PHOTOs)

 Photo2.1: show the output zero

 Photo2.2: show the output five

By using the same set up as part a running a 5V charge to pin 3 and running  resistors from the ground to pins 1, 2, 7, 8, 10, & 13 on the display we are able to display the number 0. To display the number 5 we run resistors to pins 1, 2, 8, 10, & 11  

3. Display driver (7447). This integrated circuit (IC) is designed to drive 7 segment display through resistors. Check the data sheet. A, B, C, and D are binary inputs. Pins 9 through 15 are outputs that go to the display. Pin 8 is ground and pin 16 is 5 V.

a. By connecting inputs either 0 V or 5 V, check the output voltages of the driver. Explain how the inputs and outputs are related. Provide two different input combinations. (EXPLAIN with PHOTOs and TRUTH TABLE)
Table 3.1: shows Display driver(7447)truth table

(0010) pin 13:
Photo3.1: show the output 2 in pin 13

(0010) pin11: 
Photo3.2: show the output 2 in pin 11

(0001) pin 13:
Photo3.3: show the output 1 in pin 13

Photo3.4: show the output 1 in pin 11 

These pictures show that by running certain inputs to 5V and others to ground you can get different binary codes such as 0001 & 0010. The pictures also show that with the different binary codes give different output values lighting up the LED.  

UPDATE! You cannot actually measure the output voltages directly (I challenge you to figure out why!). You need to connect an LED and a resistor. LED’s positive terminal will go to 5 V. Negative terminal will be connected to your outputs via a resistor. The circuit would look like below:

b. Connect the display driver to the 7 segment display. 330 Ω resistors need to be used between the display driver outputs and the display (a total of 7 resistors). Verify your question 3a outputs with those input combinations. (EXPLAIN with VIDEO)
Video 2 explains what happens when connecting 
7 segment display and display driver
4. 555 Timer:

a. Construct the circuit in Fig. 14 of the 555 timer data sheet. VCC = 5V. No RL (no connection to pin 3). RA = 150 kΩ, RB = 300 kΩ, and C = 1 µF (smaller sized capacitor). 0.01 µF capacitor is somewhat larger in size. Observe your output voltage at pin 3 by oscilloscope. (Breadboard and Oscilloscope PHOTOs)
Picture 4.1 shows the setup of the breadboard 
Picture 4.2 shows the display of the oscilloscope
Breadboard photo shows the circuit setup and oscilloscope photo show the output from the circuit from pin 3

b. Does your frequency and duty cycle match with the theoretical value? Explain your work.

To calculate the theoretical frequency using the formula (1.44/(C*(Ra+2Rb)) duty cycle is given by the formula (Rb/(Ra+2Rb)). This gives us (1.44/(1*10^(-6)*((150+600)*10^3))) = 1.92 Hz and (300/(150+600)) = .4 for the duty cycle. From the oscilloscope we get that the period is 250 ms which gives us a frequency of 4 Hz must have been something wrong with the connection or even how we read the oscilloscope. For the duty cycle the theoretical value is 40% but from the oscilloscope we see that the duty cycle is more like 65 or 75%. 

c. Connect the force sensing resistor in series with RA. How can you make the circuit give an output? Can the frequency of the output be modified with the force sensing resistor? (Explain with VIDEO)
Video 4.1 shows and explains the 555 circuit with the force sensor integrated in.

By adding the force sensor into the circuit we see that by applying force to the sensor we can change the duty cycle of the system. 

5. Binary coded decimal (BCD) counter (74192). This circuit generates a 4-bit counter. With every clock change, output increases; 0000, 0001, 0010, …, 0111, 1000, 1001. But after 1001 (which is decimal 9), it goes back to 0000. That way, in decimal, it counts from 0 to 9. Outputs of 74192 are labelled as QA (Least significant bit), QB, QC, and QD (Most significant bit) in the data sheet (decimal counter, 74192). Use the following connections:
5 V: pins 4, 11, 16.
0 V (ground): pins 8, 14.
10 µF capacitor between 5 V and ground.

a. Connect your 555 timer output to pin 5 of 74192. Observe the input and each output on the oscilloscope. (EXPLAIN with VIDEO and TRUTH TABLE)

This video shows the output of the decimal counter
on the oscilloscope.

The truth table of decimal counter connected to the output of the timer

In the video we observed that the frequency of the output Qa has the highest frequency and  a square wave with a small period. Also, the output of Qa will change faster and consistently between numbers than all the other outputs which is is supported by the truth table. 

6. 7486 (XOR gate). Pin diagram of the circuit is given in the logic gates pin diagram pdf file. Ground pin is 7. Pin 14 will be connected to 5 V. There are 4 XOR gates. Pins are numbered. Connect a 330 Ω resistor at the output of one of the XOR gates.

a. Put an LED in series to the resistor. Negative end of the LED (shorter wire) should be connected to the ground. By choosing different input combinations (DC 0V and DC 5 V), prove XOR operation through LED. (EXPLAIN with VIDEO)
This video shows the how XOR gate works.

The truth table of the XOR gate indicate that when one input is 1 the output will be active. This was proved in our video when 5 v is applied to one pin and 0v is applied to the other the LED light will be on and when 5 v or 0 v is applied to the two pins the LED light will be off. 

b. Connect XOR’s inputs to the BCD counters C and D outputs. Explain your observation. (EXPLAIN with VIDEO)
This video shows the output of the XOR gate
connected to the Qc and Qd of the decimal counter.

We see that the light is turning on and off, the light will be on when one of the output of the Decimal counter is activated either Qc or Qd, and the LED light will be off when both QC and Qd is activated or not activated. 

c. For 6b, draw the following signals together: 555 timer (clock), A, B, C, and D outputs of 74192, and the XOR output. (EXPLAIN with VIDEO)

This video shows Timer, Decimal counter and XOR gate signals together.

In the video we explained how the signals are related to the truth table of the decimal counter in Q5a and then we explained the relationship between Qc, Qd and XOR gate which makes sense. when the light turns  that means the signal will be active in one of the two outputs but from 0-3 the signal is inactive for both which means that the LED will turn off. 

7. Connect the entire circuit: Force sensing resistor triggers the 555 timer. 555 timer’s output is used as clock for the counter. Counter is then connected to the driver (Counter’s A, B, C, D to driver’s A, B, C, D). Driver is connected to the display through resistors. XOR gate is connected to the counter’s C and D inputs as well and an LED with a resistor is connected to the XOR output. Draw the circuit schematic. (VIDEO and PHOTO)
The entire circuit schematic using XOR gate connected to Qc and Qd. 

This video show the operation of the entire circuit 

we set up the entire circuit by  connecting the force sensor to the 150  K-ohms resistor  of the 555 timer and then we connected the the 555 time output  to the pin 5 of the decimal counter and we connected the LED light to  the XOR gate input and the XOR gate input to Qc and Qd in the display counter and as we see the light will be off from 0-3 ,which indicates that it is receiving two inputs Qc and Qd, and on from 4-9, which indicates that it is receiving one input Qc or Qd, then we connected the input of the display driver with Qa,Qb,Qc and Qd of the decimal counter, then the display driver was connected to the 
7-segment display.

8. Using other logic gates provided (AND and OR), come up with a different LED lighting scheme. (EXPLAIN with VIDEO)
This video shows the operation of AND gate connected to 
Qa and Qb of the decimal counter.

In the Video the LED was on when it reaches 3 or 7 which means that the AND gate was receiving two inputs from Qa and Qb when the Display is on 3 or 7, and it is off when the display shows other numbers which means the AND gate received only one input from Qa or Qb.


  1. Out measurement for the force sensor is not close as I thought it would be. For Question number 3a the question asks to Provide two different input combinations which will show two different numbers in the Segment display, but I think you didn't. Also, some videos and tables from question #4 to #6 still need captions. Everything else is clear.

  2. The videos could use some captions and the force sensing resistor on #1 reading of overlimit is true. I originally thought the resistance was infinite but it is just too high for the multimeter to read. I will make a change on my blog to correct this, thank you.

  3. The data you guys acquired from the force sensor was pretty similar to what we have, specially the OL value. Make sure you guys add captions for every video and image. The videos are pretty clear and easy to understand. I like how you guys setup the circuit in question 7, seems like it went pretty smooth. Good job.

  4. good blog but no response to comments.