Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Gabriel

Pages: [1] 2 3 ... 42
1
Hi luiklodwig,

I am a bit puzzled about this one. It's been awhile since I've looked at the program's code, but from what you sent it looks like you have the right idea.

You can rule out the limit switches by disconnecting them. In that case the azimuth motor should just keep turning for a very long time before it reverses direction and then switches to the altitude.

When a stepper motor just "shakes" sometimes it means that the program is set to try and turn it too fast.

It may also be that it is too under powered to turn. There is a potentiometer on most driver boards where you can increase the current to the stepper motor.

You might also try switching driver boards and see if that fixes it. It could be that the azimuth board is bad. Just make sure you don't rewire the boards when they are plugged in as that will probably ruin them.

Once you get the motors moving, then see if you can get the limit switches working.

You probably already have seen this link, but here is a diagram of the circuit if you want to clarify how to wire the limit switches.
http://www.cerebralmeltdown.com/wp-content/uploads//2012/07/SunTrackerCircuit3_bb.pdf

Hope that helps!
Gabriel

2
Hi luiklodwig,

It sounds like it should work. What code did you use to test the stepper motors? When you first reset the Arduino it should start moving the Azimuth stepper motor. You say that the motors "shake for a second". Do they stay powered on in that you can't easily move them by hand, or do they just turn right back off again.

It might be this setting "enableHIGHorLOW". I think by default it should be OK, but maybe it was changed at some point?

Let me know how it goes.

Thanks!
Gabriel

3
Heliostat Projects / Re: DIY Worm Gear Based Heliostat Design
« on: December 07, 2017, 03:01:14 PM »
Looks good!

4
I definitely could have used this when I was writing the code for the program. It is well overdo for an update I think, so I will have to try and integrated this. It's a confusing subject actually, even when you know you have the math right, the fact that microcontrollers are limited in their speed and precision throws a serious wrench into the works.

5
I haven't tried it in awhile, but I was able to install it on my Windows 10 machine and use it without any issue at all. Thanks!

6
This is a bit of a delayed reply, but you shouldn't need anti-backlash nuts. What would be more helpful is more of a say anti-backlash heliostat. So, the altitude and azimuth motions would be pulled in one direction by say a spring or a weight. That would help eliminate any wobble.

Also, It's something that I don't think I have documented well, but the closer you can keep the mirrors towards the axis of rotation the better. There will always be some drift as they get further and further  away, which may or may not be the reason for Paul's drift.

It's technically something that could be compensated for in the software, but it would add yet one more variable to the settings as I believe that you also need to have the distance to the target programmed in. I haven't gotten around to figuring out the math to compensate for it either.

I don't think it would take much to run a heliostat, or heliostats, off of solar. In the grand scheme of things they don't use much power. All they do is move part of a revolution forward and backward in each axis once a day, which amounts to practically nothing for smallish machines.

I actually managed to pick up a solar kit which even has the outdoor box for the batteries and charge controller for $10 dollars where I work, so I am planning on doing pretty much the same thing. Whenever I finally finish 3D printing all of the parts for it. Only 40 more hours of printing to go. ;)


7
Hi luiklodwig,

Those openmv microcontrollers look really cool! This isn't something I've tried before, so I'm not sure what's the best way to do this, but I think you might have to see if anyone has any example code for finding how "bright" the individual pixels are and then moving the motors according to that pixel's location in relation to the center. It's just a thought, but overall you're probably going to have to rely on whatever someone else has already started if you don't want to spend your whole life coding. :)

I think that you could get by without much math really if you can find a library to get you started.

Let us know how it goes.

Thanks!
Gabriel

8
Sun Tracking / Heliostat Program Discussion Board / Re: heliostat
« on: September 23, 2016, 05:06:52 AM »
I'm not sure why it's not showing up. Sometimes you have to click the file in the folder directly. I guess I could have just posted the code in the first place though. :)

The code basically just turns the sun and target's altitude and azimuth into a vector, calculates the half way point between them, and then turns the resulting vector back into altitude and azimuth measurements.

Code: [Select]
//This code calculates the angles for the heliostat (returnaltaz = 1 will return alt, 2 returns az)
void FindHeliostatAltAndAz(float SunsAltitude, float SunsAzimuth, float targetalt, float targetaz, float &machinealt, float &machineaz){

  float x,y,z,z1,z2,x1,x2,y1,y2,hyp,dist;
 
  z1 = sin(to_rad(SunsAltitude));
  hyp = cos(to_rad(SunsAltitude));
  x1 = hyp*cos(to_rad(SunsAzimuth*-1));
  y1 = hyp*sin(to_rad(SunsAzimuth*-1));

  z2 = sin(to_rad(targetalt));
  hyp = cos(to_rad(targetalt));
  x2 = hyp*cos(to_rad(targetaz*-1));
  y2 = hyp*sin(to_rad(targetaz*-1)); 
 
  x=(x1-x2)/2+x2;
  y=(y1-y2)/2+y2;
  z=(z1-z2)/2+z2;
 
  dist=sqrt(x*x+y*y+z*z);
  if ((dist>-0.0001) && (dist <0.0001)){
  dist=0.0001;
  }

  machinealt=to_deg(asin(z/dist));
  machineaz=to_deg(atan2(y*-1,x));

}


9
Hi Boerekos,

I remember you posted a while back. :) Things have been a bit quiet on my end as I haven't had a lot of spare time recently, but have had the chance recently to work on some things.

I have been working on a design that can be printed with a 3D printer. It seems to be going alright, but I still have a ways to go. Plastic is OK for prototyping and playing around, but once I get the design down I think I'll try to make it out of metal. There is actually a place near me that has a laser cutter that I might try getting parts made at.

1) I have played around with a GPS as someone requested the feature for one of their projects. They basically bought me a GPS and I figured out the code. The fact that they keep track of time is definitely an advantage. It's not actually that hard to add as there is example code, but I haven't done anything official yet.

2) Like you mentioned, I'm not aware of an electronic compass that is especially accurate, probably more so with the cheap ones. I actually align mine the same way.

3) I haven't done much for wind protection aside from having a mode where it parks horizontal. There is no automation there. It would be worth adding, but I wonder what it would take to build one that is sturdy enough to hold up to very high winds.

I have built (attempted mostly) heliostats where I was able to focus the reflected light by angling the mirrors. I think I've pretty much decided that it is less work, and possibly even less money, to just rip a hole in the wall and put in a bigger window than it is to try and build a single heliostat that has mirrors that are adjustable. 

I think I'm going to focus on smaller sized heliostats for that reason. :)

10
Sun Tracking / Heliostat Program Discussion Board / Re: heliostat
« on: August 23, 2016, 05:11:51 PM »
Hi Marie,

I'm not sure if I understand what you are asking, but I don't think the calculations are really posted anywhere on the site. They are in the program though, so you might be able to work them out from the programming syntax.

If you go to the "Functions" tab in the Arduino IDE and then find the "FindHeliostatAltAndAz" function, you will find where the calculations are for calculating the heliostat coordinates. It basically inputs the sun's altitude and azimuth and the desired target altitude and azimuth and outputs the altitude and azimuth direction for the heliostat.

Is that what you are looking for?

12
Hi Reptile,

Yes you should be able to load the sketch without the shield no problem. There Arduino really has no way to know the difference if it is attached or not. Are you having trouble uploading?

Thanks,
Gabriel

13
Heliostat Projects / Re: stagged spiral heliostat field arrays
« on: May 15, 2016, 05:48:37 PM »
Hi Jim,

I remember someone sent me an article on this a good while back, but it never had the math with it. It seems like it should be published somewhere, but I don't know where. It might be on one of those research sites where you have to pay for the article or something similar.

It would definitely be nice to have the math on hand though.

This is an old program they I had started working on which (among other things) lets you generate an array of heliostats and calculates how much energy they will collect based on real world solar radiation data. http://cerebralmeltdown.com/forum/index.php?topic=361.0 I actually wanted to do what you mentioned with this program, but never really needed it for my purposes so it never got done.

This program could sort of be used to check if one array is more efficient then the other, but the problem with it is that it doesn't take into account when one heliostat shades another.

Generating the "sunflower" shape might not be that bad, but checking to see if it is actually better than other shapes is no easy task. It would be worth doing though I think. Maybe someone out there already knows of something that would help with this?

Take Care and welcome to the forums!
Gabriel

14
Hi Emmpunkt,

I will definitely have to put synchronized motion up a lot higher on the list based on what you have mentioned.

I am used to dealing with small machines which only take less than a minute to move into position, but I know the larger ones can take much longer to do it.

Finding time to actually work on these things has been a big challenge lately, but I think that you should be able to hack the program pretty easily to do what you want.

We can cheat a little bit and reuse the joystick control code which already kind of synchronizes the motors. There won't be any acceleration, and the motors won't necessarily reach the end of their individual movements at the same time, but they won't be taking turns either.

If you open up the program and look at the very top of the functions tab, you will see what code to replace.


Replace this...
Code: [Select]


  if (AccelYesOrNo==1){//This code runs during normal operation
  moveMotorWithAccel(azsteps, azimuthStepPin, azimuthDirPin, azSpeed, azAccel);
  moveMotorWithAccel(altsteps, altitudeStepPin, altitudeDirPin, altSpeed, altAccel);
  }



with this...

Code: [Select]


  if (AccelYesOrNo==1){//This code runs during normal operation
    if (digitalRead(WindProtectionSwitch)==HIGH){
      joystickMoveMotors( altsteps, altitudeStepPin, altitudeDirPin, altManualSpeed, azsteps, azimuthStepPin, azimuthDirPin, azManualSpeed  );
    }else{
      moveMotorWithAccel(azsteps, azimuthStepPin, azimuthDirPin, azSpeed, azAccel);
      moveMotorWithAccel(altsteps, altitudeStepPin, altitudeDirPin, altSpeed, altAccel);
    }
  }



Note that I haven't actually tested this code, so let me know if you have any issues.

Hopefully it will tie you over until I have time to do some real work on the program. Maybe not this year, but hopefully the next. :)

Thanks,
Gabriel


15
Hello again,

Sorry about the delayed reply. I meant to look into this over the weekend, but I ended up spending the weekend putting together a 3D printer kit actually. I sort of lost track of time ha ha.

After looking into it I am now remembering that I never really got that far into the PC side of the program. I'm thinking that it might be better to just start the whole thing from scratch. Technically, I do have some code at this link, http://cerebralmeltdown.com/forum/index.php?topic=361.0, but there is so much there that it is hard to pull out only what you need.

The above is also in Visual C#, but I think it would be easier to start over in Processing because it is a whole lot easier to use.

It looks like I don't have much in the way of example code, but this link should get you started. https://learn.sparkfun.com/tutorials/connecting-arduino-to-processing
It's a little confusing at first, but once you get some example code up and running it's not too bad.

Hope that helps and sorry again about the delayed reply.

Gabriel

Pages: [1] 2 3 ... 42