I made a Custom Bed Watercooler! Open Source DIY Bed Cooler + Heater (Eight Sleep type thing)

I built this, a custom watercooled mattress topper that lets me heat or cool my bed, all from my phone, and it’s niiiiiccceeee. Much like the heinously expensive Eight Sleep product I’m sure you’ve seen advertised on YouTube, this basically means you can heat or cool yourself, rather than the room around you, at least when in bed, which is way, way more efficient, and effective. In summers we should be able to keep nice and cool – without a noisy air conditioner running – and in winter we can literally pre-warm the bed so it’s nice and cozy when we get in. Yeah, it’s amazing. Let me rewind the clock and explain how the hell I made this thing, starting with the topper itself. 

As it turns out, I live in the upholstery capital of Britain, which means I have more than one local foam merchant. I went round, gave them the dimensions for a double bed, and they cut an inch and a half chunk off for me. I went with a fairly soft foam, as this is meant to basically be an invisible addition to our mattress. I went with an inch and a half mostly so it would retain some structural integrity after I’ve cut a bunch of tubing into it, which brings me nicely onto the most annoying part of this process. At first I bought 8mm tubing, as that’s what a lot of PC watercooling uses, and what fits on the waterblock I’ll be using, but once it arrived I realised there’s no way that is going to be comfortable to lie on, especially since I opted for the reinforced variety too making it extra stiff, and being as thick as it is means very little surface area would be covered – so I bought some 4mm ID tubing instead. 

I then spent a good day cutting lines into the foam. Initially I thought I’d have to cut a wedge out, then glue the wedge back in, but I quickly realised that that’s stupid and that I can just cut a vertical channel into the back of the foam, then push the tubing in. I measured out where I wanted the runs – and worked out how tightly I could turn the tubing without it kinking – then started cutting. It turns out a double mattress sized bit of foam is quite large in a small british bedroom surrounded by tech shelves… But I got it done. I put the tubing in and used contact adhesive to glue the foam back together, sealing the tubing inside. That took an age too… In fact I ran out of spray adhesive, so I ended up just glueing spots to mostly hold it in. One day I’ll get some more adhesive and go back to it… in theory. 

So, now we’ve got a tubing-filled bit of foam on the bed. Amazing. What next? Well I should probably show you the key bit of tech that makes this whole thing work. That would be this, the TEC. No not T-E-C-H, T-E-C! Thermo-Electric-Cooler, also known as a peltier element. This little thing – well the four of them here – are basically made of two different metals, that when you push current into them, create a really cool effect where one side gets cold – draws heat from the outside – and the other side radiates heat outwards. Now as Technology Connections will tell you, Peltier modules kinda suck at cooling – at least compared to conventional refrigerant based systems. The thing is, because we are limiting how much cooling we need by only cooling ourselves, this pack should only draw 200-300 watts, versus over a kilowatt for a noisy and frankly less effective than I’d like portable air conditioner, so I count that as a win. The magic with peltier modules is that if you reverse the current flow – ie flip the wires around – the heat transfer effect is reversed too. That means with the right control logic, you can make this thing do both heating and cooling, and that’s really cool. Pun intended. 

What control logic, you might ask? Well that’s where today’s sponsor, JLC PCB comes in. Their fantastic PCB manufacturing facilities, combined with their ridiculously easy to use PCB design software, EasyEDA, meant I could build my very own custom designed board for this very job. They are lightning fast at building the boards, and their new complete fabrication and assembly service means you don’t even have to place the components yourself! The quality is always excellent, and it is exceptionally good value – plus they ship worldwide too. Check them out at the link in the description if you want to make your own custom boards – or get them to 3D print or even CNC mill something as they are great for that too! 

