This is my first time building an IoT device, so it was quite a bit of a learning curve but hopefully this blog post will encourage you to take a jump in. I have to give credit to this post by Garrett, a very good starting point.
How it started
A couple of months ago, I got tired of setting the time my bedroom LED clock every month at least. I have used Atomic Solar wristwatches for the last 10 yrs so I am used to self-setting clocks. I decided to look for an LED Atomic table clock. Easier said than done, I found out the following about the options you have available in the market
- The LED is too bright for the bedroom, I want it to be dim yet visible in the night
- A lot of the Atomic LED table clocks have this projection feature, which I do not like but there is no option to remove it!
- A number of users report that depending on the position of the clock it may be difficult to sync up. The Atomic clock uses radio waves to sync up.
- I bought one and when it syncs up the LED starts flashing!
- A lot of them have extra stuff I don’t need like Temperature, humidity etc.
So here is what I want
- LED clock, no temperature or extra stuff.
- Sync up time via internet or via radio waves. I don’t have to ever set it.
- No battery, don’t want to change any battery
- Not too bright
- No projection
Build it yourself
Well I found nothing out there in the market that fits my needs, so build it yourself, I guess that’s the entrepreneur in me.
I used Garrett’s post and there is no need to re-harsh it, I will just talk about the modifications I made to fit my needs and the new things I learned.
The elements to get
- The Photon you can get from Amazon, I advise you get the separate Photon Particle and not the kit. When you get the photon, power it on immediately with a usb cable, I got one which was DOA.
- The small Breadboard you can get from Amazon, I advise you get the 6 pack, I think its worth it.
- The cables you can get from Amazon, I advise you get the pack with different types
- The LED you can also get from Amazon.
Putting it together
Garrett’s article has good links which have instructions. Here are my tips
- When registering the photon on your wifi, you may use a mac filter like me, get the mac address from your router. First open your router for all macs then look at your connected devices and you should see the mac address.
Soldering: Perhaps the biggest learning curve for me. I have soldered in the past and I did study engineering so I remember my labs but I was not given a proper lesson on how to solder. Well today we have the internet (and Youtube..chuckle). After bungling two 2 LEDs, I decided to watch some youtube videos on soldering. Here is what I learned.
- Make sure your soldering iron head is clean
- Have some soldering wick and a desolder pump around. I would say get this solder kit, it was quite useful and get some wick.
- When soldering you are adding a conducting substance which connects the data flow between two units. Its not to hold unit A to the board! That is what I thought I was doing, so funny. So I have solder fluid all over the place.
- Soldering should be neat and just adequate, don’t let solder fluid bridge two points together else there is data cross. Use the Desoldering pump to clear any excess solder fluid. You can also use desolder wick to clean up any excess solder fluid.
- Make sure your soldering iron head is clean
- Go to the Particle website and use the WebIDE programing platform. It is easy and connected to your device.
- Go to https://www.particle.io/
- Make sure you create an id, you should do that before you register your Photon in the Phone app so that your Particle account is linked to your Photon.
- On the toolbar select WebIDE
- Download the code package from Garrett’s Github. Get the ino file.
- In the WebIDE, create an app.
- Search for 2 libraries and include them
- Paste in the ino contents from Garrett.
- I set the timezone (I am EST) and I want to use 12hr time format.
- I want to adjust the brightness
- I want to see “12” when it is 12PM or 12AM
- After these adjustments, click verify to compile it.
- Click to flash it to the Photon
Enclose the device
Garret has a 3D SKP drawing. Download it.
Download and install the Sketch application
Open the SKP file and export it as an STL and take to a 3D printing service.
Tell the 3D printing shop to scale it such that the opening in the front where the LED goes to is 4.75″.
After all the parts are printed, put all the teethed parts together. Make sure you push from the top downwards in a 90 degree shape. Don’t push in a 180 degree manner and then bend to a 90 degree. get some W40 grease spray and a hammer to gently hit from the top.
Now pass the micro-usb head through the round hole at the back plate to plug into the photon. Remove the sticker on the Breadboard and stick it to the LED towards the right side. Get some removable putty and place a little under the breadboard, I have found the sticky a bit flaky.
Once all the 4 teethed parts are together, a lot depends on what you want to do, you can get some super glue and put the back and front together. Of course if you need to open it in the future you have to deal with that. I wanted something less permanent, so I got removable putty. I use putty to attached the LED to the front plate, then I used putty to attached the front and back plates. My putty was white and my box was black, so I used a black marker to color the putty black. You can also get some small paint for that. And here it is. The digits are actually orangish, not white, guess that’s from the camera.