Wednesday, March 9, 2011

More about 555-logic for the 555 contest entry

Last week I wrote my 555 contest entry on 555-logic (and its 2-bit grey-code counter implementation as proof of concept) on this blog in a huge rush. As my wife was waiting for me to accompany her for some business, I had to finish up the 555 contest entry report which was due only a few hours before deadline (due to geographical location advantage, I get to sleep at midnight and rush afterwards, in the morning instead :D)

I started the idea to make 555-based digital logic circuits quite early when time was plenty before the 555 contest submission deadline. Another crazy idea in my mind was actually to make an Op Amp out of a 555. Last semester I taught analog electronics, and one of the lab experiment in the class was to actually build a self-made op amp with those very popular 9012s and 9013 BJTs in Indonesia. But it didn’t take long before I scrapped this idea, thinking it was kind of almost impossible, since not all comparator pins (it has this similar symbol with an op amp right?) inside the 555 could be accessed. I once read a PhD thesis that had this VCO-based op amp though, and I spent some time contemplating this concept. I even thought to make a 555-based filter.

This semester I get to teach digital designs with FPGA, and during early weeks of the class the idea of building basic logic gates with 555 came into my head. The solution on how to make it though, came real real late.

My early concept of 555 logic was a hope that a single 555 can be made into either a NAND gate or a NOR gate. The 555 as an inverter was already obvious. Only if I could make a NAND gate or a NOR gate, ANY logic gates can then be implementable (see articles on NAND logic or NOR logic in Wikipedia). I googled 555 nor gate but nothing relevant showed up that time (perhaps now there are three different styles of 555 nor gate out there, thanks to 555 contest ;D). I started by writing simple truth tables of a 555:

555 Truth Table
Reset(4)
Threshold (6)
Trigger(2)
Discharge(7)
Out(3)
0
0
0
Disconnected
0
0
0
1
Disconnected
0
0
1
0
Disconnected
0
0
1
1
Disconnected
0
1
0
0
Disconnected
1
1
0
1
No change
No change
1
1
0
Not allowed
Not allowed
1
1
1
0
0

Looking at the above truth table makes it real hard for me to find any useful logic functions other than the already-obvious inverter. Not to mention, there is this “not allowed” state and “no change” state that forces me to tie the threshold pin and trigger pin together to avoid the not allowed state. So, oh well, okay it felt hard to solve, so I might as well not think too much about it and think more about my work at the uni and my family instead.

Around 3 days before submission deadline I looked at the problem once more to find potential solutions. Had I been a better digital designer, I might have thought about the AND gate with the trigger-threshold pair pin as an inverting input (as pointed out by the Paleotechnologist). But apparently this did not seem apparent to me that time. Instead, as I dealt with transistors more than I deal with gate level designs, I saw a transistor with a free collector pin inside the 555 and thought that why not use this transistor as itself instead? (thereby wasting and throwing away the significance of some other parts of the 555) Transistors can be used as switches, and from the way the transistor is connected inside the 555, it became apparent to me that the transistor inside the 555 can indeed be used as a switch: we can give either a logical high voltage level or a low one to the gate of the transistor indirectly. Giving the correct threshold and trigger inputs will control the transistor’s gate as if we are controlling the transistor directly. The sketch below shows how this can be done:


Using the discharge transistor of a 555 as a general purpose pull-down switch


Tuesday, March 1, 2011

555-logic: designing digital circuits with 555s only!

The basic idea of 555-logic is to implement digital logic circuits with 555 ICs only. This gives advantage that a relatively higher and wide range of power supply voltage can be used, limited by the specification of the 555 IC (4.5V - 16V). According to Shannon through his famous 1937 Masters thesis at MIT, any combinational logic circuits can be made with switches. With semiconductor technology, these switches can be in the form of transistors. To use 555 as a transistor switch, one can utilize the internal pull-down transistor of a 555 (Figure 1).

Figure 1  Using the transistor of a 555

There is a restriction on how to use this transistor as its emitter is connected to ground pin (4). Even though one may be tempted to connect that emitter (or ground pin) to something other than ground voltage, this will not guarantee to work since the ground voltage is needed by other parts of the 555 IC to function. Therefore, the use of the 555 transistor as a switch is restricted to the implementation of pull-down network of switches with no cascading of emitters to collector of another transistor. This leaves a reasonable choice to implement a NOR gate. A NOR gate can be made with two pull-down transistors with collector pins connected together forming the output. A pull up resistor is to be connected between these collector pins and VCC, and a 555 can be used for this since a series of three 5ks resistors exist in a 555. The implementation of such a NOR gate with 555 is shown in Figure 2.