Current location - Education and Training Encyclopedia - Graduation thesis - Pt 100 paper
Pt 100 paper
(1): Description of design principle.

Circuit block diagram

Design description of each functional unit

Temperature detection:

Used to collect the temperature parameters of the controlled object, PT 100 is selected as the temperature sensor in the design, because PT 100 has good linearity in the detection range required by the system, and it is very good when it changes between 0~ 100 degrees Celsius at room temperature. When the temperature changes by one degree Celsius, the resistance value changes by about 0.39 ohm. When the temperature of the controlled object changes, it will be detected and sent to the later stage.

Because of the high precision requirement in the circuit, TL43 1 voltage regulator is selected to provide reference voltage to ensure the accuracy and reliability of temperature measurement.

Television conversion:

When PT 100 detects the temperature change, the resistance value changes accordingly. For the convenience of processing, a bridge is connected after detection, and the temperature is converted into voltage through the bridge, which improves the linearity of the temperature sensor. As can be seen from the figure, the voltage value formula introduced from the bridge at the noninverting end and the inverting end of the first stage can be calculated as follows:

u? =U+=?

Where Vref is the stable reference voltage across the TL43 1 regulator, which is 2.5V.

signal amplification

When the temperature is 0℃, the resistance of TP 100 is 100 ohm, which makes the bridge balanced, and the terminal voltage of the first stage is equal to that of the two input terminals of the operational amplifier. When the temperature is 0℃, the resistance is not equal to 100 ohm, and the input of the operational amplifier is different, which is amplified in two stages.

LM358 is selected as the operational amplifier. In order to prevent the nonlinear error caused by high single-stage magnification, a double-sided triode stage is adopted, with the former stage magnification of1+90/10 =10 times, and the latter stage magnification of 1+20/ 10=3 times, with a total magnification of.

Single chip microcomputer control unit

The peripheral circuit amplifies and filters the detected temperature change and sends it to the PD0 port of the analog-to-digital conversion input pin of the single chip microcomputer. Single chip microcomputer continuously reads the voltage value of PDO port, converts it into the temperature value to be displayed by internal AD, and sends it to LED display. The resistance of the temperature sensor changes from 0 to 100℃, and the corresponding resistance is 100~ 138. The output voltage range of the operational amplifier is 0 ~ 2.28 V. The single chip microcomputer detects and reads the PD0 port pin, converts it into corresponding digital quantity, and converts it into 0- 100 degrees after being processed by the single chip microcomputer, and sends it to an external digital tube for display.

led display

The display adopts dynamic display, and the internal detection processing is immediately sent to the output display as soon as the temperature changes, which increases the accuracy.

B: schematic diagram

C: program flow chart

D: program list

# Contains? & ltmega 16 . h & gt;

# Contains? & ltdelay.h & gt

# Definition? ADC_VREF_TYPE? 0xc0// Reference source selection parameters

Flash? Not signed? Charles? Table [1 1]? =? {0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x 39 };

/*ADC function */

/* entrance parameter: adc_input*/

/* Outlet parameter: ADCW*/

Not signed? int? Read_adc (unsigned? Charles? Adc _ input)

{

ADMUX=adc_input? |? (ADC_VREF_TYPE? & amp? 0x ff);

delay _ us( 10);

ADCSRA | = 0x40

What time? ((ADCSRA? & amp? 0x 10)= = 0);

ADCSRA | = 0x 10;

Return? ADCW;

};

/* Dynamic display function */

/* entrance parameters: a, b, c, d*/

/* Export parameters: None */

Not signed? Charles? Led (unsigned? Charles? A, unsigned? Charles? B, unsigned? Charles? C, unsigned? Charles? d)

{

PORTB = table [a];

PORTD.0 = 0

delay _ ms( 1);

PORTB = 0x00

portd . 0 = 1;

PORTB = table [b];

portd . 1 = 0;

delay _ ms( 1);

PORTB = 0x00

portd . 1 = 1;

PORTB = table [c];

portd . 6 = 0;

delay _ ms( 1);

PORTB = 0x00

portd . 6 = 1;

PORTB = table [d];

portd . 7 = 0;

delay _ ms( 1);

PORTB = 0x00

portd . 7 = 1;

};

Invalid? Major (invalid)

{?

Not signed? Charles? a、b、c、d、I;

int? adc_0,ADC _ 1;

/* All B ports are output and used as segment codes */?

PORTB = 0x00

DDRB = 0x ff;

/* The upper two bits and the lower two bits of the D port are set as outputs, which are used as bit codes */

PORTD = 0xc3

DDRD = 0x C3;

/*ADC configuration */

/* Frequency division clock 500kHz*/

ADMUX=ADC_VREF_TYPE? & amp? 0xff

ADCSRA = 0x83

What time? ( 1)

{

read _ ADC(0);

Adc_ 1= (unsigned? Dragon) ADCW *1123/1024;

/* Process values and send them to the display */

a = ADC _ 1/ 1000;

b = ADC _ 1/ 100% 10;

c = ADC _ 1/ 10% 10;

d = ADC _ 1% 10;

led(a,b,c, 10);

};

}

E: component layout considerations

Components with the same function are closer.

There is ground wire isolation between components with different functions.

Pay attention to the combination of high-end components, low-end components, plug-in components and patch components.

The spacing between components is appropriate. Especially parts with metal shells.

Don't let the input signal line be parallel to the output signal line to avoid signal reflection interference.

The filter electrolytic capacitor and the ceramic decoupling capacitor are connected between the power supply and the ground of each integrated circuit chip.

F top and bottom wiring diagrams

Design of power supply and ground wire

For high-speed digital bus and sensitive signals, packet processing is carried out.

Separate digital ground, analog ground, audio ground and power amplifier ground. The ground wire is completely covered with copper.