Shop OBEX P1 Docs P2 Docs Learn Events
Lunar Tracker — Parallax Forums

Lunar Tracker

TappermanTapperman Posts: 319
edited 2014-08-25 10:26 in BASIC Stamp
I'm trying to build a device to track the Moon in the sky. I'd like to track the moon 1 day before its full, the day its full, and 1 day after its full.

And the thing is working (see video below via link) ... but I have a question

http://www.youtube.com/watch?v=wSULL54JBkE&feature=player_embedded

I have 4 cds cells that, even though they are the same part number, give 4 different levels of resistance when exposed to the same light energy.

How should I correct for this?

... Tim

PS - been a while since I did anything with the BS2

Comments

  • ercoerco Posts: 20,256
    edited 2011-07-24 14:57
    Nifty idea. Is there enough light reflecting off the moon to track with CdS cells? (God bless you for NOT calling them LDRs). A good phototransistor is more sensitive than a CdS cell, and can be RCtimed just like one. Perhaps less variation between 4 ptx than 4 CdS cells, too.

    See page 4 at http://www.seas.upenn.edu/~robo2005/Electronics%20Lab%202%20v6.doc for Stamp/ptx info.
  • TappermanTapperman Posts: 319
    edited 2011-07-24 15:01
    erco wrote: »
    Nifty idea. Is there enough light reflecting off the moon to track with CdS cells?

    This guy did it with one CDS cell (see link)

    http://home.earthlink.net/~nevadabat/Moonlight/MoonLight.html

    ... Tim
  • ercoerco Posts: 20,256
    edited 2011-07-24 15:27
    XLNT. CdS are most sensitive to yellow-green light, so that's a good fit as long as you can match the sensitivity of that discontinued Clairex cell mentioned. Probably a very sensitive unit. I have a bin full of "bargain packs" of CdS cells, but I never would have guessed that they could detect moonlight particularly well. Good luck on your project!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-07-24 15:37
    The guy cited in the link obviously doesn't live in western Washington State: he had five clear evenings in a row!

    -Phil
  • TappermanTapperman Posts: 319
    edited 2011-07-24 16:04
    The guy cited in the link obviously doesn't live in western Washington State: he had five clear evenings in a row!

    Thanks for the laugh ... Yeah, I was going to try to scan on the 15th of July but the weather has been so bad, that I couldn't ... Hoping for better conditions on the 13th of Aug.'s full moon.

    The problem I was describing in the first post was "when your checking spot on" values from the sensors, there is a bias ... this is because I'm reading the CDS cells in pairs ... and they don't all respond with the same values for any given light energy ... so, the result is the controller looks off from center in both directions based on this imbalance of resistance for any given amount of light.

    I'm hoping there is a simple solution, I haven't thought of, that someone else might see?

    ... Tim
  • ercoerco Posts: 20,256
    edited 2011-07-25 08:40
    That author warned about variations between cells. For calibration, you could manually aim the unit (centered on the moon), monitor the different cells and apply an offset value to the values measured to normalize.

    Obviously, you want to calibrate at the low lunar light levels expected, not by looking at a desk lamp. :)
  • TappermanTapperman Posts: 319
    edited 2011-07-25 16:00
    erco wrote: »
    Obviously, you want to calibrate at the low lunar light levels expected, not by looking at a desk lamp. :)

    I couldn't do the video at the real low light levels, so I replaced the cap with a 1 uF and let it look at the desk lamp for the video ... but it see's the moon fine with a 0.01 uF cap.

    You can see the values show up real time in the spread sheet from the CDS pairs (left, right, top, bottom and ALL), when your outside ... I don't think a video of that is possible, at least with my camera.

    ... Tim
  • TappermanTapperman Posts: 319
    edited 2011-07-26 12:38
    erco wrote: »
    Obviously, you want to calibrate at the low lunar light levels expected, not by looking at a desk lamp. :)

    Wow, you just gave me an idea! I think you might have solved it. Picture this in your mind

    drill and blacked disk (starting with a small bit) with each CDS in a jig. Then check the response to light through the hole. And increasing the drill size as needed to bring the device into the correct ball park

    force all 4 sensors to re-act with the same response to stimulated energy? Is that barking up the right tree?

    ... Tim

    PS - How do I mark this thread as 'solved'?
    1024 x 768 - 93K
    1024 x 768 - 86K
    1024 x 768 - 82K
    1024 x 768 - 87K
  • ercoerco Posts: 20,256
    edited 2011-07-26 13:11
    Sounds good at first, but now you are introducing 4 more variables in the optical alignment of your disks and holes. Is the surface of your photocells 100% uniformly sensitive? Maybe not. It would be a shame to calibrate if it will behave differently with & without the disks. How about using a smaller light far away in a dark room?

    Better yet, get out there (dancin') in the moonlight under the exact conditions you anticipate. The moon waxes stronger as it gets fuller, so start a few days ahead of time and your signal strength will increase when you want to take your real readings.

    BTW, is there a lot of IR energy in moonlight? It is after all reflected sunlight, so I'm assuming so.
  • TappermanTapperman Posts: 319
    edited 2011-07-26 14:41
    erco wrote: »
    How about using a smaller light far away in a dark room? Better yet, get out there (dancin') in the moonlight under the exact conditions you anticipate.

    IMG_0277.jpg
    IMG_0276.jpg


    I've done both already. This is a calibration I did with a candle 12 inches from the flame.

    But the moon light I was able to study was only a small set of samples on Jul 14th before it hid behind the moutains, and with the wrong read routine ... and after that, it's been cloudy and rainy almost everyday (Willamette Valley).

    Very weird Summer

    I can track a candle outside from a distance ... but, I can't get a video of this with my camera!
    1024 x 768 - 88K
    1024 x 768 - 98K
    466 x 513 - 21K
  • ercoerco Posts: 20,256
    edited 2011-07-27 08:49
    If you're tracking a candle flame accurately, your next challenge must be the Trinity Firefighting Robot Contest. Your mobile robot navigates through a simple 8'x8' maze (house plan), locates a candle, and blows it out.

    http://www.trincoll.edu/events/robot/

    You've already done the hard part! Contest is usually in April. Time's a-wasting! :)
  • Dave HeinDave Hein Posts: 6,347
    edited 2011-07-27 09:34
    It would be interesting to mount a small camera on your tracker. This way you could record what your tracker is looking at. There are small keychain cameras available that don't cost very much and are very lightweight.
  • TappermanTapperman Posts: 319
    edited 2011-07-27 13:23
    erco wrote: »
    If you're tracking a candle flame accurately, your next challenge must be the Trinity Firefighting Robot Contest. Your mobile robot navigates through a simple 8'x8' maze (house plan), locates a candle, and blows it out.

    http://www.trincoll.edu/events/robot/

    You've already done the hard part! Contest is usually in April. Time's a-wasting! :)

    Thanks for the link ... that was cool to see that little robot find the candle, then put it out, go home and beep when finished!

    ... Tim
  • TappermanTapperman Posts: 319
    edited 2011-07-27 13:30
    Dave Hein wrote: »
    It would be interesting to mount a small camera on your tracker. This way you could record what your tracker is looking at. There are small keychain cameras available that don't cost very much and are very lightweight.

    Great Idea! Wouldn't happen to have a link would you?

    IMG_0297.jpg
    Working on my idea to 'fine' tune the cells to match each other, want to see if ERCO is correct? Still have till Aug. 13th to get it correct.
    1024 x 768 - 108K
  • Dave HeinDave Hein Posts: 6,347
    edited 2011-07-27 14:15
    If you Google keychain camera you'll get a few million hits. There are many people selling them on eBay. Most of them are from Hong Kong, and I suspect many of the sellers are the same company. I bought three gumstick cameras (which are similar to the keychain cameras) on eBay, and it took a few weeks to get them. You might try one of the sellers on Amazon.com. They might be able to deliver quicker. As always, check the information on the seller to make sure they look OK.
  • TappermanTapperman Posts: 319
    edited 2011-07-27 15:48
    erco wrote: »
    Sounds good at first, but now you are introducing 4 more variables in the optical alignment of your disks and holes. Is the surface of your photocells 100% uniformly sensitive?

    Yep, your right ... preformed a test this afternoon and got them all to line up .. then reduce the light and they spread apart ... that approach will not work.

    ... Tim
  • ercoerco Posts: 20,256
    edited 2011-07-27 15:58
    Do you have optical tunnels (shutter tubes) on your photocells? Like blinders or snorkels to make sure that your cells are only looking at the target. You can make them out of paper or almost anything; paint the inside with ultra-flat black paint to avoid reflections. Tube length and diameter depend on your situation.
  • TappermanTapperman Posts: 319
    edited 2011-07-27 17:05
    erco wrote: »
    Do you have optical tunnels (shutter tubes) on your photocells? Like blinders or snorkels to make sure that your cells are only looking at the target. You can make them out of paper or almost anything; paint the inside with ultra-flat black paint to avoid reflections. Tube length and diameter depend on your situation.

    Straw Detail.png

    I mount the CDS cell inside a Soda Pop Straw, slit down the end with a knife ... then spread the legs on the CDS and place it in the center of the straw (inside) as close to center as I can.

    ... Tim
    220 x 275 - 3K
    1024 x 768 - 80K
  • ercoerco Posts: 20,256
    edited 2011-07-27 17:29
    I like your cruciform divider... heavy duty! And optically 100% blockage.

    But your straws look like they are just for minimal support. They are translucent and the photocells are right near the top. Are your photocells just hanging in the slits? Kinda loosey goosey. If the cells get bumped, all your calibration work is lost.

    If it were me, I'd mount them firmly to a plate & glue them all down flat, making sure they are all perfectly parallel. Then I'd build a removeable optical shutter system around the array, then take it apart and paint everything (except the cells) flat black.
  • TappermanTapperman Posts: 319
    edited 2011-07-28 09:37
    erco wrote: »
    I like your cruciform divider... heavy duty! And optically 100% blockage.

    But your straws look like they are just for minimal support. They are translucent and the photocells are right near the top. Are your photocells just hanging in the slits? Kinda loosey goosey.

    Thanks, I was going to use a toy I had seen that had the perfect quad divider for this project 'light, sturdy, small & cheap". But now I can't find it, so since I was running out of time ... I took the thinnest aluminum angles I could find, rivited them together and painted them black.

    The CDS cells are inserted into the slits down the side of the soda straw, and then the legs are taped against the outside of the straw. Then the straw is placed in the corner of the angle, and 'hot-glue' is applied to secure it.

    However, 20 minutes after gluing ... the glue shrank, and they came loose (2 of them) ... so now I'm going to try 'finger nail glue'.

    The straw is easy to remove ... split the straw with a knife length ways, and pull the cell out ... and easy to fabricate again. The straw serves to align the cell, and also holds a label (#4, etc.), in addition, its easy to find (after dropping on the floor) for old guy like me (with poor eyes).:lol:

    ... Tim
  • skylightskylight Posts: 1,915
    edited 2011-07-28 12:29
    @tapperman, Didn't you find it a bit risky making your video during an earthquake?...................just joking great project, good luck with resolving the problems.
  • TappermanTapperman Posts: 319
    edited 2011-07-31 13:08
    skylight wrote: »
    @tapperman, Didn't you find it a bit risky making your video during an earthquake?...................just joking great project, good luck with resolving the problems.

    It's OK. Hope this video is better (kind of dark) ... but it examines all 4 sensors as one value and finds center in a progression of smaller steps in a series of passes, reading a modified PLX-DAQ macro

    http://www.youtube.com/watch?v=LUNEc078n1Q Trim & Zero set

    http://www.youtube.com/watch?v=bQUPner-VvQ Track

    The Zero_IN routine was the problem that was vexing me ... I think I may have it solved! (here's hoping)

    ... Tim
  • TappermanTapperman Posts: 319
    edited 2014-08-25 10:26
    Update.

    New version

    @Andy ... I used two images from WAM to aid understanding ... should I remove them?

    ... Tim
    zip
    744K
Sign In or Register to comment.