Building a Subscription Counting Clock!
The HackMakeMod Subscription Counting Clock is the perfect project to get started in the maker hobby! Even if you don’t care to keep track of social stats, it’s a great looking clock that always has perfect time!
This project touches on key disciplines worth learning for future projects that include Electronics, Programming and 3D Printing.
Supplies and Tools:
- 2 x MAX7219 LED Dot Matrix Modules 32×8 (ea)
- 2 x Ribbon Cable Connectors
- 1 x D1 Mini ESP8266 12F Micro Controller
- 1 x Cricut Premium Vinyl – True Brushed
- 4 x Foam Edge Spacers
- 1 x Double Stick Foam Pad
- 1 x USB 5V Wall Charger
- 1 x Micro USB Cable (6ft)
Tools and Supplies you’ll need:
- Soldering Iron
- Wire Cutters or Flush Cutters
- Wire Strippers
- Double Sided Tape (or anything else that can mount the ESP chip to the back of the LED boards)
- Your Undivided Attention
If you’re going to be printing the enclosure with your own 3D printer, you may want to start that first. This print took 6 hours for our printer!
Download our enclosure design HERE:
https://a360.co/3qL5TW0 (These 3D models do not require supports)
We designed a split version of the housing for those of you that have smaller print beds. The two halves can be super-glued together after printing. Note: It is not necessary to glue the back cover. Both halves can be installed with a friction fit individually.
https://a360.co/30xHtEb (These 3D models do not require supports)
After printing, use super glue to hold the two enclosure halves together. The back cover functions as two independent halves and doesn’t require gluing.
Back To The Basics
On the LED Dot Matrix modules, you’ll see a few things: A series of numbers on the sides, an IN and an OUT marked on the PCB (printed circuit board), and “VCC, GND, DOUT/DIN, CS, and CLK.”
Under the DOUT Remove one of the LED displays from one of your displays with a careful pull. This will give you space to connect them easily.
Connect the 5 pins from the other board’s IN to the OUT on the board you just pulled an LED from.
Position them at 90 degrees, and slide the 5 pins into the holes on the other PCB.
Once inserted, bend the pins back to a straight line (You may even bend them beyond straight to secure the connection).
Solder the now connected pins that are now through the board marked OUT.
Reconnect the missing display. Make sure you put the numbered side back in proper orientation.
Remove the extra input pins on the side of the board. We’re going to be soldering to the back pads of the PCB, so the extra pins are not needed.
Cut the wire to about four inches and strip a quarter of an inch of the wires bare on each end.
Take your soldering iron and tin all of the wires on both ends. Trim off any extra length you don’t need, especially if it’s bulging at the end of the wire.
Solder your IN PCB pads to your freshly tinned wires. It can be helpful to apply a little solder to the pads first, then apply the tinned wire and let it sink into the pre-applied solder!
Note: Wire colors may vary from kit to kit.
Take note of which wires attach to which pads!
Next, solder your wires to the appropriate places on the ESP8266 chip.
For your power wires:
VCC goes to 5V
GND to G
For the data wires, we wired:
DIN to D7
CS to D8
CLK to D5
Here’s a wiring diagram for example
If you wired your data differently, it’s OK! You’ll just have to remember how you connected it later.
Stick your ESP8266 to the back of your LED PCB with some double sided tape.
You’re all done building the internal parts of your clock! Hold off on inserting the hardware into the case. If there’s something wrong once you’ve uploaded code into your clock, you’ll want to have it out of the case to work on it. Additionally, there’s still much to do before you’ll get to see all those precious subs! Now, we’re going online.
Let’s Get Technical
At this point, we need to get the resources that will communicate information to our ESP8266 board. There’s a number of downloads, so follow closely!
Go to https://www.arduino.cc/en/software. Download the appropriate version for your operating system and install the program. We’re going to use Arduino.IDE to upload our code to the ESP8266. Speaking of that chip…
Go to https://github.com/nodemcu/nodemcu-devkit/tree/master/Drivers. Download the appropriate driver for your operating system and install. This will allow the ESP8266 to connect to the internet.
Once installed, open your Arduino.IDE program. Click on “Tools,” and find “Manage Libraries.”
Once there, search for the Libraries listed below. The library search bar is case sensitive. Make sure you search for these properly or they won’t show up.
WiFiUdp.h <— Contained within the WiFi101 Library
You may need to restart the program or your computer after downloading all of this!
After installing all the libraries, we need to ensure Arduino.IDE knows we’re working with and where to find it.
Go to preferences…
In the “Additional Boards Manager URLs:” we need to add this line…
If you already have it… Great! If not, just click on the little window pop-up box and add it. You may, or may not have other lines in there already.
Next go to —>”Tools” —>”Boards Manager”
After you install esp8266 got to…
Tools -> Board -> ESP8266 Boards ->
Then select: NodeMCU 1.0 (ESP-12E Module) for the microcontroller included in our kit.
Next, connect your power USB cable to the ESP8266 and connect to your computer (Note: 1:28 A.M. is the default time. If you see that, it’s OK for right now!)
Then, select the correct serial port in Arduino.IDE. In our experience, it’s been listed as COM3, COM4, or COM 5. Once selected, we’re going back to the internet to get our code.
SocialGenius Makes It EASY
Go to SocialGenius.Io. Register an account and log in.
Choose your YouTube channel that you’d like to follow, and copy/paste their URL into the “Setup your API Feed” field, then click “Preview and Save.”
Once saved, you should see the thumbnail for that particular channel. Click “Generate Code For My Project!” And you’ll see a number of options.
Now, Select the correct time zone for your clock. It will check you’re computer’s selected time zone and guess, but there’s a number of options for your time zones.
Next, write your WiFi’s name and password below.
Next, check to make sure the CS Pin, Clock Pin, and Data Pins are correct in the fields below. If you’ve followed our instructions above, you should have them correctly. If you did anything otherwise, it’s OK! Just make sure you type the correct connections into SocialGenius, and the code will be generated for that wiring scheme.
Lastly, decide how long you want your clock to take for it’s transitions. Whatever time you decide can be written into the “Transition Time” field.
I like to have my clock take 6 seconds per frame. That’s 1.5 seconds of fade in, 3 seconds of hold, and 1.5 seconds of fade out. Use whatever time you like.
Now, click “Copy to Clipboard” on SocialGenius.
Then, get back to the Arduino.ide. Select All of the text that starts in the program, and paste the new text over all of it. If you don’t get rid of that start-up text, this won’t work!
If everything has gone right, and you’ve selected all of the information correctly, click the arrow (Upload) and send your information over to the ESP8266. If you hit an error, check back over the libraries and make sure you have everything installed and plugged in correctly.
We’re almost done! Once you see the display come up correctly with your channel information, all that’s left is to put the clock in it’s enclosure.
To support the clock, place your four foam pads inside the clock, opposite to each other. Place two on each side.
Then, gently and carefully, shove your clock into the frame. Make sure the foam pads don’t roll under as you push the LED displays in. It might sound ugly as you push plastic against foam, but it’s a snug fit. Just make sure you see all four pads by the time the LEDs are all the way in.
Next, Remove the backing to your vinyl to expose it’s sticky side. Take the case and lay it over the adhering side of your vinyl.
Cut to size with an Exacto knife or any similarly sharp and useful tool.
After that, plug the charging cable into a 5V wall plug, close the back of the clock frame, and plug your clock in!
Chad’s tip: Give your wire a small coil as you place it in so the ESP has some slack and won’t be pulled to hard by the cable!
Congratulations! Now you never have to go searching online for your subscriptions again. The time of day, day of the week, YouTube subscriptions and views will start to roll by on whatever time transition you decided. If this guide has been helpful for you, give it a share and show off your piece with #HackMakeMod! We’d love to see your work!
It is our mission to help you have a path to a successful project! If you have difficulty following our instructions please let us know: firstname.lastname@example.org