Tuesday, 20 August 2013

A small diversion

Right its been a long time since I last made a post here, firstly I have lacked the time recently to sit down and make a decent post on whats been happening, secondly nothing much has happened in the last month worth reporting about.

However now I have something that might be of interest to write about today. Al the robotic arm has taken a bit of a backseat recently while I try and finish off another long term project. Several years ago during my early days of electronics I started playing around with 4017 decade counters creating a simple 1 - 10 counter with figure of eight led's. This gave me the idea of making a digital clock from scratch. It wasn't until some time later I encountered the 4510 Binary Coded Decimal (BCD)  up/down counter and the 4511 BCD to seven segment display driver which presented the flexibility to make a clock, having looked on the internet since designing my own I can see its a popular choice for this task.

With a goal in mind and the hardware to do it I set out to create the digital clock with nothing more than the datasheets at hand to guide me. I think it took me a month or two of trial and error to figure out exactly what I was doing (bear in mind I was still a green amateur at this point)
The birds nest!
And this was the result of my love and labor, a big birds nest of wires. Each wire is in fact color coded depending on what it is carrying.

Red ~ Supply                                                        |  Black / White ~ Ground
Blue ~ Optoelectronics                                          |  Orange ~ Clock Signal
Greed ~ BCD / Data                                             |  Yellow ~ Reset

I did run out of wires and have to use whatever was available so not all of them will match the above coding. Each led has a 4510 and a 4511 Cmos chip driving it. the 1Hz signal is provided by the ÷2 output of a  4060 oscillator which is then reduced to 1Hz by a 4013 D-type flip flop, the 1Hz signal is then fed into the two 4510 BCD second counters. The reset of the digits to give a functional 24 hour clock is done by a 4081 quad 2-input AND gate with the outputs being fed into the 4510 reset pins.

My first challenge was finding a free program to design the pcb for it, after much searching and trialing of free programs I stumbled upon Designspark by RS components. This is a completely free program but it does require a account and activation. you can design circuit diagrams and pcb's with it's comprehensive library of electronic components and if you cant find one you can make one inside the program to fulfill your needs.

Click for a closer look
It will take some time to learn how to use the program, although daunting at first it does become much easier with time. Unfortunately I lost the original pcb diagram for the first generation digital clock when one of my hard drives failed, however that hard drive would later become the foundation for a pulse motor which used a modified version of the digital clock to calculate the rpm! (7-8000 rpm if I remember right)


Fortunately I do possess one image of the original pcb diagram and the original transparency of the circuit, should i ever need to make another I can reverse engineer the picture or use the transparency to make another pcb.
I did built several prototypes of the led segments (3 of which are visible in the diagram above) to test that they would work before building the entire circuit, I'm please to say that beside a few refinements they did both work flawlessly.

Next I manufacture the pcb using the photo-etching process, this is where I print the pcb design onto a translucent film, this film is then placed over a copper clad board which has a thin layer of a UV sensitive chemical on it's surface. In the image below you can see several pieces of Photostar film with various circuit designs on them, the top two are designed to be used on a double sided pcb and will become more familiar later on. the bottom two are use in the control and display of information from Al the robotic arm.


Once the board has been manufactured (I will cover the process in a more detailed post at a later date) I am left with several hundred  holes to be drilled by hand! This took me several evenings to complete and not because it was hard either. After a short while of staring at the board to make certain I drilled the 25 thou  holes (0.64mm) in the correct place I would end up with terrible eye strain, figuring out the precise drilling point of a 25 thou tungsten bit is no easy task by hand and I have not yet found a sensible idea to remove this hazard.



Several hours later and lots of soldering I am left with the finished product. The only problem I faced was a small solder bridge (an undesired connection between two tracks) on the underside which shorted out one of the led segments, an easily repaired flaw.


Last time I checked the clock was 4 seconds out every 24 hours, unfortunately I cannot properly calibrate this until I buy a oscilloscope to get the precise 1Hz frequency. however this isn't too important as its a very inefficient clock draining 250mA at 6v or 100mA from a 3.7V LiPo battery. Even if i use my largest 6Ah batter that is only 2.5 days of running time, I could connect it to the mains but I'm not yet confident enough in my own design work to leave it plugged in permanently.

There is also a reason the clock uses so many jump wires, the primary reason is that I was unable to route all of the tracks, secondly I wanted some control over certain pins on the board to give me more functionality. when set up correctly I can use this as a 999,999 unit counter or as a timer for triggering events off board.

This has now changed with the next version of the clock which aims to use predominantly Surface Mount Devices (SMD) with no jump leads. energy efficiency is also a driving factor although i have no way of measuring its efficiency until I plug it in for the first time, I do however have a small 5V solar panel and LiPo charger combo to connect to it for permanent non-mains running!


This is the board at the moment of writing, I have received the last shipment of parts from Farnell and will try and finish this board off tonight before I solder together the Led baord which will connect to this board at a 90 degree angle. the large eight block pads on the bottom edge of the board are the location for the SMD connectors.

Thats it for now, have a good day.