Skip to content

dgaff/moonlight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Moonlight

Got some time in the electronics shop this past weekend, so I worked on my wifi-connected Moon Light. This started life as a nightlight for my daughter when she was young.

It's been in storage for a while, and so I decided I wanted to make it wifi-connected in order for it to automatically set the phase of the moon. I also wanted to make it brighter so it can be seen in the daytime.

Step 1 was to use my favorite little wifi board with Wemos D1 mini. These things are super cheap, and you can write quick programs with using the Arduino environment. Because I was planning to drive a string of LEDs per moon segment, I needed to use a transistor to switch the extra current. Here's a quick breadboard test.

Next, I cut up some LED strip lights that are 5V powered (the same voltage as the Wemos board) into strips for each phase of the moon. These replaced the single LED that lit each phase in the original nightlight.

Next was to populate a board. Nothing fancy on this job. A quick one-off project isn't really worth laying out and spinning a board. So I just used an old project board with traces made from solder.

Then, final reassembly

I wrote a quick program to sweep through the phases. I still need to write the wifi connected part, and I want to put a simple web api on it so I can remotely control.

There are no new ideas, of course.

Unsurprisingly, everything in code has already been solved and there's a moon phase library already for Arduino. So the rest of this project is mostly cut-and-paste code. Also unsurprisingly, after I embarked on this project, I found out that someone on Instructables also had this idea, too. They took a different approach, though, favoring a real time clock and keeping it more as a night-light on battery power.

About

Wemos Arduino project for a wifi-connected moon light

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages