Some dog owners hang a bell or wind chime on or near a door for the dog to use as a signal when he needs to go out. It's a handy little trick.
The whole point of a bell or wind chime on or near a door is so the dog can make a little noise to alert the owner when he needs to go outside. This is really helpful if you tend to hang out in a part of the house where there is no door to the outside. Your dog is taught the simple act of ringing the bell with his nose or paw, and you can then accommodate him. Teaching a dog to ring a bell is an example of target training. Targeting is training your dog to touch something with his nose or paw.
How It's Done
Your dog should already be well-mannered and trained in basic obedience skills such as sit, stay, come, down and heel. This will prepare him for learning a new skill. Decide if you want to teach your dog to touch the bell with his nose or his paw. If your dog already knows how to shake hands, then it may be quicker for you to teach him to target with his paw. However, since dogs naturally like to sniff things, it's simple to teach him to target with his nose as well. Take into consideration your dog's size and where you would hang the bell. It needs to be level with his nose or at a height easily reached with his paw.
Be prepared to reward your dog as you would when teaching any new skill including having treats ready. If you use a clicker, have that ready as well. Place your dog under a "sit" and "stay" command. To target with the nose, hold out your palm and when your dog's nose touches your palm, praise (or click) and treat. Do this several times so he gets in the habit. If you are teaching him to target with a front paw, have him touch your hand with his paw, and praise and reward. If your dog does not sniff your hand, hold the treat in your palm for a few seconds to get the scent on your hand and try again. Continue to reinforce the behavior until you are sure your dog knows he is being praised and rewarded for touching you. Add a verbal cue such as "touch" or "target." Don't treat when he gets close, only when he actually bumps your hand with his nose or gives you a real high-five.
Give a Jingle
Of course, the objective is not to have your dog tag you every time he has to pee, but to ring the bell to notify you he needs to go out. So once you are sure he "gets it," hold the bell in the same hand you have been using as a target. Ask the dog to "touch" the bell. Do this several times until he understands he is supposed to touch the bell now instead of your hand. Walking backwards, bring the bell to where it will be permanently placed, and continue to ask your dog to "target" or "touch" the bell. Affix the bell to the door and have him touch it several more times. Always praise and treat after he completes the act. Now, it's time to move on to the last step, teaching him to make the connection between "out" and "tag."
The Big Finish
To teach your dog that this is his alert system to let you know when he needs to go out, begin by placing a treat or favorite toy outside the door while your dog is watching. Give the "touch" command. When your dog rings the bell, open the door and allow him to get the treat. Do this several times until he does it reliably. For the next few days, every time you take him outside to potty, have him ring the bell first. Once he understands the connection, use treats only as a reward when he uses the bell to alert you he has to go out -- not as a lure to get him outside. In no time your dog will catch on that this is how he asks to go out. It's really quite simple.
Some people use chimes, others use bells, but you can be creative and install a doorbell, or a remote device he can tag that sets off a light or noisemaker. Stepping on something on the floor is a form of tagging too, so don't rule out children's toy pianos or drums, or other noisemakers. Whichever you choose needs to be loud enough to wake you in the night or reach you wherever you are in the house; otherwise you might as well just teach him to bark when he needs to go out.
By the way, your dog is thinking he's training you to get up and let him out whenever he rings the bell. Just let him think that -- after all, there's an element of truth there.