My girlfriend likes reading books and there is always a pile of them around the house, however to be able to build this for her birthday present I had to source the book from a second hand shop, looking for a nice chunky one that the clock could sit nicely inside. So, thanks to Charlotte Bingham and the Business I had the perfect cover :)
The rest of the parts came from the Web or the tinkerers paradise eBay
1 x ATmega328P
1 x DS1307 RTC
2 x 10K resistors
2 x 22pf capacitors
1 x 16MHz Crystal
1 x 32768Hz Crystal
1 x CR2032 battery
1 x CR2032 holder
1 x 16 pin DIL socket
1 x Sure Electronics 3208 display
MDF, Thick Cardboard or plastic
Step 1: Recycle an Old Book
Once the pages are out of the way you can mark out the position of the display on the spine, Cut this out neatly as it can show through if you get heavy handed,
I also had to cut the edge of the display off so it would fit inside the spine of he book. if you look carefully down the edge of the 3208 display you can see that the tracks run just along the edge of the LED matix, so if you draw a line from the centre of the scew holes you can safely cut down there without risk of damaging anything important.
Just take your time, while I was cutting the first one I had some shavings get lodged on the chip, needless to say that one is now a paper weight. :(
looking back on it now what I also should have done was paint the spine black before glueing the cover back on, as the display is mainly black and the book is a lighter colour it tends to create a shadow line and stands out, if it had been painted black before hand I would imagine it would blend in more.
Once the hole is cut out ready for the display you can start glueing the outer sleeve to the hard back cover. I used PVA glue and brushed it on so there were no lumps.
When it comes to the display I first coated it with PVA and also the cover, then brushed the pva to get rid of the lumps and stuck one on top of the other. Chuck a nice weight on top to hold it in place while it dries.
Just make sure that you do this step after you have built and tested the electronics as you also have to make sure the display is the right way round!
This is where the pages of the book come in handy, you can always read them until the glue is dry.
Step 2: Electronics Time!
There is hardly anything to the electronics, the big question is how you want to program the chip, I added a riser to pins 1, 2, 3 and Gnd.
Then using jumper wires I linked the chip to an Uno connected to the PC, you need to enter two different programs, one to set up the DS1307 time and date and the second that runs the display.
The other option is to remove the ATmega and place it in a UNO for programming, then back in the book etc, but you will see later why this has its own challanges.
You just got to love the telephone wire, all sorts of colours and a solid core, nice for jumper wires on a DIY PCB.
Step 3: Putting the Book Back Into BookClock
Cut it so you have a couple of mill between this and the edge of the book, I used PVA glue to hold it together then hot glued it in place after, I have a small adiction to hot glue :) If it moves stick it in place, if it should move then scrape some of the hot glue back off.
That is the moral to most of my projects!
I also added some hot glue around the display to give it some stiffness.
I then stuck a small strip of wood on the cover and added some screws to hold the thing together.
Step 4: Reboot Computer......
Once the unit is set up and powered up you will get a grand total of nothing on the display.
First of all you need to upload the ds1307_test.pde adjust the settings on the script for day, time date etc then upload, just remember that it takes a few seconds to upload, so if you want to get the time right you may have to do a few attempts at this.
Use the serial monitor to check the time is close enough.
Once that is done you need to upload the BookClock2_working_one.pde Once this is in you should have a working display.
If you don't initialize the DS1307 first you will simply end up with a display showing 0, 00, 98, 0
Step 5: Show Off Your Creation
Step 6: Thats Magic!
That is just what you want from a book about magic, for it to do something special!