Vous êtes sur la page 1sur 19

Technological Institute of the Philippines

938 Aurora Blvd., Quezon City

CPE 004 – Logic Circuits and Switching Theory

Implementation of Voltage Level Indicator Microcontroller-based

Oscilloscope Using ACEduino, Decoder, and Demultiplexer

Abesamis, Beatrice A.
Castillo, Edith A.
Nicolas, Jo Malyn D. R.
Oca, Eugene B.
Sanchez, Chlarisse Dianne C.

Group No. 2

Engr. Alonica R. Villanueva

October 20, 2017


I. Scenario

Technology is the present world. It affects people’s daily lives. It is now a big part of our society
and our foreseeable future. It may either inspires somebody to be the master at videogames or makes
somebody a computer hacker. It makes life on earth easier and faster. Indeed, it promotes safety,
efficiency, and comfort to people.

Nowadays, electronic devices and circuits have a massive impact in the daily lives of every human
being. One of the imposing application of today’s technology

Almost all appliances are powered by electricity. Electric home appliances have become so
integral to modern life that, in many ways, they are what distinguish today's society from yesterday's. The
example of home appliances are air conditioner, cooler, refrigerator, electric fan, flat iron, microwave
oven, television, vacuum cleaner, washing machine, clothes dryer, electric water heater tank, humidifier
and others. This provides convenience, efficiency, ease of use, and portability. Without electricity, work
and living will be impossible.

A brownout is a temporary interruption of power service in which the electric power is reduced,
rather than being cut as is the case with a blackout. Lights may flicker and dim during a brownout, and the
event also often wreaks havoc with electrical appliances such as computers, air conditioners, televisions
and refrigerators. The irregular voltage can damage or destroy these appliances. One could consider a
brownout the opposite of a power surge, an electrical event in which a sudden burst of power enters the
system. Instead of the voltage surging, the voltage sags.

Lightning strikes are a common cause, but most power surges stem from inside your home. Power
surges occur when the flow of electricity is interrupted, then started again, or when something sends
electricity flowing back into the system. In short, power surges occur when something boosts the electrical
charge at some point in the power lines. This causes an increase in the electrical potential energy, which
can increase the current flowing to your wall outlet. A number of different things can cause this to happen.
A power surge can damage or destroy home appliances, and in a worst case scenario, start a house fire.

According to American Red Cross, turn off and unplug any unnecessary electrical equipment,
along with the stove and other appliances that utilizes a lot of power during brownout. These appliances
may include heaters, washing machines, dishwashers, microwaves, televisions, and dryers. The length of
a brownout will vary so plug these appliances in only when the electricity voltage has stabilized.

In fact, lighting does not get damaged at all by brownouts. You don't need to switch off everything
in your house, just heavy power suckers such as TVs, heaters, washing machines, dryers and dishwashers.
Remember that you can resume all these appliances once the brownout is over. If electricity has been
stabilized, do not plug the appliances right away. Wait for several minutes before plugging electronics in
to protect your appliances from a power surge.

What if brownout occurs when there is no one person left in your house to turn the appliances
off? As stated, brownout can damage appliances especially electronics. During a brownout, protecting
your appliances and electronics from irregular voltage should be prioritized. To aid this, design a home
switching system using SR flip-flops that automatically turns off the switches when the supply is removed.
When the supply comes back, there must be an indicator to alert the client regarding the restoration of
power.

II. Objective(s)

This case study generally aims to develop a voltage level indicator microcontroller-based
oscilloscope using ACEduino, decoder and demultiplexer. Specifically, this aims to:

 Convert the AC analog signal to digital 4-bit binary by using ACEduino;


 Utilize the use of demultiplexer by converting 4 bits to 8 bits to determine the real-time
amplitude of the AC signal;
 Provide LED indicators to represent the real-time amplitude of the waveform, specifically the
single output of the demultiplexer;
 Employ decoder in the circuit to convert 4 bits BCD to 8 bits; and
 Use a seven-segment LED display for further visualization aid of the real-time amplitude of
the input signal.

III. Resources

The stage of methodological process includes the procurement of the necessary materials and
equipment. To emphasize the specification of the main equipment and materials used in this project,
individual descriptions are provided.
Figure 1. ACEduino 328

ACEduino 328 is a clone made by Alexan and based from an open source microcontroller called
Arduino UNO. Listed below are the features of this Pinoy-version Arduino:

 14 digital input/output pins (6 of which are PWM outputs)


 6 analog Input pins (with pin for analog reference)
 Different communication lines available - UART (Rx, Tx), I2C (SDA, SCL) and ISP (MISO, MOSI,
SCL)
 On-board solderable prototyping nodes
 32KB flash memory and automatic power selector between USB and DC power

Figure 2. Arduino Software IDE

ACEduino can be programmed using Arduino IDE or the Arduino Integrated Development
Environment. The open-source Arduino Software (IDE) makes it easy to write code and upload it to the
board. It runs on Windows, Mac OS X, and Linux. The environment is written in Java and based on
Processing and other open-source software. This software can be used with any Arduino board.

Arduino Software IDE contains a text editor for writing the code, a message area, a text console,
a toolbar with buttons for common functions and series of menus. It is connected to the ACEduino
hardware which would upload programs and communicate with it.
Figure 3. DDS Function Signal Generator

DDS function signal generator from this series is a multi-functional signal generator with high
precision and high performance. It adopts large scale of FPGA integrated circuits, high-speed MCU
microprocessor and with high precision oscillator as base in the inner circuit, which make the signals more
stable. SMT process can greatly improve the anti-interference and lifetime of the instrument. It has
entirely independent dual-channel DDS signal and TTL level output, can generate signals of
sine/triangle/square/sawtooth/pulse wave, white noise, etc. This instrument is of great advantage in
generating signal, scanning waveform, measuring parameters, etc.

Features:

 Using DDS direct digital synthesis technology to generate precise, stable, low distortion
output signal.
 CH1 and CH2 completely symmetrical two channels, each channel can be independently set
the parameters.
 Supports user-defined waveform, each arbitrary waveform memory depth 2048*12bits, 250
MSa/s sampling rate.
 With pulse trains burst output function, manual trigger, internal CH2 trigger and external
trigger three trigger modes that allow the unit to any output 1 to 1048575 arbitrary pulse
trains.
 Measurement functions: 100 MHz frequency meter and counter function.
 Signal output amplitude range is 10 mVpp- 20 Vpp, DC offset adjustment range is - 10 V to 10
V, the resolution is 0.1 V.
 Digital signal output function, CMOS output range 0 to 10V.
 Waveform generator up to 12 bits wide, the output waveform is more delicate, waveform
distortion is low.
 With full CNC functions, display and adjust of current output signal parameters, such as the
amplitude, offset, frequency, duty cycle, and the phase difference of two signals.
 After connected with computer, user can control signal generator functions and parameters,
and can edit and download arbitrary waveform
 High frequency accuracy and resolution: frequency accuracy up to 10-6 magnitude, total range
frequency resolution is 10 mHz.
 Tracking function: built-in frequency, amplitude, offset, duty cycle, waveform and other
parameters follow function, easy to use.
 Scanning features: frequency linear sweep and logarithmic sweep function, start and end
points of scanning can be set freely.
 Storage features: can store 20 groups parameters set by the user.
 Operation: key operation, LCD1602 display in English, directly digital setting parameters or
continuous adjustment knob.
 Input over-voltage protection: extended power input range is AC85V to AC260V wide voltage.
 Output short-circuit protection: all signal output can work above 60s in load short-circuit
situation.

(a) (b)

Figure 4. 74LS138 (a) Physical Appearance (b) Circuit Diagram

The 74LS138 is a high speed 1-of-8 demultiplexer. This device is ideally suited for high speed
bipolar memory chip select address decoding. The multiple input enables allow parallel expansion to a 1-
of-24 decoder using just three LS138 devices or to a 1-of-32 decoder using four LS138s and one inverter.
The LS138 is fabricated with the Schottky barrier diode process for high speed and is completely
compatible with all Motorola TTL families.

74LS138 FEATURES

 Demultiplexing capability
 Multiple input enable for easy expansion
 Typical power dissipation of 32 mW
 Active low mutually exclusive outputs
 Input clamp diodes limit high speed termination effects
(a) (b)

Figure 5. 74LS47 (a) Physical Appearance (b) Circuit Diagram

74LS47 is a BCD to 7-segment decoder/driver IC. It accepts a binary coded decimal as input and
converts it into a pattern to drive a seven-segment for displaying digits 0 to 9. Binary coded decimal (BCD)
is an encoding in which each digit of a number is represented by its own binary sequence (usually of four
bits).

74LS47 IC accepts four lines of BCD (8421) input data and generates their complements internally.
The data is decoded with seven AND/OR gates to drive indicator LEDs of the seven segment directly. The
outputs correspond to Common anode (CA) configuration of seven segment.

