Industriële fabricage
Industrieel internet der dingen | Industriële materialen | Onderhoud en reparatie van apparatuur | Industriële programmering |
home  MfgRobots >> Industriële fabricage >  >> Manufacturing Technology >> Productieproces

Italiaanse Word Clock

Componenten en benodigdheden

Arduino Nano R3
× 1
NeoPixel-strip
144
× 1
Adafruit Standaard LCD - 16x2 Wit op Blauw
met I2C-module
× 1
Real Time Clock (RTC)
× 1
SparkFun Drukknopschakelaar 12 mm
× 4
Weerstand 10k ohm
× 3
Weerstand 475 ohm
× 1
1N4007 – Diode voor hoge spanning, hoge stroomsterkte
× 3
DC DC-converter Instelbare stap omlaag
× 1
Wandframe RIBBA (Ikea)
× 1
Gewiss-doosdeksel 150 x 110
× 1
aluminium strips 230 mm x 10 mm x 1 mm
× 1

Over dit project

Mijn passie voor Arduino-horloges bracht me ertoe een "Word Clock" te maken, aangezien ik in Italië woon, sprak ik in het Italiaans. Voor de realisatie van het project werd ik geïnspireerd door een tutorial "Word Clock Javelin", ik maakte een paar kleine wijzigingen ... en hier voor jou "Word Clock of Italy"!

Naast "tel de uren" in het Italiaans, wilde ik de verjaardagen van mijn familie (inclusief de kat) toevoegen. Voor de constructie van het "raamwerk" heb ik er een gebruikt die al door IKEA is gemaakt, en interne wijzigingen gebruikte ik het materiaal dat ik thuis had:

Voor de realisatie van het scherm wordt het met Inkscape getekende patroon getoond.

Mijn paneel meet 12 x 12 letters met een voetafdruk van 200 mm. Aangezien ik geen 3D-printer heb, heb ik het raster gemaakt met aluminium strips, en heb ik het contact van de LED geïsoleerd met een zelfklevende spons, dit diende ook om het licht te isoleren.

Elektronisch circuit

Om de tijd bij te houden, heb ik een RTC . gebruikt .

Om de tijd te kunnen aanpassen heb ik knoppen (P1, P2, P3) en een 16 x 2 display toegevoegd. (Zie ook het project "Clock Set Date Time"). Zoals te zien is in het bedradingsschema, zijn de knoppen via een pull-down . met de Arduino verbonden circuit.

Omdat het display alleen dient om de tijd aan te passen, heb ik de jumper vervangen door een knop , door dit te doen, verlicht het alleen voor het gebruik ervan. De diode D1 dient als beveiliging tegen omgekeerde polariteit.

De diode D2 dient om de neopixelstrip niet te voeden, wanneer we, om welke reden dan ook, de schets Arduino moeten veranderen (te veel stroom zou deze kunnen beschadigen). De diode D3 dient om op 5 volt de spanning op Neopixel te brengen.

Ik voeg het schakelschema, het Fritzing-schema, de PCB-lay-out bij.

Matrix

Om de matrix te realiseren heb ik de verschillende strips met elkaar verbonden zoals op de foto. Zigzaggend van linksboven om af te dalen.

Arduino-bibliotheken

  • RTC
  • LiquidCrystal_I2C
  • Adafruit_NeoPixel

Verklaring van de code

De code is verdeeld in 5 hoofddelen:

  • "DisplayDateTime":geeft de datum en tijd weer op het lcd-scherm
  • "HourClock":toont uren in het paneel
  • "MinuteClock":toont de minuten in het paneel
  • "Auguri":Gefeliciteerd met je verjaardag
  • "Void paintWord (arrWord int [], uint32_t intColor)" is het hart van de code om de neopixel in te schakelen, "arrWord int []" zijn de LED's die moeten oplichten, "uint32_t intColor" is hun kleur

Om een ​​nauwkeurigere klok te krijgen, heb ik de nummers 1, 2, 3, 4 toegevoegd die overeenkomen met de progressieve minuten.

Voorbeeld :“SONO LE ORE DIECI E VENTI 4” betekent 10:24 (10:20 + 00:04), “SONO LE DIECI MENO QUINDICI 2” betekent 09:47 (09:45 + 00:02)

Montage

  • Open het frame en maak het glas goed schoon
  • Bedrukking invoegen in acetaat
  • Plaats het afdrukpapier
  • Voeg het raster in
  • Plaats het paneel met de LED's
  • Plak een stuk triplex, een beetje 'groter dan de schakelkast
  • Beveilig met zelftappende schroeven de schakelkast

Let goed op de uitlijning van de twee afdrukken

Locatie

Heb haar in de woonkamer gezet en ziet er goed uit.

Code

  • Italiaanse WordClock
Italiaanse WordClockArduino
/*:Project:WordClock:Auteur:Tiziano Bianchettin:Datum:25/09/2016:Revisie:1:Licentie:Publiek domeindank aan: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/ Mijn professor in het elektronicalaboratorium "Perito Carli" *///*********** bibliotheken***************//# include #include #include #include //***********neopixel********** ******//#define PIN 9 // pin neopixel#define NUM_LEDS 144 // 12 x 12#define GIORNO 255 ​​// full on#define SERA 25 // een tiende onAdafruit_NeoPixel strip =Adafruit_NeoPixel(NUM_LEDS, PIN , NEO_GRB + NEO_KHZ800); // 144 led, pin 9int intBrightness;//******************** KLEUREN ***********//uint32_t Rood =strip. Kleur (255, 0, 0); uint32_t Groen =strip.Kleur( 0, 255, 0);uint32_t Blauw =strip.Kleur( 0, 0, 255);uint32_t Wit =strip.Kleur( 255, 255, 255);uint32_t Geel =strip.Kleur( 255 , 255, 0);uint32_t Paars =strip.Kleur( 60, 0, 255);uint32_t Uit =strip.Kleur( 0, 0, 0);LiquidCrystal_I2C lcd(0x27,16,2); // Display I2C 16 x 2RTC_DS1307 RTC;int P1=6; // Knop SET MENU'int P2=7; // Knop +int P3=8; // Button -int oraagg;int minagg;int annoagg;int meseagg;int dayagg;int menu =0;int ora;//*******Presentatie*********//int txtSONO[] ={1,2,3,4,6,7,9,10,11,-1};//********Uren*********//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};//********Gefeliciteerd met je verjaardag*********//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};//******* Minuten*********//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,TR};int txtVENTI[] ={139,140,TR}; {126,127.128,129,130,131,-1};void setup(){ strip.begin(); strip.show(); lcd.begin(); lcd.achtergrondverlichting(); lcd.wissen(); pinMode(P1,INPUT); pinMode(P2,INPUT); pinMode (P3, INGANG); Serieel.begin(9600); Draad.begin(); RTC.begin(); if (! RTC.isrunning()) { Serial.println("RTC is NIET actief!"); // Stel de datum en tijd in tijdens het compileren RTC.adjust (DateTime(__DATE__, __TIME__)); } // RTC.adjust(DateTime(__DATE__, __TIME__)); // "//" verwijderen om de tijd aan te passen // Het standaarddisplay toont de datum en tijd int menu=0;} void loop(){ // controleer of u op de SET-knop drukt en verhoog de menu-index if(digitalRead( P1)) { menu=menu+1; }// in welke subroutine moeten we gaan? if (menu==0) { DisplayDateTime(); // ongeldig DisplayDateTime DateTime nu =RTC.now (); if((now.hour()>=19) || (now.hour() <7 )){ // pas helderheid dag - nacht aan intBrightness =SERA; } else{ intBrightness =GIORNO; } strip.setBrightness(intBrightness); strip.show(); int timeMin =nu.minuut(); int modMin =tijdMin % 5; // https://www.arduino.cc/en/Reference/Modulo if (modMin ==0){ // elke minuut veranderen de LED's van kleur en lichten het corresponderende nummer paintWord(txtSONO, White) op; paintWord (txtMQUATTRO, UIT); } else if (modMin ==1){ paintWord(txtSONO, Geel); paintWord (txtMUNO, Rood); } else if (modMin ==2){ paintWord(txtSONO, Groen); paintWord(txtMUNO, Uit); paintWord(txtMDUE, Blauw); } else if (modMin ==3){ paintWord(txtSONO, Blauw); paintWord(txtMDUE, Uit); paintWord (txtMTRE, Groen); } else if (modMin ==4){ paintWord(txtSONO, Red); paintWord(txtMTRE, Uit); paintWord (txtMQUATTRO, Geel); } Uurklok(); // ongeldig HourClock MinuteClock (); // ongeldig MinuteClock Auguri(); // ongeldig 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(); vertraging (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 rood, byte groen, byte blauw) { #ifdef ADAFRUIT_NEOPIXEL_H // NeoPixel strip.setPixelColor (Pixel, strip.Color (rood, groen, blauw)); #endif #ifndef ADAFRUIT_NEOPIXEL_H // FastLED leds[Pixel].r =rood; leds[Pixel].g =groen; leds[Pixel].b =blauw; #endif}void setAll(byte rood, byte groen, byte blauw) { for(int i =0; i =40){ // van de 40 minuten, voeg 1 toe aan "hour" ora =ora+1; } switch (ora ) { case 0:case 12:case 24:paintWord(txtUNDICI, Off); strip.show(); if (modMin ==0){ paintWord (txtDODOCI, Wit); strip.show(); } else if (modMin ==1){ paintWord(txtDODOCI, Geel); strip.show(); } else if (modMin ==2){ paintWord(txtDODOCI, Groen); strip.show(); } else if (modMin ==3){ paintWord(txtDODOCI, Blauw); strip.show(); } else if (modMin ==4){ paintWord(txtDODOCI, Rood); strip.show(); } pauze; casus 1:casus 13:paintWord(txtDODOCI, Uit); strip.show(); if (modMin ==0){ paintWord (txtUNA, Wit); strip.show(); } else if (modMin ==1){ paintWord(txtUNA, Geel); strip.show(); } else if (modMin ==2){ paintWord(txtUNA, Groen); strip.show(); } else if (modMin ==3){ paintWord(txtUNA, Blauw); strip.show(); } else if (modMin ==4){ paintWord(txtUNA, Red); strip.show(); } pauze; geval 2:geval 14:paintWord(txtUNA, Uit); strip.show(); if (modMin ==0){ paintWord(txtDUE, Wit); strip.show(); } else if (modMin ==1){ paintWord(txtDUE, Geel); strip.show(); } else if (modMin ==2){ paintWord(txtDUE, Groen); strip.show(); } else if (modMin ==3){ paintWord(txtDUE, Blue); strip.show(); } else if (modMin ==4){ paintWord(txtDUE, Red); strip.show(); }pauze; geval 3:geval 15:paintWord(txtDUE, Uit); strip.show(); if (modMin ==0){ paintWord (txtTRE, Wit); strip.show(); } else if (modMin ==1){ paintWord(txtTRE, Geel); strip.show(); } else if (modMin ==2){ paintWord(txtTRE, Groen); strip.show(); } else if (modMin ==3){ paintWord(txtTRE, Blue); strip.show(); } else if (modMin ==4){ paintWord(txtTRE, Red); strip.show(); } pauze; geval 4:geval 16:paintWord(txtTRE, Uit); strip.show(); if (modMin ==0){ paintWord (txtQUATTRO, Wit); strip.show(); } else if (modMin ==1){ paintWord(txtQUATTRO, Geel); strip.show(); } else if (modMin ==2){ paintWord(txtQUATTRO, Groen); strip.show(); } else if (modMin ==3){ paintWord(txtQUATTRO, Blue); strip.show(); } else if (modMin ==4){ paintWord(txtQUATTRO, Red); strip.show(); } pauze; geval 5:geval 17:paintWord (txtQUATTRO, Uit); strip.show(); if (modMin ==0){ paintWord (txtCINQUE, Wit); strip.show(); } else if (modMin ==1){ paintWord(txtCINQUE, Geel); strip.show(); } else if (modMin ==2){ paintWord(txtCINQUE, Groen); strip.show(); } else if (modMin ==3){ paintWord(txtCINQUE, Blue); strip.show(); } else if (modMin ==4){ paintWord(txtCINQUE, Red); strip.show(); } pauze; geval 6:geval 18:paintWord (txtCINQUE, Uit); strip.show(); if (modMin ==0){ paintWord (txtSEI, Wit); strip.show(); } else if (modMin ==1){ paintWord(txtSEI, Geel); strip.show(); } else if (modMin ==2){ paintWord(txtSEI, Groen); strip.show(); } else if (modMin ==3){ paintWord(txtSEI, Blauw); strip.show(); } else if (modMin ==4){ paintWord(txtSEI, Rood); strip.show(); } pauze; geval 7:geval 19:paintWord(txtSEI, Uit); strip.show(); if (modMin ==0){ paintWord (txtSETTE, Wit); strip.show(); } else if (modMin ==1){ paintWord(txtSETTE, Geel); strip.show(); } else if (modMin ==2){ paintWord(txtSETTE, Groen); strip.show(); } else if (modMin ==3){ paintWord(txtSETTE, Blauw); strip.show(); } else if (modMin ==4){ paintWord(txtSETTE, Rood); strip.show(); } pauze; geval 8:geval 20:paintWord(txtSETTE, Uit); strip.show(); if (modMin ==0){ paintWord(txtOTTO, Wit); strip.show(); } else if (modMin ==1){ paintWord(txtOTTO, Geel); strip.show(); } else if (modMin ==2){ paintWord(txtOTTO, Groen); strip.show(); } else if (modMin ==3){ paintWord(txtOTTO, Blauw); strip.show(); } else if (modMin ==4){ paintWord(txtOTTO, Rood); strip.show(); } pauze; geval 9:geval 21:paintWord(txtOTTO, Uit); strip.show(); if (modMin ==0){ paintWord (txtNOVE, Wit); strip.show(); } else if (modMin ==1){ paintWord(txtNOVE, Geel); strip.show(); } else if (modMin ==2){ paintWord(txtNOVE, Groen); strip.show(); } else if (modMin ==3){ paintWord(txtNOVE, Blauw); strip.show(); } else if (modMin ==4){ paintWord(txtNOVE, Rood); strip.show(); } pauze; geval 10:geval 22:paintWord(txtNOVE, Uit); strip.show(); if (modMin ==0){ paintWord(txtDIECI, Wit); strip.show(); } else if (modMin ==1){ paintWord(txtDIECI, Geel); strip.show(); } else if (modMin ==2){ paintWord(txtDIECI, Groen); strip.show(); } else if (modMin ==3){ paintWord(txtDIECI, Blauw); strip.show(); } else if (modMin ==4){ paintWord(txtDIECI, Rood); strip.show(); } pauze; geval 11:geval 23:paintWord(txtDIECI, Uit); strip.show(); if (modMin ==0){ paintWord (txtUNDICI, Wit); strip.show(); } else if (modMin ==1){ paintWord(txtUNDICI, Geel); strip.show(); } else if (modMin ==2){ paintWord(txtUNDICI, Groen); strip.show(); } else if (modMin ==3){ paintWord(txtUNDICI, Blauw); strip.show(); } else if (modMin ==4){ paintWord(txtUNDICI, Red); strip.show(); }pauze; }}void MinuteClock(){ DateTime nu =RTC.now(); int timeMin =nu.minuut(); int modMin =tijdMin % 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, Wit); paintWord (txtMCINQUE, Wit); strip.show(); } else if (modMin ==1){ paintWord(txtE, Geel); paintWord (txtMCINQUE, Geel); strip.show(); } else if (modMin ==2){ paintWord(txtE, Groen); paintWord (txtMCINQUE, Groen); strip.show(); } else if (modMin ==3){ paintWord(txtE, Blue); paintWord (txtMCINQUE, Blauw); strip.show(); } else if (modMin ==4){ paintWord(txtE, Red); paintWord (txtMCINQUE, Rood); strip.show(); }pauze; geval 10:geval 11:geval 12:geval 13:geval 14:paintWord(txtMCINQUE, Uit); strip.show(); if (modMin ==0){ paintWord (txtE, Wit); paintWord (txtMDIECI, Wit); strip.show(); } else if (modMin ==1){ paintWord(txtE, Geel); paintWord (txtMDIECI, Geel); strip.show(); } else if (modMin ==2){ paintWord(txtE, Groen); paintWord (txtMDIECI, Groen); strip.show(); } else if (modMin ==3){ paintWord(txtE, Blue); paintWord (txtMDIECI, Blauw); strip.show(); } else if (modMin ==4){ paintWord(txtE, Red); paintWord (txtMDIECI, Rood); strip.show(); } pauze; geval 15:geval 16:geval 17:geval 18:geval 19:paintWord(txtMDIECI, Uit); strip.show(); if (modMin ==0){ paintWord (txtE, Wit); paintWord(txtQUINDICI, Wit); strip.show(); } else if (modMin ==1){ paintWord(txtE, Geel); paintWord(txtQUINDICI, Geel); strip.show(); } else if (modMin ==2){ paintWord(txtE, Groen); paintWord(txtQUINDICI, Groen); strip.show(); } else if (modMin ==3){ paintWord(txtE, Blue); paintWord(txtQUINDICI, Blauw); strip.show(); } else if (modMin ==4){ paintWord(txtE, Red); paintWord(txtQUINDICI, Rood); strip.show(); }pauze; geval 20:geval 21:geval 22:geval 23:geval 24:paintWord(txtQUINDICI, Uit); strip.show(); if (modMin ==0){ paintWord (txtE, Wit); paintWord (txtVENTI, Wit); strip.show(); } else if (modMin ==1){ paintWord(txtE, Geel); paintWord(txtVENTI, Geel); strip.show(); } else if (modMin ==2){ paintWord(txtE, Groen); paintWord (txtVENTI, Groen); strip.show(); } else if (modMin ==3){ paintWord(txtE, Blue); paintWord (txtVENTI, Blauw); strip.show(); } else if (modMin ==4){ paintWord(txtE, Red); paintWord(txtVENTI, Rood); strip.show(); }pauze; geval 25:geval 26:geval 27:geval 28:geval 29:if ( modMin ==0){ paintWord(txtE, White); paintWord (txtVENTI, Wit); paintWord (txtMCINQUE, Wit); strip.show(); } else if (modMin ==1){ paintWord(txtE, Geel); paintWord(txtVENTI, Geel); paintWord (txtMCINQUE, Geel); strip.show(); } else if (modMin ==2){ paintWord(txtE, Groen); paintWord (txtVENTI, Groen); paintWord(txtMCINQUE, Green);...Dit bestand is afgekapt, download het om de volledige inhoud te zien.
Italiaanse WordClock

Aangepaste onderdelen en behuizingen

wordklock_aWvuaZRw4N.svg

Schema's

wordklock_JBoZPYrsYr.fzz

Productieproces

  1. Dorstalarm plantalarm
  2. Eenvoudige Word Clock (Arduino)
  3. Word Clock met minutenresolutie van tijd in woorden
  4. Sigfox kWh-meter
  5. Bluetooth-temperatuurmeter
  6. Gebarengestuurd slot
  7. The Companion IC
  8. USB MIDI-adapter
  9. Een geïsoleerde analoge ingang voor Arduino
  10. RGB 32-bands audiospectrumvisualizer
  11. Meet je reactietijd