Instruction manuals

Interfacing Temperature Sensor_colorsense

Published
of 17
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Share
Description
notes
Transcript
  Interfacing Temperature Sensor (DS1620) with AT89S51 Introduction  The DS1620 Digital Thermometer and Thermostat provides 9-bit temperature readings. It has three alarm outputs, so the device can also act as a thermostat. The DS1620, which incorporates a 3-wire interface can be controlled using an AT89C51 Microcontroller. The DS1620 is connected directly to the I/O port on the AT89C51 microcontroller, and the 3-wire handshaking and temperature readings are handled by low-level software drivers as shown in this document. Temperature Control of the DS1620  The thermostat ouputs of the DS1620 allow it to directly control heating and cooling devices. THIGH is driven high if the device exceeds a predefined limit set within the TH Register. The output THIGH can be used to indicate that a high temperature tolerance boundary has been met or exceeded, or it can be used as part of a closed loop system to activate a cooling system and deactivate it when the system temperature returns to tolerance. TLOW is driven high when the temperature of the device falls below the limit set in the TL Register. TLOW remains active until the DS1620's temperature becomes greater than the value stored in the low temperature register, TL. TCOM is driven high when the temperature exceeds the limit set in the TH Register and remains high until the device temperature falls below that set in the TL Register. In this way, any amount of user-defined temperature hysteresis can be obtained. For typical thermostat operation, the DS1620 will operate in continuous mode. However, for applications here only one reading is needed at certain times or to conserve power, the one-shot mode may be used. Note that the thermostat outputs (THIGH , TLOW , TCOM) will remain in the state they were in after the last valid temperature conversion cycle when operating in one-shot mode. Hardware Configuration  The 3-wire bus is comprised of three signals. These are the RST-bar (reset) signal, the CLK (clock) signal, and the DQ (data) signal. All data transfers are initiated by driving the RST-bar input high. Driving the RST-bar input low terminates the communication. A clock cycle is a sequence of a falling edge followed by a rising edge. For data inputs, the data must be valid during the rising edge of the clock cycle. Data bits are output on the falling edge of the clock and remain valid through the rising edge. When reading data from the DS1620, the DQ pin goes to a high-impedance state while the clock is high. Taking RST-bar low during a communication cycle will cause DQ to go to a high-impedance state, thus ending the communication. Data over the 3-wire interface is sent LSB first. Figure 1 illustrates  the device connection to the   microcontroller programmable input/output port. This project, a color sense circuit from 1993, shows how to add color sensing capability to any system. This design uses three sets of color LEDs to illuminate a target, with each LED turned on for a specific period of time. The sense circuit then decides how much of the LED color was reflected back so giving a readout of the amount of light reflected i.e. the amount of light of a specific colour. Of course the LEDs do not provide constant intensity output for every frequency of light (See Figure 10) but it seems to be a useful circuit nonetheless. Since Red, Green and Blue LEDs are used, the RGB content of a reflecting surface can be determined.    Executive Summary of the Color Sensing Circuit A system for photoelectrically sensing the color of an object includes two or more light sources having different characteristic ranges of chromaticity and one primary photosensitive element which receives light from the light sources after it has reflected off of the target object and a secondary photosensitive element which receives light from the light sources prior to reflection off of the target. A divider element divides the output of the primary photosensitive element by the output of the secondary photosensitive element to automatically align the signal representative of the color of the object for variation in the light power output of the light sources. In an alternate embodiment, the output of the secondary photosensitive receiver is used as a closed loop feedback signal to regulate the light power output of the light sources. Background of the Color Sensing Circuit In prior art color recognition devices, three electronic light transmitters such as light emitting diodes, are used to illuminate an object whose color is to be measured by emitting light pulses in a predetermined narrow-band range of wavelengths. The light pulses are carried from the light transmitters to the object by way of a fiberoptic cable or other type of optical coupling device for carrying the light generated by the plurality of light emitting diodes to the object whose color is to be measured. A transmitter control device is coupled to the electronic light transmitters establishing at least one control cycle during which said light pulses successfully illuminate the color surface of the object under examination for a brief period of time. An electronic light receiver then receives the light reflected from the colored surface in response to the arrival of each the light pulses and converts them into electrical signals having an intensity corresponding to that of the reflected light.  An evaluation device which is coupled to the electronic light receiver then makes a color determination based on the intensity of the received individual electrical signals arriving in the course of the control cycle. Since the light emitting diodes or other type of light transmitters often vary in output according to the ambient temperature, at least one temperature sensor is used to supply temperature data with regard to the ambient temperature to the transmitting control device and the evaluation device wherein the transmitting control device supplies, in the course of the control cycle, current pulses to the electronic light transmitters which are individually determined in accordance with a table correlating the temperature data and stored data relating to the temperature dependency emission curves of the light transmitters which are then adjusted in an output for successfully illuminating the colored surface with light pulses of predetermined intensity. The evaluation device also makes a compensation for the received individual signals based upon the temperature data and the stored data relating to the temperature dependency conversion curve of the light receiver. The final color recognition determination is then made by comparing received individual electrical signals with stored value for the color recognition determination. One of the limitations to this approach is that the accuracy of the light power output of the light transmitters depends on the predictability of their output in relation to the ambient temperature as predetermined and programmed into the electronic control system. Another limitation that results in measurement inaccuracies is due to the drift of the electronic components that make up the electronic control circuitry along with the drift of the characteristic of the light emitting diodes themselves. Summary of the Color Sensing Circuit In accordance with the principles of the design, color recognition of an object is achieved by providing a color sensor system comprising at least three electronic light sources, such as light emitting diodes (LEDs), which emit light pulses in a predetermined narrow-band range of wavelengths using a control device which is commonly a microprocessor coupled to the electronic light transmitters for establishing at least one control cycle during which the light pulses successively illuminate color surface of the object under examination for a brief period of time. According to the present design, the light emitted from the light sources is carried to the object of the color to be measured using a fiberoptic bundle. According to one embodiment of the present design, a portion of the fiberoptic bundle is split off and directed back towards a secondary receiver which measures the light output from the split off fiberoptic cable and then uses that signal to either regulate the output of the light transmitters and/or make correction for drift of the output of the light sources in the calculation of the level of reflected light from the object whose color is to be measured and the use of an autozero signal to prevent electronic saturation when the light sources are off. In another embodiment of the present design, a secondary light receiver is disposed within a light box which contains the light transmitters wherein the light output power off the back of the light emitting diodes is measured and used to regulate the transmitter control device which powers the
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks