Introduction: Alarm Clock Pac_Man MP3

English

This is my first instructables :-) sorry for my english...I'm french!

I have build for my daughter a alarm clock MP3 with the funny face of Pac_Man (now she wake-up all alone)

French

C'est mon 1er instructables :-)

J'ai construit pour ma fille un radio réveil MP3 en forme de Pac_Man (maintenant elle se réveille toute seul).

Step 1: Equipment

English:

what you need:

-access of 3D printer (for build the Pac_Man) with yellow plastic (PLA is enough)

-Arduino nano (1,78€ ebay or aliexpress) like this: Arduino Nano

-Real time clock (Tyni RTC I2C) 0,65€ like this: RTC

-a display with button (TM1638) 5€ like this: TM1638

-MP3 sheld (Dfplayer Mini) 3€ like this: Dfplayer Mini

-Micro SD card (2Go is enough) 2€ like this: Micro SD

-2 resistors of 1k ohm

-Prototype PCB 0,26€ like this: Prototype PCB

-a small speaker

-a soldering iron

the total cost is 11€ for electronic and 10€ for plastic (PLA)

French:

De quoi avez vous besoin:

-Accès a une imprimante 3D avec un fils plastique jaune type PLA

-Arduino nano (1,78€ ebay or aliexpress) comme celui là: Arduino nano

-Real time clock (Tyni RTC I2C) 0,65€ comme celui là: RTC

-a display with button (TM1638) 5€ comme celui là: TM1638

-MP3 sheld (Dfplayer Mini) 3€ comme celui là: Dfplayer Mini

-Micro SD card (2Go is enough) 2€ comme celui là: Micro SD

-2 resistances de 1k ohm

-Prototype PCB 0,26€ comme celui là: Prototype PCB

-Un petit haut parleur

-Un fer a souder

Le coût total est d'environs 11€ pour l’électronique et 10€ de plastique(PLA)

Step 2: Operation

English

The operation of the clock Alarm:
On starting a chase and a welcome message appears on the screen. When the alarm is working a chase appears with a message (LEO WAKE UP !, this message is changeable) with a low level of volume and in a minute-double volume.

Button:

-1st Left button: play an MP3 to launch when you want

-2nd Button: MP3 stop with short puch on bouton, if we puch long time on buton (over five seconds) we enter the time setting and an LED chaser appears from right to left. simply press again this button to exit the setting of the hour and a Led chaser appears from left to right

-3rd Button: Volume - (volume level saved)

-4th Button: Volume + (volume level saved)

-5em Button: Alarm active / inactive (the partier right of the screen shows whether the alarm time), so long you pressed the button 2, then Time +

-6eme Button: Time + Alarm, so long we pressed the button then 2 Time -

-7eme Button: Minutes - of the alarm, if it has long pressed the button then 2 Minute +

-8eme Button: + Minutes of the alarm, if it has long pressed the button then 2 Minute -

French

Le fonctionnement du Radio Réveil:
Au démarrage un chenillard et un message de bienvenue apparaissent sur l'écran. Lorsque l'alarme se déclenche un chenillard apparaît avec un message (DEBOUT LEO!, ce message est changeable ) avec un niveau de volume faible puis au-bout d'une minute le volume double.

Bouton:

-1er bouton de gauche: play pour lancer un MP3 quand on le veut

-2eme bouton : stop du MP3 pour un appui court, si l'on appui plus de 5 seconde dessus on rentre dans le réglage de l'heure et un chenillard gauche droite de led apparaît. il suffit de réappuyer sur ce bouton pour sortir du réglage de l'heure et un chenillard droite gauche de led apparaît

-3eme bouton : Volume - (niveau volume sauvegardé)

-4eme bouton : Volume + (niveau volume sauvegardé)

