Cov txheej txheem:

Mr Tracker: 3 Kauj Ruam
Mr Tracker: 3 Kauj Ruam

Video: Mr Tracker: 3 Kauj Ruam

Video: Mr Tracker: 3 Kauj Ruam
Video: Introducing Meta Quest 3 | Coming This Fall 2024, Kaum ib hlis
Anonim
Yawg Tracker
Yawg Tracker

Solar tracker muab 30% hluav taws xob ntau dua li qub Solar vaj huam sib luag

  • Nyob Zoo Xav ua koj tus kheej Solar Tracker.
  • Nov yog qee cov kauj ruam yooj yim uas koj tuaj yeem ua rau koj tus kheej lub hnub ci tracker.

Cov Khoom Yuav Tsum Tau

  • Pawg Mov Ci
  • Aurdino Uno/Nano/Pro mini
  • 9 v pin
  • 2 hnub ci pannels (Txhua qhov loj me)
  • 2 LDR (yog tias koj xav ua 2 axis yog li koj yuav xav tau 4 LDR).
  • Jumper xov hlau
  • Daim npav ntawv
  • 1 Servo tsav

Kauj Ruam 1: Txheeb Cov Duab no Yuav Ua Li Cas Lub Circuit Yuav Ua

Txheeb Daim Duab No Yuav Ua Li Cas Lub Circuit Yuav Ua
Txheeb Daim Duab No Yuav Ua Li Cas Lub Circuit Yuav Ua

Kauj Ruam 2: Yuav Ua Li Cas Code

Yog tias koj tsis paub txog servo moter. Servo tig xwb 180 degree. qhov zoo ntawm kev siv servo yog nyob ntawm peb ntau npaum li cas peb xav tig.

LDR, Kev tiv thaiv ntawm LDR qis thaum nws lub teeb ntau dhau thiab hauv qhov tsaus ntuj nws muaj kev tiv thaiv siab heev. Peb yuav tso tus lej Sab Hauv Yog tias mob li ntawd peb tuaj yeem yooj yim tig peb lub hnub ci vaj huam sib luag siv qhov tsis kam ntawm ldr.

Koj tuaj yeem sau koj tus kheej cov cai rau lub hnub ci tracker. Raws li koj lub hnub ci tracker tsim.

Code ntawm kuv lub hnub ci tracker yog:-

Kauj ruam 3: Code:-

#suav nrog Servo sg90; int pib_position = 90; int LDR1 = A0; // txuas LDR1 ntawm tus pin A0

int LDR2 = A1; // Txuas LDR2 ntawm tus pin A1

int yuam kev = 5;

int servopin = 9; // Koj tuaj yeem hloov servo tsuas yog ua kom nws nyob ntawm arduino's PWM tus pin

void teeb tsa ()

{

sg90.attach (servopin);

pinMode (LDR1, INPUT); pinMode (LDR2, INPUT);sg90.write (initial_position);

// Tsiv servo ntawm 90 degree

ncua (2000); }

void lub voj ()

{

int R1 = analogRead (LDR1); // nyeem LDR 1

int R2 = analogRead (LDR2); // nyeem LDR 2 int diff1 = abs (R1 - R2); int diff2 = abs (R2 - R1);yog ((diff1 <= yuam kev) || (diff2 <= yuam kev)) {}

lwm tus {

yog tias (R1> R2)

{

yog (initial_position> 60) {initial_position = --initial_position;

}

} yog (R1 <R2) {

yog (initial_position <120) {initial_position = ++ initial_position; }}} sg90.write (initial_position); ncua (50);

}

Pom zoo: