Pages: [1]   Go Down
Author Topic: Use photoresistor to stop actuator.  (Read 189 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Okay, here is what I am trying to do. I want to have an actuator move from 0 to 180. But I want the actuator to stop moving when the light threshold reaches (number). The idea is to have a solar cell follow the sun across the sky stopping in optimal position.

Can someone help me in this. I am new to this and having some trouble getting it right. I have been able to get it to be basically 0 or 180 depending on  the presence of light but cannot get it to move and stop at light and move again when light is removed.

Thanks in advance.
Logged

China
Offline Offline
Jr. Member
**
Karma: 2
Posts: 74
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

do not very clean about the detail you want .  do you mean you want to control the actuator from 0 to 180 depending on the ligtht intensity? if yes, just serial connect the photoresistor with a resistor , and then analog read the voltage between ,you will get the relative light intensity. but if you need the light intersity presicely, i suggest you use a digital light sensor, whose output has a much more bettter linearity with the light intensity.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 34535
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

We need to know about this actuator and what sensor you are using.
Logged

UK
Offline Offline
Tesla Member
***
Karma: 135
Posts: 7683
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you have two Light Dependent Resistors attached to your solar panel with some optical shielding (a small piece of board separating them?) so that the sun only falls evenly on both of them when the panel is facing directly at the sun then your code needs to read the values of the two LDRs and move the panel a little bit in the direction of the LDR with more light. Then read the LDRs again etc.  Should need very little code. LDRs are very cheap.

You might need to add end-stop detectors (microswitches perhaps) to prevent the panel rotating too far.

I was recently talking to a man who has a working system like this. He said his biggest problem was protecting the electronics from the rain.

...R
Logged

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12630
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have been able to get it to be basically 0 or 180

You don't say what sort of actuator you have, but if you know how to move it to a given position then all you need to add is a pair of LDRs as Robin2 describes. The algorithm to control the actuator is then extremely simple.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Shelby Township, Disco, Michigan
Offline Offline
God Member
*****
Karma: 26
Posts: 766
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Example of a 2 axes solar tracker:

http://www.instructables.com/id/Arduino-Solar-Tracker/

Logged

Pages: [1]   Go Up
Jump to: