-
New display adapter boards and finishing touches
11/01/2017 at 18:08 • 0 commentsWell after much waiting the new display adapter boards came in. This time each enable or disable pin has a diode preventing back feeding. I also redid the wiring and went with ribbon cables this time. The hand wiring was tedious to say the least and unreliable.
With a proper crimping tool ribbon cables are a breeze. The two cuts you see in the cable allow it to be routed along the support posts on the frame. Then the lower cable simply attaches on and breaks out the connections to the main board. Pretty slick.
With the board wired up properly time to work on the display code! Finally I get to see this thing tick. For the code I used an event loop based system. The clock iterates though a loop every 10-20 mS. This might not be the most elegant way but it worked well for the features I wanted. For most of the buttons holding them down triggers and alternate function, the event loops lets me easily keep track of how long every button has been held down. However that was a major gotcha that I ran into that almost derailed the project. I almost ran out of space in the 4096 byte chip. I ended up doing some serious code optimizations. I came in at 4084 bytes used out of 4096. I did get all the features in that I wanted so I just barely squeaked by!
Alright I'm getting close to the end here! Time for final assembly! One of my design goals was to have the project breakdown easily. Judging by the picture below I'd say I accomplished this goal.
Once built the clock splits up into two main parts. The main frame the core. The core pictured bellow inserts into the frame very nicely. It's held together with 4 3M bolts. I managed to get a very tight fit, only a few thou of wiggle room on each side. Looking at the top of the core you can see the capacitive sensor. The copper tape acts as a hand sensor to tell when your touching the top of the clock. This works as the snooze button and a way to toggle the light. The light prominently displayed in the black part sticking out the back is supposed to simulate the sun making waking up easier.
With the core explained time to put it all together!
And oh man what a striking clock that is! It turned out just like the 3D renders, and after all this work it had better look good! My only real regret is using a printer style usb cable. They tend to be really stiff and I had a hard time finding a flexible one. In the future I think I'll try usb C as a power cable.
-
Wiring the displays together
09/23/2017 at 04:33 • 0 commentsThe frame was mostly complete after the last update but it still needed finishing. Here it is with shellac applied!
I'm loving the look! The sapele really pops! The text on the rear panel was made with a custom stencil. I machined the lettering out of 1/32 inch ply wood and used spray paint. It worked well enough. The black block is a holder for 4 LED's. This is for the sunrise alarm feature. The idea being that slowly making the room brighter starting an hour before the alarm helps you wake up.
Then next step after this is to wire the display module. It's going to be over 210 solder connections so I'd better get started. Here's what it looked like when I started. I'm glad I have the thin soldering iron...
I have three sets of connections to wire up. The power/select lines and the enable. disable lines. After a few hours/days I had this.
Alright now time to test it out! And it doesn't work wooo! Surprisingly enough it's not a wiring error just a core driver design error. Here's a short explanation with a diagram.
Each display has 7 segments. Each segment has 3 wire controlling it. The middle connection is power and the outer connections are disable and enable. I wired all the power connectors on each display together and I can select the display by driving only 1 of 5 drive wires. I can control is it's enable or disable by selecting the enable or disable line and driving it low. All the enable and disables for each segment are linked together.
The issue is if I drive segment 1 and pull down the enable line on segment A then the current travels through the enable wire. However it also travels through the disable line and then though each digit on the other segments. This will set segment A on all the digits to enabled.
I can fix this with 60 diodes but I don't have room to have the free floating in the case. I will need an adapter PCB.
I plan to do this with an adapter PCB soldered directly onto the digits that will contain the diodes. It will be more reliable than the mess above. The wires do have a certain charm to them... I will miss that horrible mess.
-
CNC Repair and Frame Completion
09/13/2017 at 20:53 • 0 commentsThe new PCB came in and it's looking great! I've soldered on all the switches and this time it fits.
The construction for the frame has been speeding along except for a major problem. My CNC broke.... The X axis stoped working suddenly. I narrowed it down to a stepper driver chip on the control board that was responsible for the X axis. A new board is 120$ so I figured I would try to fix it.
Sadly the fix didn't work and I ended up with a new board anyways. The new one is on the right and the center piece is the heat sink. I had issues getting the board hot enough to repair it. There is a ground plane in the board that acts as the heat sink. My hot air gun lacked the power to get the chip off and the chip was at high temperatures for a long time. Either that killed it or there was an internal trace damaged.
Next time I need to use a hot plate or oven to fix it. You can see the scorch marks on the plastic connectors near the chip.
With the working CNC case construction moved right along. I built the case with 6 layers of wood. Sapele and Ash. Wood glue was used to glue it all together. Here's an intermediate step with 3 layers together to show how it works.
This is a very tedious process. I have to first machine the wood to the right thickness then cut out each piece. The end result is worth it thankfully!
I think is looks great! I still need to sand it and finish it with shelac but even at this stage it looks gorgeous! (and it better with all that machine time...)
I feel like I should elaborate on the inlay on the front. It's a very thin section of wood since a display sits right behind it for the two front indicators. To machine an inlay this fine and thin I did it while the part was flipped over. I added the epoxy to the back of the face and then machined off the exterior surface. The picture below should help explain this. All the white gunk on the right became the inlay when the front was smoothed.
-
PCB Woes and a lesson in patience
08/16/2017 at 23:13 • 0 commentsWell I have good news and bad news in this update. The good news is the PCB is in and tested. The bad news is I had to make adjustments and send off version 1.1. Bellow is a very telling picture.
All 4 of those parts should line up with the pads. They do but the large black switches get in the way of nearby parts. This shifts the whole row. The large screw terminal to the right also has the pattern rotated 90 degrees by mistake. I have tight space constrains in the clock so no possibility of a bodge or hack to make it work.
Since I had a PCB I decided to test what I could. I soldered on the buzzer, 12V power converter and part of the display drivers. The ATMega 48A was put on as well.
On testing the 12V supply worked fine. It floated at around 13.3V, a little high with load but for my uses it's good enough. Buzzer had no issues thankfully. However my driver circuit had a minor error in it. Swapped a pad around in CAD and now the PNP MOSFETS will do what there supposed to.
I added a few minor things I forgot as well. Just a few debug test points. SDA, SCL and the like.
In case your curious here's version 1.1. You can see the new test points and different switches to get around the size issue.
There's two lessons to be learned here. Test fit the big parts first on a print out of the PCB. Additionally don't expect to get it right on the first try. Nothing wrong with needing a second version for most projects if you have too.
That about wraps up this update. I've posted the new PCB Cad files and a PDF schematic.
-
Mechanical Design
08/06/2017 at 20:40 • 0 commentsWith the PCB out of the way it's time to put serious thought to the mechanical portion. If I can I'd like to try and avoid glue. I want it to come apart easily for work and display. I can't glue the PCB down like I might have done in the past.
I decided to have the displays all sit on a sub frame in the clock. This will hold them together and provide wire routing. The first order of business was to get the sub frame sitting right and use the right spacing for the displays. I don't have a data sheet so there was some guess work. I used fusion 360 to create the models you see below.
The parts aren't too complex. All the hard work went into the close fit. My first print didn't fit right but I mostly nailed it on the second try.
The indicator window on the right doesn't quite line up but it's an easy fix. One thing I did notice was the printer was printing about 10 thou over. Not a huge issue but I have to be mindful. In the final design only the sub frame will be 3D printed. The outer parts will be wood.
The design for the clock took me a while of just staring at the displays in the sub frame. Eventually I came up with one I liked. After fiddling around with CAD for a while hear it is!
Sorta of a modern art-deco look I think. I put a ruler at the bottom for scale. It's not massive but it's a good size. 8.5 inches wide. 4.5 inches tall and 3 in deep. I need to work on the hole in the back for the buttons next and try to find a really long 1/16 end mill. PCB should come in this week so that'll likely be the next update.
-
PCB creation
08/05/2017 at 01:16 • 0 commentsWith the schematic complete the next obvious step is PCB creation and you will not be disappointed. (Don't be disappointed)
The PCB was fun to work on. The limiting factor was the size of all the switches and buttons on the back. I only have 6 inches to work with and it came out to about 5.4 inches. They also take up most of the space on the PCB. Fitting the driver circuit in was tight. Not as tight as my BCD decoder but it was "interesting"
On the lower left you have the 12v module to generate the power to drive the displays. On the lower right you have the coin cell and the RTC. The RTC is under the coin cell. With such a large ground plane it's the perfect location. In the lower middle you have the driver circuitry happily taking up both sides of the board.
The buttons take up the top portion. I could have used SMD buttons but I trust though hole more for that. The end total is 8.6 square inches and 321 connections.
Here's the board in glorious 3D
I think I'll use OSH parks fast service. It's pricey but i REALLY want this done before school starts. I think this is one of my largest PCB's to date. Let's hope I don't need a version 1.1.
-
Starting the flip clock
08/03/2017 at 14:39 • 0 commentsI wanted a simple project to finish off the summer. Thus my flip clock was born.
Here we have the star of the build a 7 segment flip display. It works in the same way that flip dots do. A current though the coil will produce a magnetic field that will flip the digit. You have to be careful a pulse too long can burn the coils out.
I'm using an AVR ATMega 48A for the micro controller. It's very similar to the 328p used on the Arduino. There's a basic circuit for driving the buzzer and LED's for the day light alarm. The real time clock chip is a very accurate variant, DS3231. All the switches are connected to a I2C GPIO expander. Nothing special going on here. I plan to use USB to power it. The power filtering is nothing special.
This is the real star of the show, the driving circuits for the display. The section on the bottom supply's 12v and selects the segment. The upper portion allows you to select the direction and the segment to flip. This was more complex than I first expected. It might be difficult to fit this on the board...
Next I want to work on the PCB and start the mechanical portion. There will be a lot of effort going into the form. I want this to look elegant and professional if I can. Tune in next week for the next installment of CAN WE BUILD IT?