• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC Controlled Temperature comparison circuit


  • Yes

    Votes: 0 0.0%
  • No

    Votes: 0 0.0%
  • Other

    Votes: 0 0.0%

  • Total voters
Not open for further replies.


New Member

I would like to fabricate a PIC, (16F84 or similar as I have several of them!) circuit that would do the following:

1. Take two temperature readings, say A & B - at 1 or 2 second intervals or a practical period of time, create a log, and provide two corresponding digital readouts for visual checking.
2. A, being ambient air temperature and B, being temperature of an aluminium housing.
3. Compare the two readings - if reading B is higher than A by more than a specific tolerance, activate a peltier or fan for such a period of time as needed so as to bring the temperature of B to within the same temperature as A +/- 1% if practical.

I would imagine some sort of "fuzzy logic" may be required to prevent the peltier or fan from going on and off all the time, although i may be wrong with this regard, my knowledge of electronic design is limited and non existant for PIC programming, but I have made many AM & FM radios and the like in the past.
Any assistance and guidance would be greatly appreciated.
Many thanks


New Member
No, I am building a telescope and its important that the primary mirror, (held in an aluminuim "cell") temperature is kept as close as possible to the ambient air temperature, (the mirror gradually gets warmer as light is reflected off its surface) and this creates a similar effect to what you see looking at a distant road surface on a hot day!)


Active Member
Well since uve never programmed before start by getting a programmer and some chips, first try to make an led flash then work your way up to this. You'll probably just need to learn analog to digital conversion for this project which is offered on many pics. I'm sure your capable.



New Member
Thanks Mike, could you suggest a programming code that would be relatively simple to learn and would "do the job" after the learning curve? as mentioned before, I have some 16F84 's 4Mhz and 20Mhz versions and probably a few others if I looked hard enough.
would these be suitable?



Well-Known Member
temperature is kept as close as possible to the ambient air temperature,
Then can't you just have a fan constantly blow air on the aluminium housing? The air is obviously at 'ambient air temperature'; the Al housing temperature will therefore approach (and become) ambient. You don't need to measure anything.


New Member
Forum Supporter
One reason to control the fan is to save power. You don't really need a PIC to do this. A comparator circuit with some hysteresis should work because the thermal mass of the heatsink, combined with the hysteresis, will prevent it from cycling on/off frequently.
Last edited:
Not open for further replies.

Latest threads

EE World Online Articles