Thursday, 23 April 2015

Writing Final Report

I started writing my report since the half way through of the project. I started by writing a bit by bit in this way it gives me more time to check and rewrite again if I'm not happy with that. Some of the chapter I've to change it may be two or three time to get it right. Before start writing the report it is necessary to know that what kind of element require in the report and also the structure of  the report is also need to be logical. The basic structure of my report is shown as follow: But one must bear in mind this it not finish yet and could be changed again.

Title page
Abstract
Acknowledgement
Contents page
Chapter 1: Introduction
1.1: Aims and Objectives
1.2: Project Background
1.2.1: Pulse code Modulation (PCM)
1.2.1.1: Sampling
1.2.1.2: Quantization
Chapter: 2 Fibre Optic Technology
2.1: Optical Transmission
2.1.1: Laws of Reflection
2.1.2: Law of Refraction
2.1.3: Critical Angle
2.1.4: Total Internal Reflection
2.1.5: Numerical Aperture
2.2: Types of Fibre
2.2.1: Step Index
2.2.2: Graded Index
2.2.3: Multimode
2.2.4: Single mode
2.2.5: Plastic Optical Fibre
Chapter 3: LED (Light Emitting Diode) and Photo-detector
3.1: LED Driver Circuit
3.2: Photo-detector Circuit
Chapter 4: System's Circuit
4.1: PCM Codec Circuit
4.2: Crystal Master Clock
4.3: Frequency Divider Circuit
Chapter 5: Result and Discussion
5.1: Crystal Master Clock
5.2: Bit Clock
5.3: Frame Synchronization Clock
5.4: Serial Data Output
5.3: Testing Transmitter's Input and Receiver's Output
5.6: System's 3dB Bandwidth
Chapter 6: Future Work
Chapter 7: Investigate Time Division Multiplexing (TDM)
Chapter 8: Conclusion
Reference List

Monday, 6 April 2015

Poster

Before we start making the poster we got to make sure that we have something already in our mind. Therefore we need to decide the type of design or which kind of design of the poster we are going to make. And prepare everything before start making the poster in the power point is essential. In my case I decided to make portrait design poster to suit my ideal and design. Based on my research most of the poster are very simple design without overload the poster with text because a poster is simply just a visual presentation. Planning is very important before we even start. So we can mock up our design by hand and plan our content and layout. And also it is important to design our poster at the actual size that it will be printed. And also the resolution of the poster are also very important. Since most of the posters are printed out using 300dpi resolution. Therefore, extra care must be taken whatever photo we will insert into the poster. All photo must have 300dpi resolution because most of the images download from the internet only have a resolution of 70dpi. This could create a problem when printing out and the poster image will be blurred will not be able to see it clearly. There are number of software can be used to create a poster such as power point and photoshop. In my case I used powerpoint since it is very easy to used. After finich the poster design we can test it out whether the poster has the quality that we want by simply save the design into pdf format. And then open it and then zoom the poster up to 400% to check that the quality is good or not. If the poster is blurred then for sure we can't print it because after all it will look blurry and not clear.

3dB Bandwidth

3dB bandwidth is the frequency at which a input signal is attenuated by 3dB and which is 70.71% of the signal true amplitude. So this means that at its specified bandwidth the device can show as little as 70.71% of the actual amplitude of the signal. This can be measured by simply using the function generator and feed the since wave frequency into the system and then monitor it with oscilloscope then take the output voltage from the oscilloscope using the formula show here to calculate the gain. So we do this by increase the frequency gradually until the response drop to 3dB which is 70.71%. The whole process of measuring this taking a lot time because we need to do different value of frequency until we found the point that drop to 3dB.



Gain = 20 x Log10 (Vout/Vin)





Saturday, 28 February 2015

Clock Synchronization Problem

After testing the whole circuit and it is working as expected by using the same clock for both transmitter and receiver. But the biggest problem is that when I separate the two pieces apart and using different separate clock the problem occurred because the two clocks were not in sync both transmitter and receiver. But the system still transmitting and receiving data perfectly fine, when they are in sync I can hear the music when they are not I've got this jitter noise. Found out that the problem was the frame clock since the frame clock trigger the PCM transmitter and receiver. Therefore, the frame clock must be absolutely in sync. Since the PCM receiver need to know when the information is being sent and this can be achieve by using structure called frame. The beginning of the frame consists of repeated copies of a special bit pattern called a frame marker. So the frame markers are repeated several times to allow time for bit synchronization to be achieved before the arrival of the information bits. And then the frame markers are followed by a stare of message marker which is another special bit pattern, to mark the start of the information bits. Therefore, in order to solve this problem I need to do a lot research on how to recovery the frame clock from the transmitter so both transmitter and receiver clock are in sync.

Combining all Circuit and Testing

At this state all individual circuit were working and now it's time to connect them all together and testing them out. When connect all the circuit it is necessary to pay extra attention because if some connection between the pin or chips are not properly grounded will have a problem during operation. Based on my experience it is better to do it step by step and follow the schematic. And also check all connection as it goes. When it's all being connected then used since wave to check each chip's input and output so we know it is behaved as expected. When all the chip working as expected then we can use mp3 music player to send a music into the ADC, for this project we used iphone to play music then feed it into PCM encoder and then the output of the encoder will output digital data which then send into LED driver to transmit through fiber cable. And at the other end the receiver photodiode will receive the data been transmitted and then send it to PCM decoder and it will convert it back to analog signal. And then to play the music I'm going to use my computer to play back so the analog output of the PCM decoder will connect to audio interface and then the interface will connect to my computer and output the music. During this process I've encountered lot of problem such as wrong connection of the clock, LED driver (wrong calculation of resistor), lot of noise from LED transmitter and photodiode receiver and so on. The worse thing is identify the problem when the problem is identified then it can be easily solve but sometime a little bit difficult. 

Friday, 30 January 2015

Photodiode Circuit

Photodiode circuit for this project is quite simple and easy to implement since I'm using SFH551/1-1V. According to the data sheet the SFH511 is a silicon based and directly connected to a transimpedance amplifier that works as a pre amplifier. And also a differential amplifier is connected in series and works as a post amplifier. Then its output is passed to the internal Schmitt- trigger that drives bipolar NPN transistor. So the data out signal is from the collector of the bipolar transistor. Since SFH551 is a transimpedance amplifier with TTL open collector output stage and therefore a pull up resistor of 330ohm is used as shown in figure. And the capacitor is to reduce interference and it is recommended that it must place close to SFH551.



LED Driver Circuit

Since we know that LED requires specialized devices called LED drivers to operate. So the LED driver provide LED with electricity they require to function and perform at their best. It also protect LED from voltage or current fluctuation. Changing in voltage could cause changing in current being supplied to the LEDs. So the LED light output is proportional to its current supply, and LED are rated to operate within a certain current range. Therefore, too much or to little current can cause light output to vary or degrade faster due to higher temperatures within the LED. For our LED transmitter circuit we used the circuit that recommended from the SFH757V data sheet as shown in Figure. In this circuit as shown in the figure we used a Texas Instruments peripheral driver for high current switching at high speeds which is good for applications like optical transmission especially for LED driver circuit. As in the circuit the two capacitors are for filtering and a 1k resistor is a pull up resistor which is for a stable high level on one of the two inputs of the used AND gate (chip). And then the 50ohm resistor is to reduce reflections between data source and input port of the used AND gate. The R_ILED is very important in this circuit which limits the current through the LED. When we connect the circuit it is very important to take extra care with the LED connection. If we connect with the wrong pin then we could easily blow up the LED. And also the supply voltage as well it is necessary to read the LED data sheet and supply the voltage which is recommended. 



Testing Both ADC/DAC Circuit

When each segment of the circuit is tested and working, now it's time to test both ADC and DAC  circuit without the fiber optic transmitter and receiver. So we can test this by using a sine wave that feed into the ADC and then using the wire to connect to DAC and then observe the output. Bear in mind this it using the same clock for both chip just to check if there is a problem with the chip. First we need to supply master clock, bit clock and frame clock to the ADC and then feed a sine wave to the ADC and then digital data from the ADC output will then feed to the DAC input, therefore the output of the DAC should output a since wave. If we will get this then we can be sure that both chip are working fine. Most of the problems I encountered, were related with the clock. If the clock is not stable, the chip will result in error. Since master clock is main clock in this whole circuit we got to make sure that the master clock is stable. Otherwise, the frequency divider circuit will also get a wrong clock frequency value so they are all linked.

Thursday, 22 January 2015

Negative Voltage circuit

Since this chip require negative voltage so this it another problem to solve because if we use power supply then it is fine we can use dual power supply to supply negative voltage without a problem. In order to supply the negative voltage without a power supply is challenging therefore more research needed to be done.  Based on my research and found out a chip which can be supplied a negative voltage. This problem can be solved by implementing this chip into our PCM encoder circuit. As shown in figure is the circuit that will supply the negative voltage and in that circuit the capacitor are very important factor for generating the negative voltage.

PCM Chip Circuit

At this state we got all the clock ready and it's time to set up the PCM encoder. First we need to calculate the resistor value for the amplifier which are R1 and R2. Then using the capacitor value 10uF and 0.01uF capacitor between +5V and GND to decouple the interference from the digital siganls to analog signals. And also it is recommended that these two capacitor should place very close to the chip. And then connect all clock such as master clock, bit clock and frame clock to its dedicated pin to get ready for testing.

Frequency Divider Circuit

 Frequency Divider Circuit


When the master clock is worked and everything is as expected. Then the next step is to build the frequency divider circuit. Since we don't have a lower crystal value the best way to get the low clock frequency value is to divide the master clock by using 2 counters and flip flop. The first counter will the divide the master clock by 32 and then feed into the D flip flop so that will give us 64kHz for bit clock. That 64kHz will divide by second counter by 8 will result 8kHz for FSYN. Since this circuit involved a lot of connection it is a good way to use a colour coding wire. Otherwise it can easily mess up the connection therefore create more problems. And also the chip must be probably grounded otherwise we are not getting the right frequency oscillating clock.

Monday, 24 November 2014

Master Clock Circuit



Using crystal circuit to generate clock pulse for the chip, I'm using a technique called Schmitt- Triggered inverter.  So the if the input of the inverter goes low and therefore the output goes high. And the transition is very sharp contain many different frequency harmonics but only the one with the same frequency as the crystal will pass through. So the Schmitt-Triggered  inverter compares the input signal with two thresholds instead of one as in simple inverters or gate. Therefore, the input has to be higher than one threshold for the output to change and lower than the other one for the output to change back. As shown in figure below when there is a low on the input of the inverter and a high at its output, the capacitor on the input of the inverter is charged through the feedback resistor. When the capacitor is charged high enough that the input voltage of the inverter passes the higher threshold then its output drops to zero. Then the capacitor will start discharging through the same resistor and when its voltage drops below the lower threshold of the inverter and its output jumps up again and this will happen continuously and resulting in a square wave. The oscillating frequency of this circuit depends on how fast the capacitor charges and discharges and therefore is a factor of the resistance and capacitance value, while it is also dependent on the threshold levels. Below is the circuit that used 2 MHz crystal to generate master clock for the chip. The biggest problem for this circuit is that the oscillating frequency is not stable so I had to find the best combination of the resistor and capacitor to make it stable. So we get the clock frequency that we desire for the master clock.



Research on components

Since this project requires ADC and DAC for data conversion. There are many converter that can be used in this project. I've found this PCM codec which utilizing A/D and D/A conversion architecture. Since this chip contain both A/D and D/A therefore it is easy to implement it and learn it. Because of the chip is used for voice communication the sample rate is very low. And also the price is very cheap. Since this chip requires three different clocks such as Master clock, Bit clock and Frame clock, therefore this project will require clock generation circuit to supply the clock. In order to get the Master clock circuit it is necessary to find out how we're going to achieve it. The best solution would be using crystal to build crystal oscillator circuit. Since there are different techniques to build a crystal circuit and therefore further research needed to be done. Then the driver circuit for LED also needed for transmit the data. Also need to decide which LED we're going to use. For the transmitter side the chip and LED we're going to use for this project are shown below.



                                                                     
                                                                       PCM codec
                                                                     Transmitter LED

Thursday, 20 November 2014

Presentation For Project Proposal

To be able to present my project proposal successfully I totally understand that I have to do more research on the topic that I'm going to talk about. In my presentation, I'm planning to talk about the outline first and then explain the outline of the presentation. The main topics of my presentation going to be a thing like - what do I want to do for my project? Why do I want to do the project? And how do I achieve that?

What do I want to do for my project?

- Transmission audio signal using optical fiber
- Frequency range 20Hz-20kHz
- With line level Input voltage
- Improve design for XLR
- Comparison performance with other method
- Investigate (TDM) Multiplexing
- Investigate modulation techniques (AM, FM, PCM)

Why do I want to do the project?
- Gain new knowledge
- Build multichannel transmission ( In the future)
- Learn advantage of using fiber optic

How do I achieve that?
- Research
- Literature Review
- Design, build and test
- Perform audio test
- Investigate possible of using XLR

All these topics will be delivered and explain on the day. In order to successfully deliver the presentation I believe I got to do a lots of practice.

Wednesday, 12 November 2014

Fiber Optic Technology

Since the nature of this project will be using the fiber optic cable to transmit audio signal, it is essential to understand how fiber optic transmission works and also the construction of the fiber cable, how light propagate in an optical fiber, dispersion characteristics, various connector types, bandwidth, operation of light emitting diodes etc. in order to understand all these topics I'm totally aware of that an intensive research needed to be done. Optical fiber uses light pulse to transmit information from one point to another. So light will act as a carrier and carry modulated signal using light pulse through optical cable and at the receiver end the photodiode will detect the signal and convert it back to electrical signal. So the fiber is a waveguide and basically guide the light to the end to the receiver. The most important of light propagate within the fiber is Snell's Law, which is from basic physics. So the Snell's law is all about refraction and the bending of light as it goes from one medium to another. There are different types of optical fiber cable such as single mode, multimode and plastic optical fiber. It is necessary to decide which type of cable to use for this project and chosen cable is a plastic optical cable because of the price. And also it can be bended up to 20mm with no change in transmission. But the downside of the plastic fiber is that the transmission reduces as the distance increase. Single mode fiber cable is much narrow, which confine the optical signal to a straighter path with less reflections and therefore reduces light dispersion and result cleaner signal. Multimode optical fiber is mostly used to transmit over short distance because it can propagate many mode and also available in graded index. The graded index is the fiber core that has a reflective index, which reduces the intermodal dispersion.

PCM Modulation


Many transmission link like telecommunication nowadays using digital transmission because of its accuracy. For this project we're going to using PCM modulation technique to do the transmission. PCM modulation is mostly used in telecommunication to transmit voice signal. So PCM modulation will include sampling and quantization as shown in the Figure. PCM is a technique of converting analog signal to digital which can be transmitted over a medium like fiber or Ethernet. Then this signal will be converted back to analog signal. There are three steps involves in pulse code modulation such as sampling, quantization and coding. Sampling process is where the signal is sampled regularly at uniform intervals and the result of the values is called samples. Quantization is the process of converting the samples into discrete digital values.







Monday, 10 November 2014

FM Modulation


FM modulation is the process of the frequency of carrier wave is changed with the intensity of the signal is called frequency modulation. The amplitude and phase of the carrier wave remains constant in frequency modulation. Only the frequency of the carrier wave is change with the signal. The analog sound in frequency modulation signal is that the signal to noise ration at the receiver can be improved. And also the frequency of an FM transmitter without signal input is called the resting frequency or centre frequency and this is the allotted frequency of the transmitter.





AM Modulation

There are three different types of modulation techniques can be used for this project such as AM, FM and PCM modulation. These can be digital or analog but we have to be careful with the bandwidth. Because the analog system can have a limitation and therefore the digital system is more suitable for this project. Amplitude modulation is where the amplitude of high frequency carrier wave is changing with the intensity of the signal and it is much simpler to design. But have a Bandwidth limitation which is not the best solution for this project.



Saturday, 8 November 2014

Planning For Writing Proposal

As all the necessary research has done for proposal and it is time to start planning and writing the proposal document. Since the proposal document well structure therefore it is essential to think and plan the document logically so it will allow the reader to read easily. Below is how I'm going to structure my proposal document. 

Chapter1: Introduction
          1.1: Motivations
          1.2: Aims
          1.3: Objective
       1.3.1: Literature Review over Fiber Optic Technology
       1.3.2: Investigate Various Modulation Techniques
       1.3.3: Design, Build and Test Optical Fiber Transmitter and Receiver Circuit
       1.3.4: Perform Audio Test in Studio
       1.3.5: Investigate Possible of Using XLR
       1.3.6: Investigate Multiplexing
Chapter2: Literature Review
         2.1: Optical Fiber For Professional Audio
         2.2: Modulation Techniques (AM, FM, PCM)
         2.3: Time Division Multiplexer (TDM)
Chapter3: Methodlogy
Chapter4: Possible Solution
Chapter5: Chosen Solution
Chapter6: Project Action Plan
Reference List
         

Meeting

Met supervisor and discuss all the option and that we could do to implement the system. Things like ADC/DAC, LED driver and also type of fiber cable. How we're going to design the circuit and also the project plan. Got a lot information and guidance from supervisor things like what research need to be done as well as how to go and do it. We both agreed that to do the project step by step and so we started to design the project. Since the natural of my project involve a lots of different part and circuit therefore need to break down into part by part. And also we've decided to do research on different modulation techniques and when is done, we'll then decide which technique we're going to implement. Next step will be doing the research and also research on what ADC/DAC we're going to use for the project.