Fabrication industrielle
Internet des objets industriel | Matériaux industriels | Entretien et réparation d'équipement | Programmation industrielle |
home  MfgRobots >> Fabrication industrielle >  >> Manufacturing Technology >> Processus de fabrication

Horloge de mots italienne

Composants et fournitures

Arduino Nano R3
× 1
Bande NeoPixel
144
× 1
Adafruit Standard LCD - 16x2 Blanc sur Bleu
avec module I2C
× 1
Horloge en temps réel (RTC)
× 1
Interrupteur à bouton-poussoir SparkFun 12mm
× 4
Résistance 10k ohm
× 3
Résistance 475 ohm
× 1
1N4007 – Diode haute tension et courant nominal élevé
× 3
Convertisseur DC DC abaisseur réglable
× 1
Cadre mural RIBBA (Ikea)
× 1
Couvercle Gewiss 150 x 110
× 1
bandes d'aluminium 230 mm x 10 mm x 1mm
× 1

À propos de ce projet

Ma passion pour les montres Arduino, m'a amené à faire une "Word Clock", puisque j'habite en Italie, je parle en italien. Pour la réalisation du projet, je me suis inspiré d'un tutoriel "Word Clock Javelin", j'ai fait quelques petites modifications... et voici pour vous "Word Clock of Italy" !

En plus de "dire les heures" en italien, je voulais ajouter les anniversaires de ma famille (dont le chat). Pour la construction du "cadre" j'en ai utilisé un déjà fait par IKEA, et les modifications internes j'ai utilisé le matériel que j'avais à la maison :

Pour la réalisation de l'écran sera montré le motif dessiné avec Inkscape.

Mon panneau mesure 12 x 12 lettres avec un encombrement de 200 mm. Comme je n'ai pas d'imprimante 3D, j'ai fait la grille avec des bandes d'aluminium, et j'ai isolé le contact de la LED avec une éponge adhésive, cela a également servi à isoler la lumière.

Circuit électronique

Pour garder le temps, j'ai utilisé un RTC .

Pour pouvoir régler l'heure, j'ai ajouté des boutons (P1, P2, P3) et un affichage 16 x 2. (Voir aussi le projet "Clock Set Date Time"). Comme on le voit sur le schéma de câblage, les boutons sont connectés à l'Arduino via un pull-down circuit.

L'affichage ne servant qu'à régler l'heure, j'ai remplacé le cavalier par un bouton , ce faisant, il n'éclaire que son usage. La diode D1 sert de protection contre l'inversion de polarité.

La diode D2 sert à ne pas alimenter la bande néopixel, lorsque, pour une raison quelconque, nous devons changer le croquis Arduino (trop de courant pourrait l'endommager). La diode D3 sert à porter à 5 volts, la tension à Neopixel.

Je joins le schéma du circuit, le schéma de Fritzing, la disposition du PCB.

Matrice

Pour réaliser la matrice, j'ai connecté les différentes bandes comme sur la photo. Zigzaguer du haut à gauche pour descendre.

Libreries Arduino

  • RTC
  • LiquidCrystal_I2C
  • Adafruit_NeoPixel

Explication du code

Le code est divisé en 5 parties principales :

  • "DisplayDateTime" :affiche la date et l'heure sur l'écran LCD
  • "HourClock" :affiche les heures dans le panneau
  • "MinuteClock" :affiche les minutes dans le panneau
  • "Auguri" :Joyeux anniversaire
  • "Void paintWord (arrWord int [], uint32_t intColor)" est le cœur du code pour allumer le néopixel, "arrWord int []" sont les LED qui doivent s'allumer, "uint32_t intColor" est leur couleur

Pour obtenir une horloge plus précise, j'ai ajouté les chiffres 1, 2, 3, 4 correspondant aux minutes progressives.

Exemple :"SONO LE ORE DIECI E VENTI 4" signifie 10h24 (10h20 + 00:04), "SONO LE DIECI MENO QUINDICI 2" signifie 09h47 (09:45 + 00:02)

Assemblage

  • Ouvrez le cadre et nettoyez bien la vitre
  • Insertion d'impression en Acétate
  • Insérez le papier d'impression
  • Insérer la grille
  • Insérez le panneau avec les LED
  • Coller un morceau de contreplaqué, un peu plus gros que le boîtier de commande
  • Fixer avec des vis autotaraudeuses le boîtier de commande

Faites très attention à l'alignement des deux impressions

Emplacement

Mettez dans le salon il y a son look bien.

Code

  • WordClock italien
WordClock italienArduino
/* : Projet :WordClock :Auteur :Tiziano Bianchettin :Date :25/09/2016 :Révision : 1 : Licence :Domaine Public Merci à :http://www.instructables.com/id/Javelins-Word-Clock / http://arduinoenonsolo.blogspot.it/2012/12/orologio-con-arduino-e-il-ds1307.html http://www.mauroalfieri.it/ http://www.danielealberti.it/ http://www.maffucci.it/ Mon professeur de laboratoire d'électronique "Perito Carli" *///************bibliothèques******************//# include #include #include #include //***********neopixel******** *******//#define PIN 9 // pin neopixel#define NUM_LEDS 144 // 12 x 12#define GIORNO 255 ​​// plein sur#define SERA 25 // un dixième surAdafruit_NeoPixel strip =Adafruit_NeoPixel(NUM_LEDS, PIN , NEO_GRB + NEO_KHZ800); // 144 led, broche 9int intBrightness ; //******************COULEURS***********//uint32_t Red =strip.Color(255, 0, 0); uint32_t Vert =bande.Couleur( 0, 255, 0);uint32_t Bleu =bande.Couleur( 0, 0, 255);uint32_t Blanc =bande.Couleur( 255, 255, 255);uint32_t Jaune =bande.Couleur( 255 , 255, 0);uint32_t Violet =strip.Color( 60, 0, 255);uint32_t Off =strip.Color( 0, 0, 0);LiquidCrystal_I2C lcd (0x27,16,2); // Affichage I2C 16 x 2RTC_DS1307 RTC;int P1=6; // Bouton SET MENU'int P2=7; // Bouton +int P3=8; // Bouton -int oraagg;int minagg;int annoagg;int meseagg;int dayagg;int menu =0;int ora;//********Présentation*********//int txtSONO[] ={1,2,3,4,6,7,9,10,11,-1};//********Heures*********//int txtUNA[] ={20,21,22,-1};int txtDUE[] ={17,18,19,-1};int txtTRE[] ={57,58,59,-1};int txtQUATTRO[ ] ={96,97,98,99,100,101,102,-1};int txtCINQUE[] ={30,31,32,33,34,35,-1};int txtSEI[] ={103,104,105,-1};int txtSETTE[] ={48,49,50,51,52,-1};int txtOTTO[] ={72,73,74,75,-1};int txtNOVE[] ={60,61,62,63 ,-1};int txtDIECI[] ={12,13,14,15,16,-1};int txtUNDICI[] ={84,85,86,87,88,89,-1};int txtDODOCI[ ] ={90,91,92,93,94,95,-1};//********Joyeux anniversaire*********//int txtAUGURI[] ={24, 25,26,27,28,29,-1};int txtSIMONE[] ={36,37,38,39,40,41,-1};int txtJACOPO[] ={42,43,44,45, 46,47,-1};int txtMINU[] ={53,54,55,56,-1};int txtTIZIANO[] ={65,66,67,68,69,70,71,-1} ; int txtMARILENA[] ={76,77,78,79,80,81,82,83,-1} ;//********Minutes*********//int txtE [] ={107,-1};int txtMENO[] ={116,117,118,119,-1};int txtMUN O[] ={5,-1};int txtMDUE[] ={64,-1};int txtMTRE[] ={106,-1};int txtMQUATTRO[] ={125,-1};int txtMCINQUE[ ] ={132,133,134,135,136,137,-1};int txtMDIECI[] ={120,121,122,123,124,-1};int txtQUINDICI[] ={108,109,110,111,112,113,114,115,-1};int txtVENTI[] ={139,140,141,142,143,-1} {126,127,128,129,130,131,-1};configuration vide(){ strip.begin(); strip.show(); lcd.begin(); LCD rétro-éclairage(); lcd.clear(); pinMode(P1,ENTRÉE); pinMode(P2,ENTRÉE); pinMode(P3,ENTRÉE); Serial.begin(9600); Fil.begin(); RTC.begin(); if (! RTC.isrunning()) { Serial.println("RTC n'est PAS en cours d'exécution!"); // Définit la date et l'heure au moment de la compilation RTC.adjust(DateTime(__DATE__, __TIME__)); } // RTC.adjust(DateTime(__DATE__, __TIME__)); //suppression de "//" pour régler l'heure // L'affichage par défaut affiche la date et l'heure int menu=0;} void loop(){ // vérifiez si vous appuyez sur le bouton SET et augmentez l'index du menu if(digitalRead( P1)) { menu=menu+1; }// dans quel sous-programme devons-nous aller ? if (menu==0) { DisplayDateTime(); // void DisplayDateTime DateTime now =RTC.now(); if((now.hour()>=19) || (now.hour() <7 )){ // ajuste la luminosité jour - nuit intBrightness =SERA; } else{ intBrightness =GIORNO; } strip.setBrightness(intBrightness); strip.show(); int timeMin =now.minute(); int modMin =timeMin % 5 ; // https://www.arduino.cc/en/Reference/Modulo if ( modMin ==0){ // chaque minute, les LED changent de couleur et allument le numéro correspondant paintWord (txtSONO, White); paintWord(txtMQUATTRO, OFF); } else if ( modMin ==1){ paintWord(txtSONO, Yellow); paintWord(txtMUNO, Rouge); } else if ( modMin ==2){ paintWord(txtSONO, Green); paintWord(txtMUNO, Off); paintWord(txtMDUE, bleu); } else if ( modMin ==3){ paintWord(txtSONO, Blue); paintWord(txtMDUE, Off); paintWord(txtMTRE, vert); } else if ( modMin ==4){ paintWord(txtSONO, Red); paintWord(txtMTRE, Off); paintWord(txtMQUATTRO, Jaune); } HeureClock(); //void HourClock MinuteClock(); // annuler MinuteClock Auguri(); // annuler Auguri strip.show(); } if (menu==1) { DisplaySetHour(); } if (menu==2) { DisplaySetMinute(); } if (menu==3) { DisplaySetYear(); } if (menu==4) { DisplaySetMonth(); } if (menu==5) { DisplaySetDay(); } if (menu==6) { StoreAgg(); retard (500); menu=0; } delay(100);}void showStrip() { #ifdef ADAFRUIT_NEOPIXEL_H // NeoPixel strip.show(); #endif #ifndef ADAFRUIT_NEOPIXEL_H // FastLED FastLED.show(); #endif}void setPixel(int Pixel, byte red, byte green, byte blue) { #ifdef ADAFRUIT_NEOPIXEL_H // NeoPixel strip.setPixelColor(Pixel, strip.Color(red, green, blue)); #endif #ifndef ADAFRUIT_NEOPIXEL_H // Leds FastLED[Pixel].r =rouge; leds[Pixel].g =vert; leds[Pixel].b =bleu ; #endif}void setAll(byte red, byte green, byte blue) { for(int i =0; i =40){ // à partir des 40 minutes, ajouter 1 à "hour" ora =ora+1; } switch (ora ) { case 0 :case 12 :case 24 :paintWord(txtUNDICI, Off); strip.show(); if ( modMin ==0){ paintWord (txtDODOCI, blanc); strip.show(); } else if ( modMin ==1){ paintWord(txtDODOCI, Yellow); strip.show(); } else if ( modMin ==2){ paintWord(txtDODOCI, Green); strip.show(); } else if ( modMin ==3){ paintWord(txtDODOCI, Blue); strip.show(); } else if ( modMin ==4){ paintWord(txtDODOCI, Red); strip.show(); } Pause; cas 1 :cas 13 :paintWord(txtDODOCI, Off); strip.show(); if ( modMin ==0){ paintWord(txtUNA, White); strip.show(); } else if ( modMin ==1){ paintWord(txtUNA, Yellow); strip.show(); } else if ( modMin ==2){ paintWord(txtUNA, Green); strip.show(); } else if ( modMin ==3){ paintWord(txtUNA, Blue); strip.show(); } else if ( modMin ==4){ paintWord(txtUNA, Red); strip.show(); } Pause; cas 2 :cas 14 :paintWord(txtUNA, Off); strip.show(); if ( modMin ==0){ paintWord(txtDUE, White); strip.show(); } else if ( modMin ==1){ paintWord(txtDUE, Yellow); strip.show(); } else if ( modMin ==2){ paintWord(txtDUE, Green); strip.show(); } else if ( modMin ==3){ paintWord(txtDUE, Blue); strip.show(); } else if ( modMin ==4){ paintWord(txtDUE, Red); strip.show(); }Pause; cas 3 :cas 15 :paintWord(txtDUE, Off); strip.show(); if ( modMin ==0){ paintWord(txtTRE, White); strip.show(); } else if ( modMin ==1){ paintWord(txtTRE, Yellow); strip.show(); } else if ( modMin ==2){ paintWord(txtTRE, Green); strip.show(); } else if ( modMin ==3){ paintWord(txtTRE, Blue); strip.show(); } else if ( modMin ==4){ paintWord(txtTRE, Red); strip.show(); } Pause; cas 4 :cas 16 :paintWord(txtTRE, Off); strip.show(); if ( modMin ==0){ paintWord (txtQUATTRO, blanc); strip.show(); } else if ( modMin ==1){ paintWord(txtQUATTRO, Yellow); strip.show(); } else if ( modMin ==2){ paintWord(txtQUATTRO, Green); strip.show(); } else if ( modMin ==3){ paintWord(txtQUATTRO, Blue); strip.show(); } else if ( modMin ==4){ paintWord(txtQUATTRO, Red); strip.show(); } Pause; cas 5 :cas 17 :paintWord(txtQUATTRO, Off); strip.show(); if ( modMin ==0){ paintWord(txtCINQUE, White); strip.show(); } else if ( modMin ==1){ paintWord(txtCINQUE, Yellow); strip.show(); } else if ( modMin ==2){ paintWord(txtCINQUE, Green); strip.show(); } else if ( modMin ==3){ paintWord(txtCINQUE, Blue); strip.show(); } else if ( modMin ==4){ paintWord(txtCINQUE, Red); strip.show(); } Pause; cas 6 :cas 18 :paintWord(txtCINQUE, Off); strip.show(); if ( modMin ==0){ paintWord(txtSEI, White); strip.show(); } else if ( modMin ==1){ paintWord(txtSEI, Yellow); strip.show(); } else if ( modMin ==2){ paintWord(txtSEI, Green); strip.show(); } else if ( modMin ==3){ paintWord(txtSEI, Blue); strip.show(); } else if ( modMin ==4){ paintWord(txtSEI, Red); strip.show(); } Pause; cas 7 :cas 19 :paintWord(txtSEI, Off); strip.show(); if ( modMin ==0){ paintWord(txtSETTE, White); strip.show(); } else if ( modMin ==1){ paintWord(txtSETTE, Yellow); strip.show(); } else if ( modMin ==2){ paintWord(txtSETTE, Green); strip.show(); } else if ( modMin ==3){ paintWord(txtSETTE, Blue); strip.show(); } else if ( modMin ==4){ paintWord(txtSETTE, Red); strip.show(); } Pause; cas 8 :cas 20 :paintWord(txtSETTE, Off); strip.show(); if ( modMin ==0){ paintWord(txtOTTO, White); strip.show(); } else if ( modMin ==1){ paintWord(txtOTTO, Yellow); strip.show(); } else if ( modMin ==2){ paintWord(txtOTTO, Green); strip.show(); } else if ( modMin ==3){ paintWord(txtOTTO, Blue); strip.show(); } else if ( modMin ==4){ paintWord(txtOTTO, Red); strip.show(); } Pause; cas 9 :cas 21 :paintWord(txtOTTO, Off); strip.show(); if ( modMin ==0){ paintWord(txtNOVE, White); strip.show(); } else if ( modMin ==1){ paintWord(txtNOVE, Yellow); strip.show(); } else if ( modMin ==2){ paintWord(txtNOVE, Green); strip.show(); } else if ( modMin ==3){ paintWord(txtNOVE, Blue); strip.show(); } else if ( modMin ==4){ paintWord(txtNOVE, Red); strip.show(); } Pause; cas 10 :cas 22 :paintWord(txtNOVE, Off); strip.show(); if ( modMin ==0){ paintWord (txtDIECI, blanc); strip.show(); } else if ( modMin ==1){ paintWord(txtDIECI, Yellow); strip.show(); } else if ( modMin ==2){ paintWord(txtDIECI, Green); strip.show(); } else if ( modMin ==3){ paintWord(txtDIECI, Bleu); strip.show(); } else if ( modMin ==4){ paintWord(txtDIECI, Rouge); strip.show(); } Pause; cas 11 :cas 23 :paintWord(txtDIECI, Off); strip.show(); if ( modMin ==0){ paintWord (txtUNDICI, blanc); strip.show(); } else if ( modMin ==1){ paintWord(txtUNDICI, Yellow); strip.show(); } else if ( modMin ==2){ paintWord(txtUNDICI, Green); strip.show(); } else if ( modMin ==3){ paintWord(txtUNDICI, Blue); strip.show(); } else if ( modMin ==4){ paintWord(txtUNDICI, Red); strip.show(); }Pause; }}void MinuteClock(){ DateTime now =RTC.now(); int timeMin =now.minute(); int modMin =timeMin % 5 ; // https://www.arduino.cc/en/Reference/Modulo switch (now.minute()) { case 5 :case 6 :case 7 :case 8 :case 9 :if ( modMin ==0){ paintWord (txtE, blanc) ; paintWord(txtMCINQUE, Blanc); strip.show(); } else if ( modMin ==1){ paintWord(txtE, Yellow); paintWord(txtMCINQUE, Jaune); strip.show(); } else if ( modMin ==2){ paintWord(txtE, Green); paintWord(txtMCINQUE, vert); strip.show(); } else if ( modMin ==3){ paintWord(txtE, Blue); paintWord(txtMCINQUE, Bleu); strip.show(); } else if ( modMin ==4){ paintWord(txtE, Red); paintWord(txtMCINQUE, Rouge); strip.show(); }Pause; cas 10 :cas 11 :cas 12 :cas 13 :cas 14 :paintWord(txtMCINQUE, Off); strip.show(); if ( modMin ==0){ paintWord(txtE, White); paintWord(txtMDIECI, blanc); strip.show(); } else if ( modMin ==1){ paintWord(txtE, Yellow); paintWord(txtMDIECI, jaune); strip.show(); } else if ( modMin ==2){ paintWord(txtE, Green); paintWord(txtMDIECI, vert); strip.show(); } else if ( modMin ==3){ paintWord(txtE, Blue); paintWord(txtMDIECI, bleu); strip.show(); } else if ( modMin ==4){ paintWord(txtE, Red); paintWord(txtMDIECI, rouge); strip.show(); } Pause; cas 15 :cas 16 :cas 17 :cas 18 :cas 19 :paintWord(txtMDIECI, Off); strip.show(); if ( modMin ==0){ paintWord(txtE, White); paintWord(txtQUINDICI, Blanc); strip.show(); } else if ( modMin ==1){ paintWord(txtE, Yellow); paintWord(txtQUINDICI, Jaune); strip.show(); } else if ( modMin ==2){ paintWord(txtE, Green); paintWord(txtQUINDICI, vert); strip.show(); } else if ( modMin ==3){ paintWord(txtE, Blue); paintWord(txtQUINDICI, Bleu); strip.show(); } else if ( modMin ==4){ paintWord(txtE, Red); paintWord(txtQUINDICI, Rouge); strip.show(); }Pause; cas 20 :cas 21 :cas 22 :cas 23 :cas 24 :paintWord(txtQUINDICI, Off); strip.show(); if ( modMin ==0){ paintWord(txtE, White); paintWord(txtVENTI, Blanc); strip.show(); } else if ( modMin ==1){ paintWord(txtE, Yellow); paintWord(txtVENTI, jaune); strip.show(); } else if ( modMin ==2){ paintWord(txtE, Green); paintWord(txtVENTI, vert); strip.show(); } else if ( modMin ==3){ paintWord(txtE, Blue); paintWord(txtVENTI, bleu); strip.show(); } else if ( modMin ==4){ paintWord(txtE, Red); paintWord(txtVENTI, rouge); strip.show(); }Pause; case 25 :case 26 :case 27 :case 28 :case 29 :if ( modMin ==0){ paintWord(txtE, White); paintWord(txtVENTI, Blanc); paintWord(txtMCINQUE, Blanc); strip.show(); } else if ( modMin ==1){ paintWord(txtE, Yellow); paintWord(txtVENTI, jaune); paintWord(txtMCINQUE, Jaune); strip.show(); } else if ( modMin ==2){ paintWord(txtE, Green); paintWord(txtVENTI, vert); paintWord(txtMCINQUE, Green);...Ce fichier a été tronqué, veuillez le télécharger pour voir son contenu complet.
WordClock italien

Pièces et boîtiers personnalisés

wordklock_aWvuaZRw4N.svg

Schémas

wordklock_JBoZPYrsYr.fzz

Processus de fabrication

  1. Alarme de soif d'usine
  2. Horloge de mots simple (Arduino)
  3. Word Clock avec résolution en minutes du temps en mots
  4. Compteur kWh Sigfox
  5. Moniteur de température Bluetooth
  6. Serrure à commande gestuelle
  7. Le compagnon IC
  8. Une entrée analogique isolée pour Arduino
  9. Mesurez votre temps de réaction