Tuesday, March 8, 2011

Model-promotions-com:

LM92:

is a LM92 digital temperature sensor that has I2C connectivity, accurate to 0.33 ° C in the measurement and 12-bit resolution . This represents variations in temperature of only 0.0625 ° C. These qualities make it a thermometer ideal for high-precision systems where temperature is a critical factor to monitor. Along with a "window" comparator thermal has low temperature alarms, high and even critical temperature. The settings of these values \u200b\u200bare programmable in a simple way and we believe that we can no longer telling the benefits of this device, it's time you login to the article and be amazed with this show didactic simple and professional.

A temperature gauge Simple can admit mistakes according to area where it is used according to the needs and the application requires. Not be the same temperature sensor for a thermometer house that a medical team, for example, an incubator for babies. Nor will equal the employee in the neon sign of a corner of the city that used in a greenhouse, ie for each application requirements can change dramatically. National Semiconductor offers in LM92, a product of the highest quality development where the requirements are rigorous, where the temperature ranges measured with a considerable extent ( -55 ° C to +150 ° C ) and when we should get outstanding performance. Many features have we advanced in the header of the article, but in the development of this text you will see how simple it is to access a thermal control system professional quality.

thermometers of every kind and quality

The LM92 , as mentioned before, provides the opportunity to work with what is called a " thermal window. " The integrated circuit has a register (Programmable ) that stores a value minimum temperature below which, an alarm is activated . That is, we set the record referred to sound an alarm if the temperature the breeding of birds descended from a certain temperature and animals at risk. Thus, the system will alert with a warning that the temperature has dropped below a preset level. This record is known as T_LOW and of course, there is also a similar record to provide notice to overcome a high level Temperature: registration T_HIGH . Thus, below a programmable thermal value over another, the alarms are activated. That is the "thermal window " values \u200b\u200bthat fall between T_LOW and T_HIGH . Associated with these levels there is a third, hysteresis logic should be activated or not the alarms to avoid confusing or intermittent gunfire.

Block Diagram of LM92

The outputs of these alarms are presented to the user in a single pin (5) with the name INT. This is logical because the alarm you when the temperature is outside of the values \u200b\u200bof " window." Output is Open Drain and consequently their empowerment will produce a low logic state in that the device pin. Recall that Open Drain is the analogy to Open Collector (Open Collector) but made with MOSFET transistors as can be seen in the diagram above. There one can observe There is also a fourth register which activates an alarm when the thermal readings exceed a critical value. Registration T_CRIT also programmable and meets routinely with the aim of preserving physical structures to prevent damage to the electronic system itself, as mentioned, is usually set at high values \u200b\u200bof reading. Anyway, you can move within the range of measurement that allows you LM92. That is, you can locate the critical temperature below the thermal window and trigger an alarm when the temperature drops too dangerous levels ( freezing ). is important that you clarify this concept . The critical temperature is not only applicable to high values \u200b\u200bbut also can act at very low levels. While locate that value outside the thermal window, the alarm will work in this regard and the same way as the previous one, is presented as Open Drain on pin 3.

Vista ejemplo de cómo una variación de temperatura atraviesa los límites establecidos por los registros Vista
example of how a temperature variation across the boundary established by the records

values \u200b\u200badopted by the device to start work whenever power is applied is as follows:

  • temperature hysteresis (T_HYST) = 2 ° C Low Temperature
  • (T_LOW) = 10 ° C High Temperature
  • (T_HIGH) = 64 ° C
  • critical temperature (T_CRIT) = 80 ° C

Then, these values \u200b\u200bcan be changed when starting the program performance by the microcontroller. Thus, the LM92 saves many lines of code the programmer to avoid having to use the microcontroller pin for alarm or to organize the sequence of thermal window work, the critical temperature and hysteresis on / off. The savings in programming time, as hardware resources have been well designed and executed by people National Semiconductor in the design of the LM92 . This allows us to use basic structures to work. For example, we have used our classic hardware Amicus to carry out the assembly. Building on the same basic design we have used for other productions, we rely on the PIC 18F25K20 is a very versatile and reliable, ideal for this kind of development. The circuit adopted, therefore, is as follows:

the proposed circuit and the LM92
PIC18F25K20

Because the LM92 allows a supply that can be 5Volts or 3.3 Volts (2.7 V to 5.5 V) used the same supply as the PIC to do the job. lines SDA and SCL resistors used "pull-up " 1K and Open Drain outputs alarms connect very easily with a LED and limiting resistor voltage line of 3.3 Volts. LED yellow shown in the diagram is placed to help in the programming work. The basic idea is to make light use at the beginning of a routine "important " and off at the end of it. It is one of the many ways you can take to help in programming. If LED flashes is because the program cycle is completed, if it does is it stops somewhere and according to the state can find out where it stops the execution of the program. In our example, its performance is found before the data collection and to end the show in the LCD following a simple order of program:

  • declare the variables used. Write
  • temperature records to the values \u200b\u200bthat I will use. Top
  • an infinite loop and turn on the LED.
  • I2C Bus Leo the temperature record.
  • realize the process on the information gathered and presented on the LCD.
  • I turn off the LED and I hope some time to restart the loop.

That is all the software needed to run the LM92 and leverage their most important functions. After watching this video where we introduce the operation of our development we will see how it organizes record structure and how We can work with them.






