Вы находитесь на странице: 1из 24

 

Instituto​ ​Tecnológico​ ​y​ ​de​ ​Estudios​ ​Superiores​ ​de 


Monterrey 
Campus​ ​Toluca 
MR2005​ ​-​ ​Mechatronics​ ​Instrumentation​ ​Laboratory 
Pedro​ ​Camelo 

Final​ ​project 

Luis​ ​Guillermo​ ​Castro  Gerardo​ ​Martínez  Isaac​ ​Ayala 


A01361381  A01022033  A01184862 
_____________  ___________  _____________ 

Omar​ ​Méndez  Ibrahim​ ​Aaron​ ​Marmolejo 


I​ ​agree​ ​to​ ​the​ ​the​ ​given 
A01364948r  A01167858 
grade. 
____________  ___________ 

Rubric  Grade 

The​ ​team​ ​presented​ ​a​ ​WORKING​ ​digital​ ​recorder​ ​with​ ​all​ ​the​ ​requested​ ​features.   +50 

The​ ​system​ ​works​ ​at​ ​the​ ​highest​ ​resolution​ ​possible.  +10 

The  signal  is well adjusted at the input and output of the system and there are no 


+10 
cuts​ ​or​ ​saturated​ ​signals. 

The  length  of  the  recording  is  indeed  the  maximum  length  the  system  could 
+10 
deliver​ ​with​ ​the​ ​available​ ​memory. 

Evaluation  of  your  printed  report that should include all the topics mentioned in 


+20 
the​ ​guidelines. 

Subtotal:  100 

The​ ​system​ ​includes​ ​a​ ​physical​ ​filter.  +5 

Total:   

 
 

Index 
1|Research 2 

Operational​ ​Amplifier 2 

Active​ ​Filter 2 

Sallen​ ​Key​ ​Topology 2 

Butterworth​ ​Filter 2 

Passband​ ​Filter 3 

Signal​ ​Sampling 3 

Human​ ​Voice 3 

Nyquist’s​ ​Theorem 4 

Analog​ ​to​ ​Digital​ ​Converter​ ​(ADC) 4 

Digital​ ​to​ ​Analog​ ​Converter​ ​(DAC) 5 

2|Development 6 

Circuit​ ​Design 6 

Data​ ​Acquisition 6 

Data​ ​Conversion 11 

Data​ ​Storage​ ​and​ ​Retrieval 12 

Data​ ​Output 15 

3|Physical​ ​Implementation 17 

4|Conclusions 20 

References 21 
 

   


 

1|Research 

Operational​ ​Amplifier  
An  operational  amplifier  is  an  electronic  amplifier,  that  has  been  widely used in several 
fields  for  control  engineering  and  electronics.  Its  versatility  stems  from  the  multiple 
configurations  in  which  it  can  be  connected  with  external  components,  allowing  the 
engineer  to  perform  mathematical  operations  with  different  voltage  levels,  as  well  as 
other​ ​applications. 

Active​ ​Filter 
An  active  filter  is  a  filter that uses active components to function. The active components 
are  those  that  can  introduce  energy  to  a  circuit,  such  as  an  operational  amplifier.  It  has 
proven  to  be  more  reliable  and  versatile  when  compared  to  passive  filters,  because 
higher  order  filters become accessible. Two important configurations are available when 
using  operational  amplifiers:  the  Sallen  Key  topology  and  the  Multiple  Feedback 
topology. 

Sallen​ ​Key​ ​Topology 


The  Sallen  Key  topology  is  one  possible  way  to  connect  components  to  an  operational 
amplifier  to  create  an  active  filter.  It  is  the  most  commonly used configuration due to its 
unity-gain​ ​output.​ ​Its​ ​high​ ​accuracy​ ​is​ ​also​ ​an​ ​important​ ​characteristic. 

Figure​ ​1.1​ ​Sallen​ ​Key​ ​topology.​ ​Source:​ ​Wikipedia. 

Butterworth​ ​Filter 
The  Butterworth  filter  is  one  of  the  possible  filter  designs  that  can  be  used  within  the 
Sallen  Key  topology.  Its  most  important  aspect  is  the  behavior  of  the  input  and  output 
signals  above  or  below  the  cutoff  frequency.  It  can  be  seen  that  the  signal  below  the 


 

passband  does  not  experience  any  change  in  its  magnitude  (dB)  as  seen  in  the  next 
figure. 

Figure​ ​1.2​ ​Butterworth​ ​signal​ ​magnitude.​ ​Source:​ ​Texas​ ​Instruments. 

