Close

Stuck... Unstuck ... and redoing some work

A project log for Relay Logic Clock

A digital 24 hour clock using only relays and diodes for the counting logic.

Dave GönnerDave Gönner 05/07/2016 at 09:161 Comment

It has been a while since I last posted a log entry. The reason is that I got stuck. I guess this happens to all of us from time to time. Let me tell you what happened.

When I designed the broad layout of the circuit boards I had the whole thing figured out for 90%. The other 10% I would come up during the process. Or so I thought. I did some initial tests to confirm my understanding of the mechanism and after that I got to work designing and fabricating all the individual boards. I never forgot about my little 'problem', but I was still confident that I would come up with a solution when the time was right. And then all of a sudden I was done doing all the work that could be done before solving my little issue. This is when I got stuck...

So what was the problem? It has to do with carrying the clock signals from the lower to the higher digits and resetting the counters back to zero at the right moment.

I had sort-of solved this issue with the minutes counters. They already roll over to zero after 59 on their own. This is because the lover digit can only count from 0 to 9 and the higher digit can only count from 0 to 5. The only thing I had to do was carry the clock from the lower digit to the higher one when it rolled over to zero. So every time the lover digits rolls over, it sends a clock to the higher one and increments it by one. I should have added an extra relay to buffer the carry signal, but instead I just wired the clock for the higher digits directly to the output of the last relay in the lower digit counters. This worked, but had the disadvantage that on power-up the digits would reset to "1-0" because the higher digit would get clocked immediately form the lower "0" digit. I could live with that, for now at least.

The hours counter is a little different and this trick wouldn't work. The really big problem was that I had to reset it at the right moment. These counters don't automatically roll over from 23 to zero just on their own. I had to force it somehow. Only I had no idea how to do it. This is why I stopped working on the project for several months. There were too many conflicting issues to solve all at once. I had to figure out how to do it electronically. But this surely meant extra relays and I didn't have board space for extra relays. And I did not want to compromise the look of the clock. So I was stuck. Stuck with this thought in my mind that I couldn't solve it.

But in the end I did solve it. As always, at some random time the solution came to me. And this is what it was.

I decided that I had to detect the "2-3" state and then on the next clock reset the higher and lower hours counters back to zero. The flip-flops are reset by cutting power to them, that's the only way. So the power to these flip-flops now runs through an extra relay that can be triggered to reset the hours counters. I use the outputs of the decoders that run the display to detect the "2-3" state. Both the 3 of the lower digit and the 2 of the higher digit run to separate relays. These are chained to form a logical AND operation. Then when the next clock pulse comes in, these two relays trigger the reset relay. I added a big capacitor, to keep the reset relay energised long enough to make sure all flip-flops are reset.

With the reset covered, a new problem arose. Because the hours counters had to display "0-0" on reset, I could not use the same trick as with the minutes counters to carry the clock from the lower to the higher digit. So I had to include a buffer relay. Together with the reset relays this was an extra 4 relays and I had no board space left to place them. This was a real problem as the layout of all the circuit boards could not be changed any more.

The only thing I could do was redesign the decoder boards. Originally I had designed them as 4 separate boards, because of restrictions on the size of circuit boards I could mill at the Fablab. Unfortunately, with all the mounting holes for the extra circuit boards I lost a lot of space, space that I desperately needed for the extra relays.

I decided that a redesign of the decoders was in order. I recombined the 4 separate decoders into 2 decoder boards. A upper decoder that decodes the single minutes and the tens hours and a lower decoder that decodes the tens minutes and the single hours. I counted the total number of relays, and tried to divide them evenly among the two decoder boards. This meant a few extra wires running between them but that's acceptable. The last few days I have finished the layout of the upper decoder and milled the circuit board at the lab. I will post pictures when I'm done soldering.


So why the long write-up? I wanted to explain some of the deeper design problems that I faced during this very long process. In the hope that you learn something from it and that it may help you in your own projects. When I finally cracked the problem I was very relieved that I could continue the build. I asked myself if I could have avoided this by designing the entire clock for 100% before starting the build. The answer is no. At the beginning I did not have the understanding that I have now. By working on it, building it and debugging it I gained a deeper knowledge of how the circuits work. I needed this deeper knowledge to design these last, but very important, missing details. I took a risk by starting the build without a complete finished design, but I had confidence in my abilities to solve the problems that came up later. This eventually paid off. Without taking this risk, I would not have started the build at all because at the time I did not have a complete picture of the finished result.

So start building your project, even when you don't have a complete picture of the end result. The experience gained in the process will improve your design more than thinking out every little detail beforehand.

Discussions

Yann Guidon / YGDES wrote 05/07/2016 at 23:15 point

Yep, it's rare when you get something right the first time.

The only way to know is to try :-)

  Are you sure? yes | no