Solar panel demonstration using PIC microcontroller

Thread Starter

Reshma

Joined Mar 11, 2007
54
HI Folks!

I have to make some working model circuit making use of a PIC. The project I want to try is to demonstrate the working of a solar panel (Sun tracker) using a PIC micro controller. Here is my idea on this model...

The sun tracker solar panel has a controller interface that can adjust the angle of the panel in the direction of the highest incident radiation. I want to demonstrate this using a simple photo sensor that will move in the direction of a moving light source (can be a simple torchlight moved by hand). The materials I will be needing is:
1)Photo sensor
2)PIC microcontroller
3)dc motor
4)milli ammeter

First of all I need a light sensor. I will use a photo transistor or a photo resistor. I will need a device (Milli ammeter) to measure the current from the light sensor. Depending on the value of the current (max/min) the input will be send to the PIC and the dc motor will adjust itself till the highest current value is reached. So I will need a program that can sample the highest value of the current and note it and adjust the dc motor accordingly.

I need a little help in making the initial schematic of the circuit and your valuable suggestions on whether my project is do-able.
 

ixisuprflyixi

Joined Sep 16, 2007
52
its definitely do-able. The question is do you have to use a PIC microcontroller. The BEAM robotics enthusiasts know quite a bit about turning a motor in conjunction with a moving light. If the PIC is needed then unfortunately the BEAM circuits wont help let me know.
 

Art

Joined Sep 10, 2007
806
There is a book called "PIC Microcontroller Project Book" by John Iovine
where this project is completed using PicBASIC (ME Labs).
Schematic and code is given in the book, so it's got to be doable.
 

Thread Starter

Reshma

Joined Mar 11, 2007
54
Hi Art
Thanks for the book suggestion. But unfortunately Google only has a preview version of the book. I will just need two chapters from the book viz. light tracker using fuzzy logic and there is another one but the preview is not available. Does anyone have a pdf version of this book or at least the chapters that I have mentioned. Meanwhile I will try to see if I can get this book in the stores. Please give me some assistance since these books aren't easily available in India.
 

Thread Starter

Reshma

Joined Mar 11, 2007
54
its definitely do-able. The question is do you have to use a PIC microcontroller. The BEAM robotics enthusiasts know quite a bit about turning a motor in conjunction with a moving light. If the PIC is needed then unfortunately the BEAM circuits wont help let me know.
I had considered it but I have been told to make a PIC based project. Robotics are interesting and the robotic eye is based on the similar principle. But I have a tight budget and availability of the parts will be a problem for me. PICs are comparatively cheaper so more feasible for me. :)
 

thingmaker3

Joined May 16, 2005
5,084
You don't need an ammeter, and wouldn't be able to easily incorporate it into the PIC anyway. You can tie the photovoltaic sensor output directly to the PIC's A/D converter.

Better yet, use two photocells side by side with a tall opaque card between them. Feed both o/p to PIC A/D. Use the pic to calclulate the difference and generate PWM out to the motor to correct the aim. You can incorporate PID into your software to avoid using any unnecessary power with the motor. (Wast not, want not. :cool:)

Shoot... you could use four such sensors and two motors - compensate for seasonal changes as well as hourly ones! :D
 

Thread Starter

Reshma

Joined Mar 11, 2007
54
Thanks, thingmaker3! It is a good idea. But I am yet on decide on a schematic first :( If anyone finds any useful links on this topic please post them. I will update my progress over here.
 

Thread Starter

Reshma

Joined Mar 11, 2007
54
Hi Folks!
I have finally completely my project. I have used PIC16F877,Unipolar stepper motor and ULN2003 as the stepper motor driver. Here are the snaps taken.

This the PCB inside the device. The soldering of components took about 2 days.
http://i133.photobucket.com/albums/q71/reshma_b85/solarpro3.jpg

This is the wooden box inside which the motor and the circuit has been placed. The sensors are mounted on the ring. This took the longest time to complete.
http://i133.photobucket.com/albums/q71/reshma_b85/solarpro1.jpg
http://i133.photobucket.com/albums/q71/reshma_b85/solarpro2.jpg

The circuits works pretty well. Unfortunately the video isn't of a good quality. But I hope the snaps give a good idea. :)
 

hgmjr

Joined Jan 28, 2005
9,029
Impressive!

Did you win an award for your efforts?

Can you reshoot the video? We would really enjoy a peek at the device in operation.

hgmjr
 

SgtWookie

Joined Jul 17, 2007
22,210
Congratulations! :) Glad you got it working, and thanks for posting pics!

