Author Topic: First proper schematic - Binary Clock  (Read 2730 times)

0 Members and 1 Guest are viewing this topic.

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4055
  • Country: gb
First proper schematic - Binary Clock
« on: February 10, 2018, 09:06:32 pm »
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.
« Last Edit: February 10, 2018, 09:09:31 pm by paulca »
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 
The following users thanked this post: imidis

Offline Cyberdragon

  • Super Contributor
  • ***
  • Posts: 2676
  • Country: us
Re: First proper schematic - Binary Clock
« Reply #1 on: February 10, 2018, 09:51:55 pm »
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.
*BZZZZZZAAAAAP*
Voltamort strikes again!
Explodingus - someone who frequently causes accidental explosions
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12298
  • Country: au
Re: First proper schematic - Binary Clock
« Reply #2 on: February 10, 2018, 10:05:36 pm »
.... 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.
« Last Edit: February 10, 2018, 10:09:44 pm by Brumby »
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4055
  • Country: gb
Re: First proper schematic - Binary Clock
« Reply #3 on: February 10, 2018, 10:14:29 pm »
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.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline Cyberdragon

  • Super Contributor
  • ***
  • Posts: 2676
  • Country: us
Re: First proper schematic - Binary Clock
« Reply #4 on: February 10, 2018, 10:16:54 pm »
.... Except that at 7:31:31 PM there will be 3 + 5 + 5 +1 = 14 LEDs lit at the one time.

No, there wouldn't be. It would be multiplexed, so there'd be a max of 9 LEDs on at the same time
*BZZZZZZAAAAAP*
Voltamort strikes again!
Explodingus - someone who frequently causes accidental explosions
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4055
  • Country: gb
Re: First proper schematic - Binary Clock
« Reply #5 on: February 10, 2018, 10:19:26 pm »
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!
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline Cyberdragon

  • Super Contributor
  • ***
  • Posts: 2676
  • Country: us
Re: First proper schematic - Binary Clock
« Reply #6 on: February 10, 2018, 10:22:48 pm »
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.

You'd actually only need 6 resistors if you multiplexed them all on the same 5 lines.
« Last Edit: February 10, 2018, 10:42:58 pm by Cyberdragon »
*BZZZZZZAAAAAP*
Voltamort strikes again!
Explodingus - someone who frequently causes accidental explosions
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12298
  • Country: au
Re: First proper schematic - Binary Clock
« Reply #7 on: February 10, 2018, 10:27:27 pm »
.... Except that at 7:31:31 PM there will be 3 + 5 + 5 +1 = 14 LEDs lit at the one time.

No, there wouldn't be. It would be multiplexed, so there'd be a max of 9 LEDs on at the same time

 :palm:

I'm still on my first caffeine for the day....
 

Offline Nusa

  • Super Contributor
  • ***
  • Posts: 2416
  • Country: us
Re: First proper schematic - Binary Clock
« Reply #8 on: February 10, 2018, 10:31:40 pm »
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.
 

Offline Cyberdragon

  • Super Contributor
  • ***
  • Posts: 2676
  • Country: us
Re: First proper schematic - Binary Clock
« Reply #9 on: February 10, 2018, 10:42:14 pm »
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!

You 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.
« Last Edit: February 11, 2018, 12:57:59 am by Cyberdragon »
*BZZZZZZAAAAAP*
Voltamort strikes again!
Explodingus - someone who frequently causes accidental explosions
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4055
  • Country: gb
Re: First proper schematic - Binary Clock
« Reply #10 on: February 11, 2018, 09:18:00 am »
You could just increase the current limit to take advantage of the higher current handling and make the chip no longer pointless.

I was considering replacing the iRef resistor with a pot.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4055
  • Country: gb
Re: First proper schematic - Binary Clock
« Reply #11 on: February 11, 2018, 10:12:28 am »
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.

Thanks 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 MCU

On 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.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline Nusa

  • Super Contributor
  • ***
  • Posts: 2416
  • Country: us
Re: First proper schematic - Binary Clock
« Reply #12 on: February 11, 2018, 01:57:18 pm »
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-schematic

Decoupling 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
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4055
  • Country: gb
Re: First proper schematic - Binary Clock
« Reply #13 on: February 11, 2018, 02:47:42 pm »
Decoupling 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

Ah, 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.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf