RUNNING LINEAR ACTUATOR without feed back

Thread Starter

ajitnayak

Joined Feb 22, 2013
49
Dear all,

I am trying to do single axis solar tracker with linear actuator /rtc/ UNO. I have already done with feedback sensor. Now Here i am trying to without feedback.
Linear actuator specification: 24v , 3.2mm/sec as speed , 600mm stoke.

Desired angle calculation: tracking start from 7am to 18PM, 11hours
Assumed degree: 7AM as -45 deg , 12.30 as 0 degree and 18 pm as 45 degree.
static float slope= 0.00227272727273;
static float intercept=- 102.272727273;
TS=(3600*hour)+(60*minute);
Desire_Degree=(TS*slope)+intercept;


Problem part : calculating actual angle/ calculation for Ton time and convert in to +/-45 degree format.
rate=distance/ time
Ton=600mm/660minute = 10/11 mm each minute
time * 3.2mm/sec = 10mm / 11
time= (25 / 88) sec/minute;
if i wanna run for 2 sec ->(2*88/25)= 7.04 i.e actuator must on for 7 minute;
angle= ((3 * position) / 20) - 45 and
or
position =((angle + 45) * 20) / 3
since position = 3.2 * time
angle =((96 * time) / 200) - 45.
How can i put time here.
can someone help me coding for calculating Ton time and solve above equation. below i posted my code . I need it has to be modified little bit. i need to implement ton time actuator here.

Let me know changes to be made in below code.

Rich (BB code):
Rich (BB code):
double Desire_Degree;
unsigned int TS;
static float slope= 0.00227272727273;
static float intercept=- 102.272727273;
static int length;
double Actual_Degree;
static int h;
static int m;
double Actual_postion;
static float ACT_SPEED=3.2;


void setup()
{
   h=7;
  m=30;
  
  
Serial.begin(9600);  
}
static int time_interval;

void loop()
{
  calc_min();
  //Desire degree calculation
  if(h<23)
  {
  TS=(3600*h)+(60*m);
  Desire_Degree=(TS*slope)+intercept;
  
  //Actual anngle calculation
  time_interval=(10)/(11*ACT_SPEED)*(25/88);
 // length=(TS*3.2);
  length =(0.0151466666667*TS - 381.504);
  Actual_Degree=((3 *length) / 20) - 45;
  
  Actual_postion=((Actual_Degree + 45) * 20) / 3;
  
  
  
 // actual_deg=((3*length)/200)-45;
  Serial.print("HH-MM: ");
  Serial.print(h);Serial.print(":");Serial.println(m);
  Serial.print("Desired Degree:");
 Serial.println(Desire_Degree);
 Serial.print("Actual Degree:");
 Serial.println(Actual_Degree);
 Serial.print("length:");
 Serial.println(length);
 Serial.print("Actual pos:");
 Serial.println(Actual_postion);
Serial.println(".................................");
  
  }  
  delay(1000);
}

void calc_min()
{

if(m<60)
{
   m=m+5;
}else if(m==60)
{
  m=0;h=h+1;
}
}
 
Last edited:

sirch2

Joined Jan 21, 2013
1,071
I may be missing something but it seems you need 600mm over 11 hours giving 0.6/39600m/s = 1.515*10^-5m/s or 0.01515mm/s. So do you not just need to scale this into what ever the actuator is expecting for zero to full travel?

In Arduino Loop is called repeatedly and you have a delay(1000) - i.e. 1 second so your loop will run approximately every second so you need to move the actuator 0.01515mm every loop run. Probably best to increase that to 1 minute delay and move 0.909mm. You will need to factor in things like the time taken to check the RTC etc.
 

Thread Starter

ajitnayak

Joined Feb 22, 2013
49
I may be missing something but it seems you need 600mm over 11 hours giving 0.6/39600m/s = 1.515*10^-5m/s or 0.01515mm/s. So do you not just need to scale this into what ever the actuator is expecting for zero to full travel?

In Arduino Loop is called repeatedly and you have a delay(1000) - i.e. 1 second so your loop will run approximately every second so you need to move the actuator 0.01515mm every loop run. Probably best to increase that to 1 minute delay and move 0.909mm. You will need to factor in things like the time taken to check the RTC etc.

Could you make change in change code. I think also assumed the length as constant here.I am just testing code with fake time.When i use RTC .it should work as expected. Desired angle has no problem.I think this part is wrong because i am considering length constant

length =(0.0151466666667*TS - 381.504); Actual_Degree=((3 *length) / 20) - 45;
 
Last edited:

tshuck

Joined Oct 18, 2012
3,534
Why would you do an open loop control system? You cannot claim it is tracking when there is no feedback.

Over time, the drift in your system will make your equations and controller pretty much useless. If you have a closed loop implementation, why wouldn't you use it?
 

Thread Starter

ajitnayak

Joined Feb 22, 2013
49
I already done closed loop system. They are working fine.This application is where people doesn't matter about angle.

Since i am assuming 7Am as -45 degree ,0degree at12:30PM and 18pm as 45 degree.
During start of each day i am doing init SO to avoid drift in the angle.
 

Thread Starter

ajitnayak

Joined Feb 22, 2013
49
If it doesnot work @ all. Linear actuator with below configuration is better

1) with potentiometer
2) with encoder
3) with hall sensor
4)with limit switches

So i need option that can be controlled using MCU
 

tshuck

Joined Oct 18, 2012
3,534
I already done closed loop system. They are working fine.This application is where people doesn't matter about angle.

Since i am assuming 7Am as -45 degree ,0degree at12:30PM and 18pm as 45 degree.
During start of each day i am doing init SO to avoid drift in the angle.
...and what happens when the earth tilts away from the sun? Your angle is off.

So why make an open loop controller after you've made a closed loop one?

If it doesnot work @ all. Linear actuator with below configuration is better

1) with potentiometer
2) with encoder
3) with hall sensor
4)with limit switches

So i need option that can be controlled using MCU
Why don't you use the same method as before?
 

Thread Starter

ajitnayak

Joined Feb 22, 2013
49
...and what happens when the earth tilts away from the sun? Your angle is off.

So why make an open loop controller after you've made a closed loop one?
Why don't you use the same method as before?

Why don't you use the same method as before?("Which method ur talking about");
We can adjust angle in coding Desire angle earth tilts away from the sun?? It might be periods .
 

tshuck

Joined Oct 18, 2012
3,534
Why don't you use the same method as before?("Which method ur talking about");
You said you had a closed loop implementation. Use whatever sensing method you used then.
We can adjust angle in coding Desire angle earth tilts away from the sun?? It might be periods .
Sounds like a lot more work for something that you already have a closed loop solution for that will work in all cases...:confused:
 

Thread Starter

ajitnayak

Joined Feb 22, 2013
49
You said you had a closed loop implementation. Use whatever sensing method you used then.

Sounds like a lot more work for something that you already have a closed loop solution for that will work in all cases...:confused:

Reason i wanted to go with open loop system is it reduces Inclinometer cost that used in closed loop system.So I am trying to Design.If we use some actuator with linear encoder , we can determine position and also save driver cost.

If i am using linear actuator ALONE IT SAVE ME THE ENCODER AND FEEDBACK COST.

since accuracy is not much important . I thought we can do without any feedback
 

THE_RB

Joined Feb 11, 2008
5,438
You can get a 3-axis accelerometer module from Ebay for about $5, which will work perfectly as a two-axis analogue inclinometer.

The only other costs are some weatherproofing of the tiny module and some wires to it.
 
Top