Schematic review - Page 1
Forum section: electronics / beginners

author: sephtron
author_rank: Newbie
timestamp: January 04, 2021, 04:40:26 am
content: Hey all, newbie here with my first schematic.I'm building an OLED watch with an ATMega328p and PCF8563 RTC. It has three buttons to be connected to the same external interrupt. Also included an MCP73831 for the battery charging circuit.I'd love some feedback as I'm sure there must be something I've missed or misunderstood.Thanks!

author: Peabody
author_rank: Super Contributor
timestamp: January 04, 2021, 06:16:26 am
content: I haven't studied the whole thing, but your P-channel mosfet after the battery is oriented backwards. The drain has to be connected to the battery, and the source to Vcc. This allows the mosfet's body diode to block USB voltage from getting back to the battery. See Figure 5 of this app note:http://ww1.microchip.com/downloads/en/AppNotes/01149c.pdfWhen a button is pushed, how are you going to identify which one was pushed?

author: sephtron
author_rank: Newbie
timestamp: January 04, 2021, 07:30:52 am
content: Oh, yeah thanks for pointing that out.> When a button is pushed, how are you going to identify which one was pushed?By code, got the idea here:https://www.hackster.io/Svizel_pritula/10-buttons-using-1-interrupt-2bd1f8My prototype seems to work, so far.

author: Peabody
author_rank: Super Contributor
timestamp: January 04, 2021, 03:20:40 pm
content: Sound like you have everything covered. One thing you might look at is the MCP73871 charger chip. It looks like it has the load sharing function built in, so you wouldn't need the mosfet or the diode. But I've never used one, so don't know how well it works.Edit: It turns out the MCP73871 only comes in a QFN package. That would be a deal breaker for me.

author: sephtron
author_rank: Newbie
timestamp: January 04, 2021, 04:44:04 pm
content: Thanks, I've prototyped it with modules and an Arduino board so far. So here's hoping the PCB version works haha.> It looks like it has the load sharing function built in, so you wouldn't need the mosfet or the diode.Ohh, I'll give it another look. So with the charging circuit, I was referring to this existing project's design :https://blog.zakkemble.net/diy-digital-wristwatch/He explains it more here:https://blog.zakkemble.net/a-lithium-battery-charger-with-load-sharing/When i looked it up, the MCP73831T seems to come in a SOT-23-5 package. It can be found in JLCPCB's parts list:https://jlcpcb.com/parts/componentSearch?searchTxt=C14879https://datasheet.lcsc.com/szlcsc/Microchip-Tech-MCP73831T-2ATI-OT_C14879.pdf

author: pigrew
author_rank: Frequent Contributor
timestamp: January 04, 2021, 09:13:32 pm
content: Except for the previously-noted backwards MOSFET, everything seems OK.However, there are a few things I'd do in my design:Add load capacitor (likely ~20 pF) on the RTC's OSCI pin.Add decoupling caps near the MCU's VDD pins. (100 nF each according to Atmel).Add resistor to short USB's shield to GND.Swap the direction of the LED, so that it's connected to VDD, and the MCU would have an open-drain output.Add pull-up on the display's nCS, so that it doesn't get confused during power-up.If the XTAL pins of the MCU are unused, they should be grounded (perhaps through a 0-ohm resistor).Verify battery has over-discharge protection.I'm not familiar with AVR, but do you need a programming header? Are the button pins, and INTC pin, all interrupt capable (to wakeup the MCU)?(maybe) add a 100k to 470k pull-up on the SPI_SI net because inputs are bad for power consumption.