loading
You might remember my first version of the LED binary clock (1.0);
https://www.instructables.com/id/LED-Binary-Clock-1/ 

This version was intended as a gift, so it's in a few contests like the Holiday Gifts challenge. Please, if you like it, feel free to comment, rate it (according to what you think it deserves) and please, please vote for me.

In that guide I stated that there would be a future version of the clock with some funcionality additions along with a much neater and cleaner design, well, this is it.

BTW, please like me on facebook.

UPDATE: Winner from mini contest ANNOUNCED! Congratulations to Goalie1, who won a 3 month pro membership simply for being my subscriber.
Don't worry if you didn't win this time, i'll be running many more contests like this periodically, some with even 1 Year Pro Memberships!, so stay tuned and always remember to check my new 'ibles.

Step 1: So, What Will I Need?

Materials;

  For the circuit you'll need;
  • 13x LEDs, color of your choice.
  • 13x Cheap LEDs, color doesn't matter, as these will be used only for testing.
  • 13x matching resistors to apropiately drive your LEDs at 5 volts (you can calculate the value here).
  • 1x Atmega328 with the Arduino Bootloader (you can use an atmega8 or 168 aswel)
  • 1x 39x39 holes breadbord style PCB.
  • 1x P-channel MOSFET
  • 1x 16Mhz crystal+ caps (22pf)
  • 1x LM7805
  • 2x 100nf caps (104)
  • 2x 220uf caps
  • 1x Screw terminal
  • 1x WallWart 7.5 to 12 volts out.
  For the wooden body (optional, you can make it out of whatever you want) you'll need;
  • 2 pieces of plywood of about 20x20 CM or about 8x8 inches.
  • Wood glue. (any brand will do the job)
  • linseed oil.
