sensor interfacing with lpc2148 arm7 tyro

13,783

Circuit Image

The LM35 series consists of precision integrated-circuit temperature sensors, with an output voltage that is linearly proportional to the temperature in degrees Celsius. The sensor's output can be converted to a digital signal, facilitating easy connection to a microcontroller. The third pin of the LM35 is connected to ground, the first pin to the VCC, and the second pin to the microcontroller input. A single-pin female-to-female wire is recommended for connecting the LM35 temperature sensor leads. When the temperature is sensed, the sensor relays the reading to the microcontroller. The LPC2148 Tyro Board is used to read temperature from the LM35 sensor. The ARM7 LPC2148 Tyro board employs an ADC pin for this purpose, and the output is displayed on a PC via UART1. A 10-bit ADC is utilized for temperature readings from the LM35. The basic clocking for the A/D converters is provided by the VPB clock, which includes a programmable divider to scale this clock to the maximum 4.5 MHz required for the successive approximation process. Each conversion necessitates 11 of these clocks. To compile the associated C code, the KEIL software is required, and a correctly configured project must be established. The TempSens.c file should be included in this project. In KEIL, it is possible to develop or debug the project without hardware setup by compiling the code to generate a HEX file. During debugging mode, the port output can be checked without using the microcontroller board. The LPC2148 Tyro Board requires a +3.3V power supply, and a serial cable should connect the controller to the PC. The HyperTerminal screen must be opened, selecting the appropriate port and default settings. The screen will display current temperature readings. To test the sensor, bring a hot soldering iron tip near the LM35's pins without touching them, maintaining a distance of 1 to 2 mm. The screen will update with the rising temperature. When the soldering iron tip touches the LM35 pins, the temperature should rise rapidly. It is advised to keep the tip in place until the temperature reaches 80 degrees, after which it can be removed.

The LM35 temperature sensor is a highly accurate device suitable for a variety of temperature measurement applications. It operates within a specified temperature range and provides a linear output voltage that corresponds directly to the temperature in Celsius, which simplifies interfacing with analog-to-digital converters (ADCs) used in microcontrollers.

In the application described, the LM35 is connected to the LPC2148 Tyro Board, which is based on the ARM7 architecture. The board is equipped with a 10-bit ADC that allows for precise temperature readings. The ADC converts the analog voltage output from the LM35 into a digital format suitable for processing by the microcontroller. The reading process involves sampling the voltage at the ADC pin, which is clocked by the VPB clock. The programmable divider ensures that the clock frequency is appropriately scaled to meet the ADC's operational requirements.

The microcontroller processes the digital temperature data, which can then be communicated to a PC through UART1. This communication enables real-time monitoring of temperature readings, which is particularly useful for applications requiring immediate feedback or control based on temperature changes.

To facilitate the development and debugging process, the KEIL software is employed, allowing for code compilation and simulation without needing physical hardware. The TempSens.c file plays a crucial role in this setup, containing the necessary code to read from the LM35 and output the results. The use of a serial connection between the LPC2148 Tyro Board and the PC allows for easy data visualization through the HyperTerminal interface.

In practical testing, the responsiveness of the LM35 can be demonstrated by applying heat, such as from a soldering iron, to the sensor. This hands-on approach illustrates the sensor's quick response to temperature changes, validating its effectiveness in real-world applications. Proper care should be taken during testing to avoid damaging the sensor by excessive heat.The LM35 series are precision integrated-circuit temperature sensors, whose output voltage is linearly proportional to the Celsius (Centigrade) temperature. The output of sensor converted to digital that easy connecting with microcontroller. Fig. 1 shows how to interface the LM35 to microcontroller. As you can see the third pin is connected to GND, the first pin is connected to VCC & the second pin is connected to the Microcontroller input. Just use single PIN female to female wire to connect with the leads of LM35 temperature sensor. So when the temperature is sensing, it give the sensor reading to controller. Read the temperature in LPC2148 Tyro Board from temperature sensor LM35. The ARM7 LPC2148 Tyro board uses the ADC pin for reading temperature from temperature sensor LM35. The reading output is displayed into PC through UART1. The 10 bit ADC used for reading the temperature from LM35. Basic clocking for the A/D converters is provided by the VPB clock. A programmable divider is included in each converter, to scale this clock to the 4. 5 MHz (max) clock needed by the successive approximation process. A fully accurate conversion requires 11 of these clocks. To compile the above C code you need the KEIL software. They must be properly set up and a project with correct settings must be created in order to compile the code. To compile the above code, Temp Sens. c file must be added to the project. In Keil, you want to develop or debug the project without any hardware setup. You must compile the code for generating HEX file. In debugging Mode, you want to check the port output without microcontroller Board. Give +3. 3V power supply to LPC2148 Tyro Board; the serial cable is connected between the controller and PC. Open the Hyper Terminal screen, select which port you are using and set the default settings. Now the screen should show the current temperature readings. Bring a Hot soldering iron tip near the LM35`s pins, don`t touch it keep it 1 or 2mm away. The screen should update with the rising temperature. Now finally touch the pins of LM35 with the tip of iron, the temperature should rise quickly. Keep it there until temperature rise to 80 degrees, and then remove the iron. 🔗 External reference