germanium
Newbie
Offline
Posts: 13
Thank You
-Given: 6
-Receive: 64
|
|
« on: January 11, 2014, 07:05:44 07:05 » |
|
Since you all were so kind to invite me, I thought I'd share one of my projects. It's a controller to make a hydraulically actuated solar array (photovoltaics) follow the sun... although it could easily be adapted to work with an array driven by a linear actuator of some sort too. It uses two green LEDs mounted to the array as light sensors, and adjusts the position until they're aligned to the sun. I've had this running several years now and it works great... will even work in cloudy conditions. The software is PIC Basic, and I've included my hardware design in eagle.
|
|
|
Logged
|
|
|
|
Unhappy
Senior Member
Offline
Posts: 282
Thank You
-Given: 1005
-Receive: 101
|
|
« Reply #1 on: January 16, 2014, 09:27:12 09:27 » |
|
Can you please provide the BOM. Specifically microcontroller used
|
|
|
Logged
|
|
|
|
germanium
Newbie
Offline
Posts: 13
Thank You
-Given: 6
-Receive: 64
|
|
« Reply #2 on: January 17, 2014, 06:49:44 06:49 » |
|
Oops, didn't notice some of the labels on the schematic weren't correct. I stuffed the board by hand, so never made a bill of materials. The Microprocessor is a PIC16F887 and the LCD is a 16x2 character with the HD44780 controller, the common ones. I get the LCDs from BGMicro... same for the pushbutton switches, I use these: https://www.bgmicro.com/SWT1043.aspx For screw connectors I use phoenix screw terminals, although any screw connector with .2" spacing would work fine - or just solder directly to the board. The remaining parts are as labeled and pretty straightforward I think. I will also say, if you mount the LED sensor a long distance from the controller, use shielded wire of some sort. Without it, I had problems with it picking up the ambient 60 hz 'hum' which really screws up the sensitivity. My finished board looks like this This is the finished array that it controls, built almost entirely from scrap metal.
|
|
|
Logged
|
|
|
|
Pice
Newbie
Offline
Posts: 11
Thank You
-Given: 11
-Receive: 24
|
|
« Reply #3 on: February 18, 2014, 09:19:17 21:19 » |
|
Excuse the ignorance. Why did you choose green LEDs for the detector? Also, why are they mounted at an angle?
I once toyed with the idea but never made a working prototype. The sensor I designed was just two IR diodes mounted vertically with a divider wall between them like this :
| n|n
|
|
|
Logged
|
|
|
|
germanium
Newbie
Offline
Posts: 13
Thank You
-Given: 6
-Receive: 64
|
|
« Reply #4 on: February 25, 2014, 05:29:56 05:29 » |
|
I used green because I heard from other RE enthusiasts that they generate the most voltage when exposed to sun... However I have noticed other colors generate some voltage too, so probably as long as the LED is clear (not frosted or opaque) then it would work. The LEDs have a beamwidth of say around 30 degrees (depends what LED you get), so putting them at an angle puts the sun (when the array is centered) on the edge of each beam. The result is increased sensitivity... At least that's been my experience. The exact angle isn't real critical and you can bend them to adjust what the tracker thinks is the center position.
Also note that the LEDs are wired back to back (one's anode is connected to the other's cathode and vice versa). So when the array is centered on the sun, the sensor reading will just be the bias voltage since the two LEDs cancel each other out. If the sun is ahead, one LED produces a higher voltage than the other and that adds to the bias voltage. If the sun is behind, the reading will be less than the bias voltage.
|
|
|
Logged
|
|
|
|
petroaguia
Newbie
Offline
Posts: 23
Thank You
-Given: 26
-Receive: 5
|
|
« Reply #5 on: March 05, 2014, 12:03:37 12:03 » |
|
I used green because I heard from other RE enthusiasts that they generate the most voltage when exposed to sun... However I have noticed other colors generate some voltage too, so probably as long as the LED is clear (not frosted or opaque) then it would work. The LEDs have a beamwidth of say around 30 degrees (depends what LED you get), so putting them at an angle puts the sun (when the array is centered) on the edge of each beam. The result is increased sensitivity... At least that's been my experience. The exact angle isn't real critical and you can bend them to adjust what the tracker thinks is the center position.
Also note that the LEDs are wired back to back (one's anode is connected to the other's cathode and vice versa). So when the array is centered on the sun, the sensor reading will just be the bias voltage since the two LEDs cancel each other out. If the sun is ahead, one LED produces a higher voltage than the other and that adds to the bias voltage. If the sun is behind, the reading will be less than the bias voltage.
Hi Germanium As I do not have Eagle (just Proteus), could you post na image of your circuit? Or, at least the connections of these led sensors x PIC? Do you use a comparator or na AD converter?
|
|
|
Logged
|
|
|
|
germanium
Newbie
Offline
Posts: 13
Thank You
-Given: 6
-Receive: 64
|
|
« Reply #6 on: March 08, 2014, 07:14:49 19:14 » |
|
Hi, I have attached a PDF of the schematic. I also drew on the LED arrangement so you can see how they're hooked up. The main purpose of the amplifier is to buffer the LED output to the PIC's ADC, and if you like you can throw in a little gain using the variable resistor. Using the ADC lets you adjust where the 'center' will be in software but I guess a comparator could be made to work too.
|
|
|
Logged
|
|
|
|
jobitjoseph1
Junior Member
Offline
Posts: 44
Thank You
-Given: 18
-Receive: 178
|
|
« Reply #7 on: March 26, 2014, 06:39:31 18:39 » |
|
can you please explain about the sensor
|
|
|
Logged
|
|
|
|
Buster
Inactive
Offline
Posts: 3
Thank You
-Given: 3
-Receive: 0
|
|
« Reply #8 on: April 06, 2014, 08:03:25 08:03 » |
|
Germanium, can you please throw more light on the hydraulic system of this setup?
|
|
|
Logged
|
|
|
|
germanium
Newbie
Offline
Posts: 13
Thank You
-Given: 6
-Receive: 64
|
|
« Reply #9 on: April 06, 2014, 08:55:25 08:55 » |
|
Regarding the sensor, think of each LED as a voltage source that varies depending on how much sunlight is hitting it. Look at the picture of the sensor mount as well as the PDF schematic I posted. The LEDs are mounted so that as the sun moves, one is going to get more light than the other. When both LEDs are receiving equal illumination, they cancel each other out and the PIC just sees the bias voltage on the sensor input. When one LED gets more light than the other, they no longer cancel each other and will either add or subtract from the bias voltage. You could bring each LED into it's own ADC and then compare the two, but this accomplishes the same thing with fewer wires. For the hydraulics, get on http://www.surpluscenter.com/Hydraulics/ and find one of their double acting cylinders that fit your array. A double acting solenoid like this is the other major piece. http://www.surpluscenter.com/Hydraulics/Hydraulic-Valves/Solenoid-Valves/120-VAC-10-GPM-OC-DA-SOLENOID-VALVE-9-7235.axd The BJTs on the schematic drive relays, which drive the 115 v solenoid as well as a 1/4 horse motor for the hydraulic pump. Energizing one solenoid drives the cylinder in and the other drives it out. Get the smallest gear pump you can find - a nice slow movement is what we're looking for. Even the small gear pump I got was still way too fast, so there is a pressure relief valve that shunts excess fluid from the pressure side of the pump back into the hydraulic reservoir. Then there's a needle valve on the outlet of the solenoid which can be adjusted to control the speed the cylinder moves in and out at. I don't have a drawing of the hydraulic connections but attached are a couple pics. You could use electric actuators instead if the array is smaller, however the hydraulic system can be put together fairly cheaply if you use surplus center and your local junkyard to source parts. Plus, it's pretty fun to play with...
|
|
|
Logged
|
|
|
|
Buster
Inactive
Offline
Posts: 3
Thank You
-Given: 3
-Receive: 0
|
|
« Reply #10 on: April 06, 2014, 09:09:45 09:09 » |
|
Germanium,thanks, one more thing...your code/software cannot be viewed, google search told me its power basic, do you have in in mikroC ?, I have both Easy PICv6 and EasyPICv7 development boards and my compiler is microC.
|
|
|
Logged
|
|
|
|
PaulC
Active Member
Offline
Posts: 170
Thank You
-Given: 3935
-Receive: 133
information is free and should be shared for free
|
|
« Reply #11 on: April 06, 2014, 11:46:55 11:46 » |
|
Germanium,thanks, one more thing...your code/software cannot be viewed, google search told me its power basic, do you have in in mikroC ?, I have both Easy PICv6 and EasyPICv7 development boards and my compiler is microC.
the first line of source code says this : Designed for a PIC16F887 and built using MeLabs where did power basic come into it ?
|
|
|
Logged
|
find it , read it , share it .
|
|
|
germanium
Newbie
Offline
Posts: 13
Thank You
-Given: 6
-Receive: 64
|
|
« Reply #12 on: April 06, 2014, 08:12:07 20:12 » |
|
I'm not sure where power basic came from... maybe from the file extension? Extensions are meaningless as to the actual content of the file, they just give your OS a guess as to what program to open it with (yours probably doesn't understand .pbp). The code is just a text file so open it using a text editor like vim or emacs or even wordpad would probably work. There is a fairly nice IDE out there specifically designed for pic basic pro as well, http://melabs.com/resources/win_ide.htm Pic basic pro supports most of the PIC devices last I checked, and there are "places" you can get a free copy to experiment with for non-commercial purposes such as this.
|
|
|
Logged
|
|
|
|
Buster
Inactive
Offline
Posts: 3
Thank You
-Given: 3
-Receive: 0
|
|
« Reply #13 on: April 06, 2014, 08:25:48 20:25 » |
|
Thanks, forgive my ignorance... i was able to view the code on my windows rather than on my mac. it was the extension that caused the confusion as i was looking for a program to open it on my mac. 'tis one project i want to experiment on. thanks one again.
|
|
|
Logged
|
|
|
|
|