18 January, 2024
0 Comments
3 categories

ସର୍କିଟ ଡାଇଗ୍ରାମ

ମାଇକ୍ରୋକଣ୍ଟ୍ରୋଲର କୋଡ୍
//Su-Din Technology "Parabolic reflector tracking"
//CONTROL SIGNAL WIRE OF SERVO MUST BE ATTACHED TO A PWM PIN OF ARDUINO
#include<Servo.h>
Servo s1;
int readPin=A0;
int readVal;
float V=0;
int i;
void setup() {
pinMode(readPin,INPUT);
Serial.begin(9600);
s1.attach(9);//Control wire of servo to PWM pin 9
s1.write(i=0); /*when project is initially powered,
servo angle=0, to set it towards EAST.THIS IS A RESET OF
PROJECT*/
}
void loop()
{
readVal=analogRead(readPin);/*We have to read the analog voltage value at pin A0 which is developed at pin 3 of 555 ic when light falls on LDR*/
V=(5./1023.)*readVal;
Serial.print(V);
Serial.println("volts");
delay(500);
if(V>3.0){
for(i=0; i<=15; i+=1){
s1.write(i);
delay(100);/*These 100 has a meaning,if you write 5000 ,you will notice nothing*/
s1.write(15); }
delay(3000);
for(i=16; i<=30; i+=1){
s1.write(i);
delay(100);
s1.write(30); }
delay(3000);
for(i=31; i<=45; i+=1){
s1.write(i);
delay(100);
s1.write(45); }
delay(3000);
for(i=46; i<=60; i+=1){
s1.write(i);
delay(100);
s1.write(60); }
delay(3000);
for(i=61; i<=75; i+=1){
s1.write(i);
delay(100);
s1.write(75); }
delay(3000);
for(i=76; i<=90; i+=1){
s1.write(i);
delay(100);
s1.write(90); }
delay(3000);
for(i=91; i<=105; i+=1){
s1.write(i);
delay(100);
s1.write(105); }
delay(3000);
for(i=106; i<=120; i+=1){
s1.write(i);
delay(100);
s1.write(120); }
delay(3000);
for(i=121; i<=135; i+=1){
s1.write(i);
delay(100);
s1.write(135); }
delay(3000);
for(i=136; i<=150; i+=1){
s1.write(i);
delay(100);
s1.write(150); }
delay(3000);
for(i=151; i<=165; i+=1){
s1.write(i);
delay(100);
s1.write(165); }
delay(3000);
for(i=166; i<=179; i+=1){
s1.write(i);
delay(100);
s1.write(179); }
delay(3000);
}
if(i==180){ /*This loop is to send back the shaft of servo again towards EAST after it has reached WEST*/
for(i=180; i>=0; i-=1){
s1.write(i);
delay(100);
}
delay(4000);
}
}
Designer:
Er. Anil Kumar Prusty
Phone No. :- 9861004895
Tags: parabolic mirror solar cookerparabolic reflector parabolic reflector solar cooker parabolic reflector solar hot water heater parabolic reflector solar oven parabolic reflector thermal power plant sun tracking of parabolic reflector