Pages

Friday, 15 November 2013

Gyro Sensor

Overview
The L3G4200DTR is a low-power, three-axis angular rate sensor, able to provide unprecedented stablility of zero rate level and sensitivity over temperature and time. It includes a sensing element and an IC interface capable of providing the measured angular rate to the external world through a digital interface (I2C/SPI).

Gyro Sensor:


Features

  • 16 bit rate output data value.
  • 8 bit temperature data value. 
  • Two digital output lines. 
  • Ultra stable over temperature and time.
Applications
  • Gaming and virtual input devices. 
  • GPS navigation systems. 
  •  Appliances and robotics.

Working
A gyro sensor is a device for measuring or maintaining orientation, based on the principles of angular momentum. Mechanically, a gyroscope is a spinning wheel or disc in which the axle is free to assume any orientation. Although this orientation does not remain fixed, it changes in response to an external torque much less and in a different direction than it would without the large angular momentum associated with the disc's high rate of spin and moment of inertia. The device's orientation remains nearly fixed, regardless of the mounting platform's motion, because mounting the device in a gimbal minimizes external torque.
Gyroscopes based on other operating principles also exist, such as the electronic, microchip-packaged MEMS gyroscope devices found in consumer electronic devices, solid-state ring lasers, fibre optic gyroscopes, and the extremely sensitive quantum gyroscope.


For Code and Application please Click Here

Colour Sensor

Overview:

The TCS3200 and TCS3210 programmable color light-to-frequency converters that combine configurable silicon photodiodes and a current-to-frequency converter on a single monolithic CMOS integrated circuit. The output is a square wave (50% duty cycle) with frequency directly proportional to light intensity (irradiance). The full-scale output frequency can be scaled by one of three preset values via two control input pins. Digital inputs and digital output allow direct interface to a microcontroller or other logic circuitry. Output enable (OE) places the output in the high-impedance state for multiple-unit sharing of a microcontroller input line. In the TCS3200, the light-to-frequency converter reads an 8 x 8 array of photodiodes. Sixteen photodiodes have blue filters, 16 photodiodes have green filters, 16 photodiodes have red filters, and 16 photodiodes are clear with no filters. In the TCS3210, the light-to-frequency converter reads a 4 x 6 array of photodiodes. Six photodiodes have blue filters, 6 photodiodes have green filters, 6 photodiodes have red filters, and 6 photodiodes are clear with no filters. The four types (colors) of photodiodes are interdigitated to minimize the effect of non-uniformity of incident irradiance. All photodiodes of the same color are connected in parallel. Pins S2 and S3 are used to select which group of photodiodes (red, green, blue, clear) are active. Photodiodes are 110 μm x 110 μm in size and are on 134-μm centers.

Colour Sensor:
Functional Block Diagram:




APPLICATION INFORMATION: 
Power supply considerations:
Power-supply lines must be decoupled by a 0.01-μF to 0.1-μF capacitor with short leads mounted close to the device package.
Input interface:
A low-impedance electrical connection between the device OE pin and the device GND pin is required for improved noise immunity. All input pins must be either driven by a logic signal or connected to VDD or GND —they should not be left unconnected (floating).
Output interface:
The output of the device is designed to drive a standard TTL or CMOS logic input over short distances. If lines greater than 12 inches are used on the output, a buffer or line driver is recommended. A high state on Output Enable (OE) places the output in a high-impedance state for multiple-unit sharing of a microcontroller input line.
Power down
Powering down the sensor using S0/S1 (L/L) will cause the output to be held in a high-impedance state. This is similar to the behavior of the output enable pin, however powering down the sensor saves significantly more power than disabling the sensor with the output enable pin. Photodiode type (color) selection The type of photodiode (blue, green, red, or clear) used by the device is controlled by two logic inputs, S2 and S3
Output frequency scaling:
Output-frequency scaling is controlled by two logic inputs, S0 and S1. The internal light-to-frequency converter generates a fixed-pulse width pulse train. Scaling is accomplished by internally connecting the pulse-train output of the converter to a series of frequency dividers. Divided outputs are 50%-duty cycle square waves with relative frequency values of 100%, 20%, and 2%. Because division of the output frequency is accomplished by counting pulses of the principal internal frequency, the final-output period represents an average of the multiple periods of the principle frequency. The output-scaling counter registers are cleared upon the next pulse of the principal frequency after any transition of the S0, S1, S2, S3, and OE lines. The output goes high upon the next subsequent pulse of the principal frequency, beginning a new valid period. This minimizes the time delay between a change on the input lines and the resulting new output period. The response time to an input programming change or to an irradiance step change is one period of new frequency plus 1 μs. The scaled output changes both the full-scale frequency and the dark frequency by the selected scale factor. The frequency-scaling function allows the output range to be optimized for a variety of measurement techniques. The scaled-down outputs may be used where only a slower frequency counter is available, such as low-cost microcontroller, or where period measurement techniques are used.
Measuring the frequency:
The choice of interface and measurement technique depends on the desired resolution and data acquisition rate. For maximum data-acquisition rate, period-measurement techniques are used. Output data can be collected at a rate of twice the output frequency or one data point every microsecond for full-scale output. Period measurement requires the use of a fast reference clock with available resolution directly related to reference clock rate. Output scaling can be used to increase the resolution for a given clock rate or to maximize resolution as the light input changes. Period measurement is used to measure rapidly varying light levels or to make a very fast measurement of a constant light source. Maximum resolution and accuracy may be obtained using frequency-measurement, pulse-accumulation, or integration techniques. Frequency measurements provide the added benefit of averaging out random- or high-frequency variations (jitter) resulting from noise in the light signal. Resolution is limited mainly by available counter registers and allowable measurement time. Frequency measurement is well suited for slowly varying or constant light levels and for reading average light levels over short periods of time. Integration (the accumulation of pulses over a very long period of time) can be used to measure exposure, the amount of light present in an area over a given time period.



ARM SCHEMATIC:


ARM CODE:
For ARM code Click Here

ATMEL Schematic:
ATMEL CODE:
For ATMEL code Click Here

PIC Schematic:


 PIC CODE:
 For PIC code please Click Here