First time posting. Had to seeing this thread.
I successfully built an Arduino project to do this, using methods very similar to what was already suggested. Obviously, it's very doable, and the results are quite good.
Here are a few bullet points (in the order I think makes most sense):
- First, for tubing, I used blue aquarium airline tubing. It's nice and soft, easy to work with, and the perfect diameter. There's also cheap fittings you can easily get.
- I used the elevated container/gravity fed method. My original thought was to use a pump as well (to be able to keep everything under bed and out of the way), but for a number of reasons I decided against it (power requirements, noise, priming, and flow rate). So, I used an elevated bottle hung from the bedpost. I ran a short span of tube from the bottle to a small project box where I housed a solenoid (I think it's meant for a coffee maker). Make sure to have a small hole in the bottle to allow air in when it drains.
- I kept the Arduino under my bed and ran a small bundle of wire up to the project box to control the solenoid. I used the Vin pin for power (using a 12v supply for the Arduino) and a simple transistor circuit with a digital pin to control connection to ground. Make sure to use a flyback diode.
- I ran the main stretch of tubing from the output of the solenoid into the back of my diaper, and secured it with a small safety pin. This was surprisingly unnoticeable.
Now for the fun part. I used an adafruit lcd shield and coded a simple interface for you to be able to do two things: 1) set the probably that you will wake up wet, and 2) set how long you will be sleeping for. With these two parameters set, the code then picks a random time when you will be sleeping (waiting at least an hour) and, based on the probability, will actuate the solenoid or not. In order to avoid flooding/leaks/waking up, I had the solenoid actuate open/closed to slow down the flow.
Some notes: It worked! After a few restless nights of not being able to sleep while anticipating what was going to happen, I got what was desired. I finally slept through the night and woke up in the morning. I didn't initially feel wet - moved around a bit and thought something went wrong. Then I looked up at the bottle and it was completely empty. I immediately thought it had leaked, and only then did I realize my diaper was indeed wet. So there you go.
The problem: I never built a heating system. I knew this was likely going to be the sticking point going in. If you're a deep sleeper, and the cold flow won't wake you up, then I guess there is no point in having the liquid heated. I never got around to completing this, and I'm still not sure exactly how I would go about it.
Good luck! This is a fun project