Introduction: Logic Gates Demonstration Kit
Update (3/24/2021): now offering for sale on Tindie!
When teaching a Math Circle, I was discussing with the students various logic operations and logic gates. We went from basic AND and OR gates to constructing flip-flop circuit and full adder - using software simulation. I wanted to show them real electronics gates, so I started looking for a demonstration kit which would be
- functional: enough pieces to build something interesting such as flip-flop or adder
- easy to use
- clean-looking - breadboard with a rat's nest of wires doesn't make a good demonstration kit
- large enough so that it can be shown to a group of several students
- not too expensive: under $50 for the whole kit
I couldn't find such a kit; the closest I found was this one from Sparkfun, but is still fails on several counts. So I decided to make my own, which meets all the requirements above and more. Here are some features of my kit:
- It uses custom black PCBs; to make it look nicer, I used surface-mounted components placing most components on the back
- contains 5 types of gates (AND, OR, XOR, NAND, NOT) plus a separate 3-bit input board
- is powered through USB-C connector
- each board is relatively large - 48x72mm - only slightly smaller than a credit card, with high contrast white on black marking and bright blue LED to indicate states
- boards are connected by a common 3-wire connectors, commonly used for servos and widely available
- boards have stick-on magnets on the back, allowing one to place them on a magnetic whiteboard or blackboard or any other magnetic surface - even refrigerator door!
Using surface mounted components makes it more difficult to solder, but in this case, the components are few and not too small, so this makes a nice first SMD soldering kit for those wishing to learn SMD soldering. Unlike many other kits, it also serves a useful purpose!
Full list of necessary pars is listed in Step 1 below. With delivery to US, it will cost you about $90, but will give you enough materials for 10 gates of each kind. If we take the basic kit to have 2 boards of each kind, plus one 3-bit input, you will have enough for 5 kits.
You will also need a decent soldering iron, a hot air reflow station (basically, temperature controlled heatgun), solder paste (I used this low-temperature one), tweezers, flush cutters and other basic tools.
Step 1: Getting the Parts
You will need the following parts:
- PCBs. There are 6 kinds of PCBs (5 types of gates and input). The design files (Eagle's schematics and board files and Gerber files) are available from my github repository under open source license; feel free to use them. I ordered my boards from JLCPCB, which I highly recommend. I selected black soldermask (in JLCPCB, black soldermask is matte, which looks better than glossy). Ordering 10 board of each kind cost me $35+ shipping - altogether, about $60.
- Electronic components. I ordered mine from lcsc.com; full bill of materials (BOM) can be found in github repository. Feel free to replace passive components (resistors, capacitors) by other brands as long as the value and package match. I had opted for higher quality parts (e.g., using 1% tolerance for resistors), even though it is completely unnecessary for this project - but since the passives cost so little, it makes sense to order them in multiples of 100 and use leftovers for other projects, where you might need higher precision.
- Other components:
- Breakaway male headers. To make the board look nicer, I used surface-mounted headers, which are not common. I found mine on Aliexpress (we need the single-row ones) and had to wait 3 weeks for delivery. You will have to break the strips into 3-pin pieces, using flush cutters.
- Connectors: I used 3-pin servo male-to-male cables from Amazon. I recommend getting at least four 10-cm cables and two 20cm cables for each kit. Amazon sells them in packs of 10.
- Magnets. I used 18-mm diameter, 3mm thick ceramic magnets from Amazon.
Step 2: Assembling the Boards-1
Once you have all the components ready, the next step is assembling the boards. We begin by assembling the back side of the board (where most electronics is).There are hundreds of tutorials on SMD assembly, so I will be brief.
- arrange the boards, back side up (not more than 2-3 at a time) on silicone mat or other heatproof material
- use the syringe to place small beads of solder paste on each pad (except the long ones for headers). DO not place too much - this is the most common mistake. If you put too much paste, do not try to remove the excess with toothpick or tweezers - instead, wipe this pad (and nearby pads if necessary) clean, using a paper towel and rubbing alcohol, and then start anew.
- use tweezers to place components
- set the reflow station heat gun temperature to 180C (for low-temperature solder paste) or to 220C (for regular lead-based solder paste). Hold the heat gun vertical (angling it makes it easy to blow small components away). Heat each component from the distance of 1-2 cm; the solder paste first liquefies, then starts bubbling, then becomes molten metal; at this moment, move to next component.
If you had too much paste, the excess will probably be balled up somewhere around your components. Use a toothpick to remove it.
Inspect the logic chip to make sure there are no solder bridges between pins. If there are, remove them using a soldering iron and braided wick.
Step 3: Assembling the Boards-2
After soldering the electronics, add the headers. I had chosen to solder them using the regular solder and soldering iron, instead of paste and heatgun - it gives a stronger connection; also, the plastic of the headers can be melted by the heatgun. I used small chisel (D-type) soldering tip, with the temperature set to 370C (using regular lead-based solder)
- use flush cutters to divide long strips of headers into 3-pin pieces
- use soldering iron to tin middle pad of each group of 3 pads for a header
- put the header on the pad; holding the header with one hand, solder the middle pin to the pre-tinned pad. Make sure to press the pin firmly to the pad
- one the middle solder joint solidifies (it takes a couple of seconds once you remove the iron), solder the remaining pins, using solder and iron
After soldering the headers, turn the board over and solder the LEDs to the front side of the boards. If you - like me - have difficulty remembering which side of LED is cathode (negative), here is a nice reference sheet: https://lighthouseleds.com/blog/polarity-guide-of-...
For the LEDs in my BOM, the cathode is marked by green markings on both sides, as in this image: https://lighthouseleds.com/wp/wp-content/uploads/w...
Finally, attach the two magnets to the back side of the board, in positions marked by circles. Try to keep polarity of magnets on all boards the same - it will make it easier to pack your boards in a box.
Step 4: Using the Boards
Usage is pretty obvious: arrange you boards on a horizontal or vertical (magnetic) surface and connect them to create circuits, then use USB-C cable to power it. Here are some tips:
- Each connection header provides 3 pins: ground, 5V (middle pin), signal. This matches the usual servo connectors we use; typically in these connectors, ground is black, 5v is red, and signal, white or yellow. When plugging the cables, make sure to plug it in correct orientation. To make it easier for you, there are small labels on the boards' face over the headers: S stands for signal, G for ground.
- Each board provides two output headers - in case you want to split output; this allows you to avoid using additional cable splitters. Both outputs are connected to the same signal.
- When placing the boards on a metal surface (such as your refrigerator), be careful that the unused headers do not touch the surface - otherwise, you can short 5V and ground. It is recommended that you place a sheet of paper between the boards and metal surfaces (magnets are strong enough to hold the boards through regular paper).
Step 5: Further Plans
I plan to expand the kit, adding several more boards:
- "Mystery board": a 3-input board containing two elementary gates - leaving it to students to figure what is inside
- D-latch
- 1-bit adder with carry - connecting several such together, students would be able to create adder circuits
Any other suggestions would be appreciated!
I also plan to sell these as a kit through my Tindie store: tindie.com/stores/irobotics/, with tentative price of about $30-35 for a kit (3-bit input gate and 2 of each of 5 kinds of gates, plus the connector cables and magnets). If you are interested, please leave the comment below and I will let you know once it happens! Needless to say, leaving a comment doesn't put you under any obligation.

Participated in the
PCB Challenge
30 Comments
2 years ago
This is awesome! I had precisely the same problem as you and ended up developing an alternative solution.
I always was troubled to combine truth tables to these symbolic representations on the circuits, so I created my own "kit", it is only one Logic Gate though, and it can act as any 2 input 1 output logic gate and is easily configurable by a dip switch for students. Check out this video to see it in action!
Good work!
Reply 2 years ago
Hi,
Thanks! Yes, I saw your kit on Tindie - and it was featured on Hackaday. Great work. And I thought that the idea is similar to mine.
There is room for more than one logic gates kit:)
2 years ago
Great!
I like Your approach. Please keep me in the loop, when the kit is available.
I am interested in two to three kits.
The Adder is definitly a good idea.
I have Shannons "Minivac 601" in mind.
So what is needed are at least 12 to 16 inputs and the adders together
with the outputs. Perhaps You should make an additional input board with 6 ports. A BCD to DEC converter or/ and vice versa would also be a good thing.
Regards Thomas
Reply 2 years ago
Will do!
I hope to have it ready by the end of Feb
However, the adder and an extended input gate will probably be later - let me first get the basic kit out...
Reply 2 years ago
Hallo Alex,
Have received Your delivery today. Very fast from USA to Germany!
Every thing is ok and good looking.
The only thing I am complaining about is the USB-C connector.
I am coming from the Arduino world and have USB-A, USB-B and and also Micro-USB for my projects
but never have used USB-C nor I have one.
Regards Thomas
Reply 2 years ago
Dear Thomas:
great to hear you got your kit!
It does look like much of the world is abandoning micro-USB and moving to USB-C - in fact, for some of my other projects that used micro-USB I had people asking why haven't I used USB-C instead. So I just went with what most people ask for...
(And I did put in product description on Tindie that it uses USB-C)
Reply 2 years ago
Hallo,
You recently sent ne a message regarding Your logic Kit.
I am from Germany and unfortunatly they dont ship it!!!
I am very sorry
Greetings
Thomas
2 years ago on Step 5
hello this is a great pproject and i have been working on something similar. can i get your email address,?
2 years ago on Step 5
I have been teaching logic to friends and students for 40 years using paper and hand drawings. I love this instructable of yours. Much easier to use. I started in logic with 2 gates or 1 latch/flipflop in a TO5 can. We built everything from those elements, computer, terminals, etc.
2 years ago
Very cool. I might be interested in a few kits for our science museum when we finally open up for the public again.
How about a flip-flop of some sort? It would be cool to build something with memory.
Reply 2 years ago
The included gates are enough to build one flip-flop (SR latch). But yes, I am thinking of adding dedicated flip-flops - maybe D-latch.
Out of curiosity, which science museum are you affiliated with?
Reply 2 years ago
Chabot Space & Science Center in Oakland, CA
2 years ago
This is SO COOL!
Congrats!
2 years ago
I would be interested in a learning it like this, Thank you!
Reply 2 years ago
Will do!
I hope to have it ready by the end of Feb
2 years ago
I am interested in a kit, great idea!
Reply 2 years ago
Will do!
I hope to have it ready by the end of Feb
2 years ago
Great project! where was this when I struggled to understand Logic Gates? Please sign me up! I've been going through my math and electronics books and these will give me the visualization books lack.
Thanks!!
Reply 2 years ago
Will do!
I hope to have it ready by the end of Feb
2 years ago
I would purchase several for my classes. Please let me know when you hit the market!