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

Hydra I- Hydro Rapid Disaster Response Robotic Automation Flood Disaster Management System- Airboat Abstract Components NeededFuture

aspects Real Time Operations

PIR sensor

How Infrared motion detector components work


Infrared Radiation_____________
Infrared radiation exists in the electromagnetic spectrum at a wavelength that is longer than visible light. It cannot be seen but it can be detected. Objects that generate heat also generate infrared radiation and those objects include animals and the human body whose radiation is strongest at a wavelength of 9.4um. Infrared in this range will not pass through many types of material that pass visible light such as ordinary window glass and plastic. However it will pass through, with some attenuation, material that is opaque to visible light such as germanium and silicon. An unprocessed silicon wafer makes a good IR window in a weatherproof enclosure for outdoor use. It also provides additional filtering for light in the visible range. 9.4um infrared will also pass through polyethylene which is usually used to make Fresnel lenses to focus the infarared onto sensor elements.

Pyroelectric Sensors_____________
The pyroelectric sensor is made of a crystalline material that generates a surface electric charge when exposed to heat in the form of infrared radiation. When the amount of radiation striking the crystal changes, the amount of charge also changes and can then be measured with a sensitive FET device built into the sensor. The sensor elements are sensitive to radiation over a wide range so a filter window is added to the TO5 package to limit detectable radiation to the 8 to 14mm range which is most sensitive to human body radiation. Typically, the FET source terminal pin 2 connects through a pulldown resistor of about 100 K to ground and feeds into a two stage amplifier having signal conditioning circuits. The amplifier is typically bandwidth limited to below 10Hz to reject high frequency noise

and is followed by a window comparator that responds to both the positive and negative transitions of the sensor output signal. A well filtered power source of from 3 to 15 volts should be connected to the FET drain terminal pin 1.

The PIR325 sensor has two sensing elements connected in a voltage bucking configuration. This arrangement cancels signals caused by vibration, temperature changes and sunlight. A body passing in front of the sensor will activate first one and then the other element whereas other sources will affect both elements simultaneously and be cancelled. The radiation source must pass across the sensor in a horizontal direction when sensor pins 1 and 2 are on a horizontal plane so that the elements are sequentially exposed to the IR source. A focusing device is usually used in front of the sensor

The figure below shows the PIR325 electrical specifications and layout in its TO5 package. Note the wide viewing angle without an external lens.

This is a typical application circuit that drives a relay. R10 and C6 adjust the amount of time that RY1 remains energized after motion is detected. Download PDF drawing.

Fresnel Lens_____________
A Fresnel lens (pronounced Frennel) is a Plano Convex lens that has been collapsed on itself to form a flat lens that retains its optical characteristics but is much smaller in thickness and therefore has less absorption losses.

Our FL65 Fresnel lens is made of an infrared transmitting material that has an IR transmission range of 8 to 14um which is most sensitive to human body radiation. It is designed to have its grooves facing the IR sensing element so that a smooth surface is presented to the subject side of the lens which is usually the outside of an enclosure that houses the sensor.

The lens element is round with a diameter of 1 inch and has a flange that is 1.5 inches square. This flange is used for mounting the lens in a suitable frame or enclosure. Mounting can best and most easily be done with strips of Scotch tape. Silicone rubber can also be used if it overlaps the edges to form a captive mount. The FL65 has a focal length of 0.65 inches from the lens to the sensing element. It has been determined by experiment to have a field of view of approximately 10 degrees when used with a PIR325 Pyroelectric sensor.

This relatively inexpensive and easy to use Pyroelectric Sensor and Fresnel Lens can be used in a variety of science projects, robots and other useful devices.

Ultrasonic Position System


The ultrasonic position system uses ultrasonic transmitters/receivers to triangulate position of the robots used in GE423. Each of three transmitters uses a distinct frequencies: 23 kHz, 31 kHz, and 40 kHz. The 2812 DSP is used to measure signal timing and calculate position based on these values. The design of the electronics, as well as discussion of the software development is presented below.

The electronics were not intergrated with the 6713 DSP on the robot. Note: To get around the issue of clock syncing, the robot will start in a known position, and calculate position for four cycles before proceeding. An alternative to this would be to add a fourth transmit frequency and use the 4th signal to sync the robot clock with the transmit clock.

1.0 Hardware
A wide variety of hardware was used for this project. The hardware was chosen based on availability and price. By no means is the solution presented "the best"or the only way to achieve the desired results, but it is a workable solution. 1.1 Ultrasonic Transmitters/Receivers The ultrasonic sensor were purchased from Massa. The TR-89/B series where chosen because they come in 3 different frequencies, and they were stock parts. There is no pdf data sheet available on the Massa website, all information if available here. The main drawback of using Massa is there $500 minimum order, and the sensors aren't cheap at about ~$30 each. 1.2 Transmit Circuit A schematic of the transmit circuit looks like:

Images of the perf-boarded transmit circuits:

Details on the components of the transmit circuit can be found in the subsection below:
1.2.1 Frequency Generation The transmit circuit take from the Massa Website looks like:

Source:http://www.massa.com/datasheets/graphics/tr89_data.gif

Where R1 is a 10k 10 turn precision wound potentiometer, and U1 is a CD4039B NAND Schmitt Trigger. The tuning resistor R2 and L where left out to increase the transmit power around the base frequency. The potentiometer was adjusted until the frequency was the desired base frequency. A 1k resistor was added in parallel with the potentiometer to give a higher resolution. For the 40 kHz case, a smaller capacitor was required to reach the base frequency. Make sure to tune the circuit with the ultrasonic transducers attached, because the additional impedance will change the transmit frequency. The 12 Vdc was generated by a lab supply. The output at point TP1, is a 12V peak to peak is a square wave at the desired frequency. The point TP1 was connected to the Driver Signal Circuit presented below.
1.2.2 555 Timer Circuit The documentation for the 555 timer can be found here. An a picture of how it is wired can be seen below:

Source:http://www.williamson-labs.com/480_555.htm Using the handy calculator for Ra, Rb, and C found here, Ra=100k ohm, Rb=200k ohm, and C=2.2 mircoF.

1.2.3 Driver Signal Circuit The 35 Vdc supply is manufactured by Ultravolt, part number 1/4Aa24-P30. This supply is actually a 0-250 Vdc supply that uses a potentiometer to control voltage output.. The transistor used is an IRF520 n-channel MOSFET. 1.3 Receive Circuit A block diagram of the receive circuit can be seen below:

And a picture of the perf-boarded receive circuit can be seen below:

Details on the components of the receive circuit can be found in the subsection below:
1.3.1 Low Signal Amp Circuit An instrumentation amplifier made by Analog Devices was used to amplify the low signal output of the ultrasonic receivers. The actual part used was the AD620, one is recquired for each receive channel. Analog has a nice tool here, to size the gain resistor, Rg. Based on experiments, a gain value of 33 was chosen, resulting in a Rg of 1.5k ohm. The AD620 was wired as follows:

Source:http://www.analog.com/images/Product_Descriptions/3888333375812882340AD620_fb s.gif
1.3.2 Comparator Circuit The analog comparitor used was part number LM339. The volatage divdier was powered using +5 Vdc to creat the digital level output signal. The output from each instrumentation amplifier was wired to the "+" terminal, and the "-" was wired to 3 volts. The 3 Vdc signal was created from the +15 Vdc supply using a voltage divider. The output of the comparitor was wired to a 5 Vdc via a 3k resistor.

2.0 Software
The timing of the hardware interrupts from the 2811 is calculated, and from the times, position is calculated in the 2D plane using a combination of least squared fit and Jacobian iteration. 2.1 Matlab Triangulation Code The first algorithm was developed using Matlab. This code can be found here. The algorithm is not stable for all input parameters, a good set of test conditions are:

[x,y]=blah(.010,.012,.012) [x,y]=blah(.009,.014,.012) [x,y]=blah(.011,.011,.011) Note the highly descriptive function named blah
2.2 DSP C Code The c code for the 2812 DSP is in the attached zip file. The code works as following:

1. Hardware interrupt pin get triggered 2. Record absolute clock time when pin transition occurs 3. Go back to step 1,and once all three pins have been triggered: 1. (only do this step the first time through the code) Assume robot stationary, acquire base transmit period for each frequency by averaging first 4 values, this step syncs the clocks of the transmitters to the robot 2. Calculate time from transmitter to robot for each frequency 3. Triangulate position of robot using least squared fit to data points 4. Wait for fixed amount of time, ignore hardware interrupts during this time because of the nature of the transmit signal 5. Go back to Step 1

3.0 Lessons Learned


1. A resistor was needed in parallel with the tuning potentiometer to give better resolution 2. A resistor was required in parallel with the US transmitter for the circuit to function because the transmitter is like a capacitor.

4.0 Acknowledgments
Various people and online resources aided in this project: Misc Websites:
o o o o

http://ourworld.compuserve.com/homepages/Bill_Bowden/555.htm http://www.williamson-labs.com/480_555.htm http://www.massa.com http://www.digikey.com (source for datasheets)

TSOP 1738 Photo module Design notes


TSOP 17 Series Photo modules are excellent Infrared sensors for remote control applications. These IR sensors are designed for improved shielding against electrical field disturbances. TSOP 1738 Photo module Design notes

TSOP 17. Series Photo modules are miniature IR sensor modules with PIN photodiode and a preamplifier stage enclosed in an epoxy case. Its output is active low and gives +5 V when off. The demodulated output can be directly decoded by a microprocessor. The important features of the module includes internal filter for PCM frequency, TTL and CMOS compatibility, low power consumption (5 volt and 5 mA), immunity against ambient light, noise protection etc. The added features are continuous data transmission up to 2400 bps and suitable burst length of 10 cycles per burst. Inside the Photo module The photo module has a circuitry inside for amplifying the coded pulses from the IR transmitter. The front end of the circuit has a PIN photodiode and the input signal is passed into an Automatic Gain Control(AGC) stage from which the signal passes into a Band pass filter and finally into a demodulator. The demodulated output drives an NPN transistor. The collector of this transistor forms the output at pin3 of the module. Output remains high giving + 5 V in the standby state and sinks current when the PIN photodiode receives the modulated IR signals. Block diagram is given in Fig 1 Pin assignment Photomodules are 3 pin devices. These pins are assigned for +V,V and output. The pin assignment of TSOP 17 series from the front side (projected side) is Pin 1 Ground, Pin 2 + 5V and pin 3 Output. The photo module requires regulated 5V supply. If the supply voltage increases, the device will be destroyed. The pin assignment (Front view) of some common Photomodules Type pins 1 2 3 Response frequency TSOP 1730 G 5V OP 30 kHz TSOP 1736 G 5V OP 36 kHz TSOP 1738 G 5V OP 38 kHz TSOP 1756 G 5V OP 56 kHz TSOP 1236 G 5V OP 36.7 kHz TSOP 1838 OP G 5V 38 kHz TSOP 1138 G 5V OP 38 kHz TK 1836 OP G 5V 36 kHz SFH 506-38 G 5V OP 38 kHz RPM 7238F OP G 5V 37.9 kHz Design considerations For the proper functioning of the Photo module, it is necessary to consider some important aspects. 1. Supply voltage should be + 5 Volts. For this, a 5.1 volt Zener must be connected to the +V pin and ground. 2. A 100 uF capacitor should be connected to the +V pin as a buffer and filter capacitor. This will suppress the power supply disturbances.

3. Carrier frequency should be close to the center frequency of the band pass filter. 38 kHz in the case of TSOP 1738. 4. Burst length must be 10 cycles per burst or more. 5. Between each 10 to 70 cycles, a gap time of 14 cycles is necessary to reset the module. 6. DC lights such as tungsten bulb and daylight affects the functioning of the photo module. 7. Signals from Fluorescent lamps with electronic ballast will affect the working of the photo module. 8. Continuous IR signal (non- pulsed) will disturb the photo module and it will not responds to it. Photo module design is given in Fig.2

REMOTE CONTROL SYSTEMS Designing radio frequency (RF) remote controls has never been easier thanks to the advent of highly-integrated, single-chip RF solutions. System-on-chip (SoC) transmitter solutions greatly simplify the process of designing a remote control and reduce system bill of materials (BOM) cost by eliminating the need for numerous discrete components. Remote controls come in many different sizes, shapes and wireless technologies and are widely used in the consumer market as accessories for a wide range of products, such as televisions, video games, stereo systems, lighting controls and home automation including garage door/gate

openers, air conditioning units, fans and automobiles with remote keyless entry (RKE) key fobs. The most common remote controls use infrared (IR) technology because of the relatively low cost of IR components, but these IR-based controls suffer from many drawbacks including requiring line-of-sight pointing, limited operating angles, short transmission range, reflection problems and high current consumption associated with the IR LEDs, which leads to low battery life. RF remote controls resolve these issues and are appearing in greater numbers because consumers are demanding a much better user experience. In addition, technology improvements are closing the RF-IR price gap

All RF remote controls share common features as shown in the simplified block diagram in Figure 1. The basic components of an RF remote control are buttons for the user to input a command, a microcontroller unit (MCU) to process the user commands into digital messages, an RF transmitter (RF TX) to modulate and transmit the message, an antenna, and a battery to provide power to the remote control. The common challenges manufacturers face in designing RF remote controls are to provide consistent maximum transmission range, ensure long battery life and maintain low system costs. Maximizing transmission range involves transmitting as much power as possible (within governmental regulatory limits) while providing a receiver with excellent sensitivity since the total transmit distance is a function of both the transmitter output power and the sensitivity of the receiver. From the remote control side, the design goal is to set the RF output power to the government limit, which implies that all remote controls should have the same output performance, since they all transmit within the same limits. This would be true in an ideal world, but, in the real world with real components and manufacturing tolerances, it is practically impossible to transmit at this optimum power every time with every remote control manufactured on the production line. Moreover, interference from a users hand holding the remote control or even touching a button (known as the hand effect) changes the impedance of the antenna and thus changes the transmit output power. This real-world effect can reduce the effective radiated power (ERP) of a remote control and easily result in output power 6 dB below the government limit, with a corresponding 2x reduction in transmit distance per Friiss free space path loss equation.

These effects can be alleviated to maximize transmitter antenna efficiency by adjusting an on-chip variable capacitor to resonate with the inductance of the antenna. These automatic capacitor adjustments maximize the transmit power of the remote control by compensating for mismatches in the antenna matching circuitry and reduce design cost by relaxing manufacturing tolerances in the PCB antenna. For example, the Si4010 transmitter, the latest member of Silicon Labs EZRadio line of wireless products, is the industrys first single-chip remote control IC, requiring only one external bypass capacitor, a printed circuit board (PCB), battery and an external casing with push buttons to form a complete remote control. The Si4010 includes a patented antenna tuning circuit that automatically fine-tunes the antenna for optimum transmits power on every button press. With standard remote control designs, variations in the RF transmitter, component and antenna manufacturing tolerances and the environment can lead to large antenna inefficiencies and wasted power. Figure 2 shows a simplified block diagram of the Si4010s power amplifier and antenna tuning circuitry. An additional feedback loop is incorporated into the power amplifier (PA) to maintain constant output power by monitoring the voltage at the output of the PA and adjusting the PAs current drive to compensate for changes in the antenna impedance. This feedback loop works to maintain constant output power in spite of temperature variations and the hand effect, which, as stated above, changes the antenna impedance when a persons hand is covering the remote control. The net result of antenna tuning is to provide consistently reliable and optimal performance on every button press while reducing the cost and design complexity of the RF matching requirements. Remote controls designed with the Si4010s automatic antenna tuning feature can reliably and consistently operate at the government transmit limit for maximum transmit range.

Battery life is an important consideration for any portable electronic device, especially a remote control. When we consider typical remote control usage, more than 99 percent of the time, a remote control is waiting for a user to activate a button press. During this time, the Si4010 consumes less than 10 nA at room temperature, making it an ideal choice for battery-powered applications. Additionally, wake-on-touch GPIOs further minimize current consumption of the remote control and extend battery life.

Figure 3 shows an example of the power consumption of the Si4010 used in a typical remote control application with a CR2032 battery transmitting at maximum power of +10 dBm. During transmission, the Si4010 consumes either 14.2 mA in onoff keying (OOK) mode or 19.8 mA in frequency-shift keying (FSK) mode while transmitting at +10 dBm output power. If we assumethat the transmitter transmits at a data rate of 1 kBaud, the data is Manchester encoded and each packetis 100 bits long and repeats three times for each button press, then we have the following results: At 50 button presses per day for five consecutive years, we use only 52 percent of the charge in a 220 mAhr CR2032 battery in OOK mode and 71 percent of the charge in FSK mode. Although this example does not include the self leakage of the battery, it does illustrate the low power characteristics of the Si4010 transmitter and the importance of low standby current. The Si4010 transmitters ultra-low standby current is orders of magnitude lower than many existing solutions and is an important differentiator for extending the battery life of a remote control. One of the most important considerations in any remote control design is minimizing total system design cost, which is influenced by many factors besides component costs, including labor, inventory, test, and manufacturing yield. By far,

the dominant low-cost RF remote control solution on the market today uses an MCU and a surface acoustic wave (SAW)-based RF transmitter as shown in figure 4. The wide acceptance of this design topology stems primarily from its low cost and simplicity. A SAW device is resonated with transistor Q1 in a Colpitts oscillator structure to form the carrier frequency, and transistor Q2 provides the output power amplification and isolation needed for stable operation. Data from the MCU is applied directly to the SAW resonator to form the OOK modulated signal, and GPIO6 from the MCU supplies the voltage (VCC) to the SAW-based transmitter. This entire solution uses 24 external components, including the MCU, one bypass capacitor, a quartz crystal used to clock the MCU, and a PCB with a trace antenna and capacitor. It has an RF component cost (excluding the PCB, MCU and bypass capacitor) of $0.77 USD in 100,000-unit volumes. The $0.77 RF BOM cost does not include the cost of the MCU, bypass capacitor or PCB. Traditionally, this has been the lowest component cost solution available for reliable RF transmission. From a system cost perspective, the large BOM count increases other costs, such as labor, inventory and tests, and reduces manufacturing yield.

Although SAW-based transmitters are widely used in remote controls because of their low component costs, there are many disadvantages with this old technology. Besides the high system cost from the large number of RF BOM components, SAWbased transmitters also suffer from poor carrier frequency accuracy, single frequency operation, OOK only modulation, inconsistent performance, sensitivity to component tolerances and low manufacturing yield. In contrast, the Si4010 transmitter is a complete system-on-chip (SoC) remote control IC. Based on the proven Si500 silicon oscillator, its patented crystal-less architecture achieves 150 ppm carrier frequency accuracy over the commercial temperature range and 250 ppm over the industrial temperature range, which is twice as accurate as traditional

low-cost SAW-based transmitters with no external crystal. The device operates over a continuous frequency range of 27 to 960 MHz and includes a programmable power amplifier (PA) with output powers of up to +10 dBm, automatic antenna tuning and PA edge rate control to comply with FCC, ETSI and ARIB radio frequency regulations. The embedded 8051 MCU is instruction-optimized for fast throughput and comes with 512 bytes of internal data RAM, 4 kB of RAM, 8 kB of OTP NVM, 128 bits of EEPROM, a 12 kB library of ROM functions and a hardware-accelerated 128 bit AES encryption algorithm. The devices 1.8 to 3.6 V supply range, low standby current of less than Ultra-low-power (10 nA) and wake-on-touch operation make the Si4010 ideal for coin-cell battery applications. Figure 5 shows a block diagram of the Si4010 transmitter SoC.

Figure 6 shows a remote control schematic using the Si4010 with an optional LED to indicate when a button is pushed. The total BOM components for this remote control (excluding the optional LED) are a single Silicon Labs Si4010 IC, one bypass capacitor, and a PCB with a PCB trace antenna and capacitoNot only are the total BOM components of the Si4010 much less than the SAW-based transmitter (3 compared to 24), the Si4010 also does not have any RF components because they are all integrated within the IC. The high integration of the Si4010 reduces the total system BOM to what used to be 24 components with SAW-based transmitters to only three components. This BOM reduction dramatically reduces labor, inventory and test costs and substantially improves the manufacturing yield. Furthermore, the

Si4010 devices automatic antenna tuning feature guarantees consistently reliable output power and reduces costs by enabling the use of relaxed tolerance manufacturing processes since high accuracy antenna matching is no longer required.

Designing a remote control using the Si4010 overcomes many issues commonly found with traditional RF transmitters. The Si4010 removes the difficult and tedious RF matching problem with its antenna tuning feature, which reduces expensive RF design time and improves time-to-market. The hardware task comes down to choosing the best PCB antenna for the given remote control geometry and laying out the pads and connections for the Si4010, the PCB trace antenna, a bypass capacitor, buttons and the battery. Figure 7 shows the PCB of a Si4010 remote control for 434 MHz operation.

Developing a remote control application is as easy using the Si4010 transmitters library of remote control functions stored in its 12 kB ROM. The library includes

button service routines, AES encryption, encoding modules, battery voltage measurement and other useful remote control functions to reduce code size and speed time-to-market. Figure 8 shows a flow diagram of the Si4010 used in a remote control application. Upon battery insertion or waking up from standby mode from a button push, the Si4010 automatically begins the boot process of copying user code from the non-volatile memory (NVM) to the RAM followed by the running of user code. After booting, the digital blocks of the device are first initialized (the MCU, interrupts, timers, peripherals, etc.), and then the analog blocks are initialized with functions found in the ROM library. For example, the modulation type (OOK or FSK), data rate, PA transmit level, carrier frequency and so on are set during this phase. When initialization is complete, the program enters the main loop where it monitors the GPIOs for button presses and manages event handling. Depending upon which button is pushed, the program decides what to do and then assembles the appropriate packet according to the button press. Then, the Si4010 fine tunes the frequency and transmits the packet. As soon as the information is transmitted, it shuts down and returns to the ultra-low-power standby state. In standby mode, the chip consumes less than 10 nA at 25 C and can wake up from any GPIO button press to begin the process again.

In summary, the Si4010 is a revolutionary transmitter that offers the lowest system cost solution for the remote control market. A complete cost-effective remote control can be designed with the Si4010, a battery, PCB and push buttons. No other

transmitter solution available today matches the Si4010 ICs high level of on-chip integration. In addition, the Si4010 offers exceptional performance with its advanced RF features, including automatic antenna tuning to guarantee maximum transmit distance on every button press. The Si4010 transmitter is also very easy to use and reduces design complexity, which improves time-to-market. To learn more about designing remote controls with the Si4010 transmitter,

Design and implementation of high-speed digital CMOS camera driving control timing and data interface
High-speed digital cameras are progressing rapidly with the development of CMOS image sensor in these few years. In order to develop a high-speed CMOS industrial digital camera, the CMOS image sensor MI-MV13 is used. The sensor drive pulse and control timing based on Xilinx Virtex-II Pro FPGA is designed. A novel format of digital image transporting based on Camera Link data port is defined in this paper. It is implemented 1280 (H) x 1024 (V) SXGA resolution digital image transported at a high frame rate of 300 fps (frames-per-second) with 5 Pixels 10 bit compatible Camera Link Medium Configuration. In addition, these functions that adjustments of exposure beginning time, integral time, AOI (Area of Interest) output and so on, are realized in a FPGA chip. All of the function modules are embedded in a SOPC (System on a Programmable Chip), and further functions can be easily added to the chip at the second time development. Experimental results show that the design of driving control timing and data interface in FPGA is suitable for high-frame rate, low power, intelligent and miniaturization digital video camera. INTRODUCTION High-speed digital cameras are widely applied in industry automation, science research and national defense. For example: the automotive applications like occupancy detection, airbag control, precrash sensing, collision avoidance, surveillance and crash test observation; the aerospace applications like recording the process of the rocket and aerostat emission; the military applications like the development and test of exploder, the ballistic trajectory and attitude research of missile. Therefore we can see the momentousness of the development and design of the high frame rate digital camera. Currently, CCD (Charged Coupled Device) image sensor cameras are developed maturely. The generated images quality is already very excellent at low frame rate. But they also have many shortages. The

