Tuesday, December 7, 2010

Of Tik-Tok

Til we see the sunlight…

…Tick tock, on the clock…
…But the party don’t stop…
…Woah-oh oh oh…
…Woah-oh oh oh…

NO WAY!


Tom-foolery aside. this has got to be one of the most awesome posts I’ll ever do in a while.

Second semester at uni came with a course called Digital Logic. We learnt about pre-computer generation parts. Gigantic chips that when combined in the right order would tell you if your answer matches with the answer key, or you could even make a calculator that only adds numbers together and gives you a sum. Such stuff.

Each course this semester required us to make a project for it. For logic people made counters, traffic lights, alarms, and other basic shit.

I proposed I’d make a clock. A decent AM/PM clock. With an alarm. Since I reasoned, that once these people made their useless counters and alarms, few would have to foresight to integrate it into their everyday lives. Hence I told the prof I’ll make a clock.

I had no idea the shit I got myself in.

(Below this line things might get technical, still I’ll try and keep them simple for most of you)

  • The 555 circuit I made to drive the clock’s seconds kept speeding up for some unknown reason. so in 5 minutes it would be counting 30 seconds for every real second. in ten minutes the minute display would turn into the new second display.

  • The 7490 and 7492s I used to count the seconds, minutes and hours were retarded. Theoretically one poke means one count. They would either ignore a poke or count it as 5 like there was some sort of animosity between them and the 555.

  • No matter how hard I tried, I couldn’t get the hours to move. even though I made simple double-delay poke thingy that would reset the hours from 12 to 1 instead of the normal zero.

  • Since the hours weren’t resetting I couldn’t toggle the AM/PM light, which worked beautifully.

  • And various glitches involving AND gates, negative feedback and god knows what else.

Why is it that whenever I try to make something it has a ton of glitches. So, after a long talk with a friend of mine, I went back to the book I tracked specifically for this purpose (TTL Cookbook by Robert Lancaster) Due to desperation and a looming deadline I ended up changing a few things at the last moment. I’m noting going to even go into the design phase.

Clock 2Clock 1Clock 4 Clock 3




Sheet #2 Sheet #1
Sheet #4 Sheet #3
Sheet One. Crystal Oscillator vibrates, goes through dividers, gives 1Hz pulses. 74160s count seconds and minutes. 7493s are easy to reset.

Sheet Two. Soon as the hours turn 13, it switches back to zero in an instant. The pulse that resets the clock also gets delayed and hits the count pin of the 7493 advancing it to 1. So in a fraction of a second, 12:59:59 turns to 0:00:00 to 1:00:00. I connected the reset clock pulse to the clock-pin of the edge triggered flip-flop which toggles AM/PM lights.

Sheet 3 is just the alarm logic. Each 10’s of Hours, Hour, 10’s of Minutes, and Minute is basically a Binary Coded Decimal (BCD – No I’m not making this up) The purpose of the circuit on this sheet is to check if a certain pattern is present and to eliminate the possibilities of it finding other patterns, When all 4 patterns match…

Sheet 4. A pull-up resistor (or a transistor) will power the two 555s in tandem create a two tone frequency that is used as an alarm.

Overall, it took me a day to fix all my problems and get it to work on breadboards.

IMG_4138Yeah, 8 breadboards, and I still need to wire the alarm logic. Feel free to question my sanity.

Oh, and it got the first prize in the Second Semester Hardware Contest. Wooo!