74LS47 FEATURES

 Lamp intensity modulation capability (BI/RBO)


 Open collector outputs
 Lamp test provision
 Leading/trailing zero suppression
 Input clamp diodes limit high speed termination effects

Table 1. Complete List of Equipment/Materials with Price

NAME OF UNIT TOTAL


QTY. USES
EQUIPMENT/MATERIALS PRICE PRICE
This converts analog signal to 4-bit
1 ACEduino binary digital signal. In addition, this ₱ 328.00 ₱ 328.00
provides the 5 V supply of the circuit.
This is used to program the analog to
1 Arduino IDE
digital conversion process.
1 Function Generator This provides the analog input signal.
HD74LS138P This converts 4 bits to 8 bits for the
2 ₱ 25.00 ₱ 50.00
(Demultiplexer) LED outputs.
SN74LS47N This converts 4 bits to 8 bits for the
1 ₱ 25.00 ₱ 25.00
(Decoder) seven-segment outputs.
Seven-Segment Display This outputs the amplitude value of
1 ₱ 25.00 ₱ 25.00
(Common Anode) the input signal.
This serves as an amplitude value
16 LED ₱ 1.40 ₱ 22.40
indicator of the input signal.
TOTAL ₱ 450.40
IV. Procedures

a. Truth Table

Table 2. Demultiplexer

DATA SELECT
OUTPUTS
INPUT INPUTS
D S2 S1 S0 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
1 0 0 0 0 0 0 0 0 0 0 1
1 0 0 1 0 0 0 0 0 0 1 0
1 0 1 0 0 0 0 0 0 1 0 0
1 0 1 1 0 0 0 0 1 0 0 0
1 1 0 0 0 0 0 1 0 0 0 0
1 1 0 1 0 0 1 0 0 0 0 0
1 1 1 0 0 1 0 0 0 0 0 0
1 1 1 1 1 0 0 0 0 0 0 0

Table 3. Decoder

DECIMAL BCD OUTPUT


NUMBER Y1 Y2 Y3 Y4 A B C D E F G
0 0 0 0 0 1 1 1 1 1 1 0
1 0 0 0 1 0 1 1 0 0 0 0
2 0 0 1 0 1 1 0 1 1 0 1
3 0 0 1 1 1 1 1 1 0 0 1
4 0 1 0 0 0 1 1 0 0 1 1
5 0 1 0 1 1 0 1 1 0 1 1
6 0 1 1 0 0 0 1 1 1 1 1
7 0 1 1 1 1 1 1 0 0 0 0
8 1 0 0 0 1 1 1 1 1 1 1
9 1 0 0 1 1 1 1 0 0 1 1
10 1 0 1 0 X X X X X X X
11 1 0 1 1 X X X X X X X
12 1 1 0 0 X X X X X X X
13 1 1 0 1 X X X X X X X
14 1 1 1 0 X X X X X X X
15 1 1 1 1 X X X X X X X
b. K-map

DEMULTIPLEXER

S2D
00 01 11 10
S0S1 00 0 1 0 0
01 0 0 0 0
11 0 0 0 0
10 0 0 0 0

Y0 = D S2 S1 S0

S2D
00 01 11 10
S0S1 00 0 0 0 0
01 0 0 0 0
11 0 0 0 0
10 0 1 0 0

Y1 = D S2 S1 S0

S2D
00 01 11 10
S0S1 00 0 0 0 0
01 0 1 0 0
11 0 0 0 0
10 0 0 0 0

Y2 = D S2 S1 S0

S2D
00 01 11 10
S0S1 00 0 0 0 0
01 0 0 0 0
11 0 1 0 0
10 0 0 0 0

Y3 = D S2 S1 S0
S2D
00 01 11 10
S0S1 00 0 0 1 0
01 0 0 0 0
11 0 0 0 0
10 0 0 0 0

Y4 = D S2 S1 S0

S2D
00 01 11 10
S0S1 00 0 0 0 0
01 0 0 0 0
11 0 0 0 0
10 0 0 1 0

Y5 = D S2 S1 S0

S2D
00 01 11 10
S0S1 00 0 0 0 0
01 0 0 1 0
11 0 0 0 0
10 0 0 0 0

Y6 = D S2 S1 S0

S2D
00 01 11 10
S0S1 00 0 0 0 0
01 0 0 0 0
11 0 0 1 0
10 0 0 0 0

Y7 = D S2 S1 S0
DECODER

Y3Y4
00 01 11 10
Y1Y2 00 1 0 1 1
01 0 1 1 0
11 X X X X
10 1 1 X X

A = Y1 + Y2 Y4 + Y2 Y4 + Y3 Y4

Y3Y4
00 01 11 10
Y1Y2 00 1 0 1 1
01 0 1 1 0
11 X X X X
10 1 1 X X

B = Y2 + Y3 Y4 + Y3 Y4

Y3Y4
00 01 11 10
Y1Y2 00 1 1 1 0
01 1 1 1 1
11 X X X X
10 1 1 X X

C = Y3 + Y2 + Y4

Y3Y4
00 01 11 10
Y1Y2 00 1 0 1 1
01 0 1 0 1
11 X X X X
10 1 0 X X

D = Y2 Y4 + Y2 Y3 + Y3 Y4 + Y2 Y3 Y4
Y3Y4
00 01 11 10
Y1Y2 00 1 0 0 1
01 0 0 0 1
11 X X X X
10 1 0 X X

E = Y2 Y4 + Y3 Y4

Y3Y4
00 01 11 10
Y1Y2 00 1 0 0 0
01 1 1 0 1
11 X X X X
10 1 1 X X

F = Y3 Y4 + Y2 Y4 + Y2 Y3 + Y1

Y3Y4
00 01 11 10
Y1Y2 00 0 0 1 1
01 1 1 0 1
11 X X X X
10 1 1 X X

G = Y2 Y3 + Y3 Y4 + Y2 Y3 + Y1
c. Logic Circuit Diagram

DEMULTIPLEXER
DECODER
d. Simulation (Multisim)

Figure 5. 74LS47 (a) Physical Appearance (b) Circuit Diagram

Figure 5. 74LS47 (a) Physical Appearance (b) Circuit Diagram


Figure 5. 74LS47 (a) Physical Appearance (b) Circuit Diagram

Figure 5. 74LS47 (a) Physical Appearance (b) Circuit Diagram


Figure 5. 74LS47 (a) Physical Appearance (b) Circuit Diagram

Figure 5. 74LS47 (a) Physical Appearance (b) Circuit Diagram


Figure 5. 74LS47 (a) Physical Appearance (b) Circuit Diagram

Figure 5. 74LS47 (a) Physical Appearance (b) Circuit Diagram


V. Implementation

(Attach pictures that shows the implementation of the solution using breadboard and simulation results
to accomplish the desired outcome)

VI. Conclusion

The overriding purpose of this study was to implement the use of combinational logic, the decoder
and the demultiplexer, to solve a general problem, which is the need for an oscilloscope in particular. To
accomplish that goal it became necessary to reach some prerequisite goals. Determining what an
oscilloscope means and how that ideal is connected with its practical significance during experiments and
laboratory activities assumed a high degree of importance during the study.

This paper presented a comprehensible oscilloscope through the use of combinational logic. The
proponents of the study made use of a typical decoder incorporated with a demultiplexer. To make the
project more efficient, the proponents administered the usage of ACEduino as a platform for software
development; with this, the construction of a device with response and react to the sensors was made
possible. Oscilloscope is considered as the most important diagnostic tool during experiments. The device
can be used to see the electrical signal sensed by the sensors by displaying the replica of voltage signal as
a function of time; it draws a graph of the electric signal. Some similarities can be observed with the usual
oscilloscope and the device created by the proponents. However, one of the good advantages of the
project is that it is low-budget, unlike the pricey oscilloscope. Overall, the proponents were successful in
designing an adaptive oscilloscope device that can serve as an alternative instrument in observing signals
during experiments. In conclusion, this device can be used as a means of helping researchers to overcome
their shortcomings in during experiments due to lack of accessibility with measuring instruments,
especially oscilloscopes.

VII. Reflection

This reflection on oscilloscope device using combinational logic, the proponents hope, that there
is much potential in contributing to researchers, as well as to the students who want to pursue education
and to push through their learnings. Since this study is new, the proponents forge stronger and deeper
understandings on the basics of oscilloscope, what are its functions, and how it is properly used, including
its relationship to displaying electrical signals. Nevertheless, the proponents of this paper still proved that
the implementation of a simple combinational logic, through the application of a decoder and
demultiplexer, can be considered as a solution to a general problem encountered mostly by researchers.

Vous aimerez peut-être aussi