First proper schematic - Binary Clock - Page 1
Forum section: electronics / beginners

author: paulca
author_rank: Super Contributor
timestamp: February 10, 2018, 09:06:32 pm
content: So I've been trying to learn KiCad as my schematic tool.This is my first attempt at a project using it.It's a binary clocked based on an ATMega328P MCU and TLC59282 LED Driver with a RS1302 real time clock.Power supply is not shown, current plan is an 18650 with Wemos battery shield (basically a TP4056 + 5V boost).I'm not showing the attempt at the PCB yet. I had to do messed up things like reverse the bit order of the LEDs to stop whole groups of tracks crossing. I can handle that in code, just shift the byte out in reverse order.EDIT: Just noticed, I haven't put the setting buttons on there yet. Don't want to have to get the ISP programmer out to set the clock.

author: Cyberdragon
author_rank: Super Contributor
timestamp: February 10, 2018, 09:51:55 pm
content: You don't need a LED driver. Just connect the hours and minutes together directly to the controller and and multiplex them. Then connect the other LEDs to the remaining pins. The controller can handle 40mA per pin and 200mA total, which is plenty for simple indicator LEDs.

author: Brumby
author_rank: Unknown
timestamp: February 10, 2018, 10:05:36 pm
content: .... Except that at 7:31:31 PM there will be 3 + 5 + 5 +1 = 14 LEDs lit at the one time.* Thinks ** does some numbers *But - that's still 14mA per LED - which should be more than enough.

author: paulca
author_rank: Super Contributor
timestamp: February 10, 2018, 10:14:29 pm
content: I considered multiplexing, but decided not to.Also remember the LED driver means I don't need 17 current limiting resistors. Although, I believe with multiplexing I can share them and need less of them.Anyway, I already have the BOM at hand.

author: Cyberdragon
author_rank: Super Contributor
timestamp: February 10, 2018, 10:16:54 pm
content: Quote from: Brumby on February 10, 2018, 10:05:36 pmNo, there wouldn't be. It would be multiplexed, so there'd be a max of 9 LEDs on at the same time

author: paulca
author_rank: Super Contributor
timestamp: February 10, 2018, 10:19:26 pm
content: Also... if I multiplex the hours and minutes do I not need to common ground each bank to a MCU pin in order to select which bank?Does that not mean I have the current of 6 LEDs sinking through a single pin?Unless you mean to double multiplex like a grid. Meh. Too much hassle.I could mosfet the sink pins... but this is why they made the LED Driver chip!

author: Cyberdragon
author_rank: Super Contributor
timestamp: February 10, 2018, 10:22:48 pm
content: Quote from: paulca on February 10, 2018, 10:14:29 pmYou'd actually only need 6 resistors if you multiplexed them all on the same 5 lines.

author: Brumby
author_rank: Unknown
timestamp: February 10, 2018, 10:27:27 pm
content: Quote from: Cyberdragon on February 10, 2018, 10:16:54 pmI'm still on my first caffeine for the day....

author: Nusa
author_rank: Super Contributor
timestamp: February 10, 2018, 10:31:40 pm
content: If you want your clock to have a 24-hour display mode, you need another LED for the hours.You've got a number of +5 spots on the schematic that are annoying to look at because they're connected directly to a cap without any visual sign of an input, such as an unconnected line with a label to indicate where it comes from. It's a legibility thing, not a functional thing.

author: Cyberdragon
author_rank: Super Contributor
timestamp: February 10, 2018, 10:42:14 pm
content: Quote from: paulca on February 10, 2018, 10:19:26 pmYou have the current on the driver set to 5 mA per LED. If that's the brightness you want, you could easily sink 5 LEDs (the max on for a line) directly into an IO pin to direct multiplex all the LEDs on the same set of 6 lines.They made the driver chip for sinking more than 5mA per LED. Otherwise, it's a waste.You could just increase the current limit to take advantage of the higher current handling and make the chip no longer pointless.

author: paulca
author_rank: Super Contributor
timestamp: February 11, 2018, 09:18:00 am
content: Quote from: Cyberdragon on February 10, 2018, 10:42:14 pmI was considering replacing the iRef resistor with a pot.

author: paulca
author_rank: Super Contributor
timestamp: February 11, 2018, 10:12:28 am
content: Quote from: Nusa on February 10, 2018, 10:31:40 pmThanks for the feedback. It's a 50/50 thing with the 12 hour + am/pm light versus 24 hour with 5 binary digits for hours. Same number of LEDs, but I'm going for an AM/PM light under control of the MCUOn labelling +5V is there a standard way of denoting the source of the label? Obvious, to me, the power connector +5V with large decoupling cap is the source, but I do understand that isn't obvious without prior knowledge and that power connector could just as easily be an output to another board.

author: Nusa
author_rank: Super Contributor
timestamp: February 11, 2018, 01:57:18 pm
content: This covers some of the most common voltage node symbols, although just having a labeled dead-end line is understood too. Without that visually unconnected line, it's ambiguous. Sort of like text without punctuation, you have to stop and figure it out.https://learn.sparkfun.com/tutorials/how-to-read-a-schematicDecoupling caps can be a distraction on dense schematics, and may get placed off to the side since schematics aren't about physical layout. Placement only becomes important when you actually lay out the board. Example:https://www.bigmessowires.com/nibbler-schematic.png

author: paulca
author_rank: Super Contributor
timestamp: February 11, 2018, 02:47:42 pm
content: Quote from: Nusa on February 11, 2018, 01:57:18 pmAh, I noticed when laying out the board that it didn't matter at all which of the decoupling caps I lifted and moved, because they are connecting two very wide nets, +5V and GND they could legally be placed anywhere.It then makes sense to see the decoupling caps all paralleled up in the corner too. Of course it then tells you absolutely nothing about what has and what has not got a decoupling cap on it. For that you would need to look at the PCB layout. You could assume that all ICs have decoupling caps and that power rails probably have somewhere, but others might be less obvious. Caps on ADC inputs to filter off HF noise or stabilise/smooth the reading etc.