As you already discovered, the ULN2x03 IC will work pretty well as a driver IC for your project. However, if you wish for the microcontroller to have the maximum possible life, you should add 6.8K Ohm resistors in series with the control lines from the PIC to the ULN2x03.

The ULN2x03 and ULN2x04 are nearly identical, except that the x03 is for TTL levels (higher drive current) and the x04 for CMOS levels (lower drive current). The x03 has an input resistor of around 3k Ohms, whereas the x04 has an input resistor of 10K Ohms on each channel.

It looks like you have two optical sensors mounted to the "ring" - I assume that you have those connected to a voltage divider network, monitor the voltages, and adjust the position of the "ring" in the direction of the brighter sensor?

You could have the basis for a solar cell array driver :)
 

Thread Starter

Reshma

Joined Mar 11, 2007
54
Impressive!

Did you win an award for your efforts?

Can you reshoot the video? We would really enjoy a peek at the device in operation.

hgmjr
Thanks! No awards yet, but I hope I get good marks for it. It is my final year project and exam is due early next month and I will have to present my project over there. I will send a link after reshooting the video. :)
 

Thread Starter

Reshma

Joined Mar 11, 2007
54
Congratulations! :) Glad you got it working, and thanks for posting pics!

As you already discovered, the ULN2x03 IC will work pretty well as a driver IC for your project. However, if you wish for the microcontroller to have the maximum possible life, you should add 6.8K Ohm resistors in series with the control lines from the PIC to the ULN2x03.

The ULN2x03 and ULN2x04 are nearly identical, except that the x03 is for TTL levels (higher drive current) and the x04 for CMOS levels (lower drive current). The x03 has an input resistor of around 3k Ohms, whereas the x04 has an input resistor of 10K Ohms on each channel.

It looks like you have two optical sensors mounted to the "ring" - I assume that you have those connected to a voltage divider network, monitor the voltages, and adjust the position of the "ring" in the direction of the brighter sensor?

You could have the basis for a solar cell array driver :)
Thank you! Yes, the ULN2003 proved very useful and reduced the number of components for the driver circuit. Yes, I mounted two photo transistors on the ring. They have been connected in the common collector mode to the analog port pins of the PIC. Sampling is done on two channels and the digital result from both the photo transistors are compared to determine the direction of greater light intensity. The PIC16F877 ADC module is very good and gives accurate output. It reduced the need for an external ADC. I wrote the code in MPLAB IDE. It took me a while to get the program right and finally it worked. I will post the video soon. :)
 

SgtWookie

Joined Jul 17, 2007
22,210
hello reshma can you give the shematics of your project ??
Well, the schematic itself would be quite simple and straightforward. It would of course change if you used a different microcontroller. Without the software that our OP wrote to control the stepper motor, there wouldn't be much point in simply re-creating the same circuit.
how big stepper motor could you drive?
i mean like current per coil??
The ULN2803/ULN2003 can sink up to 500mA continuously per output, and withstand up to 50v. If you wish, you can "double up" on the outputs for increased current; for example channels 1 and 5, 2 and 6, etc. thus providing 1A for a pair of channels. However, you should also consider the following:
ULN2064, ULN2066, ULN2068, ULN2070, ULN2074, ULN2076 - 50V, 1.5A Quad Darlington Switches
ULN2065, ULN2067, ULN2069, ULN2071, ULN2075, ULN2077 - 80V, 1.5A Quad Darlington Switches
 

Thread Starter

Reshma

Joined Mar 11, 2007
54
Hi Pravvish

As SgtWookie correctly pointed out, the schematic wouldn't be of much help if you haven't decided which microcontroller you are using. Also a major part of any microcontroller based project depends on the software as well. There are a number of different types of stepper motors available..the unipolar stepper motor being the most popular. Sgtwookie has suggested a number of current driver ICs, you can choose one depending on your requirement. Good luck.
 
Top