Tools;

  For the circuit;
  • Soldering iron.
  • solder sucker/solder whick
  • (optional) helping hands
  • Dremel (if your PCB is too big and you need to cut it to size)
  • An Arduino or an FTDI breakout board to program the chip.

  For the wooden body (if you're making it as mine);
  • A Milling machine
  • Some clamps
  • Something heavy to keep both pieces of plywood together while the glue cures.
  • Table saw/circular saw to cut the plywood to size.
  • A caliper
  • A pencil

Step 2: Let's Begin!

First off, you'll need to plan your layout of the circuit according to what you have, I has a 40X50 holes Breadboard style PCB so my layout acomodates to this. but yo can make it however you want, bigger, smaller, same size, etc, or break with the square design and make it rectangular.

Although not necessary, I EXTREMELY recommend you to print some Arduino compatible stickers for the Atmega chip so you can easily know where are you connecting what and you don't need to keep going back to the datasheet.

In my case, the LEDs were placed 12 holes away from each other to fill the PCB I had.

what you first need to decide is where are your LEDs gonna be, after that, decide where are your Atmega328 chip and power supply going to be.

The schematic above shows (on top of the resistors) the pin number of the chip to where that LED needs to connect, but this is now important, as you can super-easily map it in the code using the coordinates of each LED (shown below each LED).

The LEDs in the schematic show the ACTUAL places for the LEDs, the RightMost column has 4 LEDs, the next one 3, the net one 4, the next one 2.  (Front view)

You just need to make sure that you leave at least 1 Analog input pin for the LDR, 1 PWM pin for the MOSFET and, if you want to be able to program it onboard, leave both RX and TX (pins 0 and 1) free of any components.

REMEMBER that you should solder this LEDs with the leads bet as little as posibe, as these will not be the final LEDs, this are just for testing and for the layout process.

Step 3: Add Some Wires

Add the wires from Each LED to it's Arduino pin, don't worry about connecting them exactly as I did, it's easier to just map it in the code (ill explain this later), so just connect them to the closest pin.
Remember that you are connecting the NEGATIVE leads to the chip.

And remember to add the 16 Mhz crystal and connect it, along with the caps, you could use a 16 Mhz resonator, but I don't recommend it because it is less precise, meaning you will gain or loose time quicker.

Step 4: More Wiring...

Add the MOSFET, wire it as it is shown in the schematic.
Add the 2 pushbuttons for Minute/hour setting.
add some female headers for plugging in the LDR.
(optional) add an FTDI connector so you can program the chip onboard.
Wire the MOSFET and all the connectors/buttons.

Now take your LDR and add 2 long wires to it.

Congratulations! you're done with the board, now it's testing time.

Step 5: Testing Time!

 
Testing is not necessary, however, I recommend you to do it unless you are extremely confident you didn't make any mistakes, as it will be imposibe to fix anything later.

Start by downloading the code below, use the first link if you are using the arduino IDE vesion 1.0, or the link below if you are using an older vesion.

Here's the code for the Arduino.
And here it is for older vesions of the Arduino IDE.

Step 6: Mapping the LEDs

Here's the beginning of the Arduino sketch:

#define AA 10
#define AB 9
#define AC 8
#define AD 7
#define BA 11
#define BB 13
#define BC 5
#define BD 6
#define CA 12
#define CB 15
#define CC 4
#define DA 14
#define DC 2
#define MOSFET 3
#define LDR 19
#define MinButton 17
#define HourButton 16
#define ModeSwitch 18

To make your clock work properly, you'll need to tell the Arduino where each thing is connected.
Simply write the pin where each LED is connected (using the coordinates in the schematic to see what letter combination corresponds to each LED and checking with your Arduino compatible sticker what pin is that).

Here is a higher resolution version of the schematic.

Then do the same for the LDR, the buttons and the switch/jumper used for the 12/24 hour mode selection.

NOTE: that you need to use the digital number for the analog input pins, this corresponds as follows: analog inputs 1-5 = digital outputs 14-19. you need to use that version of the number for the LDR aswell!

After you finish the mapping, Upload the code to the chip and test it as I do in the video (but remember that you are doing it BEFORE you go to further steps, contrary to what I did).

Step 7: Now to Make the Wooden Body.

First, you need to glue together the 2 pices of plywood to form a single, thicker piece.

Start by applying glue to the first one as shown in the picture.

Step 8: Sandwiching.

Now place the other piece on top.

Step 9:

Now clamp it along the sides to ensure it says aligned and then place a heavy object on top of the sandwich to ensure the glue goes evenly flat.
Remember to place another piece of wood between the sandwich and the heavy object so it doesn't damage the surface.

Let it sit for at least 5 hours, depending of the glue you are using.

Step 10: Chop Chop...

Now cut the plywood to the size you want it to be (leave it about 3 millimeters bigger to clean off the other sides).
Check that the circuit will fit in and that there will be enough wall left after milling to ensure it doesn't break/drill the wall mounting hole.

Step 11: Clean the Other Sides

Set the saw to the exact size you want your clock and cut the other 2 sides of it (the ones we DIDN'T cut), this is done to clean the edge from any glue that might have cameout on the edges.

Step 12: Mark Your Plywood.

marke a square where you're going to mill (where the circuit will be), make it bigger because the mill leaves the edges rounded, so if you make it the exact size, it won't fit.

Now place it on the milling machine and clamp it down.

Step 13: Remove All That Wood.

Start milling and remove all the exes wood until you only leave a thin layer of about 5 mm (1/4 of a inch). Most milling machines have a stopper to prevent it from going too low, set ti to about that height. (see 2nd picture for the stopper)

Step 14: Mark Your Holes

Mark a 4x4 grid with the proper spacing depending of the size you built your circuit and check to see if it aligns with the LEDs.
Use a soft pencil and DON'T apply pressure or else, marks will be left in your wood even after sanding.

Step 15: Centers...

Mark the center of the holes you ARE going to drill, remember we're only using 13 LEDs, not 16. you can refer to the schematic to see where you need those holes. This is done so that the drill bit goes straight into the center and all your holes are aligned.

You can use a screwdriver and a hammer if you don't have one of those special pointy things.

Step 16: Drill 'em All

Well, just drill all 13 holes.

Step 17: Drill the 2 Remaining Holes.

First drill the wall mounting hole, make sure that both, a nail, and a screw will fit in.

And drill a small hole on the top for the LDR, in most cases this will be about 5mm.

Step 18: Sanding

Sand all the edges, front, back, and inside too. make sure to sand the front enough so that the pencil markings disappear.

Step 19: Apply Linseed Oil

apply linseed oil on ALL surfaces and let it sit so the wood absorbs it.

Step 20: Start Assembling

Place all the LEDs, I recommend you to test all the LEDs BEFORE you tug them in, or you won't be able to replace them.

Step 21: Fix Them in Place

Add a tiny blob of glue to each LED so it stays firmly in place, don't add glue to the leads.

Step 22: LDR

Put the light dependent resistor in place, you remembered to drill that hole, right? and to add 2 long wires to it, right?

Step 23: Black

Paint the inside black, this is mainly to prevent Ghosting on the LEDs.

Step 24: Ghosting, You Say?

Yes, this means that, when some LEDs light up, others may seem to light up aswel, but dimmer.

Why?

Well, there's many possible causes for this effect, but on this case it's simple reflection of the light inside the clock. depending on your LEDs, this might not happen.

Step 25: Removing the LEDs

Remove the old LEDs from the board to get it ready for the new ones.

Step 26: More Drilling.

Mark, on the back of your PCB, where the old LEDs were and drill some insanely big holes for the new LEDs to fit in, I originally tried to to this with the original holes, but I then realized that it is almost impossible to get 26 leads to align with that level of precision to go into the holes all at once. 

Step 27: Drop It In

Drop the PCB in place, making sure that ALL the leads went thru.

Step 28: Clean the Leads

before we solder those leads in place, we need to clean the black paint from them, so add some pieces of paper to the inner walls to prevent that paint from being cleaned, grab a piece of cloth and apply some paint thinner or acetone to it, then clean all the leads and make sure no paint stays behind.

Step 29: Solder

Now you can bend those leads and solder them in place, also solder the LDR and trim the leads.

Step 30: Black... Again.

Now mask the buttons, headers and power terminal with some sticky tape and paint it all black again, this is to make it look neater.

Step 31: Remove the Maskings

After the paint has dried, remove the sticky tape.

Step 32: Test It.

Perform the same test shown in step 5.



You might also test the brightness response to light.



Congratulations! if it all goes well, you're done! if not, you can write a comment explaining your problem or send me an email at emihackr97@gmail.com

Step 33: Hang It an Enjoy OR...

Hang it on the wall or place it on your desk and enjoy...

Step 34: Wrap It Up and Give It As a Present

Step 35: A Special Chance for YOU to Win! Update: Winner ANNOUNCED!

I'm running a mini contest to thank my subscribers, if you are one of them, you can win a 3 month pro membership!
If you are not yet subscribed, all you need to do to participate in the contest is hit that yellow button that says subscribe.
you've got until February the 4th to subscribe, or else, you wont be able to participate. The winner will be chosen randomly.

Winner will be announced here and on my profile on February the 5th.

Remember to rate this 'ible according to what you think it deserves and, if you feel it deserves it, vote for it.

It is currently on:
 
  • The Make it Glow challenge.
  • The Holiday Gift challenge.
  • The ShopBot Challenge.

oh and, by the way, please remember to like me on Facebook. :)




UPDATE: Winner from mini contest ANNOUNCED! Congratulations to Goalie1, who won a 3 month pro membership simply for being my subscriber.
Don't worry if you didn't win this time, i'll be running many more contests like this periodically, some with even 1 Year Pro Memberships!, so stay tuned and always remember to check my new 'ibles.
Nice!<br><br>Awesome points for liking Disturbed, too.
how do you read a binary clock?
Hey great project! I think I'm going to attempt to build this, however I have a few questions about it. First, I noticed you added pushbuttons later in the steps, but they're not on the &quot;main&quot; list of required things. Is there anything else that you need that is not on the main list? Also I was hoping you might beable to point me in the right direction as for where to find a wallwart like the one you used. Thanks for the great project guide btw!
is there a way to make it without microchip?
Not really, it is the brains of it; it keeps the time and shines the corresponding LEDs, I see no other possible solution, sorry. But it is based in Arduino, which is a great microcontroller for beginers since it has tons of community, examples and documentation.
Great project. But is there also a conversion-table for the binary-disabled? Otherwise they don't know what time it is.
That's another feature, you can be the only one to know the current time!
WOW! this is sooo cool!
Hi<br>Nice version<br>Very elegant, a carpenter is necessary more than an electronic... but a beautiful idea. Thanks for sharing

About This Instructable

19,232views

74favorites

License:

Bio: Interested in all kind of projects, mainly electronics but other stuff too! I try t publish everything I make, eventhough this is not always possible ... More »
More by Emiliano Valencia:CNC Wall Mounted Desk DIY Modular Guitar Amp! TinyDice: Professional PCBs at home 
Add instructable to: