This month’s project; a YouTube statistics counter I made from spare parts I had laying around and also a good opportunity to play around with the ESP8266 module which is a WiFi chip that contains an 80Mhz 32bit CPU with some flash space free to run some additional code on. It has a USB bootloader in ROM to enable you to install custom programs which can be written in lua, python or C++ to increase it’s functionality. It’s basically a high speed Arduino as it can be programmed with the Arduino IDE amongst others. The Arduino IDE is what I used as I was already familiar with that and C++. I have a crap ton of spare 7 segment LED displays so I thought I’d put some of them to use and designed a YouTube stats counter that shows your current subscriber count and views to your YouTube page.
Now YouTube made some changes to how the subscriber counts are displayed last year and now instead of it showing you the exact number of subscribers you have they are now approximated and rounded down on a sliding scale. For example subscriber counts below 999 will show exact numbers and above 1000 they are rounded to the lowest 10 e.g 1234 subscribers will show 1230 or 1.23K depending on where it is displayed. This counter gets it’s statistics via the YouTube API which only returns numbers so in this case it would return 1230. So I decided that I would settle for a 4 digit display for subscribers and 8 digits for views. It is ideal for smaller channels with less than 10,000 subscribers who want to keep an eye on their channel growing. When you are just starting every new subscriber counts and this will show it in relative real time; the counts are updated every 5 mins.
As you can see I decided to make my own PCB as I didn’t want to assemble it on prototype board and connect loads of wires as that would just take too much time and it’s a tedious process. You can get boards made now for very cheap; I used JLCPCB and it only cost $17 including shipping which even with the current restrictions was very quick. The boards were manufactured and sent to me within 2 weeks. Not bad.
The circuit consists of an NodeMCU ESP8266-12E module, 2 MAX7219 chips and a 74ACHT125 buffer which serves to convert the 3.3V logic signals of the 8266 into the 5V the MAX7219 requires. Some vintage Fairchild MAN74A 7 segment LED displays finish the design for a retro look. I plan to fit it into a photo frame or perspex display case to finish the counter. Power is supplied via USB although I have provided PCB pads for a 5 volt standalone power supply.
I do have some spare blank unpopulated PCB’s for this project. Please let me know in the comments below if you would like one. They would be sold via eBay UK and I will list one as needed. Link to buy a completed PCB with orange LED displays here.
Code and all other files can be downloaded here Please click on read more for setup instructions.
Updated firmware version 1.02 (fixed HELP error not displaying if can’t connect to WiFi network.
This project is being released under the creative commons non commercial licence. You are free to download / use / modify any of the project for your personal use but must give me credit in any of your modifications if you re-release it on the internet. You may not use this project for commercial purposes i.e. make copies and sell them for profit.
Continue reading →