high power dissipation makes its calorific value great. Considering the temperature range in automotive applications, CCD image sensors cannot guarantee functionality over the whole temperature range required 1. The CCD sensors need high level driving voltage, its pixels shift structure and the operating principle can not meet the demand of the high frame rate camera. The other typical problems of CCD like blooming or smearing are also avoided by using a CMOS (Complementary Metal Oxide Semiconductor) image sensor. CMOS image sensors feature inherently low-power dissipation in contrast to CCD sensors. In addition, in some high speed imaging applications there is a need to acquire images in a very short time and using short integration times. This requires the image sensors used in such applications to be equipped with a synchronous shutter to avoid blur and skew, so we must choose a CMOS image sensor with a global electronic shutter, like MI-MV13 CMOS image sensor of Micron Technology, Inc. In the next section the implementation of the camera hardware system and the introduction of the CMOS image sensor MI-MV13 are presented. The developed camera system for high speed imaging using an FPGA (Field Programmable Gate Array) as a control unit for all components and the design of driving control timing is shown in Section 3. A novel format of digital image transporting based on Camera Link medium configuration data port of this camera system is discussed in Section 4.In the Section 5, some experimental results are presented.

HARDWARE SYSTEM COMPONENTS Modules of the designed high speed camera are showed in Figure 1. The sensor module, the FPGA module and the interface module are three important components. The sensor module contains CMOS image sensor MI-MV13 and LTC1665. The details of MI-MV13 are introduced in the next subsection. LTC1665 is the Micropower Octal 8-bit DACs, it generates many analog signals which are used for Dark offset voltages, Bias and reference for sensor ADC. The controlling and processing core of the camera system is implemented in the FPGA Virtex II pro XC2VP4, whose configuration data memory is Platform Flash XCF04S. Both the control signals for supplying the sensor with necessary for proper camera operation and the digital image data output signals are generated in a FPGA chip. Moreover, the Virtex II pro XC2VP4 are embedded with PowerPC 405 core, which can be operated at 300+ MHz while maintaining low power consumption. Specially designed interface logic integrates the core with the surrounding CLBs, block RAMs, and general routing resources 2. Therefore it brings some useful image preprocessing which can make the output image better, for example the Bayer format color conversion, Automatic luminance compensation and white balance, Median filter noise reduction, Blind pixel elimination and so on. All of the control, preprocessing and sensor driving functions can be reprogrammed in the chip FPGA, so we complete the SOPC design for the high-speed digital camera. The interface module has two ports. One port is control port. It receives the signals of controlling

and initializing the camera from the host PC by RS232 serial UART, which is necessary for adjustments of the integration time, AOI (Area of Interest) and other camera control parameters, then sends the camera operating state to the host PC. The other port is a novel format Camera Link data port for digital image transporting. This ports definition is expatiated in section 4. For flexible operation conditions, the camera can be supplied either by a 5V or a 12V power. The 12V/5V converter which has been included on the interface board can generate system needed voltage of 3.3V, 2.5V and 1.5V.

Introduction of MI-MV13

The MI-MV13 is a 1,280H x 1,024V (1.3 mega pixel) CMOS digital image sensor, which is capable of 500 frames-per second operation. Its TrueSNAP electronic shutter allows simultaneous exposure of the entire pixel array. Available in color or monochrome, the sensor has on-chip 10-bit analog-to-digital converters (ADCs), which are self-calibrating, and a fully digital interface. The chip's input clock rate is 66 MHz at approximately 500 fps. The sensor has ten 10-bit-wide digital output ports. Its open architecture design provides access to internal operations. ADC timing and pixel-read control are integrated on-chip 3. All Features Specifications of the sensor MI-MV13 are summarized in Table 1. The chip Functional Block Diagram is shown in Figure 2.

DRIVING CONTROL TIMING DESIGN In figure 2, we can see all of the sensor control signals. SYSCLK is the clock signal for entire sensor chip. Its maximum design frequency is 66MHz, but in our design it works at 40MHz, so that the camera output image data speed is 300fps. The designs not only ensure the stated fps and integral time in our real requirement, but also try to decrease transmission bandwidth at 10bit pixel gray level. The integration of photo signal is controlled by two control signals PG and TX. These signals of ROW_ADDR, ROW_STAR, LD_SHIFT and DATA_READ_EN complete pixel conversion and readout process. The designed sensor driving control timing simulation sequence chart is showed in figure 3. After power on the camera system, the camera works at the Free-run working mode automatically and output 1280x1024@300fps image at the longest integration time of 3.3msec. The operating register parameters of AOI, Integration Time, Fps, Gain, Offset and Working Mode can be downloaded into the FPGA by RS232 serial UART. In sequential mode the ROW_ADDR, PG and the TX pulses must have a minimum duration of 64 SYSCLK cycles, in every SYSCLK time transmits 10 pixels, thereby AOI horizontal direction is least 640 pixels. When AOI is 640 x 512, the camera frame speed can reach approximate 1200fps.

