Shop OBEX P1 Docs P2 Docs Learn Events
Servo kept parallel with sun — Parallax Forums

Servo kept parallel with sun

GoogfanGoogfan Posts: 16
edited 2008-11-19 01:03 in BASIC Stamp
I cannot figure out a way to keep a servo horn parallel with the sun/flashlight. im trying to keep a solar cell pointed torward the sun/flashlight. as it moves across the "sky"

Any help Please!?

oh, i use· bs2SX controllers.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mixing things...

It can be deadly -- Potassium Carbon Nitrogen [noparse][[/noparse]KCN]
It can be fun
·Potassium Nitrogen Oxogen Carbon Sulfer [noparse][[/noparse]KNO3+C+S]
It can be useless - Napkin Butter
wait, what point was I·trying to establish?



Post Edited (Stickmansam) : 11/18/2008 2:44:27 PM GMT

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2008-11-18 14:46
    One classic approach is to use two CdS cells. You put each cell on either side of a black board, which stands up between them. When it's pointed right at the sun, both cells get light. As the sun moves, one cell is 'shadowed' by the board. Your code figures out which one is 'shadowed', then moves the platform with the board until both cells get light again.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-11-18 14:59
    What you want is called a solar tracker. Do a Google search for this term. Many of them are designed for direct DC motor drive, but a few are for use with a servo motor. Look at Parallax's "Robotics with the BoeBot" tutorial for lots of information on servos and Stamps. The tutorials can be downloaded here: www.parallax.com/tabid/535/Default.aspx.
  • Carl HayesCarl Hayes Posts: 841
    edited 2008-11-19 01:03
    Allan is correct -- this is an old problem, solved many times.· The initial idea of using two solar cells (or other light detectors) with a shadowing wall between isn't bad.· Much better, though, is to eliminate the shadowing wall and point the two detectors outboard about 30-to-45 degrees, then compare their output.· This is better because (1) it's mechanically more robust, and (2) the rate of change of detected intensity, per degree change of direction, is much greater at 30-to-45 degrees than it is with both sensors at 90 degrees (pointing directly at the sun).· By pointing them outboard, using no shadowing wall, and comparing the measured intensities, you can get much greater precision.· With a little sophistication you can then use proportional control, instead of on-off control (engineers call it bang-bang control) and thus avoid overshoot in your aiming mechanism.· It's easy to get, say, half-degree aiming accuracy that way, at really low cost.·


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i

    Post Edited (Carl Hayes) : 11/19/2008 5:39:13 AM GMT
Sign In or Register to comment.