The board itself has gone through quite a number of iterations, all because I’m an idiot. The current revision actually isn’t perfect either, but at this point I’ve bodged it into working, so it’ll do for now. I’ve spent far too long working on this to not explain at least a little of how this thing works, so you’ll have to bear with me here. The big challenge with controlling these TECs is that you need a circuit to not only be able to turn them on and off, but to essentially re-wire which side is connected to power and ground, ideally without having to manually flip a connector or switch. It turns out though that if you use digital switches (aka transistors), you can have four, two connected to power – one on each side – and two connected to ground. Then you just make sure that only one of the transistors per side is enabled and you’re good. Now the reality of designing that is that it’s not quite that simple. First, TECs really don’t like just being switched on and off, so an inductor and capacitor on each side is a good idea. Next, unless you’ve got a current regulated power supply – which I technically don’t as I’m using a PC power supply – you’ll need current limiting resistors. The trouble I’ve had with this whole project is that these suckers can draw up to 6 amps… EACH. Finding MOSFETs and resistors that can handle 300W and 24 amps isn’t easy, nor is it easy to then get the buggers to work. So, I settled for car headlight load resistors. Four of them. One for each TEC. These specific ones aren’t my final choice, these are only rated for 50 watts, and are actually 6 ohm, meaning at 12V that’s only 24 watts, but I’ll replace them with 3 ohm 75W rated ones soon – but they are enough to prove the concept, plus the heating side is way more efficient so I don’t really need the full power until next summer! 

Anyway, with those wired in, the next step is actually on that control front. While my MOSFETs do work, the input side one in particular gets painfully hot even at basically half current, so I swapped to automotive 12 fused relays instead. This works a treat, and the built in fusing is great. Each one is rated for 30 amps at 12V, meaning these can more than handle the four TECs I’m looking to use here. 

As for control, that comes from this little guy, an ESP32. This one is from Unexpected Maker and Adafruit, the FeatherS3, and just slots into the headers on the board. The output signals from this are bumped up to 12V with these level shifters, which also control the fans built into the TEC module itself. It’s running ESPHome, with this configuration. Everything for this project by the way – the PCB files, the config, the lot, will be in a Github repo linked in the description if you want to have a play yourself. This is not a professional design, and if I were to do it again, I’d do even more differently, so use at your own risk. There are a couple of other nice features on the board though. Two 4 pin PWM fan headers – which the ESP can control both via PWM and read the fan speed – and a two pin header for this, a negative temperature coefficient thermistor, basically a resistor that changes its resistance with heat. This specific one is built into a watercooling fitting, which can monitor the water temp and at least in theory adjust the heating accordingly. I’m yet to program that in, but the hardware is there!

And that brings us nicely onto the watercooling part of this. Phanteks graciously sent over their tiny, and beautiful, P200 Air Mini case, and the genuinely stunning Glacier R260C reservoir and pump combo unit to use here – these will be linked in the description at Overclockers if you want either, or both. The case is perfect – it comes with a couple fans to help airflow, it’s small, and sleek. Perfect. As for the pump, that being a D5 means it’s powerful, and still fairly quiet too – oh and really reliable. The reservoir is perfect – it fits in the case really well, screwing to the front fan mounts to secure it, and has extra ports to make filling and, say, monitoring temperature really easy. 

So, building the system then. First things first, let’s get the res in and TEC mounted, then we know what to pipe to. I’m opting for the most classy mounting solution for the TEC here – zip ties. That’ll keep this nice and stuck in place, right? Now I’ve got these 8mm barb fittings, but I also wanted the bed portion to be detachable, so I opted to get quick disconnect fittings. Now as I said earlier, I’m an idiot, so while these are quick disconnect fittings, they don’t seal themselves when disconnecting, which isn’t exactly ideal. Still I’m going to put opposite ends on each tube, so when you disconnect them you can basically make two loops out of one, re-sealing them. I do need to step the hose size down though, which is why I’ve got these 8mm to 4mm adapters. I’m also gonna use zip ties to secure the tubing to the fittings, just in case. There’s a lot of tubing – 30 metres of it – in the bed, which means quite a lot of pressure will be needed to flow water through that line, and I’d rather not wake up to a mildly flooded bedroom. Just my preference, you know? 

I’ve lifted the TEC unit into the airstream with the most high-tech device possible – a block of wood. Look, I said this wasn’t professional didn’t I? Otherwise it’s all wired and plumbed up, so I think it’s time to get it filled up! Luckily the amazing Phanteks reservoir has a bunch of spare ports, so with a spare bit of tubing I can fill this thing up, cycling the pump on every time the reservoir gets full to push it through the loop. I didn’t measure how much water went in but it was less than I thought it would be – the 4 mm tubing is really pretty tiny so it doesn’t need much water to fill it. 

Watch the video to find out my thoughts on using it!

So, that’s my DIY bed watercooler. It’s going to be great on those cold winter nights, and those sweltering summer nights too. I’m looking forward to testing it out properly, and adding a load more features – mostly on the automation front.