dual axis tracker utilizing suncalc embedded into arduino

Thread Starter

JohnIhle

Joined Mar 14, 2012
3
I am starting a new project for a dual axis solar tracker and would like to know if you can somehow embed the "suncalc" javascript into an arduino type kit or board. I'm very new to this.

I'd use suncalc to provide the arduino with the position of sun and the arduino would drive a couple of 24 vdc 5A brushed or brushless motors (not sure) through one or more motor controllers (and H bridge(s)).

Tracker position would be provided to the arduino with a magnetometer (with accelerator) and a gps.. The suncalc program is in javascript (I don't know if this is an issue for a compiler).. The sun obviously needs to shine directly on the tracker with relatively high accuracy.

An input into the arduino would also use an anemometer to help protect the tracker in high winds.. maybe above 25 or 30 mpg (haven't done the calculations, yet) and position the tracker in the horizontal position.

I'd also like to be able to operate the trackers manually both locally and over cat5...or something.

It's something I've been thinking off and on for awhile. I'm not sure if arduino is the best way to go forward...in some ways it's probably easiest for me since I know nothing about programming and there is a lot of code out there that is free, as is the suncalc program.

If it can be figured out well enough, at some point I'd like to get data off the communication bus (assuming I2C or SPI??) through some additional instrumentation. For example; power produced, solar incidence, ... and I've got all sorts of other ideas so the communications should be able to be expanded to other capabilities.
 

Thread Starter

JohnIhle

Joined Mar 14, 2012
3
The question was in the first sentence.. I was describing how I'm thinking I'd go about the project in the rest of the text. So;

I'd like to know if you can embed suncalc into an arduino system.. suncalc is in javascript or would you have to convert the javascript into a recognizable language.. How would one go about doing that? if you can do that.
 

wayneh

Joined Sep 9, 2010
17,498
So it was. Sorry, missed it.

Hopefully one of the many Arduino fans will come along and advise you now that the question is clear.
 

MikeML

Joined Oct 2, 2009
5,444
Isnt it much easier to build a solar tracker that seeks the sun electro-mechanically than it would be to implement a 2-axis position controller that is driven from a computer algorithm?
 

Thread Starter

JohnIhle

Joined Mar 14, 2012
3
I don't know since I've never built one. why would it be easier and do you think it would be better? I don't want to use ldr's ... Since the suncalc program is freeware I thought it would be somewhat straightforward. I don't know a lot about controller circuits but I'm willing to learn because I'm interested. I thought that arduino is pretty simple and there's a lot of code out there.. but maybe a little difficult with the suncalc program. I've got a different program from an earlier project I was involved with that is written in C that positions the sun. If it's going to be a problem writing a javascript (suncalc) program into the arduino maybe I'll do that.

If you've never gone the suncalc website.. it's pretty cool. You can plug your longs and lats and it's time dependent..

I don't know, Mike, I've liked what I've seen with suncalc and didn't think it would be a huge problem.
 

THE_RB

Joined Feb 11, 2008
5,438
... why would it be easier and do you think it would be better? I don't want to use ldr's ...
Light sensors can be "better" because the solar panel will point at the area of the sky with the most insolation (sunlight). Using clockwork tracking can and does leave it pointed at clouds when the sun is behind a group of clouds. It would make more electricity when pointed at the brightest area of the sky, which is often the edge of the cloud group or a patch of blue sky.

Also, your solution using closed loop feedback from a accelerometer (inclinometer) mounted on the panel has the same hassles and costs of using a light sensor mounted on the panel. In both cases you need to weatherproof a small electronic box on the panel and run flexible wires etc.
 
I am starting a new project for a dual axis solar tracker and would like to know if you can somehow embed the "suncalc" javascript into an arduino type kit or board. I'm very new to this.
You could do the calcs (no gps, and fixed location) on the computer and then program the results into an eeprom chip(s). Use a real time clock and a data table to read in the positioning data from the eeprom. An I2C bus would be good for this part of the project.
 
Top