I'm trying to build a clock, rate my first schematic design

Hey guys, I'm a developer trying to learn pcb design and advanced hardware design and needed a place to start. I've designed a very basic clock with a Atmel Atmega328P-AU and from checking out some reference designs.

This design is my first ever design so not so great on rules and general design principles. I would like to be sure that this is a functional project rather than a pretty one. Are my connections correct? Is the 7 segment display wired correctly, is the DS1307 going to work? Can I connect MOSI, MISO and SCK to test pads on the PCB and use it to cleanly program the system effectively?

Please let me know of anything stupid I've done or any resources that can help me improve.

Thank you for your time everyone!

Regarding the DS1307, the datasheet recommends pulling the SQW/OUT (pin 7) high, even if unused. I use this chip in a lot of projects and use a Bournes 4604X-101-103LF resistor network (chip pin 8 is VCC, which lines up with pin 1 of the resistor): it makes tying up SQW, SDA and SCL simple.

@timinelmira Thanks for feedback, I'll incorporate the changes immediately. Thanks for your quick response, looking forward to more feedback.

The digital power section is wrong , not sure what you are doing there , but the transistors are the wrong way around

Hey Hammy, I've referenced the design from here.

Thanks for replying so quickly, is the reference design itself incorrect or have I misunderstood it?

You need current limiting resistors for the LED segments.

The reference you linked shows the collectors of the transistors going to Vcc, not GND.

Good notice @david_2018, the reason for this is because my 7 segment display is a common cathode display.

The part I'm using: FJ3462AH Shenzhen Zhihao Elec | C528072 - LCSC Electronics

Where would I add the current limiting resistors for the LED segments and how large should the resistor be? The system is being powered via 3 AAA batteries, generating a total of 4.5 volts, I'm stabilising the same via a LDO.

  • Q1 thru Q4 are not correctly connected.

  • LED3 needs a series resistor.

  • Use a DS3231 instead, it is far superior.

  • 7 segment LEDs require series resistors.

  • Switch 1 looks suspicious.

I stopped looking for anything more after 4 problems.

  • What would the correct way to connect them being, I'm sorry the question may be obvious to you but it's not to me. Any help is appreciated, thanks for your feedback.

  • LED3 needs a series resistor, I've added a 300 ohm resistor for the same. Thanks for that.

  • I've gone with a 7 segment display due to aesthetic reasons, I have a specific use case for the same as well.

  • I've added 150E resistors to the 7 segment LED's, thanks for your help good catch.

  • Here's the part number for SW1, it's a tactile switch. Let me know if you think it's wrong.

Thanks Larry for your extremely thorough feedback, much appreciated.

There seems little point adding the 16MHz crystal and caps. Running the atmega at 8MHz using it's internal 8MHz clock will be fast enough. Timing won't be as accurate as with a crystal, but this won't be a problem because you will have the ds1307/ds3231 for accurate timing.

  • Emitter to GND.

  • Looks like you use 1 and 2.

You might want to calculate the expected current draw for the display, the batteries are not going to last long if you continuously display the time.

It's also here: atmega328p - I'm trying to create a clock. Rate my first schematic design - Electrical Engineering Stack Exchange

Nice schematic. One thing I would worry about is the shortage of decoupling capacitors for the regulator. Parallel C3 and C4 with something in the 100nF range for high frequency bypass for the regulator. I did not look yours up but most require it for stable operation. I would also recommend you use something n the 4.7K for the pull up resistors on the I2C bus. I like about 1mA to keep noise out of it.

What is the zener on the led supposed to do?
LED is backwards ...

Npn transistors control current flow from the collector through to the emitter - the transistors appear upside down ; but the designers intentions are not clear .

Thank you everyone for so much feedback, I'll upload a updated schematic with everything I've learnt with the help of the community.

Yes, @6v6gt that's also me on the Electrical Engineering Stack Exchange, for some more feedback.

Fixes

  • Fixed the transistors being in the incorrect direction.
  • SW1's orientation
  • Added resistors to the power led
  • Blink led's polarity
  • Added resistors to the 7 segment display's
  • Reduced the resistors on the base of the transistors

Things I've not fixed yet

  • How to power the board, as a clock I want it to be able to last for a reasonable amount of time. Atleast more than a month, or 2-3 weeks.
  • The SOT power package, some people suggested using a buck/boost converter. No idea what this is, any reference designs/ videos would help.

Don’t say things are fixed, show us the new schematic.

I understand, as a noob I appreciate the help. Here's the new schematic :slight_smile:

I'd appreciate any sort of help about mistakes I've made, possible solutions for my power system.

With 3 AAA batteries and a LDO I won't be able to power the system for too long. Plus the efficiency is non-existent at best.

Confirm this switch is Normally Open.