Home Literature Review Requirement sheet Hardware Design
Hardware design was developed with two questions in mind.
1. What components can be used so that the desired features mentioned in requirement sheet can be implemented?
2. How to use these components effectively?
The first question was analysed and we came up with following components:
1. Analog Front End
1. Measurement probe
2. Input channel
3. Analog buffer
4. Attenuation and level shifting circuit
5. ADC Driver
2. Data acquisition system
1. Analog to Digital converters
2. Digital to Analog converters
3. Atmega32 microcontroller
3. Main Microcontroller
1. EK- TM4C1294XL Launchpad
4. Control Panel
1. Rotary encoders
2. Switches
3. Atmega8 microcontroller
4. LCD and touch screen interface
The block diagram of our project is shown in next page. It includes all major components which we are using in Integrated Scope with the exception of power management devices.
Figure 5. Hardware design
1. Analog front end: This module uses four devices for its operation. The physical quantity to be measured is initially converted to electrical signals with the help of Measurement Probes. These electrical signals are then buffered and given to Signal Conditioning Circuits. They attenuate and level shift the signals so that they match the input range of ADC’s. The attenuated signals are finally given to ADC through ADC Drivers
i. Measurement Probe: The scope supports at least three kinds of measurement probes which can be used for measurement of Voltage, Current and Temperature. Sensors are integrated into these probes which facilitate the conversion of physical quantities into electrical signals.
· Voltage Probe: A simple wire can be used to measure voltage.
Figure 6. Voltage probe
· Current probe: To measure current ACS712 Current sensor module is used. It has a full scale range of 10 A ranging from - 5 A to +5 A. It provides an output voltage which is proportional to the input current. This module works on the principle of Hall Effect. When a conductor carries current it produces a magnetic field in its vicinity. This magnetic field produces a differential voltage which is measured by the Hall Effect Sensor. To prevent errors in measurement the ambient fields must be kept minimum. The output voltage is related to input current according to the following equation:
Vo=Vcc/10 *(5+I)
Where I is the input current and Vcc is the supply voltage (5V).
Figure 7. ACS712 Current sensor
· Temperature probe: The conversion of temperature to voltage is done by LM35D temperature sensor. It can measure temperature from -55 C to 150 C and has an accuracy of about 2 C. Whenever the temperature changes the sensor takes about 4 seconds (if put in stirred oil bath) to reach the final value corresponding to the new temperature. So it is best used at frequencies well below .25Hz.
Figure 8. LM35 Temperature sensor
The output voltage is given by:
Vo = T/100 , where Vcc is 3.3V
Where T is the ambient temperature in Celsius.
ii. Analog Buffer: The output of measurement probe is connected to Analog Buffer ‘BUF634’. Some of its main features are wide supply range (+/-18 V max), higher Bandwidth (180 MHz) and higher output current (250 mA).
Figure 9. BUF634
iii. Signal conditioning circuit: The purpose of this circuit is to attenuate and level shift the input signal so that it matches the input range of ADC. The ADC used (ADC08B200) has a recommended input range of 0.3 to 1.9V. Hence the
+/-12 V (additional 2V for safety reasons) input must be attenuated by a factor of 15 and level shifted by 1.1 V.
The output of this stage is
Vo = Vin/15+Vcc/3 , where Vcc is 3.3V
iv. ADC Driver: The attenuated and level shifted voltage is then buffered using MAX4200. It has unity gain for input signals over a wide range of frequencies (750MHz bandwidth) and can be used to drive high speed Analog to Digital Converters.
Figure 10. MAX4200 IC
2. Data Acquisition system: This module consists of two Analog to Digital Converters, two Atmega32 microcontrollers and two Dual Digital to Analog Converters. The Dual DAC’s are used to set the top and bottom reference of the two ADC’s. The main microcontroller uses Atmega32 to collect and store samples given by the ADC. The diagram shown below is a functional block diagram of Data Acquisition System. It shows the pin connections of the main microcontroller. The connections for ADC, DAC and Atmega32 of channel 2 are similar to channel 1.
Figure 11: Functional Diagram of Data Acquisition System
i. Analog to Digital Converters: The ADC08B200 is a 200 MSPS 8-Bit ADC which is used to sample the Analog signal given by the ADC Driver. At very high sampling rates the internal 1024 Bytes capture buffer is used to store sample values after conversion. At lower sampling rates the capture buffer is disabled and the samples are collected and stored in Atmega32 which will be later sent to the main microcontroller whenever required. All supply pins are bypassed with a 10uF||.1uF capacitor to ensure good performance at higher frequencies.
Figure 12. ADC08B200 IC
ii. Dual DAC: The DAC used is MCP4822. It has two inbuilt DAC’s which can be configured using a serial interface. The output of two DAC’s are connected to top and bottom reference pins of ADC08B200. It has an inbuilt reference of 2.048 V and a programmable gain of 1 or 2.
Figure 13. MCP4822 IC
Atmega32: Atmega32 is used to handle the data transfer between ADC08B200 and the main microcontroller. Its primary function is to collect and store samples while the main microcontroller is busy processing the data. The stored samples are then sent to the main microcontroller using UART interface operated at 2Mbps baud rate. It is also used to initialize and configure the ADC as required.
Atmega32 is a 16MHz 8-bit microcontroller with up to 32 programmable IO pins, 32KB of ROM and 2KB of SRAM. The code is developed in Atmel studio IDE. The hex file created by this application is used by USBasp AVR Programmer to burn the program code into Atmega32.
Figure 14. Atmega32 microcontroller
The pin connections of Atmega32 is shown below. Pins having similar positions in two boxes are connected to each other.
Figure 15. Pin connections of Atmega32
3. Microcontroller: Integrated Scope is run by Tiva C series EK-TM4C1294XL Launchpad. The Launchpad has a 32-bit 120MHz TM4C1294NCPDT microcontroller. The microcontroller has 2MB of Flash, 256kB of RAM and a maximum of up to 90 I/O pins. The programming is done in code composer studio. It is free and fully functional when connected to evaluation boards.
Figure 16. Diagram of EK-TM4C1294XL
The pin connection of the main microcontroller to the external hardware modules is as shown below:
Figure 17. Pin connections of TM4C1294 Launchpad
4. Control Panel: The control panel contains various switches, potentiometers and rotary encoders which can be used to operate Integrated Scope. These switches convert user input into electrical signals which is recorded by three Atmega8 microcontrollers.
The physical layout of control panel is shown in next page.
Figure 18. Control panel
The control switches can be divided into six sections based on their usage purpose.
i. Vertical Controls: These switches are used to set vertical position, vertical division and to enable/disable channel 1 or channel 2.
ii. Horizontal Controls: These switches are used to set time division, position of waveform on x-axis, run or pause the waveform and acquire single waveforms.
iii. Side Screen Controls: These switches are used to interact with the Side Screen menu displayed on the right hand side of the screen.
iv. Waveform Controls:
Measure: This button when pressed will bring up a menu where user can define what parameters to be measured and displayed.
Multi-purpose: This knob is used to switch between various options available in menu columns.
Cursor: This button when pressed will pause the waveform and display two cross axis which can be used to determine the time and vertical quantity corresponding to the intersection point.
Math menu: This button when pressed will bring up a menu where the user can add, subtract or multiply the two waveforms. It can also be used to calculate the Fourier Transform of any one channel.
Probe menu: This button when pressed displays various options which can be used to initialize the measurement probe.
v. Trigger Controls
vi. Display and Menu controls: These switches are used to interact with the main menu and side screen menu.
Move left/ Move right: These buttons are used to switch between the menu columns.
vii. Other Controls:
Utility: This button when pressed displays various options which can be used to recall waveforms from memory. It can also be used to save current waveform, create new file, edit existing files, etc.
Default: This button when pressed resets the scope configuration back to its original settings.
Help: This button when pressed displays various options which can be used to view help topics.
The pictures of various switches used in control panel are given below
Figure 19. Control Panel Switches
5. LCD and touch screen interface: The scope uses a 4.3 Inch LCD module. This module comes with two inbuilt controllers which simplify the display and touch screen communication process. The LCD controller SSD1963 has a maximum of 1218K Bytes of display memory. It uses this frame buffer to update the LCD screen at a constant rate of 60 fps. A detailed list of all the features supported by SSD1963 is provided in the data sheet.
The microcontroller communicates with the LCD controller using a 16-bit interface. The controller is designed to accept both commands and data. Commands are used to configure the controller for a particular kind of operation. It also has a secondary function where the command is followed with one or more sets of 8-bit data. In such cases the command is used to indicate how the data has to be used. This data will then determine the LCD operation.
The touch screen controller XPT2046 uses a SPI interface for communication. Every communication packet begins with a control byte which determines the output of XPT2046 touch screen controller.
Figure 20. 4.3 Inch LCD Module
Figure 21. Pin connections of LCD Module