Go Down

Topic: suntracker with actuator (Read 6829 times) previous topic - next topic

techmind

Jan 19, 2013, 03:22 pm Last Edit: Jan 29, 2013, 07:56 pm by techmind Reason: 1
Finally i found the time to made the arduino based suntracker for my old diy solarpanels  ;)

I made a model with a gear motor fro polulo to simulate the actuator, use a ethershield from nuelectrictronics, and i found dc motor controller chip in a defect tape deck.

In the real life suntracker i have a actuator / polarmount from a scraped from a satellite parabol. In the real life suntracker i will make a suntracker+mppt charger+inverter shield with a mosfet H-bridge.

My first version of the suntracker is a beta model, based on a nuelectronic webserver sketch.
In the beta version the position counter(interrupt) is not functional.

If you can use the first beta suntracker sketch, you can grab sketch here: 

** The site is in danish, please use google translate on the site, thanks **

http://techmind.dk/arduino-singleboard/soalrtracker-med-actuator-arduino-version/

Latter i might 'migrate' the arduino sketch to the nabduino platform ;)
Why not convert the world to run on electricity :)

http://techmind.dk

Blog is in Danish, use google translate please

ReggieTheDog

This sounds really cool and as I am a complete novice you'll allow me to ask the really dumb questions first:
Why do you use an Ethernet shield ( I take it that the word shield doesn't actually mean that it shields something!! Doh)
I'm looking to make a 2.5m solar parabolic dish. PV's are way too expensive for my pockets. And I want to track the sun too. Simply put I just don't know where to start. Hand holding and guidance would be appreciated

tytower

#2
Jan 28, 2013, 10:07 pm Last Edit: Jan 29, 2013, 09:30 pm by tytower Reason: 1
Can You post a picture of what you have made here?
I was not able to copy the code from that page above. It is a .dk site but the language did not look like German.
Can you post the sketch text here too? I was mostly interested  to look through your code to see what you have made but it is not easy at all on that web site.

I run 2 solar panels and numerous small electric fence panels  and would like to know if I can use this.


Why do you use an Ethernet shield ( I take it that the word shield doesn't actually mean that it shields something!! Doh)

A "shield"" sits on top of an arduino board and all the bottom board pins are normally extended through that top board

AWOL

Quote
It is a .dk site but the language did not look like German.
I'm sure some Danes do speak German, but that's no reason to author your website in German.

techmind

#4
Jan 29, 2013, 07:31 pm Last Edit: Jan 30, 2013, 09:39 am by techmind Reason: 1
Hey, i am sorry to hear you can't translate. The site is in danish, but comments in code are in english

Try this link:  http://translate.google.com/translate?twu=1?sl=da&tl=en&u=http%3A//techmind.dk/arduino-singleboard/soalrtracker-med-actuator-arduino-version/

I think i will put the code on codebender.cc and embed from them.

It should be possible to copy paste from the plugin i use to embed code now.
Why not convert the world to run on electricity :)

http://techmind.dk

Blog is in Danish, use google translate please

techmind

Sketch now on Codebender.cc : http://codebender.cc/sketch:5009   :%
Why not convert the world to run on electricity :)

http://techmind.dk

Blog is in Danish, use google translate please

tytower

#6
Jan 29, 2013, 09:31 pm Last Edit: Jan 29, 2013, 10:42 pm by tytower Reason: 1
Thanks ,Tried compiling and got " EtherShield does not name a type. I see etherShield.h is included what Library are you using?
I tried http://trollmaker.com/article11/arduino-1-0-with-enc28j60-ethernet-shield-v1-1/   it does have an EtherShield class and an etherShield class?? Looks like someone has just copied "etherShield.h" and called it "EtherShield.h". Trying to import the library into a sketch gives blank lines so this library is not working for me.

I tried http://www.r3cube.com/Drivers-software/etherShield.zip and this looks like the original unmodified version . This seems to work OK.
Now it seems you have to get the  "time" library too http://playground.arduino.cc/Code/time

Hmm lots more warnings and errors now . If its like this in the coding I  don't think I will waste my time going any further-What a shame .
Code: [Select]
variables can be placed into program memory area
SolarTracker.ino:394: warning: only initialized variables can be placed into program memory area
SolarTracker.ino:399: warning: only initialized variables can be placed into program memory area
SolarTracker.ino:401: warning: only initialized variables can be placed into program memory area
SolarTracker.ino:402: warning: only initialized variables can be placed into program memory area
SolarTracker.ino:403: warning: only initialized variables can be placed into program memory area
SolarTracker.ino:404: warning: only initialized variables can be placed into program memory area
SolarTracker.ino:407: warning: only initialized variables can be placed into program memory area
SolarTracker.ino:408: warning: only initialized variables can be placed into program memory area
SolarTracker.ino: In function 'void goHomeToWest()':
SolarTracker.ino:425: warning: statement has no effect
SolarTracker.ino: In function 'void getSolarTrackerSchedule(char*)':
SolarTracker.ino:510: warning: overflow in implicit constant conversion
SolarTracker.ino: In function 'void getstatus(char*)':
SolarTracker.ino:604: warning: overflow in implicit constant conversion
/opt/arduino-1.0.3/hardware/tools/avr/bin/avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=103 -I/opt/arduino-1.0.3/hardware/arduino/cores/arduino -I/opt/arduino-1.0.3/hardware/arduino/variants/standard -I/mnt/home/TempStore/sketchbook/libraries/etherShield -I/mnt/home/TempStore/sketchbook/libraries/Time -I/mnt/home/TempStore/sketchbook/libraries/etherShield/utility /mnt/home/TempStore/sketchbook/libraries/etherShield/enc28j60.c -o /tmp/build8001797048211974753.tmp/etherShield/enc28j60.c.o
/mnt/home/TempStore/sketchbook/libraries/etherShield/enc28j60.c:18:55: error: WConstants.h: No such file or directory
/mnt/home/TempStore/sketchbook/libraries/etherShield/enc28j60.c: In function 'enc28j60ReadOp':
/mnt/home/TempStore/sketchbook/libraries/etherShield/enc28j60.c:46: warning: implicit declaration of function 'digitalWrite'
/mnt/home/TempStore/sketchbook/libraries/etherShield/enc28j60.c:46: error: 'LOW' undeclared (first use in this function)
/mnt/home/TempStore/sketchbook/libraries/etherShield/enc28j60.c:46: error: (Each undeclared identifier is reported only once
/mnt/home/TempStore/sketchbook/libraries/etherShield/enc28j60.c:46: error: for each function it appears in.)
/mnt/home/TempStore/sketchbook/libraries/etherShield/enc28j60.c:60: error: 'HIGH' undeclared (first use in this function)
/mnt/home/TempStore/sketchbook/libraries/etherShield/enc28j60.c: In function 'enc28j60WriteOp':
/mnt/home/TempStore/sketchbook/libraries/etherShield/enc28j60.c:66: error: 'LOW' undeclared (first use in this function)
/mnt/home/TempStore/sketchbook/libraries/etherShield/enc28j60.c:73: error: 'HIGH' undeclared (first use in this function)
/mnt/home/TempStore/sketchbook/libraries/etherShield/enc28j60.c: In function 'enc28j60ReadBuffer':
/mnt/home/TempStore/sketchbook/libraries/etherShield/enc28j60.c:78: error: 'LOW' undeclared (first use in this function)
/mnt/home/TempStore/sketchbook/libraries/etherShield/enc28j60.c:92: error: 'HIGH' undeclared (first use in this function)
/mnt/home/TempStore/sketchbook/libraries/etherShield/enc28j60.c: In function 'enc28j60WriteBuffer':
/mnt/home/TempStore/sketchbook/libraries/etherShield/enc28j60.c:97: error: 'LOW' undeclared (first use in this function)
/mnt/home/TempStore/sketchbook/libraries/etherShield/enc28j60.c:109: error: 'HIGH' undeclared (first use in this function)
/mnt/home/TempStore/sketchbook/libraries/etherShield/enc28j60.c: In function 'enc28j60PhyWrite':
/mnt/home/TempStore/sketchbook/libraries/etherShield/enc28j60.c:149: warning: implicit declaration of function 'delayMicroseconds'
/mnt/home/TempStore/sketchbook/libraries/etherShield/enc28j60.c: In function 'enc28j60Init':
/mnt/home/TempStore/sketchbook/libraries/etherShield/enc28j60.c:163: warning: implicit declaration of function 'pinMode'
/mnt/home/TempStore/sketchbook/libraries/etherShield/enc28j60.c:163: error: 'OUTPUT' undeclared (first use in this function)
/mnt/home/TempStore/sketchbook/libraries/etherShield/enc28j60.c:164: error: 'HIGH' undeclared (first use in this function)
/mnt/home/TempStore/sketchbook/libraries/etherShield/enc28j60.c:170: error: 'INPUT' undeclared (first use in this function)
/mnt/home/TempStore/sketchbook/libraries/etherShield/enc28j60.c:173: error: 'LOW' undeclared (first use in this function)
/mnt/home/TempStore/sketchbook/libraries/etherShield/enc28j60.c:190: warning: implicit declaration of function 'delay'

guidoc

For one of my next projects I was thinking to start with a solar tracker for my camper. As far as I can see you are working with a tracker with one axe. I need to work with 2 axes. The motors I have already (old base of a automatic sattelite disk).
Is it possible to publish also the hardware you made (LDR circuit, H-bridge; ..)

techmind

Thanks for your interest in the beta sketch ;)

As written already in the beta sketch header i use 0018 arduino IDE and ethershield lib is from nuelectronic:

// Version: 0.8b Arduino IDE 0018 - based on nuelectronics.com ethershield webserver software http://www.nuelectronics.com/estore/

Direct link to the ethershield i use: http://www.nuelectronics.com/estore/index.php?main_page=product_info&cPath=1&products_id=4

time.h is a standard library

The errors you got from compiling is most ethershield related, so you might have to convert the code to your own ethershield, or get the nuelectronic version of the ethershield. However, i plan to migrate the project to nabduino, or rasperry pi, so this might work better for you.

But, you can just remove the code related to the ethershield, and just use the tracker code. The ethershield is just used to visualize what's going on i the tracker. In the v1.0 the solarpanels performance will be logged to by the webserver ;)


Why not convert the world to run on electricity :)

http://techmind.dk

Blog is in Danish, use google translate please

tytower

Yes All Good I understand now . Did not see the Version 0018 arduino mentioned anywhere
I have now had good results with Arduino 1.0.3 and I recommend it to you as the download has been simplified by the new Atmel tool chain including everything needed except Java JRE

techmind

Great, happy to hear it compiles well. Thanks for the tip, i have not tryed 1.0.3  :P
Why not convert the world to run on electricity :)

http://techmind.dk

Blog is in Danish, use google translate please

tytower

No I said I understand what you have posted , not that I have it compiled . It does not compile without a lot more work I think for 1.0.3.
More I was suggesting you update some but thats your business.

AJITnayak

Dear sir,

congrats for the above success project . i  need few clarification
1)how did you locate sun elevation angle. For this sun position algorithm (SPA) not work with Arduino Board
2) did you used   Stoke of linear actuator to calculate sun elevation angle
3)can you share me the code .
4)what are the component you are using for the project.















Finally i found the time to made the arduino based suntracker for my old diy solarpanels  ;)

I made a model with a gear motor fro polulo to simulate the actuator, use a ethershield from nuelectrictronics, and i found dc motor controller chip in a defect tape deck.

In the real life suntracker i have a actuator / polarmount from a scraped from a satellite parabol. In the real life suntracker i will make a suntracker+mppt charger+inverter shield with a mosfet H-bridge.

My first version of the suntracker is a beta model, based on a nuelectronic webserver sketch.
In the beta version the position counter(interrupt) is not functional.

If you can use the first beta suntracker sketch, you can grab sketch here: 

** The site is in danish, please use google translate on the site, thanks **

http://techmind.dk/arduino-singleboard/soalrtracker-med-actuator-arduino-version/

Latter i might 'migrate' the arduino sketch to the nabduino platform ;)

AMPS

Reedsterd

Another example: http://m.youtube.com/watch?v=bHFCJ7TXcM4
2-DOF 2 Servos
4 LDRs
9v Solar Panel

tytower

#14
Feb 18, 2013, 07:02 am Last Edit: Feb 18, 2013, 07:05 am by tytower Reason: 1
Quote from: Reedsterd

2-DOF 2 Servos
4 LDRs
9v Solar Panel

Thats easier to follow . Will you publish the code and circuit ?
It seems to work very well !

Go Up