Hedgehog Habitat Controller

About This Project

A hedgehog habitat needs to be maintained in a range of 70-80 F, with an ideal temperature of 75 degrees. This is difficult in Canada, as we don’t have air conditioners, and tend to resist turning on the furnace until the temp reaches 55.

Currently I have a heating pad and a fan that kicks on to regulate the temperature within this range, but it is no longer sufficient to just use a passive fan. I need active cooling.

I’d also like to detect humidity and dry the habitat out, control lighting, so you can adjust the nocturnal cycle, and control a camera so you can watch the crazy animals.

What’s Connected

I want to develop this with a Pi Zero as other Pis are costing about $80 CAN for just the Pi by the time they are in hand. For now, I’ll use a Pi 3.

Cooling and heating will be done with a Peltier device with heatsinks on either side, and controlled by an H-Bridge. With an H-Bridge, I can have current not flow, flow in one direction, or reverse the direction, depending on if I want cooling or heating. A peltier device will get cool on one side and super hot on the other when DC current is applied. Reverse polarity and the cooling/heating is reversed too. They can take up to 5A or so of current though, so you need a beefy bridge

A PC power supply to provide 5V (Pi) and 12V (Peltier/Fans/Lights)

Need a temperature and a humidity sensor, DHT-11 should do.

Also need a PWM controller that can drive 1-2A per channel for RGB LED strips, and fans. Hedgies will go to sleep with white light, but low levels of red light, they’ll stay awake through, allowing nocturnal viewing when they are most active.

Triggers & Alerts

Temp Control
For simple operation, a temperature over 78, should kick in the fans and turn the Peltier on for cooling.
A temperature under 72, should kick in the fans and turn the Peltier on for heating.
When temperature is between 74 and 76, active cooling/heating shall be turned off.
However, a PID algorithm behind Cayenne would be more effective due to thermal mass (D) and spikes caused by opening the door and losing lots of heat or cool air (I). (FEATURE REQUEST)
If temperature is below 70 or above 80, an alert should be sent.

Humidity Control
A humidity over 50%, should kick on the fans IF not already running during a Peltier cycle.
A humidity less than 40% should kick off the fans IF not already running during a Peltier cycle.
If humidity drops to below 30%, an alert should be sent.
Need a lost connection alert. (FEATURE REQUEST)

Light Control
At any time, over-ride light level, if user button pressed.
When user button released, revert to previous setting.


If during X time window, turn on bright white light.
If during Y time window, turn on low red light.
Note override in lighting trigger.

Dashboard Screenshots

Not developed yet.

Photos of the Project

When it’s done…

Here’s a happy hedgehog in the meantime.


Want to implement a camera and have it show up on the Cayenne dashboard. When will we have a cam widget?


Cam widget is in the works!

I have to say, I’ve had the pleasure to have a pet hedgehog…not the cuddliest of animals but very fun and interesting. Can’t wait to see this project unfold as Cayenne releases more features!


1 Like