Author Topic: Arduino Sun Harvester Program: Next Generation Update and Ideas  (Read 7695 times)

Gabriel

  • Administrator
  • Hero Member
  • *****
  • Posts: 654
    • View Profile
Re: Arduino Sun Harvester Program: Next Generation Update and Ideas
« Reply #15 on: October 23, 2015, 06:14:34 PM »
"How hard is it to use your current code to power 2 separate worm gear driven 12v motors? "
I personally have never tried this but I know it's possible, although it would of course require some modification. To start, you would need to add a hall sensor or maybe an encoder to count the number of revolutions the motor has moved so that the program know the orientation of the machine and can move it accordingly. I know Bob101 on this forum built his machine and wrote his program to accomplish this task.
I think through some trickery you could make the program think that you are using stepper motors. For example, instead of telling the program that the stepper motor has say 1600 steps per revolution, you tell it that it has only 1 step per revolution.

You would then place your code in the moveToPosition function which takes the altsteps and azsteps input variables and moves the motors accordingly. So if altstep = 1, your code would know to move the alt stepper motor one revolution.

The searchForLimit function would also have to be modified.

This would be useful code to have around I think.


Emmpunkt

  • New Member
  • *
  • Posts: 2
    • View Profile
Re: Arduino Sun Harvester Program: Next Generation Update and Ideas
« Reply #16 on: May 05, 2016, 04:15:10 AM »
Hi

Add simultaneous movement to the stepper motors instead of having them take turns 
I always read, that it looks cooler. But that is not why i could need it.

1. Speed
If both axis are driving simultaneous, they are reaching there endpoint faster. In "Normal-mode"  this may not be interesting. 
But in "Wind protection" it is important for me. My Solartracker is more than 4m high and it is really slow.
It is slow because i dont like making noise with it. Im living in the hills, so we don't have strong and constant winds here, but
we have strong Gusts here. If my Anemometer detects high wind, its better to move fast into windprotection!

2.Temperature and Current
If one axis is moving, the other axis is powerd too.
This causes sometimes an overheating of my altitude Driverboard. I'm driving my steppers near their limit, because i need
maximum power if it is windy.
While the azimuth is driving, the altitude board is powered but does no moving. This means that 2 of the Transistors inside
the altitude driver are on full current and have no chance to cool down, like in normal movement. And it is wasting energy too.

An Alternative (for me)  would be a third speed option. So i can drive the stepper much faster into the wind protection.

Thanks Michael


Gabriel

  • Administrator
  • Hero Member
  • *****
  • Posts: 654
    • View Profile
Re: Arduino Sun Harvester Program: Next Generation Update and Ideas
« Reply #17 on: May 15, 2016, 05:32:49 PM »
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


Boerekos

  • New Member
  • *
  • Posts: 3
    • View Profile
Re: Arduino Sun Harvester Program: Next Generation Update and Ideas
« Reply #18 on: September 19, 2016, 08:23:54 PM »
Hi Gabriel,
I am very interested in your project.
I've built my own Heliostat with the help of Mark, from http://heliostaat.nl/.
I bought dual axis gearboxes and Stepper as well as DC motors in the beginning (From China).
I struggled really hard to find someone to build the electronics, although I was prepared to pay a lot of money. The electronic engineers I approached, just did not seem interested, although I was going to pay for their time.

I designed my own hardware bits on Autocad in 3D. I had all the aluminium parts cut out on a waterjet cutter. That was quite interesting how accurate those machines are, and their power. Something like 1900 bar of water mixed with grit. Able to cut through 4 inches or more of solid steel. 
My heliostat is not 100% finished yet, but its been working for a few years. I still need to put the electronic switches for the horizontal and vertical stops in place, so that the motos wont run past certain points.

Unfortunately most of my fun stopped when I got divorced, and now I am renting my property out in S-Africa where the heliostat is, while I am living in Austria.
I had many trails done, and have sent my electronic parts back to Holland several times, so that Mark could make some changes as I wanted it.
My total costs were big, as I also mounted my heliostat on a long lamp post of steel, so that the sun could go into my bedroom on the second storey. Most of the pole is hidden, as it is inside/between the branches of trees. I've spent 1000's (yes, converted to Dollars)

For your project, just my thoughts:

1) GPS is a definite advantage for position AND time, and that was one of my requirements, as Mark only used a DCF time signal, which do not cover South Africa.

2) As I work offshore, and alongside ROV's (Remote operating vehicles) crew, which use fluxgate Compasses: I know that they are not that accurate, like the fibre optic Gyros we sometimes use. I am not sure about the Arduino unit's accuracy.
Point is, you dont need to calibrate the heliostat that often, so that it knows where 0š is. Mark has a simple way of calibrating: You put a cylinder (Tall empty spraypaint/beer can) on top of a piece of paper on the mirror's surface, aim the mirror electronically at the sun, until there is no shadow from the cylinder/can. When there is no shadow, you tell the electronics that "this is the sun's position"
 
3) I have some heavy winds in my area during Winter, and during my first Winter, I had to put my Heliostat to rest a lot of times, so that it wont blow away.. Rest position as you know is horizontal. The heliostat will restart its normal cycle the next morning at sunrise. I had to send my electronic parts back to Mark again, so that he could build an interface for an anemometer. It doesn't measure windspeed, but rotations, but I cant remember at which RPM it triggers the rest command.

I used to like it to get the sun on my bed at the exact sunrise time, or even to wake up, hearing my DC motors waking up.
Same for when the days get shorter. Every day you hear the motors start up in fast mode, to go to the sleep position.

Another nice feature I have, is my remote control, which I can select 3 targets, as well as a target straight to the sun, if you have solar panels.

I do like the idea of Ben, to be able to track the Moon as well :)

I am still looking to change my setup, so that I can set my mirror's angles individually, as I lose a lot of sunlight on the wall next to my windows.
Also, just for interest. Hope that all the fanatics wont drool too much. I saw some solar trackers in Austria. Have a look here:

https://www.smartflower.com/en

Gabriel

  • Administrator
  • Hero Member
  • *****
  • Posts: 654
    • View Profile
Re: Arduino Sun Harvester Program: Next Generation Update and Ideas
« Reply #19 on: September 21, 2016, 05:19:10 PM »
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. :)


Emmpunkt

  • New Member
  • *
  • Posts: 2
    • View Profile
Re: Arduino Sun Harvester Program: Next Generation Update and Ideas
« Reply #20 on: September 10, 2017, 12:26:25 PM »
I watched an interesting Video today.
Maybe its usefull for you or someone else.
https://youtu.be/fHAO7SW-SZI

Itīs a long one ;D
Greetings M.

Gabriel

  • Administrator
  • Hero Member
  • *****
  • Posts: 654
    • View Profile
Re: Arduino Sun Harvester Program: Next Generation Update and Ideas
« Reply #21 on: September 10, 2017, 05:22:23 PM »
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.