Like any I2C device , the LM92 has a communications protocol through a particular structure, communicates with the PIC exchanging all the information necessary for proper operation. In this case, the structure is explained in the datasheet LM92 (p. 13, Fig.6) and do a little review of how the work we have used to help you understand more quickly steps to continue and not lose valuable time that can be used in developing the rest of the application. Then we began to "open " the I2C bus through the command HBSTART . Amicus In this format of instruction indicates that the module will use the PIC MSSP for communication. In other words, use dedicated hardware pins to facilitate the work of the PIC . After opening the dialogue channel, we turn to write the internal registers of the LM92 , if we want to change the working limits of alarms about the values \u200b\u200bthat the device comes preprogrammed default when initializing operation. For this reason, if you want to work with different values \u200b\u200bwhich brings the LM92 by "default " within the structure of our program in the PIC , we write our work values.

Structure
how to read or write using the "pointer" and the data bytes

The writing is simple and is divided into two parts. First, it signals the " pointer (Pointer) of LM92 the record on which we work. This work is done "writing" with the statement HBUSOUT followed by the address ( Byte Address) of LM92 inside the bus and then the registration number. For example, to tell the pointer to work on registration T_LOW , write an instruction { HBUSOUT Address Byte [Registration No.]}. Thus, the LM92 prepares to host an activity in that file available for writing or reading. In this case it is writing, but equally we can proceed to make reading the value stored in the record when we make complex developments working with dynamic windows. That is, when the system take care of automatically adjust the values \u200b\u200bof the "thermal window " according to the needs of design and development of the program executed by the PIC .

fragment where the records are scheduled

then write the appropriate value in the following format: { HBUSOUT Address Byte, Registration No. [M writing]}. Thus, and as you can see in the picture above, you modify the internal registers of the LM92 . When you download and read the list that is the program observe that the phrase "write " in the image above means that the program is indicating the direction of LM92 within the Bus to the last bit (R / W) to zero for indicate writing. Then, when we conduct a reading this bit will change to a logical one and the label will change its name. Finally, when all records are written, at our discretion, close the I2C communication through training HBSTOP . Thus, we are able to start reading the temperature obtained by LM92 and present it in a LCD or process according to the needs of hardware we are developing. This work is as simple as above. The structure is the same and we had to read the registry that stores the value obtained by using the HBUSIN . In the example below, "LEO is the address (Address Byte ) with the last bit enabling the reading process.

that simple is the I2C protocol to read the LM92

Let's see how they organize the two bytes of data and how we will extract information from temperature or in the reverse, as we do write a useful value in any of the records. The data are organized in a word of two bytes that seen in linear form are as follows:

The word of two bytes that contain the information exchanged between the LM92 and
18F25K20

In any of the records we find that the D15 bit position will indicate the sign of the observed temperature. That is, if D15 is above zero and have a low value below zero if the LM92 us back in this position a logical one. On the other hand, the positions D0, D1 and D2 we return the status (Status ) alarm when reading while not involved at the time of writing of any of the other records. After using and discard the three leading bits we note that we are useful bits of between D3 (Bit 0) and D14 (Bit 11) and thus is housed in 12-bit temperature data . Within this structure, the four least significant bits (LSB) are processed separately from them getting the decimal measurement. Recall that the LM92 offers " steps" of 0.0625 ° C and for this reason 15 steps (4 bits) mean 0.9375 ° C. This allows you to appreciate the quality of measurement offered by the LM92 . Finally, the positions survive D7-D14 which are treated as a conventional byte value is expressed as a decimal integer value of the temperature. Combining the entire decimal with the final result that we show on the LCD.

Management of data used to read a value on the LCD

TEMP terms, T6, T3, T1, T4 and T5 are the variables used to load the values \u200b\u200bthat the program needs and declared at the start of it. Noting the image is found that conditional IF that is responsible for determining the value taken by D15 (the sign bit). By weight, equivalent to a decimal D15 equal to 256, therefore, if the variable exceeds the value 255 will be an indication that the LM92 is recording temperatures below freezing. Remember: if D15 takes a value equal to one, the temperature is below zero . From this, the presentation is transformed into what is known as "two's complement ." When you view the data sheet may seem that the entire system goes crazy and you have to reprogram everything differently, however, how to handle a "two's complement is investing at face value and adding a unit. For example, if the byte 11100111 is expressed in "two's complement " we must invest (00011000) and add a unit obtaining the number 00011001. BASIC language that is very simple to make a single statement (T6 = T6 ~ + 1). This time, the LM92 offers temperature values \u200b\u200bbelow zero.

temperatures "below zero" is available in format "twos complement"

This is the way we write and read the records in the LM92 . We just need to understand and exploit the use of the tools offered by the programming language used and thus, we get the most out of the system. The final point worth to indicate, and that is important when a project with this device is to know that while the microcontroller "reads " the temperature record, alarm indicators stop working. By quickly as the I2C bus , or the language compiler used, indicating there is a gap in the acquisition of temperature data. To demonstrate this phenomenon in our example program, we assign a duration to yellow LED on / off for that, contrasting with the duration of the interruption in the indication of the / the alarm / s of LM92 , you notice the difference . Ie This process is observed and interpreted clearly better performance. This leads us to end the video where we show the LM92 action all alarms activating and displaying their features. Do not miss:





There are many integrated circuits on the market that offer the possibility of providing its operation as temperature gauges, but few offer as many features in one package as LM92 does. A useful device for endless applications where precision, accuracy and strict temperature control should be key design factors. I hope in the Electronics Forum arg to tell us your experiences with the LM92 . Visit us!

0 comments:

Post a Comment