sam am I
Commander
- Joined
- Jun 26, 2013
- Messages
- 2,169
Stop here as this is not very interesting for most.....You were warned,
So I made a self regulating AC phase controller for a heater (light bulb based) I've made for my squirrel house (or whatever)..........The Home Depot/Ace Hardware type of light dimmer rheostats (Triac dimmer) do work well enough to adjust the heat output of a given light bulb/heat source HOWEVER, they don't/can't self adjust for varying temps/loads particularly IF you use them as a heat controller as I am.
The down fall comes when I could set it such that the light bulb gave out enough/proper heat to make it to say around 40F inside the house on one day. So on this given day, say it was around -4F out, then 2 days later it's 42F out, now it's too warm inside, I'm always chasing it from day to day seems.......no insulation per-se with a wooden box doesn't help either.
I've considered/used the regular on to off temp dial adjustable old but, true school bi-metal type thermostats and they might work okay but, switching the bulbs from all on to all off, as they do, blows out the bulbs as I'd hit max cycle rating in a day I think.......And, they're just too big and not practical for what I'm working with.
This thing (breadboard testing right now, I'll lay out a PCB in the next day or twelve) is pretty simple (I think, see source code link and schematic link), it still uses a Triac to control phase like the light dimmers do but, this has feedback to adjust itself accordingly........The design just monitors its own 120VAC 60Hz power source waveform, when it crosses zero (twice per cycle) a "zero crossing" circuit signals the uPC which then fires a interrupt in the code, the interrupt service routine (ISR) then grabs the desired set point temp and the actual temps and compares the two, if actual temp is less than the real temp, turn on the Triac (solid state switch) which of course, closes the AC circuit to the bulb/heater. If and when the actual temp goes higher then the set point temp, it turns off the bulb/heater, pretty simple!!........The interrupt on zero crossing keeps things in sync BTW.
The code does this forever (while (1) loop) and fires a interrupt at the two crossing per cycle = 16.67ms/2 = 8.33ms where 1/60hz = 16.67ms. I spiced it up a bit and put a variable delay in one of the "on" routines to reduce overshoot on heat up and reduce any further filament stress there is.....Basically, I chop the "on" cycle down (from 180 degrees down to about 20 degrees)up as the real temp reaches (attack rate if you will) the set temp. I do this from a difference of 6 degrees F and less, on for full 180 degrees of the cycle for a delta greater to 6 degrees F and then down to only 20 degrees of the cycle as the delta goes to 0 F..........Seen in the scope video link, the cycles are being chopped more and less as it tracks/holds/changes temps.
In the video, I have the set point temp at 90F with the monitoring ("actual temp") temp sensor sitting/pressed on the cup bottom as seen, the halogen is 200W (those will burn ya as you might know, feels like 700-800F seems). It holds and tracks quiet well I might add, meter scale is 0.900V = 90F, 0.905V = 90.5F etc.. Scope shows input 120VAC (top trace) relative to the bulbs input (lower trace). The microcontroller is running at 32Mhz FWIW.
I also use a shallow'ish bird bath dish to water my back yard critters and need to use water heater (44 watt) in winter, I have to use a 120VAC inline anti freeze thermostat (pre-set bi-metal switch) that auto-magically comes on when the ambient temp is at like 28F and below but, it tends to evaporate (over heat) the water at times so fast, its dry in two days. With this however, it'll work much better set at say 35F. It'll track the water's temps waaaay better and will just warm the water enough to not freeze.......I'll just pot the sensor in some epoxy and drop it in the water weighted to the bottom.
Why? because I can, it's like 100F outside, I'm bored, needed another project AND have a sorta sick fox squirrel. Boris (sister of Natasha and both daughter's of Rocket J) has seizures sometimes and isn't developing normally, not sure why but, beings she and her sister were both born in this house this past Feb, they both continue to live here and Boris, I'm afraid might not make it this winter.
Part numbers are all on the schematic, the design and source code (with comments) are mine, feel free to use at your will............
So I made a self regulating AC phase controller for a heater (light bulb based) I've made for my squirrel house (or whatever)..........The Home Depot/Ace Hardware type of light dimmer rheostats (Triac dimmer) do work well enough to adjust the heat output of a given light bulb/heat source HOWEVER, they don't/can't self adjust for varying temps/loads particularly IF you use them as a heat controller as I am.
The down fall comes when I could set it such that the light bulb gave out enough/proper heat to make it to say around 40F inside the house on one day. So on this given day, say it was around -4F out, then 2 days later it's 42F out, now it's too warm inside, I'm always chasing it from day to day seems.......no insulation per-se with a wooden box doesn't help either.
I've considered/used the regular on to off temp dial adjustable old but, true school bi-metal type thermostats and they might work okay but, switching the bulbs from all on to all off, as they do, blows out the bulbs as I'd hit max cycle rating in a day I think.......And, they're just too big and not practical for what I'm working with.
This thing (breadboard testing right now, I'll lay out a PCB in the next day or twelve) is pretty simple (I think, see source code link and schematic link), it still uses a Triac to control phase like the light dimmers do but, this has feedback to adjust itself accordingly........The design just monitors its own 120VAC 60Hz power source waveform, when it crosses zero (twice per cycle) a "zero crossing" circuit signals the uPC which then fires a interrupt in the code, the interrupt service routine (ISR) then grabs the desired set point temp and the actual temps and compares the two, if actual temp is less than the real temp, turn on the Triac (solid state switch) which of course, closes the AC circuit to the bulb/heater. If and when the actual temp goes higher then the set point temp, it turns off the bulb/heater, pretty simple!!........The interrupt on zero crossing keeps things in sync BTW.
The code does this forever (while (1) loop) and fires a interrupt at the two crossing per cycle = 16.67ms/2 = 8.33ms where 1/60hz = 16.67ms. I spiced it up a bit and put a variable delay in one of the "on" routines to reduce overshoot on heat up and reduce any further filament stress there is.....Basically, I chop the "on" cycle down (from 180 degrees down to about 20 degrees)up as the real temp reaches (attack rate if you will) the set temp. I do this from a difference of 6 degrees F and less, on for full 180 degrees of the cycle for a delta greater to 6 degrees F and then down to only 20 degrees of the cycle as the delta goes to 0 F..........Seen in the scope video link, the cycles are being chopped more and less as it tracks/holds/changes temps.
In the video, I have the set point temp at 90F with the monitoring ("actual temp") temp sensor sitting/pressed on the cup bottom as seen, the halogen is 200W (those will burn ya as you might know, feels like 700-800F seems). It holds and tracks quiet well I might add, meter scale is 0.900V = 90F, 0.905V = 90.5F etc.. Scope shows input 120VAC (top trace) relative to the bulbs input (lower trace). The microcontroller is running at 32Mhz FWIW.
I also use a shallow'ish bird bath dish to water my back yard critters and need to use water heater (44 watt) in winter, I have to use a 120VAC inline anti freeze thermostat (pre-set bi-metal switch) that auto-magically comes on when the ambient temp is at like 28F and below but, it tends to evaporate (over heat) the water at times so fast, its dry in two days. With this however, it'll work much better set at say 35F. It'll track the water's temps waaaay better and will just warm the water enough to not freeze.......I'll just pot the sensor in some epoxy and drop it in the water weighted to the bottom.
Why? because I can, it's like 100F outside, I'm bored, needed another project AND have a sorta sick fox squirrel. Boris (sister of Natasha and both daughter's of Rocket J) has seizures sometimes and isn't developing normally, not sure why but, beings she and her sister were both born in this house this past Feb, they both continue to live here and Boris, I'm afraid might not make it this winter.
Part numbers are all on the schematic, the design and source code (with comments) are mine, feel free to use at your will............
Last edited: