temp controlled light dimmer

hi all, please bare with me as all in all am still new to arduino.

i am looking to control a bulbs brightness depending on a specific temp range.

i am looking for a max of 100watt spot bulb to provide heat for my snakes. when the temp reaches the desired heat i need it to dim the bulb and rest until the temp drops below a threshold, then bring the brightness back up and so on so forth.

i have been looking at various components such as analogue temp sensors, thermocouple, thermistors, but need some help as not 100% sure where to start

regards

marc

I suggest using DS18B20 digital temperature sensors, rather than analog. They're easy to use and save you from calibration issues.

The main challenge I can see is that you need to provide a circuit to perform PWM on a lamp that is presumably powered by mains voltage AC. Controlling mains voltage circuits is possible but not trivial, and comes with considerable risks. You really ought to be looking at buying rather than making the hardware for this.

The electronics involved would be slightly simpler if you could just switch on individual lamps to achieve your required variable power levels rather than PWMing one big lamp, that would save you having to buy/build a triac controller. Taking that approach one step further, you might consider controlling each lamp through a simple thermostatic switch and rely on the hysteresis of the thermostats to provide the thermal cycling you wanted.

this is a great help, thank you,
so it seems far easier to buy one rather than controlling ac voltage?

regards

marc

A normal heater switches between full-on and full-off with some hysterisis or "swing", so the turn-off temperature is slightly higher than the turn-on temperature. The thermal mass of the air and objects in the space smoothes-out the temperature changes.

And, it's a LOT easier to switch AC on & off with a mechanical or solid state relay thatn it is to build & control an AC dimmer,

I have a couple of concerns....

  • If you try to use dimming or variable heat with heat-sensor feedback, the time-lag is going to confuse everything. i.e If the temperature sensor tells the processor you need more (or less) heat, how is it supposed to know how much to increase (or decrease) the heat? ...That's why a normal heater comes full-on 'till the temperature is slightly above the target, and then shuts off.

  • I also wonder if lights constantly switching on & off (or constantly changing brightness) 24 hours a day is going to stress the snake. I sort-of made the same mistake once when I was young... I tried to use a heat-lamp to heat a room without thinking about how much light they put-out. :smiley:

ok thats kl, so with regards to standard ones then would this more than likely be a relay to dim the bulb?

thanks fr the support so far
:slight_smile:

Hi,
if you say you need a dimmer, I will not object. You may see one of the prototype designs at

It may need some adjustments to your needs byt should be easy to control with just PWM.
J.

maybe you are looking for something like this , but remove the water heater and replace it by heat bulb