Continue to Site

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.

  • 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 thermostat ( Heat or Cool )

Status
Not open for further replies.

granddad

Well-Known Member
Most Helpful Member
I always thought the standard , bi-metal thermostat devices have too much hysteresis for some of my requirements, for instance, a seed propagator ideally requires a steady temperature for germination , also I wanted a control for a bathroom extractor fan to run when the power shower was used , but not attached to the light switch by using a sensor attached to to the shower hot supply also something for the Green house heat / ventilation . This circuit , uses a NTC thermistor as a sensor ,inputting to the PIC16F627 comparators the adjustment side is determined by VR1 ,VR2 potential dividers , thus setting the ON and OFF temperatures independently, so giving an active Cooling (LED green) or heating (LED red ) thermostat, with very close hysteresis , the bicolor led flashes when drive is active. the signal at R1 can be used to switch an SST or a transistor / relay circuit. The addition of a digital temperature readout would enhance its uses.
pictherm.jpg
hex file for PIC16F627. ....
 

Attachments

  • vent02.HEX
    850 bytes · Views: 380
Last edited:
Nice project :)

If I could offer a bit of feedback that may help further your design..

My concern would be the ability to calibrate and set those pots accurately and avoid moving them accidentally.

Think you might find it even more effective if you took the project to the next level and added a cheap 16x2 lcd and a couple of switches to set the temperatures by.
That way to can add a band between heat and cool where neither needs to be on.
You could also add a dc fan with variable speed cooling for smaller areas.

I find having 2 sensors and 2 outputs best, one for the propagator and one for the main house frost protection.

hth
 
the ability to calibrate and set those pots accurately and avoid moving them accidentally.
Thanks Wp the pots on the first build were 'pots' for a propagator , and were set using a cheap commercial temperature gauge , so I could establish overall temperature and adjust accordingly, the second build for the shower extractor , has multi turn trimpots , and was set via voltage levels at comparator inputs rather than temperature , not builta greenhouse version yet . I had a 2x8 serial display on PIC TX originally but only for development.
 
I would suggest using a digital temperature sensor and getting rid of any of the analogue stuff.

Something like the LM74. If you can handle SOT23 devices, I've got quite a few LM95071 sensors that you could have if you wanted.
 
Diver , thanks for offer... don't need digital accuracy really , done projects with mcp9808 but thermistor works well and surprising how rapid response to temperature changes are.
 
also I wanted a control for a bathroom extractor fan to run when the power shower was used , but not attached to the light switch by using a sensor attached to to the shower hot supply

Cool projects, actually. My bathroom situation is/was:

An IR heatlamp and a slow turn on green spotlamp and fan in one housing. These are controlled by a mechanical timer (20 minutes) and a delay on break for the shower. So, you have light/fan as switches and IR on a mechanical timer. The extraction fan runs on a delay on break. The timer is in the attic and has to be replaced, but it's been at least 40 years.

I've thought about a flow switch to turn on the extractor. The bathroom fan also needs a decent check valve.

Normal lighting is a photo activated LED night light.

Then there is "over the mirror" globe lighting. One, two or 3 globes on. Nearly 99% of the time the night light is all you need.

The more I think about it, the convenience of actual temperature control would be really nice.

I wish I would have put in the dual valve version of the shower control rather than the spout diverter and On/OFF. The dual valve gives you one for the shower and one for the tub. That's more convenient for those taking a shower sitting on a shower chair.

I also forgot to make the shower have a 45 degree bend rather than a 90 degree bend.

Issues (breaks) happen when one rests their feet on the tub spout if plastic. The "diverter" right now "stays up" and this is better when using a chair in a shower.

I plan on adding a recirculator too at some point too.
 
My main thought is why use a PIC? - if you're simply going to use the analogue comparators in it? - why not just use a comparator chip?.

No problem with using a thermistor, it's a perfectly valid method, but there are many better options which would give you actual temperature readings. Then you could use the PIC much more fully, and do it all in software.
 
My main thought is why use a PIC? - if you're simply going to use the analogue comparators in it? - why not just use a comparator chip?.
Originally I had a circuit using LM311 's , but was difficult to set up correct on /off temperatures ,( probably the choice of components. project details was in ETI magazine summer circuits yonks ago) the PIC also offered some logic options , display etc on 1 chip .and I had not coded the PIC comparators before ,(.asm)
The shower vent version , ready to go...

therm02.jpg
 
Since everybody is telling you how you should do it, let me join the club.

I'm an advocate of the Dallas 18B20 1-wire temperature probes. They are ridiculously cheap on eBay, calibrated to 0.5°C as I recall, and you can connect a number of them on a few hundred feet of wire if you want readings at multiple locations. I built exactly the system shown here with separate on/off points for controlling a greenhouse heater or fan a few years back.

image.jpg
 
Been using ntcs for temperature control for 40 years, both machines at work and home diy; you can easily get 0.1 deg c accuracy where a narrower temperature range is needed.

The Ds1820 are good now they come cased like you show and are good for wider ranges, though for most jobs the humble ntc at a small fraction of the price will do.

Us oldies still good for some things :):)
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top