First, tie a long string with a bell on it on your doorknob. Be sure that the bell hangs at the same height as your dogs head.
We put tape around our bell so it wouldn't scrape the paint off the door too much.
Every time you take your dog outside, show them the bell. Shake the bell so that it rings and praise your dog a lot as if they are responsible for making it ring. Give your dog a treat each time.
It you are housebreaking your dog, do this every 45 minutes if possible. Go to door, say, " lets go outside!". Ring bell, give treat and take dog out.
Soon your dog will make a connection between the bell and outside. Now begin gently touching his face to the bell each time.
When he makes the bell ring, give him tons of praise and treats and let him out. Eventually it will be a habit for him to ring the bell on his own when he needs to go out. Phase out treats as needed.
It makes life so easy when your dog can let you know when he/she needs to be let out. I trained our English Bulldog as a puppy, but any age dog can be trained easily. Hope this video helps!