Show Posts
Pages: [1] 2 3 ... 49
1  Using Arduino / Project Guidance / Re: Adjusting DS1307 time in hardware on: Today at 03:18:33 am
I meant to say . Using selector switch for date and time. if we can use below component How  to use in arduino

http://www.directindustry.com/prod/elma-electronic/rotational-switches-6089-451042.html


2  Using Arduino / Project Guidance / Adjusting DS1307 time in hardware on: Today at 03:00:19 am
Dear all.

I would like to know is there any way to set RTC date and time using External hardware.
Below code is working  fine for me. I would like to adjust date / time by external hardware. Instead of software.

If any one know suggestion help me out.




Code:
#include "Wire.h"
#define DS1307_ADDRESS 0x68
byte zero = 0x00; //workaround for issue #527

void setup(){
  Wire.begin();
  Serial.begin(9600);
  setDateTime(); //MUST CONFIGURE IN FUNCTION
}

void loop(){
  printDate();
  delay(1000);
}

void setDateTime(){

  byte second =      45; //0-59
  byte minute =      41; //0-59
  byte hour =        8; //0-23
  byte weekDay =    2; //1-7
  byte monthDay =    16; //1-31
  byte month =  7; //1-12
  byte year  =       14; //0-99

  Wire.beginTransmission(DS1307_ADDRESS);
  Wire.write(zero); //stop Oscillator

  Wire.write(decToBcd(second));
  Wire.write(decToBcd(minute));
  Wire.write(decToBcd(hour));
  Wire.write(decToBcd(weekDay));
  Wire.write(decToBcd(monthDay));
  Wire.write(decToBcd(month));
  Wire.write(decToBcd(year));

  Wire.write(zero); //start

  Wire.endTransmission();

}

byte decToBcd(byte val){
// Convert normal decimal numbers to binary coded decimal
  return ( (val/10*16) + (val%10) );
}

byte bcdToDec(byte val)  {
// Convert binary coded decimal to normal decimal numbers
  return ( (val/16*10) + (val%16) );
}

void printDate(){

  // Reset the register pointer
  Wire.beginTransmission(DS1307_ADDRESS);
  Wire.write(zero);
  Wire.endTransmission();

  Wire.requestFrom(DS1307_ADDRESS, 7);

   int second = bcdToDec(Wire.read());
  int minute = bcdToDec(Wire.read());
  int hour = bcdToDec(Wire.read() & 0b111111); //24 hour time
  int weekDay = bcdToDec(Wire.read()); //0-6 -> sunday - Saturday
  int monthDay = bcdToDec(Wire.read());
  int month = bcdToDec(Wire.read());
  int year = bcdToDec(Wire.read());

 /*  int second = 11;
  int minute =18;
  int hour = 18;
  int weekDay = 1;
  int monthDay = 2;
  int month = 11;
  int year = 12;
*/
  //print the date EG   3/1/11 23:59:59
  Serial.print(monthDay);
  Serial.print("/");
 
 
  Serial.print(month);
  Serial.print("/");
 
  Serial.print(year);
  Serial.print(" ");
  Serial.print(hour);
  Serial.print(":");
  Serial.print(minute);
  Serial.print(":");
  Serial.println(second);

}

3  Using Arduino / General Electronics / PCB schematic on: Today at 12:41:18 am
Dear all.

Here  I am trying to build my own UNo eliminating unnecessary component used in project. I have eleimnated USB part and i wanted to upload code using avr pocket programmer

https://www.sparkfun.com/products/9825
Please let me know what are changes to made need to work.

I have attched my schematic here.
4  Using Arduino / General Electronics / Selection of tilt sensor on: July 22, 2014, 12:11:51 am
Dear all,
I am looking for tilt sensor IC . which can out put analog voltage 0~5v.
Can you suggest the IC model available . easily compatible with arduino board.

The measuring range of the sensor must be around +/-90 degree.

1.   https://www.sparkfun.com/products/10313
2.   http://www.analog.com/en/mems-sensors/mems-inertial-sensors/products/index.html
3.   http://aitendo3.sakura.ne.jp/aitendo_data/product_img/sensor/MMA7260Q/MMA7260QT_AN3107.pdf
4.   http://in.element14.com/freescale-semiconductor/mma8451qr1/accelerometer-3-axis-8g-14bit-16qfn/dp/2238134?in_merch=true&MER=MER-L52-L5IB-PD-ACC-SMT
5.   http://in.element14.com/freescale-semiconductor/mma6331lt/ic-2-axis-accelerometer-4g-12g/dp/1908973
6.   http://in.element14.com/freescale-semiconductor/mma2241keg/accelerometer-x-axis-16soic/dp/2080500


here i have attached some tilt sensor i explored.I dont how to choose these sensor.

what is meant by Acceleration Range: ± 10g . What is used for.
5  Using Arduino / Project Guidance / Re: Dual axis tracker design on: July 20, 2014, 11:21:50 pm
I got all my angle correctly. I am facing problem to convert inclinometer sensor out put.for 360 degree format.
This How i am converting my angle
Code:
float  ARDUINO_ANALOG_SCALING =0.00322265625;
void Calc_INC_Pos()
{

  Inc_Sensor90_Value= analogRead(A0);
  Inc_Sensor360_Value= analogRead(A1);

Voltage90_Value= Inc_Sensor90_Value*ARDUINO_ANALOG_SCALING;
  Voltage360_value= Inc_Sensor360_Value*ARDUINO_ANALOG_SCALING;
tracker_actual_elevation = 45*  Voltage90_Value - 112.5 ;
 tracker_actual_azimuth=45*Voltage360_value-112.5;
}


6  Using Arduino / Project Guidance / Re: Dual axis tracker design on: July 18, 2014, 11:27:30 pm
I have tested With Nrel code, NOAA data. I found azimuth and zenith angle are almost equal.
Question i am asking here is Which are two  angles need to be considered for dual axis tracker??

If it single axis tracker we consider altitude/ elevation angle to measure angle.

In excel sheet attached .I found That after 12PM the azimuth angle is going to 21 to Directly 360 degree.
Is here angle need to be subtracted like mention in the link
http://www.pveducation.org/pvcdrom/properties-of-sunlight/azimuth-angle

I have output file attached  i got it from controller.

NOTE: azimuth. Elevation are almost same with 0.05 degree accuracy. compared to NREL & NOAA data
7  Using Arduino / Project Guidance / Re: Dual axis tracker design on: July 18, 2014, 12:25:44 am
Here i am attaching Excel sheet of my calculation.
Let me know Which part i have  gone wrong.

Altitude angle is consider from below link
http://www.susdesign.com/popups/sunangle/altitude.php

I am subtracting 360-Azimuth if my actual local time going beyond 12 noon. calculation based on
http://www.pveducation.org/pvcdrom/properties-of-sunlight/azimuth-angle

I stay in INDIA, Bangalore region . SO what should i need to consider my angles.
pseudo code
Code:
if(hour_angle> 7Am &  hour_angle <12)
{
tracker_des_azimuth=calculated_azimuth;
tracker_des_elevation=-(90-altitude);
}else
{
tracker_des_azimuth=360-calculated_azimuth;
tracker_des_elevation=(90-altitude);
}


As per me elevation angle are correct. But Azimuth angle converted are wrong i think. Please help me out here




8  Using Arduino / Project Guidance / Re: Dual axis tracker design on: July 16, 2014, 11:06:06 pm
Code:
The zenith and azimuth columns for the rows you highlighted look credible for a position in the southern hemisphere that was within about eight degrees of the equator, with dawn slightly before 06:00 and dusk slightly before 19:00. You could verify them yourself just by checking whether each pair of figures accurately reflects the position of the sun at that time.

is there any software to check it so i can verify answer.
9  Using Arduino / Project Guidance / Re: Dual axis tracker design on: July 15, 2014, 11:39:00 pm
Now all points are cleared. How to check Whether postion i calculated is pointing toward the sun.Here iam attaching output xls i got from nrel .

If i am wrong let me know.
10  Using Arduino / General Electronics / Power Isolation Circuit Arduino on: July 15, 2014, 07:22:38 am
Dear all,

I am trying to build power isolation circuit between USB and Power supply.

Like in ardunio UNO  they used lp2985-33DBVr are connected.
I am using 7812 & 7805  7805 to  turn on MC  and 7812 for sensor input.
I need isolation between USB power supply & 7805 When it powered through USB. Is there any link where i can copy the schematic.
11  Using Arduino / Project Guidance / Re: Dual axis tracker design on: July 15, 2014, 06:59:52 am
if i am not wrong . I cant also express what i have understood due improper sentence

Please answer with yes or no. If not why??
These points are expected or not
1) zenith and azimuth gives sun direction right ya wrong??
2) altitude give sun elevation angle right ya wrong??
3)for dual axis tracker i need to consider azimuth along x dir that circular and altitude angle y direction for vertical motion.
The respective angle for day is attached in below . it relevant to one day. ?? Please let me know whether i calculated right or wrong.
formula taken from herehttp://www.susdesign.com/popups/sunangle/altitude.php


Quote
You need to know your current position and the current time. You need to calculate the direction of the sun at that position and time, for example as an azimuth angle and zenith/elevation angle. You need to position your actuators to point your device in that direction. You need to repeat this periodically so that the device tracks the sun as it moves. I'm sorry if it sounds patronising to explain something so basic after you've spent this much time working on a solar tracker, but from the way you keep asking about it I'm not at all sure you have grasped the concept.

current time : is calculate from RTC
current position?: still not confirmed
i considered azimuth and altitude angles to determine position.
since actuator as no feedback , i am using inclinometer to adjust angle from reference 0~360 degree  and 0~90 degree.

12  Using Arduino / Project Guidance / Re: Dual axis tracker design on: July 15, 2014, 05:54:25 am
My question Here is Which are the angle need to consider & why.
How could track sun based on These angle.

As links attached above says i.e zenith & azimuth angle use to measure direction of sun & altitude to postion.Which are angle need to consider & why???

In all arduino based tracker they used LDR and moving along zenith and azimuth . Since i am using inclinometer  , how considered angle
13  Using Arduino / Project Guidance / Re: Dual axis tracker design on: July 15, 2014, 01:33:20 am
after all.

http://www.susdesign.com/popups/sunangle/altitude.php

I understood that altitude/ elevation gives exact position of the sun. Which i converted to my inclinometer angle
The altitude angle is calculated as follows:

Altitude =asin( [cos (L) * cos (D) * cos (H)] + [sin (L) * sin (D)])
Converted angle is

sun_pos=90-altitude; in degree.


where:

Al = Solar altitude angle

L = Latitude (negative for Southern Hemisphere)

D = Declination (negative for Southern Hemisphere)

H = Hour angle

If i am correct these relation works. let me know if i am wrong here,

2) Now we know zenith, azimuth which represent direction of sun & altitude represent sun position .

My question
1) which are angle need to be consider for the sun position for dual axis tracker
2) When to actuate the motor/actuator???
3)@ which situation limit switch are triggered  for dual axis tracker.

Here i have also attached output file.



14  Using Arduino / Project Guidance / Re: Dual axis tracker design on: July 14, 2014, 11:41:05 pm
My location is INDIA ,
12.9667° N, 77.5667° E
Code:
You don't "find" the position of the sun from that - it is the position of the sun, expressed as azimuth and zenith angles. It is the answer to the question of which direction do you need to point your solar collector, or whatever it is that you want to track the sun.
I cant understand this statement
Below link gives elevation angle.
http://en.wikipedia.org/wiki/Solar_zenith_angle
http://www.pveducation.org/pvcdrom/properties-of-sunlight/elevation-angle
http://www.susdesign.com/popups/sunangle/altitude.php

Actually i am getting output from Nrel C code.

Julian Day:    2452930.312847
//L:             2.401826e+01   earth heliocentric longitude [degrees]
//B:             -1.011219e-04 degrees earth heliocentric latitude [degrees]
//R:             0.996542 AU earth radius vector [Astronomical Units, AU]
//H:             11.105902 degrees observer hour angle
//Delta Psi:     -3.998404e-03 degrees
//Delta Epsilon: 1.666568e-03 degrees
//Epsilon:       23.440465 degrees
//Zenith:        50.111622 degrees
//Azimuth:       194.340241 degrees
//Incidence:     25.187000 degrees
//Sunrise:       06:12:43 Local Time
//Sunset:        17:20:19 Local Time
15  Using Arduino / Project Guidance / Re: Dual axis tracker design on: July 14, 2014, 07:07:50 am
If that case ,
how can determine the sun position. In below code
http://kokoraskostas.blogspot.gr/p/include-timer.html
why he adjusting  tracker position to zenith and azimuth angle. Can you elobrate so i can understand proper manner .

is there any relation that gives sun postion depend on zenith and azimuth,

If i am wrong, Once we know Direction of sun how can we find sun position.


Quote
I suspect you have misunderstood what azimuth and zenith angles are. They give you a direction relative to your location. If you calculate them for the position of the sun, they give you the direction to the sun. Having calculated them for the sun's position you don't "determine sun position" from them - they are the answer, expressed as an azimuth and zenith angle.
Pages: [1] 2 3 ... 49