Introduction: Arduino Mario Clock

It's a musical desktop alarm clock with a theme of well-known MARIO game. Actually I like to wake up with the Mario theme instead of my cellphone. Also the LEDs (color tubes) blinking make it more beautiful.

Features:

- Display of Time, Date, Temperature

- Mario image and music on startup theme and alarm time

- Adjustable time, date, alarm

Used parts:

- 1x Arduino ProMini 5v

- 1x Nokia 5110 LCD

- 1x DS1307 module (real-time clock)

- 1x Speaker/Buzzer

- 1x DS18b20 Temp sensor

- 1x Electronic board

- 4x LED (different colors)

- 4x Push button

- 4x Resistor 220 (for LEDs)

- 5x Resistor 1K (4x for buttons, 1x for Temp sensor)

- 1x Hot glue stick (tube) which cut into 4 pieces 2x 6cm and 2x 8cm

- 8x metal rings and cylinders (I used Ferrite beads salvaged from my old printers)

- 1x Plastic box

- 5x mini battery, or 4x AA battery

- Tools: Hot-glue gun, soldering iron, pliers, some wires, ...

Step 1: Make a Desktop Clock Box

Picture of Make a Desktop Clock Box

If you want to use it as a real desktop clock, so find a pretty box. I've used the soldering iron to melt the box and making holes for pushh buttons and the lcd.

Step 2: Make the Circuit

Picture of Make the Circuit

Attach the push buttons and resistors on the board. Fit the board in the box via hot-glue. Connect the LEDs under the glue tubes. Use the solderig iron to make a propper hole inside the tubes. Fit the parts like as temp sensor, rtc, batteries and others inside the box via hot-glue.

Step 3: Arduino Code

Picture of Arduino Code

I've made a few images (Mario splash screen, Mario jump, Temperature icon, Alarm icon) with MSPaint which can be converted to binary data via LCDAssistant. All the coed is attached.

I think the code is enough plain and simple but, the following code hints can be helpful.

Classes:

- NokiaFa5110: Nokia LCD driver class.

- Util: Bitmap images.

- DS1307RTC, Time: Used for date time module.

- Wire, OneWire, DallasTemperature: Used for temperature sensor.

- EEPROM, avr/pgmspace: To use the EEPROM memory.

- Narcoleptic: A handy class to lower the battery usage via stand by delays.

Hints:

- A main switch-case and state variable used to handle the different menus and program states.

- The EEPROM memory has used to save the adjusted date and time variables.

- I've tried to partially refresh the LCD when the time, date or temp will change. The LCD is most battery consuming part.

- Narcoleptic class make it easy to lower the Arduino board battery usage, when there is no job to do (delay).

Comments

firazpeerjade (author)2015-07-04

Is there any working video

dunk8888young (author)2014-11-10

what pin does the 5110 led go to is it just grounded or does it have a pin to flash or turn off etc

dunk8888young (author)2014-11-10

Thanks,its all done now,it works a treat,now all you need to do is try a nice oled display.

m-shams (author)2014-11-06

The pin outs are in the sketch file.
Pins 8, 12, 13 have used for menu buttons. The fourth button is a direct reset signal which not depend on sketch code.
For the sensors it's better to use their manual. I'm sorry that I couldn't draw circuit when the project was done.

dunk8888young (author)2014-11-05

do i tie buttons to ground or 3v sink or source? the speaker doesnt matter that works eather way round,i love how arduino auto does that.

m-shams (author)2014-10-08

I used the IDE 1.5.2 to compile the project.
Copy any lib to libraries folder of Arduino installation path.
Libs with "" (double quote) are located in sketch folder.
Narcoleptic is not necessary, if you have any problem with it. It's just to save battery.
Have fun

dunk8888young (author)2014-10-08

the only way i get it to compile is to delete this line -

Narcoleptic.delay(300);

dunk8888young (author)2014-10-08

Hi now i get narcoleptic was not declaired in this scope,also where does the util.h file go?do i put it in the mario sketch folder?we will get there,its best to try sort it so other people dont get the same problem,thanks

Also witch ide version was this compiled on?

dunk8888young (author)2014-10-07

Great project,although half the librarys are missing,I cant get it to compile,theres endless errors,

Narcoleptic gives error,ive added a library for it but its probly the wrong one,would be great if you could attach all files so we can comile the code,Ive built the clock, its a shame to wast it due to code,thanks for any help.

m-shams (author)dunk8888young2014-10-08

Ok, All the libs, added!

dunk8888young (author)m-shams2014-10-08

ohhhh great stuff,thanks,cant wait to see it running, happy man now,the clock is for my little lad.

seamster (author)2014-08-15

Nice project, thanks for sharing!

About This Instructable

4,206views

40favorites

License:

Bio: Programmer, Arduino Fan
More by m-shams:Arduino Mario ClockArduino, Mini Sonar RobotArduino CDROM BLDC Motor Driver, Enhanced Performance
Add instructable to: