Instructables
Picture of Electronic Diaper
IMG_1576.JPG
IMG_1580.JPG

Long gone are the days of peeking at a diaper to determine if it's that time or not.  You know what I'm talking about.  Introducing the Electronic Diaper:  a high-tech interior garment for infants with a sensor that monitors your child's comfort level.  It provides instant audible feedback by way of a buzzer as well as a persistent optical sensory notification system by way of an  LED.  In theory, it works by making use of a voltage divider which is extremely sensitive to wetness at the tip of the probe.  When wet, electricity flows across the leads of the probe but with some resistance.  The voltage drop is measured through the microcontroller's analog to digital converter every second.  As soon as any voltage is detected, a buzzer goes off like a siren followed by chirps at 5 second intervals for as long as wetness is detected.  The LED turns on and stays light indefinitely, however, at the onset of wetness.  So after a diaper change, a reset is required.

 

 
Remove these adsRemove these ads by Signing Up

Step 1: Bill of Materials

Picture of Bill of Materials
IMG_1576.JPG
IMG_1580.JPG

Hardware
PC with serial port
PIC burner and dev board w/ POT, DB9 serial (for debugging and development) 
Serial cable (for debugging)

PCB making stuff
Single sided Copper clad board (3" x 3")
Paint thinner
Hydrogen Peroxide
Muratic Acid
Plastic tray
Laser printer
Laminator
magazine w/ thin and glossy pages

Components
PIC Microcontroller 16F88
18 pin socket
LED
buzzer
220 Ohm resistor
1 MOhm resistor
4.7 KOhm resistor
0.1 uF catalytic capacitor
on/off switch
2 lead ribbon cable


Software
Digital Diaper software by carlitos (hex and source code)
Eagle Software (if you wish to modify PCB)
JAL compiler (if you wish to modify code)
Tera Term Pro (for debugging)

Miscellaneous
Paper
tape
Permanent marker
Hot glue and gun
Cloth
Scissors

Step 2: Program PIC microcontroller

Picture of Program PIC microcontroller
To program the PIC microcontroller, download the hex file electronicdiaper.hex and burn it onto a  PIC 16F88 using a  PIC burner like the U2 Programmer.  If you wish to further develop the software, download the source code electronicdiaper.jal and use the JAL compiler and libraries to compile.  use a dev board with a potentiometer connected to pin RA4/AN4 of your 16F88 and an LED/220 Ohm resistor to pin B7.  Buzzer should be connected to pin B0.  Pins RB2 (TX) and RB5 (RX) are used for serial communications to a computer for debugging.  The LAB-X18 Experimenter Board and melabs U2 Programmer was used to develop and debug the software.

Step 3: PCB - printing

Picture of PCB - printing
To make the PCB, download electronicdiaper_boardbottom.pdf and print it using a laser printer. I find a glossy magazine sheet works best.  To avoid the magazine sheet jamming your laser printer, tape the magazine sheet onto reguler paper.  If you wish to modify or further develop the board, you can download electronicdiaper.sch and electronicdiaper.brd and import it using Eagle software. 
Once printerd, cut out and paste the drawing face down over a copper clad board.  To transfer the toner onto the copper clad board, use a laminator.  Make a few passes to be sure all the toner is transfered.  Immerse the board in water and gently rub off the magazine paper.  If not all the toner transfers successfully, you can touch things up using a permanent marker.

Step 4: PCB - etching

Picture of PCB - etching
IMG_1598.JPG
IMG_1598.JPG
IMG_1599.JPG
IMG_1600.JPG
IMG_1602.JPG
To etch the PCB, use a solution made of 2 parts Hydrogen Peroxide, 1 part Muratic Acid.  Fully submerge the PCB and agitate for a few minutes until all copper dissolves.  The solution will turn green.  Rinse and remove the toner from the etched board using paint thinner.

Step 6: PCB - finishing

To finish the PCB, add a switch (I glued mine with hot glue since I forgot to add it to the PCB layout), insert the PIC into the socket, and connect to a battery supplying 5V.  I soldered 1 AAA (1.5V) with a CR2 (3V).  4.5V works well. 
Add hot glue over anything (except the PIC) you want to protect.

Step 7: Packaging and testing

Picture of Packaging and testing
To package things up, I cut a small piece of cloth and wrapped it around the PCB.  Hot glue holds it in place.  Slapped on a sticker I recently acquired, and proceeded to having the electronic diaper undergo a rigerous testing phase.
Nothing happened when I turned it on.  That's expected.  I touched the probe with my tongue and did not get shocked.  However, the buzzer immediately went off like a siren followed by the LED turning on.  The buzzer would continue to chirp every 5 seconds denoting wetness.  I dried the tip of the probe with a paper towel and the buzzer went silent while the LED stayed light.

Step 8: Using the electronic diaper

Picture of Using the electronic diaper

My subject did not cooperate as she refused to have a go with the electronic diaper.  Maybe the robot logo scared her.  It's hard to say.  So, I settled for a simulation. I cut a small slit on the back side of a new diaper and inserted the wetness probe.  I poured 2 ounces of water and the electronic diaper worked it's magic.  It instantly notified me it's time to change the diaper.  Success!

The electronic diaper is not a toy.  It has small parts not suitable for human consumption.  While all precautions have been taken in lieu of safety, the possibility also exists of electic shock.  Ask a certified electronic engineer if the electronic diaper is right for you.

mowdish3 years ago
This is a brilliant idea. That said, the buzzer worries me a little. It didn't sound to bad in the video, but if your baby doesn't like the sound, then this is classic negative reinforcement. If your baby loves the sound, then it is positive reinforcement. Probably not healthy either way. If you put in a delay of 1 or 2 minutes, then your baby won't associate the peeing with the noise.
carlitos (author)  mowdish3 years ago
That's so true. What was I thinking!
A high-end solution is to have a wireless WI-FI transmitter and effectively send a text to a cell-phone instead of a buzzer like caitlinsdad suggested.
I could do this with a wifly RN-121, but it will get really bulky if it isn't already. 
Maybe one day Huggies will come out with these.  Each diaper could 
have embedded conductive thread where you clip on a SMT board inside a pocket.  Like if diapers were not expensive enough already!

    if (firstiswet) then
+       delay_1s(120) -- wait 2 minutes 
       dobuzzchime 
   
I wonder if you could do it with an RFID tag. Break the circuit on the tag so that it is only functioning when moisture is detected. Then the RFID reader and wireless (or wired) transmitter could be in the crib/stroller/etc.

BTW, is there enough water in poop for your probe to detect?
carlitos (author)  mowdish3 years ago
I have not worked with RFID and reading about them sounds like a good idea with an active tag.

Good question. I'm guessing yes, there is enough most of the time.

I think one of these days I'll "install" it during a nap and hope she does not mind when she wakes up. Maybe I can catch that rare moment in the name of science and report back.
Dr Qui mowdish3 years ago
Bit of a double edged sword maybe.

Now there an Oprah I cant wait for "my dads crazy invention makes me pee myself every time I hear a fire truck, ambulance, police siren etc"  LOL

A negative sound would be of use in the nappy around potty training time.

You could put one in a potty that has a positive sound.

The flashing LED is a good idea.

Keep up the good work.


carlitos (author)  Dr Qui3 years ago
That would be great. Then I come out on Oprah riding my antique bicycle!
Looked it up, and this stuff is actually patented and a wireless version for seniors is already out. Hm
Dr Qui carlitos3 years ago
I'm almost certain the potty with this in it is patented too.

Here's a theme tune for when you ride you bike around Oprah's couch. :-)
http://www.youtube.com/watch?v=uoC7kuFV3oY
hubi3 years ago
Hi,
this is a cool idea!!!
but you could do all of this with only one 555, easier with two

caitlinsdad3 years ago
Ha, it should really tweet a message to the nanny to attend to the diaper change...
neuropol3 years ago
Every time a child goes to the bathroom a buzzer goes off and lights start flashing. I can see a pavlovian response later in life. I like it.

Maybe this could be adapted for coworkers?
Foxtrot703 years ago
Interesting, there are possibilities of miniaturization, more importantly have you tried to get a patent?
jeff-o3 years ago
Ha, that's fantastic. I think my son and daughter would try to yank it right off though! Be sure to let us know if your test subject ever gives it a try.
depotdevoid3 years ago
Oh, that's hilarious! Thanks for sharing!