Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PTC1000 and Pic 16f877

Status
Not open for further replies.

Pulstar

Newbie level 5
Joined
Nov 11, 2008
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,326
ptc1000

Hello

I'm building a temperature controller based on a PTC1000. The formula for the resistance of the sensor is as follows:

R(T) = (700/180*T) + 902,8

I'm trying to calculate a analog curve between 0V and 5V to correspond the temperature -20C to 120C. The Resistance@-20C is 825ohm and Resistance@120C is 1368,5ohm. I'm trying to use a 741 as an ampop for the analog readings conected to the ADC of the Pic.

Can you help me how to obtain the schematics and resistor values for the Ampop?

Thanks in advance.

Pulstar
 

a/d 16f877a tricks

necati said:
http://obrazki.elektroda.pl/41_1227570204.gif

hello,

I've simulated your circuit, but the values didn't come quite what i wanted...

Is there any circuit diagram that i can use, with somekind of a formula, that i can calculate the Resistors to use in the circuit?

thanks for the help
 

16f877a negative voltage measurement

This circuit should do the trick. Make sure you use low tempco resistors, especially for the reference resistor R1. Make sure the PIC uses the 5V supply as the reference for the A/D.

The opamp needs a negative voltage, like -5V and a positive voltage of at least 8V, since the 741 is not a rail to rail opamp.

To adjust the circuit, with the PTC at -20C adjust the pot to get 0V at the output. Actually, if you ask me, I would adjust it to get about 50mV above GND. That way you will always be sure you measure -20C, otherwise it's possible to get a negative voltage at the PIC's input, which you cannot measure. The voltage at the pot wiper should be about 0.41V. The value of the pot should be about 10K.

With the PTC at 120C, adjust (if needed) the 11K resistor R4 to get a little below 5V at the ouput. The reason is the same, give yourself some room to measure a little above your limit. Nomally, the gain of the circuit should be 11.92, but I chose it only 11 for the reasons I showed above. If you want, insert a 1~2K pot in series with R4.

This circuit should be good to prove the concept, but if you are going to mass-produce something, then some way to auto-zero it should be implemented.
 

    Pulstar

    Points: 2
    Helpful Answer Positive Rating
pic voltage divider mesure negative positive

VVV said:
This circuit should do the trick. Make sure you use low tempco resistors, especially for the reference resistor R1. Make sure the PIC uses the 5V supply as the reference for the A/D.

The opamp needs a negative voltage, like -5V and a positive voltage of at least 8V, since the 741 is not a rail to rail opamp.

To adjust the circuit, with the PTC at -20C adjust the pot to get 0V at the output. Actually, if you ask me, I would adjust it to get about 50mV above GND. That way you will always be sure you measure -20C, otherwise it's possible to get a negative voltage at the PIC's input, which you cannot measure. The voltage at the pot wiper should be about 0.41V. The value of the pot should be about 10K.

With the PTC at 120C, adjust (if needed) the 11K resistor R4 to get a little below 5V at the ouput. The reason is the same, give yourself some room to measure a little above your limit. Nomally, the gain of the circuit should be 11.92, but I chose it only 11 for the reasons I showed above. If you want, insert a 1~2K pot in series with R4.

This circuit should be good to prove the concept, but if you are going to mass-produce something, then some way to auto-zero it should be implemented.

Excellent Work VVV.

It worked. I only had to change a the value of the R4... but virtually it gave me exactly what i wanted...

Thank you so much!
 

pic16f877 a/d converter adjusting range

You've got me thinking... How can i make a Auto-Zero Circuit?
 

ptc1000 resistance

You will have to use some analog muxes and switch the input of the opamp to a known, stable divider and measure the output. If it's different from what the divider should produce, then you know you have an offset, which you can then add/ subtract to/ from the actual measurement. This calibration can be done once in a while, as offsets are caused by temperature variations and the circuit temperature cannot change that fast.

Compensating the gain would be more involved, so if you can, use a resistor network for the gain-setting resistors. They will track with temperature, so the gain would be stable.

in all fairness, what I am describing applies to high accuracsy systems. But in your case, with just 10-bit resolution, this circuit may work just fine.
 

ptc1000 resistance to temperature

yes it should work fine.

Thank you very much for everything
 

typical ptc value for 5v supply

Using low TC resistor is a good suggestion, generally. One may doubt, if a 5 ppm resistor TC will be ever utilized when used together with variable resistors spanning a 5 volt reference range, even if perfect TC matching of both divider resistors is assumed.

A real worlds design would use 10 or 25 ppm resistors and a fixed reference voltage divider, with a small variable part, if necessary at all. Digital temperature controllers are mostly using digital adjustment without variable resistors. Analog temperature controllers, as they have been used for decades, would probably have a linearizing positive feedback in the amplifier to consider Pt temperature characteristics.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top