- This topic has 2 replies, 3 voices, and was last updated 11 years, 6 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
|
Miscellaneous › Others › Logic or c code for maintaining the temperature
hi, i’m doing a mini project on maitaining the temperature for a particular time.
for example my maximum tempearature (Tmax)=80 and minimum tempearature(Tmin)=30. When the temperature reaches Tmax, the boiler should switch OFF and when the temp drops to Tmin, the boiler should switch ON again. I want to maintain this cycle for 3 hours. after this 3 hours time the boiler should completely turn OFF. I would like to know the C-code for it. kindly help.
Hi Mangara,
Please share more details like which microcontroller are you using and what are the components like temperature sensor. If possible please post a circuit. The first thing you should know about a embedded c code is that it is always written for a particular circuit or hardware including one particular microcontroller.
So the circuit first and then think about the code.
if you are using lm 35 or lm 34 as temperature sensor that range should be -55 to 150 c for lm35 . you simply get the analog values of temp sensor and passed to adc single or multi channel and from that digital values you add that with 0x30 or 48 with your original temp value to get correct value as well as resolution, reference calc is also one of the important parameter .