Go Down

Topic: Hacked R/C Moon light displays the current phase (Read 1 time) previous topic - next topic

imagitronics

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

Andrew

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

Grumpy_Mike

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.

imagitronics

#3
Jan 27, 2009, 06:19 pm Last Edit: Jan 27, 2009, 06:26 pm by imagitronics Reason: 1
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: [Select]

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

jerrya.net

#4
Jan 28, 2009, 06:58 pm Last Edit: Jan 28, 2009, 07:00 pm by jerrya.net Reason: 1
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!]
- Jerry Adlersfluegel

bHogan

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!)
"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom."
~ Clifford Stoll

imagitronics

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

jerrya.net

- Jerry Adlersfluegel

Go Up