Passband​ ​Filter 
A  passband  filter  is  a  filter  designed  to  only  allow  signals  within a designated frequency 
range  to  be observed at the output without affecting its magnitude. Frequencies above or 
 
below​ ​the​ ​frequency​ ​range​ ​observe​ ​a​ ​magnitude​ ​loss​ ​of​ ​-10​ ​dB​ ​per​ ​decade.

Signal​ ​Sampling 

Human​ ​Voice  
The  frequency  range  differs  between  males  and  females.  For  males,  the  fundamental 
frequency  spectrum  ranges  from  80 Hz to 185 Hz. Females possess a greater range, going 
from  165  to  255  Hz.  These  ranges  are  only  for  fundamental  frequencies,  and  practical 
applications  use  a  greater  range.  Telephony  systems  use  an operating range of 300 Hz to 
3.4​ ​kHz. 


 

Nyquist’s​ ​Theorem 
The  sampling  theory  states  that  for  a  limited  bandwidth  signal,  the  sampling  frequency, 
fm,  must  be  greater  than  twice  its  bandwidth  [B]  measured  in  Hertz  [Hz].  This  is  due  to 
the  information  that  can  be  observed,  at  the  same  frequency  as  the  input  signal  a 
constant  value  would  be  observed.  At  higher  frequencies  more  information  from  the 
original​ ​signal​ ​can​ ​be​ ​obtained. 

Figure​ ​1.3​ ​Sampling​ ​at​ ​different​ ​frequencies.​ ​Source:​ ​ASDL​ ​Community. 

Analog​ ​to​ ​Digital​ ​Converter​ ​(ADC) 


The ADC0808, ADC0809 data acquisition component  is a monolithic CMOS device with an 
8-bit  analog-to-  digital  converter,  8-channel  multiplexer  and  ​microprocessor  compatible 
control  logic.  The  8-bit  A/D  converter  uses  successive  approximation  as  the  conversion 
technique.  The  converter  features  a  high  impedance  chopper  stabilized  comparator,  a 
256R  voltage  divider  with  analog  switch  tree  and  a  successive  approximation  register. 
The​ ​8-channel​​ ​multiplexer​ ​can​ ​directly​ ​access​ ​any​ ​of​ ​8-single-ended​ ​analog​ ​signals. 

Digital​ ​to​ ​Analog​ ​Converter​ ​(DAC) 


The  DAC0808  is  an  8-bit  monolithic  digital-to-analog  converter  (DAC)  featuring  a  full 
scale  output  current  settling  time  of  150  ns  while  dissipating  only  33  mW  with  ±5V 


 

supplies.  No  reference  current  (IREF)  trimming  is  required  for  most  applications  since 
the  full  scale  output  current  is  typically  ±1  LSB  of  255  IREF/256.  Relative  accuracies  of 
better  than  ±0.19%  assure  8-bit  monotonicity  and  linearity  while  zero  level  output 
current  of  less  than  4  µA  provides  8-bit  zero  accuracy  for  IREF≥2  mA.  The power supply 
currents  of  the  DAC0808  is  independent  of  bit  codes,  and  exhibits  essentially  constant 
device​ ​characteristics​ ​over​ ​the​ ​entire​ ​supply​ ​voltage​ ​range. 

   


 

2|Development 

Circuit​ ​Design 
The  complete  circuit  is  divided  into  six  stages,  each  detailing  a  different  aspect  of  the 
system.​ ​Interactions​ ​between​ ​stages​ ​are​ ​shown​ ​as​ ​inputs​ ​and​ ​outputs​ ​of​ ​each​ ​block. 

FIgure​ ​2.1​ ​Top​ ​level​ ​circuit​ ​schematic. 

Data​ ​Acquisition 
Data  acquisition  is  done  through  the  use  an  electret  microphone,  coupled  to  an 
amplifying  circuit  to  enhance  the  amplitude  of  the  signal.  The  microphone  used  is  a 
CZN-15E,  which  operates  at  4.5  V  and  1  mA.  To  ensure  proper  functionality  at  9  V  DC,  a 
series  resistor  was  used  to  control  the  power  fed  into  the  microphone.  Also,  a  bandpass 
filter​ ​was​ ​added​ ​to​ ​remove​ ​undesired​ ​input​ ​noise. 

The  signal  produced  by  the  electret  microphone  without  amplification  had  and 
amplitude  of  200  mV.  As  suggested  by  the  supplier,  a  0.1  uF  capacitor  was  added before 
signal  measurements  to  remove  the  DC  component  of  the signal. The amplification stage 
was  done  by implementing an inverting amplifier with a gain of - 10, followed by unitary 
gain​ ​inverting​ ​amplifier​ ​to​ ​recover​ ​the​ ​original​ ​phase​ ​of​ ​the​ ​signal. 
Rf 100 k
A =− R =− 10 k =− 10  


 

Figure​ ​2.2​ ​Amplification​ ​circuit. 

To  remove  the  noise  captured  by  the  microphone,  the  Butterworth  passband  filter  was 
designed  to  filter  signals  out  of  the  range  of  300  Hz  and  3.4  kHz.  This  range  was  chosen 
based  on  the  common  frequency  spectrum  range  used  in  telecommunication  systems. A 
fourth  order  passband  filter  based  on  the  Sallen-Key  topology  was  used.  Based  on  the 
following  formulae,  the  values  for  each  stage  were  obtained.  After  testing  the  physical 
implementation​ ​of​ ​the​ ​circuit,​ ​the​ ​cutoff​ ​frequencies​ ​shifted​ ​to​ ​340​ ​Hz​ ​and​ ​3.35​ ​kHz. 

Low​ ​Pass​ ​Filter 

2 C 2 ≥ C 1 4b
a2  
R1,2 = √
a C 2 ∓ a2 C 2 − 4bC 1 C 2
 
4 π f c C1 C2

High​ ​Pass​ ​Filter 


1 a
R1 = π fc C a   R2 = 4π f c C b  
Table​ ​2.1​ ​Filter​ ​design​ ​values. 

Low​ ​Pass​ ​Filter 

  1st​ ​stage  2nd​ ​stage 

a  1.8478  0.7654 
b  1  1 

C1​ ​[nF]  1  1 

C2​ ​[nF]  1.17​ ​(1)  51.2​ ​(47) 

R1  43,248.01​ ​(43.248​ ​k)  1,236.99​ ​(1.237​ ​k) 


 

R2  43,248.02​ ​(43.248​ ​k)  34,591.59​ ​(34.591​ ​k) 

High​ ​Pass​ ​Filter 

a  1.8478  0.7654 
b  1  1 

C​ ​[nF]  1  1 

R1  574,214.18​ ​(574.214​ ​k)  1,386,246.35​ ​(1.386​ ​M) 

R2  490,144.17​ ​(490.144​ ​k)  203,028.66​ ​(203​ ​k) 


 

Figure​ ​2.3​ ​Filter​ ​circuit. 


 

Figure​ ​2.4​ ​Filter​ ​behavior​ ​below​ ​cutoff​ ​frequency. 

Figure​ ​2.5​ ​Filter​ ​behavior​ ​at​ ​lower​ ​cutoff​ ​frequency. 


 

Figure​ ​2.6​ ​Filter​ ​behavior​ ​at​ ​upper​ ​cutoff​ ​frequency. 

Figure​ ​2.7​ ​Filter​ ​behavior​ ​within​ ​bandpass​ ​frequency​ ​range. 

10 
 

Data​ ​Conversion 
The  filtered  signal  voltage  range  (-2  V  to  2  V)  did  not  match  the  voltage  reference  range 
available  for  the  ADC  (0  V  to  5  V),  thus  a  level  shifter  was  added  to  ensure  the  signal  fit 
the  required  voltage  range.  The  clock  signal  fed  into  the  ADC  was  120  kHz,  generated 
with  a  555  timer  IC.  With  the  voltage  reference  of  5V,  the  resolution  of  the  system  was 
19.5​ ​mV​ ​per​ ​bit. 

Level​ ​shifter 
R2 −
V out = R1 (V − V +)   -​
V​+​=-2V 
V​ =Input​ ​Signal 
V out = 1.25 V − + 2.5   R​1​=10k 
V out ∈ [0, 5]   R​2​=12.5k 

555​ ​timer 

f>100kHz,​ ​given​ ​R​A​=330,​ ​R​2​=330,​ ​and​ ​C​ ​=0.01​ ​uF 


1.44
f = (R +2
A R )C = 145454 Hz  
B

ADC​ ​Resolution 
5V mV
Resolution = 256 bits ≈ 19.5 bit  
 

11 
 

Figure​ ​2.8​ ​ADC​ ​circuit. 

Data​ ​Storage​ ​and​ ​Retrieval 


Data  storage  was  done  on  a  CMOS  RAM  IC  (6116),  with  a  total  of  2048  addresses  and  8 
parallel  I/O  pins.  Two  74LS245  IC  were  employed  as  buffers  to  separate  input  data  from 
output data. Control of the system was achieved with two 555 timers in monostable mode 
and​ ​2​ ​LEDs​ ​to​ ​provide​ ​visual​ ​feedback. 

To  change  addresses  on  the  RAM  IC,  three  74LS193  IC  were  used  in  a  cascade 
configuration  to  obtain  a  12  bit  binary  counter.  Only  11  bits  were  used  by  the  RAM, 
leaving  the  last  output  pin  free.  A  reset  instruction  was  sent  to  all three IC when the last 
counter​ ​exceeded​ ​the​ ​last​ ​available​ ​address​ ​of​ ​the​ ​RAM​ ​with​ ​the​ ​use​ ​of​ ​logic​ ​gates. 

To  determine  the  frequencies  required  to  properly  read  and  write  data  to  the  RAM,  the 
minimum  Read  Cycle  Time  (RCT  =  120  ns)  and  Write  Cycle  Time  (WCT  =  120  ns)  were 
obtained  from  the  manufacturer’s  datasheet.1  This  time  determine  the  maximum 

1
​ ​http://ee-classes.usc.edu/ee459/library/datasheets/6116SA.pdf 
12 
 

frequency  (8.33  MHz)  at which the binary counters could operate, and the one-shot pulse 


duration​ ​of​ ​the​ ​555​ ​timers​ ​were​ ​also​ ​determined​ ​in​ ​a​ ​similar​ ​fashion.  

Given  the  maximum  read  and  write  frequency  exceeded  the  maximum  frequency  at 
which  the  ADC  could  convert  data,  the  frequency  of  the  binary  counters  was  arbitrarily 
set  to  900  Hz.  This  allowed  for  a  total  WCT  and  RCT  of  1ms  per  address,  a  total  of  2.048 
seconds  to  fill  all  2048  available  addresses with data. This meant that a maximum of two 
seconds  of  sound  could  be  recorded.  The  monostable  555  timers  were  then  adjusted  to 
this​ ​time. 

555​ ​Timer​ ​-​ ​Monostable​ ​configuration 

t ≈ 1.1R C   R~1.818M 
2 s ≈ 1.1 R * 1uF   C​ ​=​ ​1uF 
R ≈ 2 −6 ≈ 1.818 M  
1.1*10

555​ ​Timer​ ​-​ ​Astable​ ​configuration 


1.44
f= (RA +2RB )C   R​A​ =​
​ ​R​B​ =​
​ ​5333.33 

900 = 1.44
  C=0.1​ ​uF 
3 R *0.1*10−6
R = 5333.33  
 

13 
 

Figure​ ​2.9​ ​RAM​ ​circuit. 

14 
 

Data​ ​Output 
Conversion  of  the  bits  provided  by  the  RAM  IC  is  done  by  the  DAC0808.  The  reference 
voltages  were  adjusted  for  a  5  V  output,  and  the  signal  amplitude was then adjusted to a 
maximum  of  0.4  V  peak  with  the  help  of  a  level  shifter.  This  was  required  to  avoid 
damaging  audio  amplifier  (LM386)  used  to  control  the  speaker  output,  which  has  a 
maximum  input  signal  voltage  rating  of  0.4  V.  The  audio  amplifier  was  implemented 
with  a  gain  of  20,  thus  resulting  in  a  maximum  output  voltage  8  of  V,  which  is  then  fed 
into​ ​the​ ​speaker. 

ADC08808 
n=8 V​ref​​ ​=​ ​5V 
1*biti
V out = V ref * ∑  
i=1 2
i
bit=0​ ​if​ ​LOW​ ​input,​ ​1​ ​if​ ​HIGH​ ​input 

V ref 5V V​ref​=5V 
I max = R = 4700Ω = 1mA   R=4700 

Level​ ​shifter 
R
V out = R2 (V − − V + )   V​+​=2.5V 
1 V​-​=Input​ ​Signal 
V out = 0.16 V − − 0.4   R​1​=100k 
V out ∈ [− 0.4, 0.4]   R​2​=16k 

15 
 

Figure​ ​2.10​ ​DAC​ ​circuit. 

Figure​ ​2.11​ ​LM386​ ​circuit. 

   

16 
 

3|Physical​ ​Implementation 
Each  stage  of  the  circuit  was  built  on  a  different  breadboard  to  accelerate  testing  and 
improve  design  modularity  in  case  any  stage  failed.  Testing  circuits  were  also  built  to 
verify  the  behavior  of  the  following  IC:  ADC0808,  DAC0808  and  RAM  6116.  Videos  of the 
functional​ ​circuit​ ​are​ ​provided​ ​here: 

● https://youtu.be/38xV_cNXm3Q 
● https://youtu.be/AYXRqO30XWU 

Figure​ ​3.1​ ​Microphone,​ ​filter​ ​and​ ​level​ ​shifter​ ​stage. 

Figure​ ​3.2​ ​ADC​ ​stage. 

17 
 

Figure​ ​3.3​ ​RAM​ ​stage. 

Figure​ ​3.4​ ​DAC,​ ​level​ ​shifter​ ​and​ ​audio​ ​amplifier​ ​stage. 

18 
 

Figure​ ​3.5​ ​ADC​ ​testing​ ​circuit.   

19 
 

4|Conclusions 
Several  problems  were  encountered  in  the making of this circuit. These problems all can 
be  grouped  into  a  single  category:  faulty  components.  The  usage  of  this  technology  did 
not  facilitate  the  implementation  of  the  circuit,  because  of  the  high  sensitivity  to  static 
that  the  ICs  possessed.  A  better  implementation  could  be  done  with  other  components 
such​ ​as​ ​a​ ​PIC​ ​and​ ​dedicated​ ​ICs​ ​that​ ​are​ ​currently​ ​produced​ ​by​ ​different​ ​suppliers. 

In  general,  too  many  things  could  have  gone  wrong  because  of  the  sheer  amount  of 
components  used.  The filter stage needed special attention, because high deviations from 
the  specified  values  caused  the  TL084  to  go  into  saturation.  Faulty  ADCs  prevented 
proper​ ​testing​ ​of​ ​the​ ​complete​ ​circuit,​ ​because​ ​its​ ​output​ ​could​ ​not​ ​be​ ​trusted. 

   

20 
 

References 
Kugelstadt,  Thomas.  (2008).  Digital  to  Analog  Converter  (DAC).  Abril  3,  2017,  de  Texas 
instruments​ ​Sitio​ ​web:​ ​https://focus.ti.com/lit/ml/sloa088/sloa088.pdf 

Kugelstadt,  Thomas.  (2013).  Analog  to  Digital  Converter  (ADC).  Abril  3,  2017,  de  Texas 
Instruments​ ​Sitio​ ​web:​ ​http://www.ti.com/lit/ds/symlink/adc0808-n.pdf 

Anonymous.  (1999).  Digital  to  Analog  Converter  (DAC).  Abril  3,  2017,  de  Texas 
Instruments​ ​Sitio​ ​web:​ ​http://www.ti.com/lit/ds/symlink/dac0808.pdf 

Anonymous.  (2017).  Operational  Amplifier  Basics.  abril  3,  2017,  de  Electronics  Tutorials 
Sitio​ ​web:​ ​http://www.electronics-tutorials.ws/opamp/opamp_1.html 

Anonymous.  (2017).  Active  Low  Pass  Filter.  Abril  3,  2017,  de  Electronics  Tutorials  Sitio 
web:​ ​http://www.electronics-tutorials.ws/filter/filter_5.html 

Texas  Instruments.  (2011).  Sallen-Key  Topology.  Abril 3, 2017, de Texas Instruments Sitio 


web:​ ​http://www.ti.com/lit/an/sbfa001c/sbfa001c.pdf 

Burr  Brown.  (1991).  Application  Bulletin.  Abril  3,  2017,  de  Burr  Brown  Sitio  web: 
http://electro.uv.es/asignaturas/ea2/sintesis/sallen-key.pdf 

Anonymous.  (2017).  Passive  Band  Pass  Filter.  Abril  3,  2017,  de  Electronics  Tutorials Sitio 
web:​ ​http://www.electronics-tutorials.ws/filter/filter_4.html 

Anonymous.  (2017).  Band  Stop  Filter.  Abril  3,  2017,  de  Electronics  Tutorials  Sitio  web: 
http://www.electronics-tutorials.ws/filter/band-stop-filter.html 

Anonymous.  (2017).  Human  Speech  Spectrum,  Frequency  Range,  Formants  .  Abril  3, 
2017,  de  AV  Info  Sitio  web: 
http://www.bnoack.com/index.html?http&&&www.bnoack.com/audio/speech-level.html 

Wescott,  Tim.  (2016).  Sampling:  What  Nyquist  Didn’t  Say,  and  What to Do About It. Abril 
3,  2017,  de  Wescott  Design  Services  Sitio  web: 
http://www.wescottdesign.com/articles/Sampling/sampling.pdf 

21 

Вам также может понравиться