-5em bouton: Alarme actif/inactif (la partier droite de l'écran affiche ou non l'heure de l'alarme), si on a appuyé longtemps sur le bouton 2, alors Heure +

-6eme bouton : Heure + de l'alarme , si on a appuyé longtemps sur le bouton 2 alors Heure -

-7eme bouton: Minutes - de l'alarme, si on a appuyé longtemps sur le bouton 2 alors Minute +

-8eme bouton: Minutes + de l'alarme, si on a appuyé longtemps sur le bouton 2 alors Minute -

Step 3: Electronique

English:

you can test the assembly before soldering it to the pcb, with the electronic shéma :

Dfplayer Mini, RX (D10 on arduino with a resitor of 1 k ohm), TX (D11 on arduino with resitor of 1 k ohm)

afficheur TM1638,display connection, data pin D8, clock pin D9 and strobe pin D7

Tyni RTC I2C , A4(arduino) => SDA, A5(arduino) =>SCL

If the test is ok (after dowload the code) you can weld all componant.

French

Vous pouvez tester sur un plaque d'essaie les branchements des différents élément (voir le schéma):

Dfplayer Mini, RX (D10 sur l'arduino avec une résistance de 1 k ohm), TX (D11 sur l'arduino avec une résistance de 1 k ohm)

afficheur TM1638,branchement: data pin D8(sur l'arduino), clock pin D9(sur l'arduino)et strobe pin D7(sur l'arduino)

Tyni RTC I2C , A4(sur l'arduino) => SDA, A5(sur l'arduino) => SCL

Si les tests sont ok (après téléchargement du code dans l'arduino) vous pouvez ensuite souder les différents composant sur la plaque pcb (plaques a trou).

Step 4: Arduino, Code

English

Now the electronic is done, you can download the code in the arduino.

-Dowload IDE Arduino here: Arduino IDE and install it

-dezip and copy Librairy.zip in your folder "Mes Documents\Arduino\libraries"

-dezip the file affichage_RTC_Bouton_MP3.zip in a folder (the name of folder must be "affichage_RTC_Bouton_MP3")

-In arduino IDE, select the right microprocessor (arduino nano) and the right port

-load the file affichage_RTC_Bouton_MP3.ino in the microprocessor

-copy MP3 music in the mini SD

French

Maintenant que l'électronique est fait, vous pouvez charger le code dans l'arduino.

-Télécharger l'arduino IDE ici: Arduino IDE et installé le

-deziper et copier le fichier Librairy.zip dans votre repertoire "Mes Documents\Arduino\libraries"
-deziper le fichier "affichage_RTC_Bouton_MP3.zip" dans un répertoire nomée "affichage_RTC_Bouton_MP3")

-Dans l'arduino IDE, selectionner le bon microprocessor (arduino nano) et le bon port

-Téléversé le fichier "affichage_RTC_Bouton_MP3.ino" dans le microprocessor

-Copier la musique MP3 sur la carte mini SD

Step 5: Pac_Man Printed

English

Now you can print all part of Pac Man and integrated the electronic

French

Maintenant vous pouvez imprimer les differente partie du Pac Man et intégrer l'electronique.

Step 6: Servo-motor for Move Eyes

English:

Cut 2 pieces of white plastic(Styrene in my case) to support eyes, use a rod (or a stick) to connect the eyes and plug the arm (already printed) of an actuator (I've glue the servo-motor).

French:

Couper deux pièces de plastique blanc(Styrene pour mon cas) pour supporter les yeux, utiliser une tige pour connecter les yeux et insérer le bras (déja imprimé) sur le servo-moteur (J'ai collé le servo-moteur).

Step 7: Enjoy !

English:

Now you can plug the Alarm Clock Pac_Man MP3 with a 5v power directly to the arduino.

French:

Maintenant vous pouvez brancher le radio réveil MP3 Pac_Man avec un transformateur 5v directement sur l'arduino

Step 8: Thanks

English:

Thanks you Fred for your help in coding (especially for structuring the code) and thank you to my daughter, she was my beta tester and found bug in my code :-)

French:

Merci a Fred pour l'aide sur le code (spécialement pour la structure du code) et merci a ma fille, elle a été ma beta testeuse et a trouvé des bug dans le code :-)