Building a temperature sensor + fan switch

I’m a long time reader, but now that I’ve decided to build something I actually need to write something…

I’ve a RPI3 running as a raspbian-based media centre.
I’ve just moved the amp from on top the entertainment unit to inside the entertainment unit. And it’s getting warm in the cabinet. I figure I need to put a fan in there. But I only want the fan to run when it’s too warm, so I’ll need a temperature sensor.

First question: do I really need the waterproof DS18B20 or will the plain sensor DS18B20 be ok? If I use the plain sensor, then how could it work in an enclosure (eg “altoid tin”)?

Second question: the GPIO pins on the RPI3 are quite tiny, I see there is a popular adapter. What’s the difference between these 2 versions?

https://core-electronics.com.au/40-pin-raspberry-pi-gpio-breakout.html and
https://core-electronics.com.au/assembled-pi-t-cobbler-plus-gpio-breakout-for-raspberry-pi-b.html

Does it work with every breadboard or are some more compatible than others?

Third question: Once I’ve got it all working (I’ve got more questions about a suitable fan and controlling it!), what do I tranfer the build to? I can’t leave the breadboard in the entertainment unit.

How do I manage the connection between the RPI3 and the new-target, do I need to make my own n-wire cable to connect the thing to the RPI3?

Sorry, just getting into this and got lots of questions.

I figure that if I can work out all the bits I need, then I can order them all at once and just have all the right bits at hand. Rather than build a bit, order a bit, build a bit more, etc.

Looking forward to building something that I need rather than buying another toy :sunny:

Hey Francis,

I would recommend using one of these:

You certainly don’t need a waterproof sensor for this purpose. As far as the enclosure, it will need to be in the open air. So either make vent slits in the top of your Altoid tin or cut a hole in the side for the sensor to stick out.

Those two breakouts are the same. They will work with any breadboard, but I’d you might need a pretty long one since the breakout takes up 20 rows. As far as moving away from the breakout, you will probably find that you only need a few wires. So you might be able to pin directly into the RPI GPIO with only what you need. Something people often use to finalize their project is a protoboard:

You cut these to size and solder your components together on it. If you want to take your project a step further, you can design a PCB using EAGLE and we can mill it for you!

1 Like