IMAGE DATA OUTPUT INTERFACE DESIGN There sensor output data format is 10 pixel x10 bits, the data bus width is 100 bits at 40MHz. We design the camera output data format of 5 pixel x 10 bit at 80 Mhz, we also design a FIFO for the output data format conversion. The FIFO has four 50bit data buffers. First, FIFO(0,1) are written 100bit data at one SYSCLK, the next SYSCLK writes FIFO(2,3). When FIFO(2,3) are being written, the FIFO(0,1) has been written fully, so FIFO(0,1) can be read at the same time in turn. Therefore data output clock PIXCLK must be two times of SYSCLK, which works at 80MHz. The data output processes circularly in the ping-pong mode. FIFO in camera schematic and simulation sequence chart are shown in figure 4. The image data only buffer 10 pixels in camera, no need to save one frame. This design can have the shortest output image time in the camera. It is beneficial to using this camera to fast capture and real-time target track. Camera Link is a communication interface developed for using in vision applications. The Camera Link specification is an open specification which gives manufacturers the ability to differentiate their products while maintaining interface compatibility. By specifying a standard pin arrangement and a cable assembly that is specifically designed for reliability at high data rates, the Camera Link standard ensures that compatible devices can be connected with ease. The Camera Link standard is based on Channel Link technology developed by National Semiconductor. Channel Link consists of a transmitter and receiver pair. The Channel Link Transmitter converts 28 bits of CMOS/TTL data into four LVDS data streams. A phase-locked transmit clock is transmitted in parallel with the data streams over a fifth LVDS link. With each cycle of the transmit clock, 28 bits of input data are sampled and transmitted in serialized 71 streams. The Channel Link receiver converts the data streams back into 28 bits of CMOS/TTL data for the flame grabber. Correspondinglythe four LVDS pairs are reserved for the general purpose camera control. They are defined as camera inputs and frame grabber outputs 1. For the entire specification see reference 4.

Our designed novel Camera Link format of 5 taps x 10 bits that transmission of video data is handled by 28-bit Channel Link chips DS90CR287 manufactured by National Semiconductor. DS90CR287 can work at the highest speed of 85MHz, so it can complete designed camera transmitting task at 80MHz. We use two DS90CR287 to buildup a compatible Camera Link medium configuration with two MDR26 connectors. Each transmitter DS90CR287 sends 25bits of pixel data signals and three synchronizing signals of image data that are LVAL, FVAL and DVAL. The designed transmitting format doesnt waste any transmitters pins of 28 data bits. For the Assignment of pixel data 50 bits of the two Channel Link transmitters, see in Table 2. The performance of transmitter is used most efficiently, so the image data transmitting speed can be up to 4Gbits/s. If the camera uses RS232 serial UART to communicate with the frame grabber, no need the Camera Link two RS-644 LVDS pairs-SerTFG and SerTC, we can use one 26 pins MDR connector to transmit the 50 bits image data, so that one MDR connector and cable are saved.

EXPERIMENTAL RESULTS According to the high-speed camera design discussed in this paper, we implemented the specimen camera, see in figure 5The left PCB is sensor module. The medial PCB is FPGA module. The right PCB is interface and power module. The camera acquired pictures at high frame rate are shown in figure 6. We give the preeliminated column-wise fixed-pattern noise picture, as image (a). MI-MV13 contains special self-calibrating circuitry that enables it to reduce its own column-wise fixedpattern noise, so we dont see the fixed pattern noise (FPN) in the last two real scene pictures that is 10 bit gray level. The image (b) is 10bit gray scale test image;

it consists of lines with repeated gray scale gradients ranging from 1023 to 0. The color CMOS sensor is equipped with an additive color separation filter; each individual pixel is converted by a micro-lens which allows light of only one color to strike the pixel. The pattern of the color filter is Bayer format as a rule, which is in each block of four pixels, one pixel is struck by red light, one is struck by blue light and two pixels are struck by green light. Since each individual pixel gathers information on only one color, an interpolation must be made from the surrounding pixels to get full RGB data for the pixel. The image (c) shows the Bayer format gray picture. The camera can convert the output from the Bayer format image into RGB color information. The converted color image is showed in image (d).

SIGNALLING SYSTEM
IR TRANSMITTER
The IR transmitter sends 38-40 kHz (frequency can be adjusted using 555 timer) . IR carriers at around 40 kHz carrier frequency are widely used in TV remote controlling and ICs for receiving these signals are quite easily available. The circuit can be controlled using any TTL or RS-232C level control signal which makes the interfacing very simple. The circuit can be used for example for using computer to generate IR remote control signals or experimental IR data transmission.

1.555 TIMER
The 555 is a timer and oscillator chip capable of sourcing and sinking 200 milliamperes, and is useful for pulsing an infrared LED to power an infrared transmitter. It can be pulse width modulated or otherwise controlled via the various control pins. The 555 timer integrated circuit (IC) has become a mainstay in electronics design. A 555 timer will produce a pulse when a trigger signal is applied to it. The pulse length is determined by charging then discharging a capacitor connected to a 555 timer. A 555 timer can be used to debounce switches, modulate signals, create accurate clock signals, create pulse width modulated (PWM) signals, etc. A 555 timer can be obtained from various manufacturers including Fairchild Semiconductor and National Semiconductor. A 555 timer is shown below in Fig 1.

Fig. 1 555 Timer


Pins of the 555 timer are as follows: Gnd Ground connection for chip Trigger 555 timer triggers when this pin transitions from voltage at Vcc to 33% voltage at Vcc. Output pin goes high when triggered Output pin of 555 timer Reset 555 timer when low Vcc= 5V to 15 V supply input Discharge used to discharge a capacitor Threshold used to detect when the capacitor has charged. The output pin goes low when capacitor has charged to 66.6% of Vcc. Control Voltage Used to change Threshold and Trigger set point voltages and is rarely used

FIG-1

1.1555 Timer Astable Circuit


Fig. 2shows an astable 555 timer circuit. The astable 555 timer circuit outputs a series of pulses. Fig. 2 Astable 555 Timer Circuit When the circuit is first turned on, the discharge pin is disconnected from ground and output pin is set high because the trigger pin is below 33% Vcc Voltage. The capacitor, C, starts to charge through resistors R1 and R2. The threshold pin is used to detect when the voltage across the capacitor reaches 66.6% Vcc voltage. When the voltage across the capacitor reaches 66.6% Vcc voltage, the output pin is set low and the discharge pin is connected back to ground. When the discharge pin is connected back to ground, the capacitor starts discharging though resistor R2. When the voltage across the capacitor reaches 33.3% Vcc voltage, the cycle repeats and creates a series of output pulses. An astable circuit triggers from previous output pulse whereas a monostable circuit requires an externally applied trigger. The output pin oscillates from high to low creating a series of output pulses. The duration the output pin stays high , tHIGH, is given below: tHIGH=0.693.C.(R1+R2) The duration the output pin stays low, tLOW, is given below: tLOW=0.693.C.R2 The frequency, f, of the series of pulses is: f=1/(tHIGH +tLOW) The astable 555 timer circuit can be used in the following applications: Modulate transmitters such as ultrasonic and IR transmitters Create an accurate clock signal (Example: There is a pulse accumulator pin on the 68HC11 microcontroller that counts pulses. You can apply an astable 555 timer circuit

set at 1 Hz frequency to the pulse accumulator pin and create a seconds counter within the microcontroller. The pulse accumulator will be covered in later in the course.) Turn on and off an actuator at set time intervals for a fixed duration

FIG-2 ASTABLE TIMER CIRCUIT

2. 555 timer to modulate infrared (IR) light


An IR emitter is modulated using an astable 555 timer. The IR emitter needs to be modulated by a frequency of 38 kHz since the detector(TSOP 1738) used in this project only detects 38 kHz modulated IR. The detector is set to see only 38 kHz modulated IR because there are random IR sources such as overhead lights, the sun, heaters, etc. in most environments that can cause interference if we will use an un-modulated IR. The following circuit shown in Fig.3 is modulated IR transmitter:

FIG-3 MODULATED IR TRANSMITTER

IR RECEIVER
TSOP 1738:

It is used for reciving the infrared signal from a the signal reflected from the train (obstacle) whose magnitude is 38khz . The TSOP17_ _ series are miniaturized receivers for infrared remote control systems. PIN diode and preamplifier are assembled on lead frame, the epoxy package is designed as IR filter. The demodulated output signal can directly be decoded by a microprocessor. TSOP1738 is the standard IR remote control receiver series, supporting all major transmission codes.

Features
Photo detector and preamplifier in one package Internal filter for PCM frequency Improved shielding against electrical field disturbance TTL and CMOS compatibility Output active low Low power consumption High immunity against ambient light Continuous data transmission possible (up to 2400 bps) Suitable burst length .10 cycles/burst

Suitable Data Format


The circuit of the TSOP17.. is designed in that way that unexpected output pulses due to noise or disturbance signals are avoided. A bandpassfilter, an integrator stage and an automatic gain control are used to suppress such disturbances. The distinguishing mark between data signal and disturbance signal are carrier frequency, burst length and duty cycle. The data signal should fullfill the following condition: Carrier frequency should be close to center frequency of the bandpass (e.g. 38kHz). Burst length should be 10 cycles/burst or longer. After each burst which is between 10 cycles and 70 cycles a gap time of at least 14 cycles is neccessary.

For each burst which is longer than 1.8 ms a corresponding gap time is necessary at some time in the data stream. This gap time should have at least same length as the burst. Up to 1400 short bursts per second can be received continuously.

MOTOR UNIT
1.L293D:
Introduction:
The L293D is a quadruple half H-bridge bidirectional motor driver IC that can drive current of up to 600mA with voltage range of 4.5 to 36 volts. It is suitable to drive small DC-Geared motors, bipolar stepper motor etc.

Specifications:

Supply Voltage Range 4.5V to 36V 600-mA Output current capability per driver Separate Input-logic supply It can drive small DC-geared motors, bipolar stepper motor. Pulsed Current 1.2-A Per Driver Thermal Shutdown Internal ESD Protection High-Noise-Immunity Inputs

Applications:

DC and stepper motor drives Position and velocity servomechanisms

Description:
The Device is a monolithic integrated high voltage, high current four channel driver designed to accept standard DTL or TTL logic levels and drive inductive loads (such as relays solenoides, DC and stepping motors) and switching power transistors. To simplify use as two bridges each pair of channels is equipped with an enable input. A separate supply input is provided for the logic, allowing operation at a lower voltage and internal clamp diodes are included. This device is suitable for use in switching applications at frequencies up to 5 kHz. The L293D is assembled in a 16 lead plastic packaage which has 4 center pins connected together and used for heatsinking
The L293DD is assembled in a 20 lead surface mount which has 8 center pins connected together and used for heatsinking.

Voltage regulator-7805
DESCRIPTION:
The 7805 is a VOLTAGE REGULATOR.It looks like a transistor but it is actually an integrated circuit with 3 legs. Turn it into a nice, smooth 5 volts DC. You need to feed it at least 8 volts and no more than 30 volts to do this. It can handle around .5 to .75 amps, but it gets hot. Use a heatsink. run off of 5 volts. It can take a higher, crappy DC voltage and Use it to power circuits than need to use or run off of 5 volts.

RISC ARCHITECTURE
A microcontroller is an entire computer system contained within a single integrated circuit or chip. Microcontrolleroperation is controlled by a userwritten program interacting with the fixed hardware architecturer esident within the microcontroller. A specific microcontroller architecture can be categorized asaccumulator-based, register-based, stack-based, or a pipeline architecture. The Atmel ATmega16 is a register-based architecture. In this type of architecture, both operands of an operation are stored in registers collocated with the central processing unit (CPU).This means that before an operation is performed, the computer loads all necessary data for the operation to its CPU. The result of the operation is also stored in a register. During program execution, the CPU interacts with the register set and minimizes slower memory accesses.Memory accesses are typically handled as background operations.Coupled with the register-based architecture is an instruction set based on the RISC concept.A RISC processor is equipped with a complement of very simple and efficient basic operations.More complex instructions are built up from these very basic operations. This allows for efficient program operation. The Atmel ATmega16 is equipped with 131 RISC-type instructions. Most can be executed in a single clock cycle. The ATmega16 is also equipped with additional hardware to allow for the multiplication operation in two clock cycles. In many other microcontroller architectures, multiplication typically requires many more clock cycles. For additional information on the RISC architecture, The Atmel ATmega16 is equipped with 32 general purpose 8-bit registers that are tightly coupled to the processors arithmetic logic unit within the CPU. Also, the processor is designed following the HarvardArchitecture format.That is, it is equipped with separate, dedicated memories and buses for program and data information. The register-based Harvard Architecture coupled with the RISC-based instruction set allows for fast and efficient program execution and allows the processor to complete an assembly language instruction every clock cycle. Atmel indicates the ATmega16 can execute 16 million instructions per second when operating at a clock speed of 16 MHz.

ATMEGA16 DATASHEET

NON VOLATILE AND DATA MEMORIES


The ATmega16 is equipped with three main memory sections: flash electrically erasable programmable read-only memory (EEPROM), static random access memory (SRAM), and byteaddressable EEPROM for data storage..

In-System Programmable Flash EEPROM


Bulk programmable flash EEPROM is used to store programs. It can be erased and programmed as a single unit. Also, should a programrequire a large table of constants, it may be included as a global variable within a programand programmed into flash EEPROM with the rest of the program. Flash EEPROM is nonvolatile, meaning memory contents are retained when microcontroller power is lost. The ATmega16 is equipped with 16K bytes of onboard reprogrammable flash memory. This memory component is organized into 8K locations, with 16 bits at each location. The flash EEPROM is in-system programmable. In-system programmability means the microcontroller can be programmed while resident within a circuit. It does not have to be removed from the circuit for programming. Instead, a host personal computer (PC) connected via a cable to a microcontroller downloads the program to the microcontroller. Alternately, the microcontrollercan be programmed outside its resident circuit using a flash programmer board. We will use this technique throughout the book. Specifically, we will use the Atmel STK500 AVR Flash MCU Starter Kit for programming the ATmega16. This inexpensive development board (less than $100) is readily available from a number of suppliers.

Byte-Addressable EEPROM
Byte-addressablememory is used to permanently store and recall variables during program execution.It too is nonvolatile. It is especially useful for logging system malfunctions and fault data during program execution. It is also useful for storing data that must be retained during a power failure but might need to be changed periodically. Examples where this type of memory is used are found in applications to store system parameters, electronic lock combinations, and automatic garage door electronic unlock sequences. The ATmega16 is equipped with 512 bytes of EEPROM.

Static Random Access MemorySRAM

is volatile. That is, if the microcontroller loses power, the contents of SRAM memory are lost. It can be written to and read from during program execution. The ATmega16 is equipped with 1000 bytes (actually 1120) of SRAM. A small

portion (96 locations) of the SRAM is set aside for the general-purpose registers used by the CPU and also for the I/O and peripheral subsystems aboard the microcontroller.

Programmable Lock Bits

To provide for memory security from tampering, the ATmega16 is equipped with six memory lock bits. These lock bits are programmed using the Atmel STK500 programming board. The lock bits may be configured for the following options: No memory lock features enabled. No further programming of memory is allowed using parallel or serial programming techniques. No further programming or verification of memory is allowed using parallel or serial programming techniques.

Pulse Width Modulation Channels

A pulse width modulated, or PWM, signal is characterized by a fixed frequency and a varying duty cycle. Duty cycle is the percentage of time a repetitive signal is logic high during the signal period. It may be formally expressed as duty cycle (%)=(on time/period) (100%). The ATmega16 is equipped with four PWM channels. The PWM channels coupled with the flexibility of dividing the time base down to different PWMsubsystemclock source frequencies allows the user to generate a wide variety of PWMsignals, from relatively highfrequency, low-duty cycle signals to relatively low-frequency, high-duty cycle signals. PWMsignals are used in a wide variety of applications, including controlling the position of a servo motor and controlling the speed of a DC motor.

Analog-to-Digital Converter
The Atmel ATmega16 [6] microcontroller is equipped with a flexible and powerful ADC system. It has the following features: 10-bit resolution, 2 LSB absolute accuracy, 13 ADC clock cycle conversion time, 8 multiplexed single-ended input channels, selectable right or left result justification, and 0 to Vcc ADC input voltage range. Let us discuss each feature in turn. The first feature of discussion is 10-bit resolution. Resolution is defined as: resolution = (VRH VRL)/2b. VRH and VRL are the ADC high and low reference voltages, whereas b is the number of bits available for conversion. For the ATmega16 with reference voltages of 5 VDC, 0 VDC, and 10 bits available for conversion, resolution is 4.88 mV. Absolute accuracy specified as 2 LSB is then 9.76 mV at this resolution. It requires 13 analog-to-digital clock cycles to perform an ADC conversion. The ADC system may be run at a slower clock frequency than the main microcontroller clock source. The main microcontroller clock is divided down using the ADC Prescaler Select (ADPS[2:0]) bits in the ADC Control and Status Register A (ADCSRA). The ADC is equipped with a single

successive approximation converter.Only a single ADC channel may be converted at a given time. The input of the ADC is equipped with an eightinput analog multiplexer. The analog input for conversion is selected using the MUX[4:0] bits in the ADC Multiplexer Selection Register (ADMUX). The 10-bit result from the conversion process is placed in the ADC Data Registers, ADCH and ADCL. These two registers provide 16 bits for the 10-bit result. The result may be left justified by setting the ADLAR (ADC Left Adjust Result) bit of the ADMUX register. Right justification is provided by clearing this bit.The analog input voltage for conversion must be between 0 and Vcc V.

PIN DIAGRAM OF ATMEGA 16

ADVANTAGES
high performance coupled with low power consumption, outstanding flash memory technology, reduced instruction set computer Harvard Architecture, single-cycle instruction execution, wide variety of operating voltages (1.8--5.5 VDC), architecture designed for the C language, one set of development tools for the entire AVR line, and in-system programming, debugging, and verification capability

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