Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pm:prj2022:agmocanu:solartracker [2022/05/11 23:01]
bogdan_florin.cutur
pm:prj2022:agmocanu:solartracker [2022/05/27 13:13] (current)
bogdan_florin.cutur
Line 10: Line 10:
 The 4 photoresistors change their resistance depending on how much light hits them so that when it is dark they have a high resistance and when light hits them they have a lower resistance. Using a voltage divider we can determine which side is darker or more illuminated and move the device with the servomotors accordingly so that all photoresistors have similar resistances. A solar panel will be mounted on the platform controlled by the motors and it will attempt to power an LED. The 4 photoresistors change their resistance depending on how much light hits them so that when it is dark they have a high resistance and when light hits them they have a lower resistance. Using a voltage divider we can determine which side is darker or more illuminated and move the device with the servomotors accordingly so that all photoresistors have similar resistances. A solar panel will be mounted on the platform controlled by the motors and it will attempt to power an LED.
  
-{{:​pm:​prj2022:​agmocanu:​cutur_bogdan_schema_bloc.png?800|}}+{{:​pm:​prj2022:​agmocanu:​cutur_bogdan_schema-v2.png?700|}}
  
  
Line 23: Line 23:
   * resistors   * resistors
   * breadboard   * breadboard
 +
 +{{:​pm:​prj2022:​agmocanu:​cutur_bogdan_el_diag_solar_tracker.png?​800|}}
  
  
 ===== Software Design ===== ===== Software Design =====
  
 +int topleft;
 +int topright;
 +int downleft;
 +int downright;
 +int waittime = 1;
  
-<note tip> +void setup() { 
-Descrierea codului aplicaţiei ​(firmware): +  ​pinMode(9, OUTPUT)
-  ​* mediu de dezvoltare ​(if any) (e.g. AVR StudioCodeVisionAVR+  pinMode(10OUTPUT); 
-  ​* librării şi surse 3rd-party ​(e.g. Procyon AVRlib+  ​TCCR1A = 0; 
-  ​* algoritmi şi structuri pe care plănuiţi să le implementaţi +  TCCR1A = (1 << COM1A1| (1 << COM1B1) | (1 << WGM11); 
-  ​(etapa 3surse şi funcţii implementate +  ​TCCR1B = 0; 
-</note>+  ​TCCR1B = (1 << WGM13| (1 << WGM12) | (1 << CS11); 
 +  ICR1 = 40000; 
 +  OCR1A = 3000; 
 +  OCR1B = 3600; 
 +}
  
-===== Rezultate Obţinute =====+void loop() { 
 +  topleft ​analogRead(A0);​ 
 +  topright ​analogRead(A1);​ 
 +  downleft ​analogRead(A2);​ 
 +  downright ​analogRead(A3);​
  
-<note tip+  if (topleft > topright) { 
-Care au fost rezultatele obţinute în urma realizării proiectului vostru. +    OCR1A = OCR1A + 1; 
-</note>+    delay(waittime);​ 
 +  } 
 +  if (downleft > downright) { 
 +    OCR1A = OCR1A + 1; 
 +    delay(waittime);​ 
 +  } 
 +  if (topleft ​topright) { 
 +    OCR1A = OCR1A - 1; 
 +    delay(waittime);​ 
 +  } 
 +  if (downleft < downright) { 
 +    OCR1A = OCR1A - 1; 
 +    delay(waittime);​ 
 +  } 
 +  if (OCR1A ​4000) { 
 +    OCR1A = 4000; 
 +  } 
 +  if (OCR1A ​2000) { 
 +    OCR1A = 2000; 
 +  } 
 +  if (topleft ​downleft) { 
 +    OCR1B = OCR1B - 1; 
 +    delay(waittime);​ 
 +  } 
 +  if (topright > downright) { 
 +    OCR1B = OCR1B - 1; 
 +    delay(waittime);​ 
 +  } 
 +  if (topleft < downleft) { 
 +    OCR1B = OCR1B + 1; 
 +    delay(waittime);​ 
 +  } 
 +  if (topright < downright) { 
 +    OCR1B = OCR1B + 1; 
 +    delay(waittime);​ 
 +  } 
 +  if (OCR1B > 4200) { 
 +    OCR1B = 4200; 
 +  } 
 +  if (OCR1B < 2400) { 
 +    OCR1B = 2400; 
 +  } 
 +}
  
-===== Concluzii ===== 
  
-===== Download ​=====+===== Rezultate Obţinute ​=====
  
-<note warning>​ +Video with the end result:
-O arhivă (sau mai multe dacă este cazul) cu fişierele obţinute în urma realizării proiectuluisurse, scheme, etc. Un fişier README, un ChangeLog, un script de compilare şi copiere automată pe uC crează întotdeauna o impresie bună ;-).+
  
-Fişierele se încarcă pe wiki folosind facilitatea **Add Images or other files**. Namespace-ul în care se încarcă fişierele este de tipul **:pm:​prj20??:​c?​** sau **:​pm:​prj20??:​c?:​nume_student** (dacă este cazul)**Exemplu:​** Dumitru Alin, 331CC -> **:​pm:​prj2009:​cc:​dumitru_alin**. +https://drive.google.com/file/​d/​1BW08E6qgRL3nlCCXdpT7-novVfuvH9Ry/​view?​usp=sharing
-</note>+
  
-===== Jurnal ===== 
  
-<note tip> +===== Concluzii ===== 
-Puteți avea și o secțiune de jurnal în care să poată urmări asistentul de proiect progresul proiectului. +The solar tracker manages to follow the light well in all directions limited by the maximum rotation angle of the servomotors. Due to imbalances in the construction of the frame the tracker overshoots its movement due to the inertia of the frame and that causes a slight wiggle.
-</​note>​+
  
-===== Bibliografie/​Resurse ​=====+===== Download ​=====
  
-<​note>​ 
-Listă cu documente, datasheet-uri,​ resurse Internet folosite, eventual grupate pe **Resurse Software** şi **Resurse Hardware**. 
-</​note>​ 
  
 <​html><​a class="​media mediafile mf_pdf"​ href="?​do=export_pdf">​Export to PDF</​a></​html>​ <​html><​a class="​media mediafile mf_pdf"​ href="?​do=export_pdf">​Export to PDF</​a></​html>​
  
pm/prj2022/agmocanu/solartracker.1652299314.txt.gz · Last modified: 2022/05/11 23:01 by bogdan_florin.cutur
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0