Brunetic B2 Pulse - Digital 7 Segment Clock
20 Views, 0 Favorites, 0 Comments
Brunetic B2 Pulse - Digital 7 Segment Clock
Hello! So I built a pretty cool DIY clock you can build for your own. It's based on ATmega328p which controls four 7 segment displays with 74HC595 Shift Registers.
Supplies
Materials:
- 1 pcs PD USB-C Module set to 12V - Click here to buy*
- 4 pcs 74HC595 Shift Register - Click here to buy*
- 173 pcs of 1206 SMD Red LEDs - Click here to buy*
- 28 pcs of BC817 NPN Transistors for controling each segment - Click here to buy*
- SMD Capacitors
- 6 pcs 1206 SMD 22uF Capacitors - Click here to buy*
- 3 pcs 1206 SMD 100nF Capacitors - Click here to buy*
- 2 pcs 1206 SMD 22pF Capacitors - Click here to buy*
- 4 pcs 1206 SMD 2.2uF Capacitors (optional) - Click here to buy*
- SMD Resistors
- 1 pcs 1206 SMD 10k Resistors - Click here to buy*
- 5 pcs 1206 SMD 330Ω Resistors - Click here to buy*
- 1 pcs AMS1117 5.0V SOT89 Voltage Regulator - Click here to buy*
- 1 pcs ATMega328p TQFP-32 (You can extract it from Arduino Nano or buy it) - Click here to buy*
- 1 pcs HC49S Quartz Crystal Resonator 16.000MHz - Click here to buy*
- 1 pcs JST XH2.54 2 Pin Connector 100mm - Click here to buy*
- 4 pcs JST XH2.54 9 Pin Connector 100mm - Click here to buy*
- 1 pcs RTC Clock Module DS1302 - Click here to buy*
- 26 pcs M3 10mm Screws (I used Black 12.9 Class steel M3 Hex bolts) - Click here to buy*
- 3D Printed Case i used Rosa 3D Gray filament
- Seperate Arduino Nano or Uno for programming the ATMega328p on PCB
Order All the Parts and PCB's
To get started, you need to order the PCB and prepare all required parts.
Download the PCB Gerber files provided below and order them using JLCPCB (or any PCB manufacturer of your choice). Make sure to order all the boards included in the files.
Next, download and 3D print all mechanical parts using the STL files attached on this page. Any standard FDM 3D printer will work.I personally used an Ender 3 V3 SE, which has a limited build area. Because of this, I had to split the main board into two separate parts so it would fit on my 3D printer. However, I have also provided the full, single-piece board version for those who have access to a larger 3D printer.
Below, you can also find the full schematic of the entire project, which shows how all components are connected and how the system works.
Soldering All the Boards
Control Board
Start by soldering the control board. You can choose any soldering method you are comfortable with — a soldering iron, hot air gun, or a hot plate. I personally used a soldering iron and a hot air gun, as my hot plate was too small for this PCB.
Once the control board is fully soldered, use a multimeter continuity mode to check for any shorts on the 12V+ to GND and 5V+ to GND power lines.
If no shorts are present, you are ready to connect the board using a USB-C PD module set to 12V.
If the LED next to the AMS1117-5.0 regulator lights up, it means the power section is working correctly. We will move on to programming in the next step.
Four Segment Boards
Next comes the more time-consuming part: soldering the 168 LEDs across the four segment boards. This step requires patience and attention, as it involves a lot of soldering and produces fumes — make sure to use a fume extractor and work safely.
After soldering both sides of each segment board, check again for any shorts on the 12V+ line.
You can then briefly connect each segment board to 12V and test every segment individually to confirm that all LEDs are correctly connected and functioning.
Prorgamming the ATMEGA328P
Now it’s time to program the ATmega328P on the control board.
I won’t go into detail on how to program an ATmega328P using an Arduino Nano, as there are already many great tutorials available online. If you are using a brand-new ATmega328P, you must first burn the bootloader. Use the upload pins provided on the PCB.
Click here to see a detailed tutorial on how to do this.
Code
Once you are able to program the ATmega328P, upload the code provided below.
To successfully compile the code, you need to install the following libraries:
- ArduinoRTClibrary (virtuabotixRTC)
- ShiftRegister74HC595
You can install both libraries using the Arduino Library Manager, or download them directly from the links provided below.
Setting the Initial Time
To set the initial date and time, uncomment line 82 in the code and enter the current date and time. Then upload the code to the ATmega328P.
After the upload is complete, comment out line 82 again and upload the code once more.
This step is important — otherwise, the date and time would reset to the same value every time the device is restarted.
Assembly
Now it’s time for the final assembly.
Start by mounting all segment boards, the control board, the RTC module, and the USB-C PD module onto the main 3D-printed base using M3 screws.
Next, make the electrical connections:
- Connect 12V and GND from the USB-C PD module to the control board using a 2-pin JST connector.
- Connect all segment boards to the control board using 9-pin JST connectors.
- Connect the RTC module to the control board using five standard wires.
Once everything is connected, plug a USB-C cable into a power supply that supports Power Delivery (PD).
If all steps were done correctly, the clock should power on and work as expected.
Done!
If you want to mount it on the wall use 2 sided tape made for hanging something on wall
If something doesn’t work or you have any questions, feel free to leave a comment or contact me directly on Discord: 8nix_