Pages: [1]   Go Down
Author Topic: Hacked R/C Moon light displays the current phase  (Read 1272 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just finished a new little hack. I modified a ThinkGeek R/C Moon Phase light so that it reflects the current lunar phase in realtime.

Essentially, the R/C Moon Phase light is a nightlight that comes bundled with an infrared remote control. The controller allows the user to change the moon's current phase with the press of a button - or automatically cycle through the standard phases of the moon throughout the day.

I decided that it would be more interesting if the model moon actually reflected the current phase of the moon based on the date. I did this by replacing the original PCB with an arduino and a DS1307 realtime clock module from Sparkfun. The DS1307 module maintains the proper time and date, while the arduino calculates the current phase of the moon based on the date. The RTC module contains a coin cell battery backup that enables the internal clock to maintain the proper time, even without power, for up to 17 years!

I also included a simple C# application for Windows.NET that updates the DS1307 in case it starts to drift over time.

Please take a moment to check it out at www.imagitronics.org/rc-moon/

Tim
Logged

UK
Offline Offline
Sr. Member
****
Karma: 1
Posts: 491
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hella cool! I want one...

I've written a small Java app for my phone that displays the current moon phase or animates through the cycle but a physical one on the wall would be most excellent. I think I see how the phases are done from your photos so I might try and mock one up myself.

So many projects, so little time...

Andrew
Logged

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

Great I just bought my son one for Christmas, I know what to do with it when he's through with it.

Incidentally you know your system will only work in the Northern hemisphere. If you use it in the southern hemisphere you have to hang it up side down otherwise the phase will be in the wrong direction.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Incidentally you know your system will only work in the Northern hemisphere. If you use it in the southern hemisphere you have to hang it up side down otherwise the phase will be in the wrong direction.

Good catch. I'll stick another combobox on the C# form that asks what hemisphere you're in. When the arduino reads the value over serial I'll store it in EEPROM for safe keeping...

It should be a simple fix. You'll notice that I use a single byte and a bitmask to determine the status of the LEDs, so maybe something like:

Code:
currentPhase = getPhase(fullYear, month, day);

if((SouthernHemi) && (currentPhase != 0 && currentPhase != 63))
    currentPhase = ~currentPhase;
    // phase 0 is NEW moon, and phase 63 (00111111b) is FULL moon.
updateMoon(currentPhase);

The two leftmost bits are unused, so their value will not effect the outcome...

Thanks for your input!
Tim
« Last Edit: January 27, 2009, 12:26:28 pm by imagitronics » Logged

St. Louis MO
Offline Offline
Jr. Member
**
Karma: 0
Posts: 83
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Shouldn't you actually mount the moon upside down for southern hemisphere mode? We all see the same moon, but some of us are not upside down relative to each other.

If the light didn't have the image of the moon on it, you could just reverse the phase sequence. But since it does, the moon image should also be upside down. Right?

(BTW, I had never thought of the moon being upside down in the other hemisphere before, but it's an interesting off-topic. I can't imagine how strange the moon must look upside down when traveling that far.)

[edit, forgot to mention: Awesome hack to make it work as it should have in the first place!]
« Last Edit: January 28, 2009, 01:00:18 pm by jerrya.net » Logged

- Jerry Adlersfluegel

Denver
Offline Offline
God Member
*****
Karma: 20
Posts: 779
Inactive - PM
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It's funny, an hour before reading your post I was thinking about adding moon phases to my LED clock. "Now where in the hell am I going to get an algorithm for that?", I thought.

I also liked your utility to set the clock. That .NET 3.5 is a whopper though! I might try a VB script with a comm object I found.

Anyway, great job, and it sounds like you just need another hook so it can be hung upside down, down under. (I hope you don't have to reverse the polarity on your battery too!)
Logged

"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom."
~ Clifford Stoll

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ThinkGeek got wind of my R/C Moon hack (which means they either read these forums, or hackedgadgets.com) and posted about it on the official ThinkGeek blog: http://www.thinkgeek.com/blog/2009/01/tim-farley-hacks-the-moon-oneu.html

What's more, according to a ThinkGeek staffer, this project helped him convince the company to start a promotion in which hacking ThinkGeek products could get you a $50 gift certificate to the store! (details available on the ThinkGeek Blog)

Wow.
Tim
Logged

St. Louis MO
Offline Offline
Jr. Member
**
Karma: 0
Posts: 83
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Nice, I knew I loved that company!
Logged

- Jerry Adlersfluegel

Pages: [1]   Go Up
Jump to: