## What is a TeethTimer ™?

It's difficult to teach kids to brush their teeth properly. One of the hardest parts is getting them to brush for the two minutes recommended by most dentists. This simple timer will solve that problem as well as making brushing more fun. Also it won't take long for your child to pick up an understanding of binary numbers simply by watching the timer during brushing. (Not only are binary numbers central to the way we program computers, but they can improve understanding of our usual decimal number system.)

## Instructions for using your TeethTimer

### Quick Start (all you need to know)

Using your TeethTimer is very simple. Just push the button and the timer will start. Two minutes later, the TeethTimer will play a little tune to let you know that you can stop brushing. Then, the TeethTimer will turn itself off allowing the batteries to last for a year or two (depending on how often you use it). If you would like the tune to play more quietly, remove the blue circular sticker on the speaker.

If for some reason you want to turn off the timer before the two minutes are up, just press the button. That's all you need to know to enjoy using the TeethTimer.

While you are brushing, note that the light emitting diodes (LEDs) are counting up in binary. (If you don't understand binary numbers I suggest typing "binary numbers" into your favorite search engine. You will find many informative sites that explain this concept. You may also find it useful to look up "hexadecimal".

The TeethTimer will count in 1 second intervals up to 120 which is 0111 1000 in binary (or Off,On,On,On,On,Off,Off,Off from left to right) which we often conveniently write as 78 hex. (Note: 7 * 16 + 8 = 120).

### Slow Start (all the gory details)

It's also possible to modify the TeethTimer's behavior. For example you can change the limit count. (Kids with braces are often told to brush for three minutes, so this capability could prove useful). You can also change the count interval from one second to anything between .0625 and 15.9375 seconds (in steps of 1/16 of a second). This would allow the timer to be used for very short events or events over an hour long (not likely for brushing teeth!). You can also change from up counting to down counting as well as the counting method from binary to bcd. (If you don't know what that is, enter "binary coded decimal" into your search engine.).

The TeethTimer has 16 different ring tones (which I'll call them for lack of a better name) for alerting you that the timer has stopped. By default it uses a different ring tone each time until of course all 16 ring tones are used at which point it starts over again. Some of these ring tones may be too long for your taste so you can choose to use a specific ring tone each time. You can even adjust the ring tone's tempo and pitch to suit your preference or if silence is bliss, you can disable the speaker.

I'll warn you though that controlling all these parameters with a single button is not for the squeamish. If you have trouble programming your VCR I would recommend accepting the TeethTimer for what it does when it leaves the factory. (At least it doesn't blink 12:00 at you!) If you are among the non-squeamish, read on.

The TeethTimer has two major modes - the operating mode (described in the first four paragraphs above) and the setup mode. To enter the setup mode, push the button and and then press the button again as soon as the count advances the first time (i.e. the display shows 0000 0001 if you are in the default "count up" mode). You will hear two beeps indicating that you have successfully entered the setup mode.

Once in setup mode, the low order nibble (the rightmost four LEDs) begin counting from 0 to 11 with an interval of 1.2 seconds. After 11 the count cycles back to 0. The counts 0 thru 7 correspond to eight user modifiable parameters which I'll describe later. The counts 8 thru 11 correspond to the four different setup-mode exit codes. If you push the button during one of the exit codes, the TeethTimer will return to operating mode after taking the following action:

 Exit code Action 8 Save the current parameter set in memory "A" 9 Save the current parameter set in memory "B" 10 Recall the parameters set in memory "A" 11 Recall the parameters set in memory "B"

Note that memories A and B are non-volatile. (This means that the memories do not lose their data when the battery is removed). For the exit codes, the upper nibble is not used and in fact is always set to zero. (By the way, a nibble is defined as half a byte, or 4 bits. The left most nibble is often called the upper nibble, or the high order nibble, or the most-significant nibble because changes in that nibble make the most difference in the number represented. The same terminology is used for bits or bytes. For example MSB/LSB (most/least significant bit) specifies the bit at the far left/right end.)

Now back to the eight parameters mentioned earlier. As each parameter number is displayed in turn in the lower nibble (in 1.2 sec intervals), the upper nibble simultaneously shows you the value of that parameter. The parameter numbers are as follows:

 Parameter number Default value Meaning 0 7 Maximum count (MS nibble) 1 8 Maximum count (LS nibble) 2 1 Counting interval (MS nibble) - units: 1/16 second 3 0 Counting interval (LS nibble) 4 0 0/1 = binary up/down. 2/3 bcd up/down. 5 3 Pitch (smaller values give higher frequencies) 6 8 Tempo (smaller values give faster tempos) 7 0 Ring tones 1 thru 15 (0 = rotate)

The default counting interval is 10 hex (16), but the units are sixteenths of a second, making the interval exactly one second. Using the default counting method (binary), this allows a maximum time of 255 seconds to be selected. The default maximum count is 78 hex (120 decimal) as I mentioned before. If you change to bcd counting, the maximum count would be 99 seconds assuming strict bcd encoding, but the TeethTimer actually lets you select a maximum count of F9 (or 15*10 + 9 = 159 seconds). Decreasing the values of the Pitch or Tempo parameters increases the pitch or tempo of the ring tone respectively. If you set the Tempo parameter to zero, the speaker is disabled (for both ring tones and button clicks). The default ring tone selection is zero, which means that every time the ring tone plays, it will cycle to the next ring tone in a rotating sequence. If you select a non-zero number for the ring tone, it will always play the specified tune.

To modify one of these parameters, push the button when the corresponding parameter number appears in the low nibble. At this point the parameter number in the low nibble will stop changing and the upper nibble will begin to count from 0 to 15, continuously in a circular fashion. (This count changes every .8 seconds.) When you see the desired value of the selected parameter press the button. The parameter takes on the value you selected and then the parameter number again begins to rotate allowing you to modify an additional parameter or to select one of the exit codes.

After you have modified one or more of the parameters as desired, select exit codes 8 or 9. (You would normally want to avoid exit codes 10 or 11 at this point since that would overwrite the painstakingly entered current parameters.) The new parameters will be saved in non-volatile memory (A or B for codes 8 and 9 respectively) and the TeethTimer will return to operating mode with the new parameters in effect. (You still have to push the button one more time to start the timer again.)

If you change the batteries, the TeethTimer will forget the current parameters and return to the program defaults shown above. Fortunately though, the parameters will be saved in memory A or B and so they can be easily be restored by entering setup mode and then selecting exit code 10 or 11. (Unfortunately you do have to remember which memory you used).

Counting the default parameter set, you can use the timer in three different ways without having to remember how to modify the parameters. For instance, you might save the parameters needed for teeth/braces brushing (3 minutes) in memory A, the parameters needed for a 10 minute egg timer in memory B. So you could select braces brushing or egg timing by using codes 10 and 11 respectively. To return to normal 2 minute teeth brushing, push the button to start the timer, then briefly push one of the batteries against one of the springs holding it in place. This will momentarily interrupt the power to the TeethTimer and cause it to return to its default settings. (That procedure is also useful if you've managed to program the TeethTimer into an unknown or unrecoverable state.)

You may recognize most of the ring tones, but if you don't, here is the list:

 Ring tone code Song 0 Over the Rainbow 1 Chim Chim Cher-ee 2 Scarborough Fair 3 Swing Low 4 The Caissons go Rolling 5 When the Saints 6 On Top of Old Smoky 7 Sunrise, Sunset 8 Jacques Saint-Luc: The Lute Player 9 Haslinger: Sonatina 10 Bach: Musette in D major 11 Close Encounters 3rd kind 12 Major scale 13 Major arpeggio 14 Two beeps 15 One beep

If you are more interested in playing with gates instead of microprocessors, consider this design challenge:
Design a version of the teethtimer that responds to the start button by counting in binary from 0 to 127 (displayed using 7 LEDs) at the approximate rate of 1 second per count. A short tone sounds at the end of the 127th count and the LEDs turn off ready to resume counting when the start button is pressed again. Restrict yourself to the simple (14 pin) ICs in the 74HC00 family. Use no more than three ICs and a small handful of discrete components (including the same LED, pushbutton, speaker, and battery components used by the microprocessor based design).

After you have completed this design challenge (or after you have given up on the task) you may be interested looking at two of my solutions shown in the schematics below. (I have built both versions to verify that they work.) These SSI versions can't play a song like the microprocessor version, yet they work just as well for helping you to brush for the recommended time.