Youtube Subscriber Counter Award With New Subscribers Alerts!

by justbarran in Circuits > Electronics

1210 Views, 12 Favorites, 0 Comments

Youtube Subscriber Counter Award With New Subscribers Alerts!

youtube subs tumbnail.png
IMG_5861.JPG
F33OAV3LCUJ5XZZ.png
YouTube Award 2023 now comes with a Subscriber Counter, new subs alerts and RGBs!

Being a young youtube channel is hard. Sometimes my motivation to do projects gets really low so why not let my youtube viewers also remind me they like my content and alert me in the most excellent way? This might just be the small motivation I need to get me excited on a day I am feeling unmotivated. Day or Night.

Introducing the live youtube subscriber counter now with an alarm that alerts you of new subscribers. Hope you enjoy this project.

Features

  • Display Up to 999k Subs
  • RGBs (which we all know make everything better)
  • Multiple RGB pattern settings via programmable LEDs
  • WiFi (Bluetooth not used yet!)
  • Get alerted when your subscriber count goes up.

Full Project Video: https://www.youtube.com/watch?v=Xyod39A879Y

Supplies

3D Printer Section

Microcontroller:

7 Segment display

Bell section

Button

Tools and etc stuff


This post contains affiliate links, which help support my channel. If you purchase through one of my links, I may earn a small commission; at no extra cost to you.

Design and 3D Printing

Screenshot 2023-01-14 003056.png
Screenshot 2023-01-14 003138.png
Screenshot 2023-01-14 003157.png
3d parts_1.88.1.png
3d parts_1.88.2_1.102.2_1.100.1.png
heated inserts_1.129.1.png
base_1.146.1_1.144.2.png

This is my first time designing something of this size and level but I tried. For this, I went with two parts.

I used fusion 360.

Files: https://www.thingiverse.com/thing:5786711

  • The youtube award
  • would hold the 7 Segment Display and show the subscriber count
  • grey
  • The Base
  • Which would hold the Award, main MCU board, servo and bell
  • black

You can use any combination of colours that you like. Note you may want to use my Light tester STL to make sure your filament is allow light to pass through nicely. https://www.thingiverse.com/thing:5786850


My 3d Printer is an ender 3v2 upgrade to an S1.

  • Layer height 0.2mm
  • Supports: yes
  • Infill 20% but it can be lower

For the Award I went with Grey PLA+ I had while for the base I went with PETG because I did not have black PLA on hand. If I did I would use black PLA. In my project, the Bell holder had a layer split while printing due to PETG warping on the tower. I had to reinforce this with epoxy after.

How the supports are for the wire channels, you can use a flat-tip screwdriver to release the supports and pliers to pull them out.

For the Award, my printer had a slight curve on the corners of the slot for the 7-segment displays so I had to send down two of the 7-segment displays to allow the corners to fit. This would not affect the display shows.

Also, The depth of the slot is more than the width of the LEDs so it is important to solder the LEDs as in my video by aligning the LEDs first, putting them in the slot, all the way in and soldering the pins while at that depth

so that the LEDs press on the filament.

Next, use the M3 Heat Set Insert and set the soldering iron to the temperature recommended to melt the filament to drive the inserts for the Bell, Servo and protoboard.

Solder a pair of wires about 100mm long to the 12mm push button, under the screw locks and put it in the hole. From the underside with pliers, you can hold the washer and nut in place and twist the button to lock it in place. Fish the wire through the channel underneath the base and up through the back hole. Here you can solder a pair of male 2.5mm headers to the end to be used later.


NOTE BELL IS OPTIONAL:

The hole on the micro servo would need to widen, I used a Dremel and a bit the size of an m3 screw for this.

From here you can use two nylon washers and a ~7mm (or anything that works) M3 screw to secure the bell and servo. Set the servo arm such that 90 degrees are perpendicular to the bell.

Measure and cut a length of the 18ga artistic wire about 80-85mm long which would allow you to make two hooks on each end.

Using the Dremel again and a bit of about 1.5mm drill a hole in the bell at the centre of the first curve and widen the furthest servo arm hole. this is to allow the 18ga wire to pass and hook through.

LED 7 Segment Display

youtube sub counter display driver.png
Screenshot 2023-01-14 031917.png
Screenshot 2023-01-14 031710.png
3d parts_1.88.2_1.102.1.png
3d parts_1.88.2_1.102.2_1.100.1.png
leds_1.107.1.png
led board back_1.111.1.png
back_1.165.1.png

See the circuit diagram above.

To solder the display, make sure they are in the slot on the Award and pushed all the way in. then take the protoboard, and line up the holes such that you have room on the board for the max7219 and wires. I found it was also good to use some m2 screws to lift the protoboard of the PLA so it can be removed easily with a flat-tip screwdriver.

There is no easy way to do this board I found out the hard way. It would be better to do a PCB design but I found it hard to justify a design for something I would only use once.

I started off by measuring cutting and stripping short about 30mm lengths of the ribbon cable. Here all the segments need to be tied to the same as the max7219 uses multiplexing to drive all the displays with as few wires as possible.

See attached photo for 3 digit 7 Segment display pinout and 2 digits 7-segment display pinout.

If you are using a 3-digit display you need x2 displays and if you are using a 2 digits display you need x3 displays to make up the 6 digits.

Once this was done I moved on to the Max7219 connecting all the letters and digits accordingly. It is important to add the capacitors as close to the power as possible.

On this board, I also put a passthrough for the programmable LEDs strip so there is less wiring needed. I put a male header on this board so the strip can plug into it to get the data line, 5v power and ground. It is also important here to put a capacitor and protection resistor of 200 to 500 ohms. I went with 330.

I use a piece of ribbon cable with 6 pins with the same pinout as the logic level converter to connect this board with the Brain board.

Brain

Seed Xiao (2).png
main board 2_1.149.1.png
main board_1.162.1.png

See the circuit diagram above

It is important to maximise the space on the small board.

I use female headers here so that the xiao wifi can be removed if needed or replaced. As well it makes it easy for the system to be plugged and play and make future upgrades if needed.

I ran wires both above and below the board, avoiding the screw holes.

once down screw down the protoboard in the grove on the base and connect the display, servo and button.

Code

Link to Code: https://github.com/justbarran/YoutubeSubCounter

I am using Arduino 2.03 at the time of this Instructables:


Some of the code was taken from @CallousCoder on YT

So some credit goes to him, Please check out and support his channel if you do use this code

His video: Making YT Subscriber counter on ePaper


Getting Started with Seeed Studio XIAO ESP32C3:

https://wiki.seeedstudio.com/XIAO_ESP32C3_Getting_Started/

You would need to add the ESP32 board to the Arduino IDE if you don't have it already.


Needed Arduino Libraries that need to be added via Arduino library manager:

https://github.com/noah1510/LedController v2.0.1

https://madhephaestus.github.io/ESP32Servo/annotated.html v0.12.0

https://arduinojson.org/?utm_source=meta&utm_medium=library.properties v6.20.0

https://github.com/adafruit/Adafruit_NeoPixel v1.10.6


The only change to the code needed is:

char ssid[] = "your ssid ";     
char password[] = "wifi password";
#define API_KEY "google api key" //https://developers.google.com/youtube/v3/getting-started
#define CHANNEL_ID "yt channel id you want to track"  //https://support.google.com/youtube/answer/3250431?hl=en


To get your youtube Id check: https://support.google.com/youtube/answer/3250431?hl=en

To get a google API key Follow the steps: https://developers.google.com/youtube/v3/getting-started and

 https://console.developers.google.com and make sure you are logged in to your Gmail account.


You can test whether the API is working by going to this address in your browser:

 https://www.googleapis.com/youtube/v3/channels?part=statistics&id=YourYoutubeID&key=YourYoutubeAPIKey

Replace "YourYoutubeID" with your YouTube ID and "YourYoutubeAPIKey" with your API key.


OPTIONALLY you can adjust setting like the brightness of the LED strip via

#define BRIGHTNESS 255 //0 - 255

The value here 255 is the brightest setting and 0 is off.


and the 7-segment displays

#define LED_INTENSITY 10 //0 - 15

The value here is 15 is the brightest setting and 0 is off.


Additional lighting patterns could be added and colour settings in the LEDs state machines and updated count.

Presently by default the board power up into Pattern 1 by pressing the button you can cycle into different lighting patterns

  1. Rainbow colours
  2. blue
  3. green
  4. red
  5. RGB off

Once it goes past 5, it reset to '0' and everything including the 7-segment display is turned off. Pressing the button again would return it back to pattern 1 with 7 segments coming back on. If the subscribe count increases no matter the pattern state, the pattern automatically changes to '1' and the 7-segment display comes back on. Pressing the button with simply turn off the alarm. The button would then need to be pressed again to change the pattern.

Thanks and Updates

all together_1.164.1.png
back_1.165.1.png
display_1.192.1.png

The code can be updated to also notify new views or alert when another youtube uploaded a new video. Polssiablites are endless. Additional lighting patterns can be added,

I am also thinking about controlling and setting up over wifi, where I can control how loud the bell rings and control brightness and patterns. But that is for another project.

Thank you for checking out my project you can always support my projects by checking out my youtube channel @ https://www.youtube.com/c/justbarran , giving a like, commenting on my videos and subscribing and I would be listening out for the bell!

If I made a mistake or forgot something let me know, please. Also, let me know of any ideas or updates you would like to see in version two.