Turing Alarm for Arduino

Alarm for Arduino

NOTE: This Instructable is currently incomplete. I will finish it before September 19. 

I started this project after seeing Nick Johnson’s Turing Alarm clock. I found that the PIC chip he used was a little too advanced for me, so I decided to use the Arduino microcontroller. The original project by Nick Johnson can be found on his blog here . All credits for the idea goes to Nick.

The turing alarm forces you to solve math problems when you wake up. If you get the math problem correct, the alarm stops, and if you don’t, you will have to solve another one. My version also includes a 12V light dimmer using a MOSFET. A DS1307 real time clock (RTC) keeps track of the time and the menus are controlled with five buttons.Alarm for Arduino

Future improvements:
Joystick control
Math problem level setting
battery backup power
two alarms

Step 1: Materials and Tools


• Arduino board
I used the Uno board for testing and the Pro Mini for the final project

• DS1307 RTC
You can use the DIP version; I used the breakout from SparkFun

• SparkFun Serial LCD 16×2 (Any serial LCD will work)
This is much easier to interface with than a parallel LCD

• Small 12mm buzzer (2.048 kHz)

• 5 SPST panel mount momentary switches

• 10k pull-down resistors
You will need seven of these

• 1 DC jack panel mount (two if you want light control)

• Project box
I used a 6 x 3 x 2″ project box from Radioshack

• Mounting screws and nuts (4-40 ½ inch)
Mount LCD and slide potentiometer

• Female and male headers

• 10K slide potentiometer
Only if you want light control

• N-channel MOSFET
Only if you want light control

• Blank copper PCB
This is optional, but it makes layout easier


• Soldering iron
• Jumper wire
• FTDI Basic board
• USB-B cable
• Drill with bit
• Dremel / rotary tool
• Ruler
• Breadboard
• Mini push-button switches for testing
• PCB etching and drilling equipment

Alarm for Arduino circuit

Step 2: Solder Headers

You will need to solder headers onto the RTC and the LCD. There are two sets of connections on the LCD: one is already terminated with a JST connector, and the other is empty. They both do the same thing, so pick which one you want to use. I didn’t have any JST cables so I desoldered them and attached hookup wires.

If your Pro Mini is new, you will also have to solder headers on them. Be careful with the Pro Mini because some SMT parts are really close to the header vias.

Step 3: DS1307RTC

The RTC module uses the Wire I2C interface to communicate with the Arduino on A4 and A5. The data line (SDA) is on A4, and the clock line (SCL) is on A5. With the coin-cell battery on the module, the RTC can run for up to 17 years without an outside power source. The datasheet recommends using pull-up resistors to 5V on the data lines. For this project ignore the square-wave output (SQW).
If you aren’t using the SparkFun breakout make sure to connect a crystal on pins 1 and 2. You can read more about the chip on the datasheet here .

To set the time I used ladyada’s example code from her RTC library and tutorial. You can get the library here on her github page. Her code sets the time using the current time on your computer. Make sure to uncomment this line of code:

// RTC.adjust(DateTime(__DATE__, __TIME__));

Read more: Turing Alarm for Arduino

Leave a Comment

Your email address will not be published. Required fields are marked *