There are times when you want to incorporate some basic logic into your designs but your
available pcb space is limited, or maybe you would like a cheaper alternative to the more costly IC option.
Transistors used in these circuits can be any npn transistor such as BC547, BC548, BC549, 2N3904 etc.
Diodes can be almost any type so long as they can handle the reverse voltages in your design.
LED's were only used to provide a visual reference to show these circuits in action.
Experiment on breadboard first before you use any of the circuits shown, All were tested before
publishing and All of the component values can easily be played around with to meet your needs.
inputs can be virtually any signal source from timers to oscillators and more, or even push
buttons and reed switches and so on.
I came up with these circuits back in 1995 when i studied Electrical Engineering in college,
i quickly moved onto microprocessors so i never got a chance to put these designs into practice
apart from a test probe below which uses my NOT gate design, so i would love to hear any ideas
you have or maybe you are putting one into practice right now, please let me know.
2 input AND Gate
Both inputs need to be high to switch the output on.
2 input NAND Gate
Both inputs need to be on to switch the output off, if both inputs are high then the output is low.
Both Diodes are needed to prevent feedback, The input resistors could be lower values if used
in a lower voltage circuit or input voltages are less than 9v.
The 220 ohm and 500ohm resistors are required to make the circuit switch on and off.
The 1K Base resistor could be changed for a variable resistor to create a variable output voltage.
NOT Gate
The result is the opposite of the input, if the input is high then the output is low,
somtimes called an inverting buffer, although buffers generally have a high output voltage
compared to standard logic gates.
2 input NOR Gate
Output is high until one or more of the inputs are used.
More inputs can easily be included, as you can see the inputs share the same transistor base,
you may need to add diodes to each input if you need to prevent any feedback or if you come
across any problems, if there are switching errors you could also change the resistor values
for each input, the 2 existing diodes are there to prevent basic switching errors.
:: A Simple Practical Useful application with the NOT Gate above ::
:: Test Probe / Continuity Tester ::
Every now and again you may need to test a circuit board for short circuits or broken tracks
so this handy little gadget should help you out.
The probes can either be a pair of crocodile clips or purpose made probes which you should be
able to source from any good component supplier, if you wanted you could even integrate them
onto the PCB with the rest of the circuit.
I designed this circuit to run on 2 AA or AAA batteries but you could also use a 3V button cell
commonly used for car remote key fobs, do as much testing as you can before any sensitive
components are fitted, although there is only around 800mv to 1.5v running through
the probes, its better to be safe than sorry.
When the circuit is live, the red LED is lit but when the probes come into contact with a solder
bridge or a short circuit is found, the red LED switches off and the green one lights up.
Other fault checking could include broken tracks, in which case the led will remain red
and aid in tracking down the problem areas.
How it works is fairly simple.
The transistor connected to the red LED will only stay on while there is no contact between the probes,
as soon as the second transistor is switched on, there isn't enough power for the first one so it switches
off, The 220 ohm resistor helps block the power to the first base while it flows into the second transistor
which is now switched on.
I am working on a simple cheap Analog to Digital Converter at the moment so if you would like to
see it and some other great stuff please click the follow button to keep an eye on my future instructables.


























the Led is also a diode but the cathode pin is shorter and has a flat edge on the rim of the head.
the NPN type transistors i use in these circuits have 3 pins, collector .. base and emitter, like a diode, power flows in the direction from collector to emitter and in these circuits i use them as switches so the base pin acts as the on/off switch.
the NAND circuit shown above is pretty much the same as the NOT circuit but instead with 2 inputs.
as you can see in the picture of the NOT circuit, a 1K resistor is connected from battery positive to the first transistors base pin which means the transistor is switched on and the Led connected from the emitter pin to the battery negative pin is also on.
to switch the Led off all we need to do is drain the power going to the base of the first transistor,
this is done by using a second transistor as a switch, so anything that switches the second one on means there isnt enough power for the first one to stay switched on.
for a NAND you just need more than one input transistor.
so when the NAND circuit in powered on, the Led is on.
if only one of the 2 inputs are switched on then there will be no change and the Led will stay on until both inputs are switched on, only then will the Led switch off until one or both of the inputs are switched off.
i hope that helps...
Thanks
as an easier alternative though, some 555 timer datasheets have a latching flip flop circuit which would be cheaper, and if you use surface mount components it would potentially look really impressive,
it got me extra points before with tutors and i would think it still applies today.
i hope that helps, still working on the A-D Converter that i mentioned above but if you want a really really impressive circuit for your project i would recommend you look one of those up online first.