Problems with bistable multivibrator latch
Microcontrolled
Posts: 2,461
I'm building a latch using this circuit
I'm using all 100 ohm resistors except the pulldowns on the base pins which are 10k. I'm using 2N3904 transistors, .1uf ceramic capacitors, and 1N4004 diodes. The circuit will only latch/unlatch when I touch the clock line to power. If I connect it to a pushbutton or pulse generator it does not work, and I cannot figure out why. The pulse generator is buffered by a transistor and the pushbutton is connected straight though to power, so it should be basically the same electronically. I have built this circuit before and it has worked with both methods, so this is a real mystery. If anyone could help me out, I would greatly appreciate it.
Thanks,
Microcontrolled
I'm using all 100 ohm resistors except the pulldowns on the base pins which are 10k. I'm using 2N3904 transistors, .1uf ceramic capacitors, and 1N4004 diodes. The circuit will only latch/unlatch when I touch the clock line to power. If I connect it to a pushbutton or pulse generator it does not work, and I cannot figure out why. The pulse generator is buffered by a transistor and the pushbutton is connected straight though to power, so it should be basically the same electronically. I have built this circuit before and it has worked with both methods, so this is a real mystery. If anyone could help me out, I would greatly appreciate it.
Thanks,
Microcontrolled
Comments
The way I see it, the commutation pulse should pull both bases down through the diodes, but the difference in charge stored on the capacitors makes the circuit flip, or flop.
BTW, The finished product of this circuit needs to use a clock pulse to flip the latch, not a pushbutton.
Similary does your transistor buffer have a stiff pull up.
That circuit is giving me headache just now but I can't help thinking you need to be sure the center point of the two capacitors is discharged as well as charged. Or vice versa.
I have seen this kind of flip flop done with tubes. Two triodes and no diodes. Isn't it possible to make the transistor version without diodes?
The resistors, 100Ω all around, seem pretty low. What's the supply voltage, Vcc? Resistors R1 and R4 are the load, but the resistors R2 and R3 supply the only base current to the cross-coupled transistor and could be higher values. 10x higher is reasonable, still enough base current to drive the transistor to saturation, and more voltage swing at the collector of the transistors. The resistors R5 and R8 for the steering network could also be larger values, say 10k. They determine the time constant between trigger events.
Based on the circuit of my own design, I built 3 working copies and had them setup in a working data array, but now that I rebuilt it using newer components, I can't get it working. The resistors I used in the initial (working) prototype had no markings, so I don't know the value (they came with a bulk purchase of eBay LED's, and they were all I had at the time I made the first prototype) but I assumed them to be about 100 ohms as they were intended to use with LEDs and a 9V source. The problem is, even if I build the circuit now using the exact same items that I did when I had it working, it still won't work. For some reason tapping the wire on the power rail will flip the latch, but directly connecting it with a pushbutton or a pulse will not.
@Heater: I haven't managed to make it without using diodes. It took me 5 revisions before I got a working transistor latch circuit, so I wasn't up for trying to design one that didn't use diodes after I got it finally working. I first tried an all-transistor and resistor circuit that was basically the transistor logic equivalent of a logic gate latch, but it failed to work. I then tried a combo double-latch transistor and diode circuit that was rejected due to the high part count (the circuit I'm working on requires 44 of these, so every component counts). I finally started working with the transistor bistable multivibrator circuit and attempted to convert the SR latch to a T flip flop using transistor logic, but once again failed. This is the last attempt at it, using the capacitors to hold the charge at each of the transistor bases so that the latch can be triggered with one pin. It worked, up until now, so I thought I had found what I was looking for.
A propeller 2 using discretes? ;-)
Why use a 60 year old design approach, when you can use that stuff invented ~ 30 years ago called Logic ICs ?
Modern Logic comes in small packages, and has Schmitt action on the clocks.
This isn't making sense to me.
They work, but they don't latch...then they don't work.
They are held in their state by external circuitry anyway...then why do you need a latch?
Are you sure you can't describe a little more of the surrounding detail?
C.W.
http://www.tpub.com/neets/book9/36c.htm
Some of the old computers were just drawers and drawers of these things on little plug in cards. Google on NTDS and/or 642-B
Frank
You know what, here's the schematic. It's worth a thousand words. TransistorClockSchematic.pdf Just don't hold me to it if it doesn't work in the end, it's purely experimental. The goal of the final project is to have a functional digital clock using nothing but discrete components, which is why it is crucial that I don't use logic gates.
Some half-baked circuits are sensitive to small changes in component values. Even a small difference in capacitance that exists between a plugboard and a soldered board can have a serious effect, so that it works one way here, and another way or not at all there.
PS--I see you just did link to your schematic, thanks. And Frank linked to another source with the #1 circuit.
PPS--Just took a look. No wonder you hadn't posted it before!
Ahhhh, one of those "a hill I just have to climb" projects!
I would get each "sub-circuit" worked out and fully understood before moving ahead.
C.W.
+1 on what C.W. said. It would be a good learning experience to understand the basic transistor multivibrator circuits. The very word multivibrator evokes a lost age. But the clock project as a whole looks like torture! Where did you find that schematic?
Definitely find a pile of 4.7k resistors to try instead of questionable 100Ω.
Don't give up, torture or not.
A decade or so ago I found easy access to an effectivly infinite supply of BC108 transistors at my work place.
So my lunch time project for many weeks was building logic gates, then flip-flops of varying complexity and ending up with a four bit binary conter. Complete with LEDs on the collectors to display the count. (Tip: all circuits shouls include LEDs)
Of course I was not being tricky and using diodes and capacitors so each of my divide by two stages used 2 transistors for the master flip-flop, another two for the slave flip-flop and a bunch more for the feedback/steering gates.
Sadly, my contract work at that company ended before my transistor clock project was complete.
What I do remeber though is that I was working with a bunch of guys involved in designing ASICs. When I asked them how to put my flip flops together with discrete transistors they were no use what so ever.:)
Here is a digital clock built entirely with vacuum tubes:
http://www.engadget.com/2006/06/26/all-tube-digital-clock-seven-years-in-the-making/
Same idea just bigger and hotter...
As for the schematic, I didn't "get it" anywhere, I drew it up. This was my challenge: to build a working transistor clock using no logic IC's, and to draw all original schematics. The rules were that though I could ask this forum for help if I needed it, I could not use the internet for any other resources. Paper sources of information are fair game, but googling "transistor latch" before I had a working model was off limits, so I had to come up with it myself. It took me 2 weeks just to get the schematics done, and I'm guessing it will take many more before construction is complete.
@Heater: That sounds really neat. I used the "master-slave" setup for the second prototype of my flip flops, and it was a mess. It must have taken you forever to get a working counter.
That tube clock looks like it was a pain to design, but totally worth it in the end.
BTW, I don't even know what a "spool valve" is, but why would you use mechanical equipment to make a counter when you have good ol' transistors?
Thing is, you have probably realised by now, it is quite easy to make logic gates with transistors. AND, OR, NOT etc.
The next step is to understand how to make flip-lops, latches, counters, adders etc etc out of logic gates.
Putting those bits of knowledge together you might build a toggle flip-flop out of gates, which is in turn built out of transistors and end up with a solution using eleven transistors or whatever.
Meanwhile, that toggle flip-flop you have presented exploits some tricks of capacitance and such that it can be a toggle flip-flop in only two transistors. Amazing.
There are similar "tricks" using the properties of relays and the physics of their magnetic parts that enables one to create a toggle flip-flop from only two relays. Which, looking at the simple logic of the switching mechanisms is impossible.
My transistor counter used no capacitor tricks and hence a lot more transistors, still only took a few lunch times to build it.
The "spool valve", if they even call it like that these days was easy. In my mind air pressure went in one hole and came out of one or other of two holes. Meanwhile air pressure into one or other different holes could move a piston in the valve steering which hole the input air came out of, if you see what I mean. Kind of like a logic gate.
I've rebuilt a few automatic transmissions in my day, Ford C-4s and TorqueFlite 727s. All-mechanical marvels using planetary gearsets. The valve body is an amazing hydraulic computer chock full of spool valves, check valves, accumulators, springs, labyrinthine passages, seperator plates, calibrated orifices, etc which did all of the "computing logic". Piping hot ATF fluid is pumped through as lube/coolant/hydraulic fluid/hydraulic coupler (within the torque converter) and the system monitors shaft RPM and engine vacuum to engage two outer bands and engage/release different internal clutch packs. These things are nearly bulletproof and operated under all temperature/road conditions. Back before slapping on a microcontroller to do everything was an option, those mechanical engineers really earned their paychecks.
http://www.transmissiontester.com/china-09g_09d_valve_body_remanufacture_rebuilt_transmission_valve_body-145630.html
It has that delightful college textbook feel to it. Nummy.
Edit: Mostly same material at http://www.allaboutcircuits.com/worksheets/ttl.html with "reveal answer" links plus help pages at end.
That's quite a remarkable circuit, particularly for someone who doesn't know what a ripple counter is. (It's another relic of an earlier age). I'm interested to hear your explanation of how it works, or is supposed to work when finished, or even how some bits and pieces work.
Here is the tiny lower left-hand corner of your circuit. There is the astable on the left, and that is feeding a long chain of diodes in series that go one after another to the "clock" line of the individual flip-flops. The clock signal has to pass through a pair of transistors that involve a logical combination of the Q output of the previous stage and the Q\ output of the current state. That is what leads me to think that you are trying to make a synchronous counter (but I haven't groked how or what). If it were a ripple counter, the Q\ output of each stage would be connected to the trigger input of the next stage. That arrangement ripples, because the trigger pulse at the input takes time to propagate through the sequence of flip-flops (and it could display incorrect digits briefly in the process). But you do not have a ripple counter here. I'm not sure exactly what it is, but a synchronous counter is built from J-K type flip-flops that all share a common clock, and when the common clock pulse comes along, they all change state at (pretty much) the same instant.
I was puzzled by why the "NOT Q" label is on the same node as "Vdd" power. NOT Q belongs on the junction between the transistor collector and the 4.7k resistor. Well, that's a minor puzzle. Keep at it a bit at a time!
I did in younger days wire up large arrays of 1) neon bulb subcritical oscillators and 2) same with coupled programmable unijunction transistors. It was supposed to be kind of a neural net, to respond to external periodic or random inputs, and synchronize or not. Inspired by fireflys, or heart cells. That was college. The profs were working on the forced van der Pol oscillator (a kind of multivibrator circuit), and other such things that have internal clocks, to see how they can exhibit deterministic chaos, noise. I didn't learn much from the big arrays, but it was rewarding to dig into the individual circuit cells.
For each full clock cycle generated by the astable multivibrator, the next sequential latch in the chain changes it's state. When the end of the chain is reached, all the latches are reset to their default. As each latch is activated, the 7 segment increments by 1. These individual "digits" are linked together to form, essentially, a clock.
Theory of Operation
An astable multivibrator generates a clock pulse that controls the rest of the circuit and keeps it on time. This has to be the most precise part of the clock. The clock keeps data stored in an array, which is then outputted to the 7 segment displays. The array is a series of linked bistable multivibrators modified to be T flip flops. The goal was to get only the next sequential one to latch with an incoming clock pulse, which is done using a 2 transistor AND gate. The clock pulse can only activate a latch when the NOT Q from itself is high (meaning that it cannot be changed once it has latched, as NOT Q will be low), and when the previous gates Q is high. This means that (1. The gate can only be triggered when the previous one has been triggered (2. The gate can only be flipped if it is not in the "latched" state. The diodes are added to feed into the base of the transistors to prevent the base current (I'm not sure what that's called) from feeding back into the mulitvibrator and causing trouble. The diodes across the clock lines are to prevent any unwanted signals from the clock line of the multivibrator from activating any of the other latches, so it's really just a precaution rather than a necessity. When the last latch is activated, it resets the series of latches by clicking the power off using a relay. This is quite a crude and unconventional method, but it was be economical than using multiple transistor mechanisms to individually reset each latch. When the relay flips over, the action of it flipping to the opposite pole serves as the clock pulse for the next string of latches.
The translation to the LED digits is simple. A PNP transistor on each signal line prevents current from flowing if the next sequential latch is active, preventing multiple digits from being displayed on top of each other. It is also fed into the base of an NPN transistor so that the current from the latch isn't needed to power the LED's. The LED digits are selected using an array of diodes, operation is pretty self-explanatory.
I'll post pictures of my paper schematics (much easier to read) when I get the time.