﻿1
00:00:06,830 --> 00:00:12,410
‫Well come to the microphone interface explain lecture in this lecture I'm going to explain the output

2
00:00:12,710 --> 00:00:17,210
‫from a microphone and how we can read the signals with an FPGA.

3
00:00:17,260 --> 00:00:19,510
‫First off one is a microphone.

4
00:00:19,510 --> 00:00:24,230
‫Everyone is probably familiar with what a microphone is has one used one or heard one.

5
00:00:24,380 --> 00:00:28,040
‫And actually that's what we're using right now to talk to you guys and microphone.

6
00:00:28,300 --> 00:00:31,130
‫But what does a microphone actually physically do.

7
00:00:31,180 --> 00:00:37,660
‫We know we talk to a microphone and it makes it broadcasts our voice over speakers correct.

8
00:00:37,870 --> 00:00:44,680
‫Well not necessarily the microphone is simply a sound transducer and all that means is a microphone

9
00:00:44,680 --> 00:00:49,560
‫takes and sound waves such as your voice and turn them into voltages.

10
00:00:49,810 --> 00:00:55,060
‫And so the output from a microphone is going to be a signal that changes really fast just depending

11
00:00:55,060 --> 00:00:57,950
‫upon the pitch or the volume of your voice.

12
00:00:59,250 --> 00:01:02,660
‫So how do we interface a microphone with an FPGA.

13
00:01:02,910 --> 00:01:08,760
‫Well just like a temperature sensor we need to have an analog to digital conversion that takes place

14
00:01:09,090 --> 00:01:12,650
‫because the output of a microphone is an analog signal.

15
00:01:12,760 --> 00:01:21,330
‫And so you have to either have an external ADC chip for an internal ADC if your FPGA supports that and

16
00:01:21,690 --> 00:01:26,640
‫when the microphone puts an output the louder your voice the higher the output will be.

17
00:01:26,700 --> 00:01:31,690
‫And depending on the frequency of your voice will determine the frequency of that signal.

18
00:01:31,950 --> 00:01:38,490
‫And by taking samples of the microphone at regular intervals we can gain an idea of what that actual

19
00:01:38,580 --> 00:01:42,250
‫signal looks like from a digital perspective.

20
00:01:43,190 --> 00:01:45,830
‫Some will throw a little digital signal processing theory at you.

21
00:01:45,850 --> 00:01:53,400
‫Here we have the Nyquist theory which is also known as the sampling theorem and it states that you must

22
00:01:53,400 --> 00:01:59,590
‫sample at a minimum of twice the rate of a signal you're trying to accurately sample.

23
00:01:59,760 --> 00:02:01,990
‫So what does that mean for a microphone.

24
00:02:02,100 --> 00:02:09,660
‫We're assuming that we're trying to capture the human voice and humans can hear typically in the range

25
00:02:09,660 --> 00:02:12,750
‫of 20 hertz to 20 kilohertz.

26
00:02:12,750 --> 00:02:19,560
‫So to accurately sample a microphone and to be able to recreate that signal we need a sample at a rate

27
00:02:19,620 --> 00:02:23,830
‫of twice 20 kilohertz which would be 40 kilohertz.

28
00:02:24,060 --> 00:02:30,030
‫And if you notice when you use any type of software with like audio recording typically will have a

29
00:02:30,030 --> 00:02:36,050
‫rate of 44 kilohertz and that's because you want to be at least minimum of twice the sampling rate.

30
00:02:36,150 --> 00:02:41,480
‫So they'll sometimes say OK 40 is the minimum we'll go up to 44 just to be sure.

31
00:02:41,490 --> 00:02:47,860
‫And there's a few people who can say they can hear higher than 20 kilohertz.

32
00:02:47,870 --> 00:02:55,370
‫Now if we under sample the audio let's say we don't reach the full 40 kilohertz we sample at 20 kilohertz

33
00:02:55,370 --> 00:02:57,610
‫or 30 kilohertz per se.

34
00:02:58,080 --> 00:03:03,190
‫If we do this we won't be able to actually accurately recreate that signal.

35
00:03:03,260 --> 00:03:07,790
‫We need to know what the highest frequency of the signal we are trying to capture is so that we can

36
00:03:07,790 --> 00:03:12,420
‫accurately recreate that signal and get an understanding of what's going on.

37
00:03:12,820 --> 00:03:18,110
‫If we're if we're under sampling and we think that something else is that is occurring and we're not

38
00:03:18,110 --> 00:03:19,270
‫getting the full picture.

39
00:03:19,280 --> 00:03:24,170
‫This is called aliasing and that's an digital signal processing.

40
00:03:24,170 --> 00:03:29,620
‫They'll use the term aliasing now over sampled audio.

41
00:03:29,680 --> 00:03:33,700
‫You cannot over sample audio where it hurts you per se.

42
00:03:33,940 --> 00:03:41,530
‫If we say we need to have a signal sampled at 44 kilohertz we could sample it at 400 kilo Hertz 500

43
00:03:41,530 --> 00:03:43,190
‫kilohertz 600 kilohertz.

44
00:03:43,360 --> 00:03:47,200
‫It's not going to hurt you or you're just going to throw more samples on that signal and you actually

45
00:03:47,200 --> 00:03:50,580
‫get a better idea of what's actually occurring.

46
00:03:51,000 --> 00:03:55,450
‫And some people when you're working with audio signals they'll claim that when you're sampling at a

47
00:03:55,450 --> 00:04:00,150
‫much higher rate it makes the audio sound much more pure or clear.

48
00:04:00,160 --> 00:04:05,430
‫However to me at 44 kilohertz I can't tell the difference of that sample are higher.

49
00:04:05,470 --> 00:04:08,650
‫Now what will happen if you over sample audio.

50
00:04:08,650 --> 00:04:11,650
‫It's going to cost you in terms of processing time.

51
00:04:11,740 --> 00:04:20,950
‫If you had only a much faster DSP microprocessor or a PDA in his course or with PJ's to run faster means

52
00:04:20,950 --> 00:04:26,260
‫we're going to utilize more power or Also more resources so we can do more things in parallel.

53
00:04:26,290 --> 00:04:29,140
‫So you want to sample high enough to recreate the signal.

54
00:04:29,260 --> 00:04:35,180
‫What you don't want to oversample so much that it costs you in terms of resources and processing time.

55
00:04:36,400 --> 00:04:39,160
‫Now that you know how to interface your FPGA with the microphone.

56
00:04:39,160 --> 00:04:40,660
‫Let's get started on the assignment.

