|
|
View previous topic :: View next topic |
Author |
Message |
lordmag
Joined: 09 Nov 2010 Posts: 1 Location: TN
|
temperature alert with LM335 sensor + pic 16F877A |
Posted: Tue Nov 09, 2010 5:28 pm |
|
|
hi ,
My project is to make a temperature alert with pic 16f877A.
I'm using the LM335 sensor to detect the temperature this is the datasheet.
The input is RA2/AN2 so I should make the ADC and the code that make the RED LED which is the output RB3 on when the temperature reach 60 °c
notice that this sensor range is between (-50 ° 125 °).
The temperature sensor's voltage output is related to absolute temperature by the following equation: Vout = VoutT0 * T / T0, where T0 is the known reference temperature where VoutT0 was measured. The nominal VoutT0 is equal to T0 * 10 mV/K. So, at 25 C, VoutT0 is nominally 298 K * 10 mV/K = 2.98 V
Without the ADC the RED LED is on when the Vout=2,5v T= -23°c
so help me please to do that analog digital conversation to make the RED LED on when T reach 60°c = 333 k when Vout >= 3,33V the input is RA2/AN2
The pic is 16F877A and I'm using CCS C compiler.
Thank you !! |
|
|
ezflyr
Joined: 25 Oct 2010 Posts: 1019 Location: Tewksbury, MA
|
|
Posted: Wed Nov 10, 2010 11:07 am |
|
|
Hi,
This is an interesting project, and probably a good start for a beginner. You have to take some initiative, however, if you want to get some help from the members of the forum. I suggest that you show us a program that controls your LED, and reads the A/D converter. Your circuit should include a serial interface so that you can get real time feedback from your circuit to aid in troubleshooting even if you don't need it in the final version of your project.
There are literally hundreds of serial interface, LED control, and A/D reading examples on the forum. Show us what you've got and we'll happily jump in to help!
John |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|