How to Make a YouTube Subscriber Counter with ESP8266
A Youtube Subscriber counter is a useful motivation tool for every Youtuber! We use an EPS8266 a big LCD display and a 3D printed enclosure. Let's get started!
In this video, we will be making this: A DIY YouTube subscriber counter. It uses the big I2C display I reviewed a few weeks ago to display the subscriber count with big easy to see from distance numbers. The enclosure of the counter is 3D printed using a wood filament. I used two different wood filaments this time and I really love the color combination! In my opinion, it looks so cool. I really wanted a YouTube subscriber counter to help me stay motivated! Producing videos requires a great amount of time and effort. When you know that 35.000 people are waiting for a video from you, you work harder and harder to keep all these people satisfied, it gives you a great motive. So, this counter will help me stay focused. Let's now see how to build this project!
Dear friends, welcome to another ESP8266 project video. Today we are going to build a DIY You Tube subscriber counter with a big LCD display and a 3D printed enclosure. Let’s get started. Hello Guys, I am Nick and welcome to educ8s.tv, a channel that is all about DIY electronics projects with Arduino, Raspberry Pi, ESP8266 and other popular boards. Subscribe to the channel now, if you don’t want to miss any future video. In this video we will be making this- a DIY You Tube subscriber counter.
It uses the big 12C display I reviewed a few weeks ago to display the subscriber counter with big easy to see from distance numbers. The enclosure of the counter is 3D printed using wood filament. I used two different wood filaments this time and I really love the color combination! In my opinion, it looks so cool. I really wanted a You Tube subscriber counter to help me stay motivated. Producing videos requires a great amount of time and effort when you know that 35000 people are waiting for a video from you, you work harder and harder to keep all these people satisfied, it gives you a great motive. So this counter will help me stay focused. Let’s now see how to build this project. The project is really simple and easy to build. The parts needed in order to build this project are the following-
A Wemos D1 miniboard
A 30x4 12C character LCD display
The cost of the electronics is less than 10 $s. You can find links for the parts in the description of the video below. If you are going to 3 D print the enclosure, you are also going to need two rolls of wood filament. I used Form Futura’s Easy wood birch and Coconut filaments. For the enclosure, we need about 100 gms of material so it will cost us around 5$s.So the total cost of the project is around 15$s! Now let’s connect all the parts together. I used a small breadboard in order to build a prototype for the hardware and develop the code. In case you are not familiar with it, the Wemos D1 mini board is a fantastic new board which uses the ESP8266 chip. It costs around 5$ and it is 17 times faster than an Arduino Uno. It offers Wi Fi, it has, and a huge amount of memory and it can be programmed using the Arduino IDE.
The Display is a big character display which uses the 12 C interface so it is extremely easy to use with any board you like. I have prepared a detailed tutorial about this display a few weeks ago; you can check it by clicking on the card here. The connection couldn’t be easier. We connect the Vcc pin of the display to the 5V output of the Wemos D1 mini board. We connect ground to ground and then we have to connect the 12C pins. SDA pin of the display goes to the Digital Pin 2 of the Wemos D1 mini and SCL pin goes to the Pin 1.
Now if we power up the project, we can see that after a few seconds, the board is connected to the Wi Fi network and on the screen the number of the Subscribers of this channel is displayed with big numbers. The project works as expected so we can move on. I designed a simple enclosure for this project in Fusion 360- great, easy to use software. The enclosure consists of 3 parts and it took me less than two hours to design. I have uploaded the design files to thingiverse and you can download them for free. You can find a link for the enclosure files in the description below. Now it’s time to print it.
I used Formfutura’s easy wood coconut filament for the two parts, and Birch filament for the front part. It is an easy and quick print. It took me around 5 hours to print all the parts using my Wanhao i3 3D printer. After the parts were printed, I sanded them with the fine sand paper and then I applied wood varnish to them. I used different wood varnish for each color and I applied it using a small piece of cloth. Next, a let the varnish dry for 24 hours. After the varnish was dry, it was time to put the electronics inside the enclosure. I glued the front piece in place and then I placed the display to its exact position.
I used some hot glue to keep the display in place as well. Then I shouldered some female wires to the Wemos D1 mini pins we are using, and then I connected them to the display. I tested the project to see that everything is working fine and then I used hot glue to glue the board in place. The last step was to glue the back cover of the enclosure. Our project is ready and it looks so cool. In my opinion, it does not look plastic like most 3D printed objects look! I really loved how it turned out. Let’s now see the code of the project.
The project retrieves the number of the subscriber of a given You Tube channel using the You Tube API. We send a request to a Google server and the server replies with a JSON file with the number of subscribers. In order to use the You Tube API we need to have an API key. Let’s do that first. So, we have log in to our Google account and visit the developer console. We click to create a new project we give it a name and we press create. Then with the new project selected, we enable that You Tube API.The last step is to create credentials. We press the credentials key and then from the window that appears, we select to create a new API key.
We press close and we are done. Let’s now take a quick look at the code of the project. First of all we have to download some libraries. We need a version of the liquid crystal 12C library which works with the ESP8266 chips. We also need the excellent Arduino JSON library. You can find links for both libraries in the description below. Next we have to define some variables. We set the said password for the Wi Fi connection. We also need to enter the API key we created in this variable. Lastly, we need to enter the channel ID of the YouTube channel we want to check the subscriber count here.
The code is relatively simple. At first, we initialize the display and we create some custom characters for the display. We need these characters in order to produce big digits. Don’t forget the display we are using is character LCD display, it cannot display graphics. It can just display 4 lines of text. In order to create big numbers, we use two lines of text and some custom characters. Then we connect to the Wi Fi and we get the subscribers every minute. In order to get the subscriber count, we send a request to a Google server and we parse the JSON fine it responds using the Arduino JSON library. We save the subscriber count into a variable the display and we print the new number. In the loop function, we check if there is a change in the subscriber count, we clear the new number.
As always, you can find the code of the project in link in the description of the video. As a final thought, I really loved this project. It was really easy to build and inexpensive. Of course there is room for improvements. We can add a battery inside the enclosure or even sound. I am thinking about adding an 18650 lithium battery along with the Wemos battery shield. I didn’t do it in this project because I need to test the Wemos battery shield some more. This small shield can charge and project lithium batteries and so it provides an easy way to add the rechargeable batteries to our projects.
I would love to hear your opinion about this project. Do you like how it looks and can think of any improvement to this project? Please post your comments in the comments section below and don’t forget to like the video and share it with your friends if you find interesting. Also, consider subscribing to the channel and to click that bell or you tube might not show. If you are going to be shopping for parts, check out the affiliate links from the video description. That’s it for today guys, thank you very much for watching. I will see you in the next video.
This video is made by educ8s.tv, click here to see the original youtube video.