I admit it: I'm a total geek. I love electronics, programming, 3D art, vintage Apple hardware, and whisky. I'm always juggling half a dozen projects. I also enjoy documenting it all: my successes, my failures, my experiences... and everything geeky along the way.

Seeed Studio Fusion - $9.90 for 10pcs 2 layer 10x10cm boards


 
 
 
 
 

LCD Clock Version 2 - Part II | Kevin Rye.net - Main

Kevin Rye

Geek Extraordinaire. Yeh, I said it.

LCD Clock Version 2 - Part II

With my PCBs in-hand, and the laser cut acrylic on the way, it was time to start the assembly.

I started with the ATmega and all the components that were required to bootload the chip and upload my sketch. It would be a waste of components to install everything and find out that I made a mistake. It would also be that much harder to troubleshoot. It always makes sense to assemble your project in stages and test as you go.

DSC_0006 6
DSC_0004 4

Once all the components and headers were soldered in, I attached my Arduino and configured it as an ISP. I then burned the bootloader for an Arduino Uno.

DSC_0010 10

I then connected my FTDI programmer and uploaded the blink sketch.

DSC_0009 9

Success!

Wow, that LED is super bright! It’s actually blinding and kind of hard to look at. With that, I swapped out the resistor for a 1K one in order to bring the brightness down.

DSC_0011 11

Knowing that the ATmega worked, it was time to solder in the rest of the components, except for the display. Again, I don’t want to come this far and then waste a $15 LCD.

DSC_0020 20

I uploaded the Tone sketch and had it play a simple tune in order to test the audio. In this case, the Star Wars theme.



For the buttons, I configured the Alarm LED to flash with each button press to verify that everything was connected properly. Good to go. I then made sure that the ATmega could talk to the DS3231 RTC chip and set the time and date. Good to go.

DSC_0019 19

All that remained was the LCD. However, the large clips for the USB connector stuck up just a little higher than I had anticipated. They touched one of the clips on the back of the LCD, causing it to not sit flush against the PCB.

DSC_0021 21

To solve that, I just cut that one clip off. No big deal.

DSC_0023 23

The LCD then sat nice and flush against the PCB without contacting the USB connector.

DSC_0026 26

I still had some work to do on the code to implement the alarm feature, so until my acrylic arrived in the mail, I just threw a few standoffs on the clock so that it would sit nicely on my desk.

DSC_0029 29

After a few hours of tweaking, I uploaded my final sketch that included an alarm menu, alarm tone, and chime-on-the-hour.

DSC_0033 33

DSC_0034 34

All that remained was the enclosure. My laser-cut acrylic showed up a few days later.

dsc_0054-54

Looks pretty good.

DSC_0055 55

I masked off the engraved text.

DSC_0057 57

I then gave it a quick blast of white spray paint.

DSC_0060 60

It came out pretty good. The text for “ALARM ON” was a little too small for the paint to really get in there, so that didn’t come out perfect. I didn’t bother painting “ACTIVE” because that LED is always going to be on anyway, and it looks pretty white even without the paint. I was actually hoping that you wouldn’t be able to see it at all. The original intent was for that LED to only come on when the audio was active, but I forgot to wire the shutdown pin on the audio amplifier to the ATmega. So I couldn’t shut it down if I wanted to. Needless to say, that LED is always going to be on.

DSC_0063 63

The final assembly.

I like how the text is easy to read on the dark acrylic, but it’s still easy to see the guts through it. It’s not black. It’s tinted gray.

LCDClockV2Final_0002
LCDClockV2Final_0005

Here it is in action. This short video shows the options in the functions menu, the alarm menu, the alarm going off, and the chime on the hour. Ideally, I’d like to save the alarm setting into the EEPROM, but I’ll leave that for another day. Another thing that needs to be tweaked is that the call to the Tone Library happens outside the main loop, so the clock stops counting while the alarm is going. Probably an easy fix, it’s just a matter for coding it.



I think this clock came out so much better than version 1. I can’t think of a reason to do a version 3. With this, I think I’ve done all I can do with a 16x2 LCD clock.

See this project from start to finish:
LCD Clock Version 2 - Design Decisions
Mini Audio Amp, Take 1… and 2
Mini Audi Amp - Version 2 Build
LCD Clock Version 2 - Part I
LCD Clock Version 2 - Part II