* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Analog Path Amplification/Attenuation Resistive divider --
Surge protector wikipedia , lookup
Flip-flop (electronics) wikipedia , lookup
Power dividers and directional couplers wikipedia , lookup
Power MOSFET wikipedia , lookup
Oscilloscope types wikipedia , lookup
Cellular repeater wikipedia , lookup
Analog television wikipedia , lookup
Oscilloscope wikipedia , lookup
Superheterodyne receiver wikipedia , lookup
Power electronics wikipedia , lookup
Integrating ADC wikipedia , lookup
Transistorβtransistor logic wikipedia , lookup
Audio crossover wikipedia , lookup
Analogue filter wikipedia , lookup
Oscilloscope history wikipedia , lookup
Mechanical filter wikipedia , lookup
Two-port network wikipedia , lookup
Valve audio amplifier technical specification wikipedia , lookup
Distributed element filter wikipedia , lookup
Current mirror wikipedia , lookup
Phase-locked loop wikipedia , lookup
Resistive opto-isolator wikipedia , lookup
Negative-feedback amplifier wikipedia , lookup
Radio transmitter design wikipedia , lookup
Equalization (audio) wikipedia , lookup
Schmitt trigger wikipedia , lookup
Switched-mode power supply wikipedia , lookup
RLC circuit wikipedia , lookup
Zobel network wikipedia , lookup
Analog-to-digital converter wikipedia , lookup
Wien bridge oscillator wikipedia , lookup
Operational amplifier wikipedia , lookup
Regenerative circuit wikipedia , lookup
Index of electronics articles wikipedia , lookup
KolmogorovβZurbenko filter wikipedia , lookup
Opto-isolator wikipedia , lookup
1. Analog Path a. Amplification/Attenuation i. Resistive divider ---LEAVE OUT? ii. Op amp design iii. Two inverted op amps iv. Programmable gain Amplifier b. Filter Design i. 1st order filter 1. -20dB per decade ii. 8th order filter 1. -160dB per decade c. ADC in Micro controller 2. Power Management a. 5Volt b. Battery Charging i. USB charging ii. LiPO charging 3. PCB Design Analog Sensor Amplification/ Attenuation 8th Order Low Pass Filter Analog to Digital Converter Figure 1: Block Diagram of the Analog Path Figure 1 above shows the pathway that the analog signal needs to take going through this system. The analog signal is first generated from the analog sensor. This sensor can be measuring anything from temperature, pressure, vibration or etc. The next step is the amplification or attenuation stage. The amplification or attenuation will be done by using a programmable gain amplifier. The next stage is the Low Pass Filter. The filtering for this system will be done using an 8th order low pass filter. The final stage is the Analog to Digital converter. This will be done inside of the micro controller that was chosen. The analog sensor will be connected to the circuit through the 2.5mm jack. From the customer requirements, the analog sensor can input an analog voltage anywhere between 0 and 10V into this system. Amplification and Attenuation The original customer requirement for this project was for a universal sensor input. This could not be accomplished while accomplishing the other requirements as well. So the input of the system was changed to be from 0-10V. The microcontroller that was selected only has an input range of 0-3.3V. To accommodate for this different range in voltages, the input range from the sensors will need to be attenuated. There are a few different ways that the voltage can be attenuated. One way that the voltage can be attenuated is a resistor divider circuit. This is not the best way to do the attenuation because the voltage division would change for different load impedances. Figure 1 represents one kind of resistor divider circuit. To find the output voltage you would use Equation. With this type of circuit the load gain of the circuit, the output divided by the input, would change if the input voltage changed. Another reason why this is not the best way to attenuate voltage is because if another resistor was added in series or parallel at Vout, the gain would change. The gain of this circuit will change depending on the load impedances. Figure 1: Voltage Divider Circuit πππ’π‘ = π 2 π 1 βπ 2 β πππ Eq. 1 Figure 2: Second Voltage Divider Circuit πΊ= ππΏ ππ =[ 1 ][ π 3 ) (π 2 +π πΏ )(π 3 +π πΏ ) 1+π π ( 1 π 2+π 3 ] Eq. 2 πΏ Figure 2 shows a different type of voltage divider. The gain for this circuit can be seen in Equation 2. This circuit has the same problem as the other resistor divider circuit in that the output changes if the load changes. For both of these circuits the load impedance will also affect the output voltage. When the load changes the output resistance of the voltage divider circuit will change. This change of resistance will cause the output voltage to increase or decrease depending on the change in the load resistance. One way to overcome this impedance matching issue is to use op amps to attenuate the voltage. Op amps have zero output impedance so there is no need to worry about any impedance matching. Op amps can be used to have a positive or negative gain in a circuit. Equation 1 shows the equation needed to find the gain of a non-inverting op amp. The gain of a non-inverting op amp can never be less than one. Equation 4 shows the equation used to find the gain of an inverting op amp. Using two inverting op amps in series a positive gain of less than 1 can be achieved. πππ’π‘ =1+ ππΌπ πππ’π‘ πππ = βπ π π π π π π π Eq. 3 Eq. 4 Since the voltage for this system needs to have a gain of less than 1, to inverting op amps can be used. The circuit in Figure 3 shows a circuit that attenuates a 10V signal to a 3.3V signal. The op amp that was chosen was the LT1001 precision op amp. This op amp was chosen because of the high accuracy and the low noise. The feedback resistor in the first op amp is 33kβ¦ and the input resistor is 100kβ¦ which yields a gain of -1/3. The second op amp has a gain of -1 because the feedback resistor and the input resistor have the same value. This results in a total gain of 1/3. Figure 3: Attenuation using Two Inverting Op Amps Figure 4 shows the simulation result of the circuit in Figure 3. The green curve is the input signal which is a sine wave that ranges from 0-10V. The output signal is the blue curve which is a sine wave from 0-3.3V. Figure 4: Simulation Results of Op Amp Attenuation Circuit Figure 5 shows the results from building the circuit shown in Figure 3 on a bread board. The input signal on the function generator was set to a sine wave with amplitude of 5V and a DC offset of 5V. This input signal should have been a 10Vp-p signal but the oscilloscope was reading a 9.68Vp-p sine wave. This could result from a problem with the function generator not reading the exact signal that it is putting out. All of the resistor values were the same that were used in the circuit used in the simulation in Figure 3. These resistors were not ideal and there actual values can be seen in Table 1. The gain in the actual circuit was 0.38 instead of the 0.33 that was simulated. Using Equation 4 and the actual resistance values from Table 1 the gain was calculated to be 0.34. The percent error in the actual gain measured and the gain that was calculated using the resistor values is 10.5%. This percent error is high and one of the reasons for this is that the same oscilloscope probe was not the same for both the input and output. Another reason that this might not be the most accurate measurement is because of non-idealities and noise that can be caused from other components that were on the breadboard. Figure 5: Hardware Results of Op Amp Attenuation Circuit Resistor Ideal Value(kβ¦) Actual Value (kβ¦) Rg 100 98.4 RF 33 32.9 R1 10 9.78 R2 10 9.87 Table 1: Actual Resistance Values used in Op Amp Attenuation πππππππ‘ πππππ = (π΄ππ‘π’ππβπππππ’πππ‘ππ)β100 π΄ππ‘π’ππ = (0.38β0.34)β100 0.38 = 10.5% Eq. 5 A programmable gain amplifier was used in this system. The chip that was chosen was the MAX9939 PGA. This PGA is a SPI PGA with gains from 0.2Volts/Volt to 157 Volts/Volt. The maximum input signal to this DAQ can be 16.5V because the input of the ADC on the microcontroller is 3.3V and the minimum gain is 0.2V/V. Donβt have any simulations What Else? Low Pass Filter Design A low pass filter is used to pass low frequency signals through a system and filter out the unwanted high frequency components of a signal. The cutoff frequency is the frequency point where the energy starts to be reduced. Any signal that is at a higher frequency than the cutoff will be attenuated. Low pass filters are used for smoothing data. Figure 6: First Order RC Low Pass Filter Circuit Figure 6 above shows a circuit design for a first order low pass filter. Figure 7 shows the frequency response for a first order filter. In Figure 7 the cutoff frequency is set to 1 rad/sec. At the cutoff frequency the magnitude of the signal going through the filter starts to decrease a 20dB per decade. Equation 6 shows how to calculate the gain in dB. So when the gain is decreasing at -20dB per decade that means the output voltage is decreasing as the input voltage is remaining constant. Signals with frequencies higher than the cutoff, will be attenuated. π πΊπππ(ππ΅) = 20 β log(π π ) ππ Eq. 6 Figure 7: Frequency Analysis of a First Order Low Pass Filter For this design the MAXIM MAX7403 8th order filter low pass filter (LPF) was used. An 8th order filter attenuates the signal at -160dB per decade past the cutoff frequency. Since the 8th order filter attenuates faster, more of the unwanted high frequency noise will not be allowed to pass through. Figure 8 shows the frequency response of the 8th order filter. After the cutoff frequency, 10 kHz, the slope of the curve is 8 times steeper than the first order filter shown in Figure 7. Figure 8 shows that all signals with a frequency of 10 kHz or less will have a gain of 0dB. A gain of 0dB is the equivalent of multiplying by 1. Anything with a frequency higher than 10k Hz will have a gain of something much less than 0dB which is equivalent of multiplying by a number that approaches 0. Figure 8: 8th Order Filter Frequency Response Simulation Results Figure 9 shows the actual measurements that were taking using the MAX7403 8th order LPF. As you can see the actual measurements look very similar to the simulation shown in Figure 8. This proves that this chip will work in our system as a very efficient low pass filter. Figure 9: 8th Order Filter Frequency Response Hardware Results Figure 10: Input and Output of the 8th Order Filter Simulation Results Figure 10 shows the input and output of the filter. The yellow curve is the input to the filter and the red curve is the output of the filter. There is some time delay between the input and output of the filter but it is in the µs range. The Input signal was changed and for all signals with a frequency below 10 kHz the output had the same amplitude as the input. For signals with higher than 10 kHz frequencies, they were attenuated and the output was zero. This helps prove that the filter is an efficient filter. The output of the filter cannot go below 0.25V. This can easily be fixed by using the offset pin on the chip. The signal will be offset by 0.25V but the ADC on the microcontroller can only have an input of 3.3V. This will change our maximum input signal to the whole system from 16.5V to 15.25V. Even though we have zener diodes protecting the inputs to the ADC, we will round down the maximum input voltage allowed from 15.25V to 15V to be safe. Figure 11 below shows the actual measurement that was taken using the MAX7403 chip Figure 11: Input and Output of the 8th Order Filter Hardware Results Power Management This DAQ device is being powered by a 3.7V Lithium Polymer battery. This battery will be charged using a USB. USB was chosen because USB has a 5V pin. Also the FRDM KL25Z board is charged via a USB. The MCP73831 chip will be used to charge the LiPo battery. This chip is a linear charge management in a small 2 mm x 3 mm package. This chip along with the USB charging will allow for quick easy charging of this DAQ device. None of the components in this device require 3.7V that the LiPo battery can supply. This is resolved by using a 5V boost converter. The converter that was chosen was the TI TPS61200. This chip was chosen for because it has high efficiency and it can operate with a varying input. This important because the voltage of the battery might not always be the same. When the battery is in use and not charging, the output voltage will decrease slowly over time. The MCP73831 LiPo charging chip and the TPS61200 were chosen because these chips were used on the power cell LiPo Charger/Booster. This charger/Booster was purchased to test these chips and charging a LiPo battery. PCB Design After going through a few iterations, the final PCB design for this will be a shield board that will go on top of the Freescale KL25Z devolvement board. The development board is used because it is reducing a lot of risk. The development board has the KL25 microcontroller already on the board. All of the pins are routed to the holes on the outside of the board. Pins will be put into these holes and these holes line up directly with our shield board. Figure 12 shows the PCB layout for the shield board. Figure 12: Finalized PCB Layout