Frequently, I will come up with an idea for a project I’d like to do. Some of the projects are small in scope, like designing a PCB for some DIP components so that my students don’t have to spend time wiring up a frequently-used component (like the 7447 and a 7-segment display). Those are relatively easy to do (now that I know how to design PCBs, which I guess could make another blog post). I can just sit down in front of my computer and have a board layout done in a few hours.
Some ideas I can implement with a little bit of breadboard work and a couple days of thinking. Small to medium projects I can pull off the “eat the entire piece of cake at once” process because the cake is actually more like a cupcake.
I’d like to write about breaking down larger projects. Right now I have quite a few large projects that I’m either in beginning or intermediate stages of. These can be daunting and overwhelming. At first, it’s an exciting idea! You can’t wait to get started! Then you start thinking about it, and there are so many things you need to do. It gets overwhelming quickly. If you don’t do some careful planning, you might give up before even getting started.
Right now my big projects are: build an analog computer (I just want to do something that can solve 2nd order linear ODEs and output to either a ROM/RAM in an MCU or display on an LCD screen), an 8-bit computer (but I want to design my own ISA, so no Ben Eater stuff, even though his stuff is awesome), a clock that syncs to WWVB (which I’ve been working on a lot, although I’m currently stuck right now on one of the components so I’m taking a break for a moment), and also to build a chip tester that can test almost all of the 7400 chips that I use in digital systems (I already have a tester that can do 7400 / 7402 / 7404 / 7408 / 7432 / 7486, but I’d like to scale up and include a lot more combinational and even sequential chips).
This post is going to discuss the chip tester. It’s not as huge of an undertaking as designing an 8-bit computer out of individual TTL components. But it’s still big enough that it requires some careful planning not to get overwhelmed. Sometimes it can be tricky finding ways to break a project into pieces.
How do you go from “I want to build a chip tester that can show me if a whole bunch of chips are working or not” to a finished project? First you have to think about the hardware. This is actually a very simple project, hardware-wise. The block diagram is beyond simple.
However, even in the hardware phase we have some decisions to make. Here is a good opportunity to start acting like an engineer and making design decisions to get the ball rolling. And once we do this, we’ll see that other opportunities start to present themselves.
- What microcontroller should I use?
- What touchscreen should I use?
- Which logic chips do I want to test?
Already, this has allowed me to take my project and break it down into smaller pieces. I started with my ZIF (zero insertion force) socket. If you’re not aware, a ZIF socket is a device that can hold DIP chips firmly in place using a little lever that creates a tight electrical connection. You can solder a ZIF socket into a PCB and it allows you to place DIP chips in and out in a reliable manner, without having to use a DIP socket, which requires a lot of force for inserting and removing pins and can lead to bent pins if you’re going to be inserting and removing frequently.
The ZIF socket I have has 28 pins. That’s a great starting point. I will use all of them, so that I can scale up to DIP-28 ICs that I can test. Now that I am writing this post, I realize that my ZIF socket limits me to 0.3” chips, so I will probably find a replacement that allows me to use 0.6” chips. (0.3” is the width of an AND or OR gate chip, 0.6” is the width of an EPROM or 4 to 16 decoder chip.) However, this is a design choice that is flexible at the moment because I haven’t done any soldering.
At any rate, using a 28-pin ZIF socket means I need 28 I/O pins on my microcontroller, taking the Uno out of the running (I suppose I could use it, but I don’t want to deal with using external multiplexers). So I decided to use an Arduino Mega which has more than enough pins for this project. For the display, I am using a 320×480 resistive touchscreen LCD that I purchased from Adafruit a couple years ago and haven’t found a use for yet. Now I can break my project into even smaller pieces.
- Find the help page for the LCD screen to read the tutorial and learn how to wire it up
- Download a library for the LCD screen
- Use the example program from the LCD screen library and make sure things are connected properly
- Figure out how to draw a rectangle on the LCD screen
- Figure out how to write text on the LCD screen
- Create an array of rectangles with text on the LCD screen that correspond to the chips I will test
- Create page forward / page back buttons on the LCD screen
- Use the serial monitor to gather x,y coordinates from touching the screen to determine the extent of the rectangles for user input to change the display from the home page to previous/next pages or to chip test pages
- For each individual IC, decide how to test the functionality
I also highly recommend keeping a project notebook. It’s a habit I picked up from being a grad student where I had to keep meticulous notes of my fabrication work in a clean room, but it’s a habit that’s serves me well. I frequently go back and read my old notes to see how I’ve solved problems in the past. I will insert data sheets, pin outs, and other technical notes into my book as well, making it a very valuable resource. I date every entry and try to be as specific as possible. I’ve almost filled my current project notebook up completely, and I will have a small celebration once it’s filled (just as I was excited when I recently finished up an entire spool of solder)!
I use a task management website called Asana to keep track of my projects. I have a task called “logic chip tester” and I put all of the above items as sub tasks. I like to give them due dates that are reasonable to me (and then I add at least a week because things always take longer than I want). Due dates for me are important to keep me motivated. I like being able to click “completed” on an item and have a feeling of accomplishment. Even if that task was as seemingly trivial as “draw a rectangle on the screen.”
Projects like this that require software can require a bit of planning. I don’t have a strong background in programming, so I’m not sure if there are best practices. I’m sure that my flow for writing software is probably not the best. However, I like to try to break things down into small pieces on the software side of things as well as on the hardware side. Rather than “how do I make this whole thing work” I break things down into steps.
- Figure out how to write a rectangle and text onto a certain position on the screen
- Use the serial monitor to figure out what coordinates correspond to the rectangle
- Write a function that determines if I’ve pressed within those coordinates, then go to another page
- Write a function that determines which chip I’ve clicked on based on the string value in an array
- For each chip, decide how to set DDRx registers, PORTx registers, and read PINx registers to figure out if it’s working (this is many steps, not one step)
I haven’t wanted to lock into any design features yet, because it’s still early in the process. But one thing I knew from the beginning is that I want to make this tester upgradeable and expandable. I also want the chips to be listed in numerical order. This means that I’ve had to think very carefully about how to check which chip I’m testing when I press on the screen. Comparing string values is the best way I’ve figured how to do this, because I can change the order of logic chips without affecting all of the subroutines that do the testing. Important features like this should be thought about before starting any substantial programming. But the small things don’t need to be agonized over yet!
As you start programming, you’ll probably come up with more ideas. One of my ideas was to create pagination for each chip, because I knew that a bunch of chips weren’t all going to show up on one tiny LCD screen, and I wanted it to be expandable. Some things you might need to plan for ahead of time, but if you haven’t gotten far into your coding, you haven’t committed to large design decisions yet. Write your ideas down in your notebook, and don’t worry about integrating them all at once. Once you’ve accomplished one task, then go back and reassess the rest and determine what to do next. Try not to get sidetracked by all of your “hey it would be cool to do…” ideas. Write them down and address them later!
I know that this post is rather specific to my logic chip tester, but I’ve used similar strategies for other projects. For my WWVB clock, the first step was to buy a WWVB module. Then the next step was solder the crystal onto the PCB. Then figure out how to interface it with an Arduino. Even a small step like “solder a crystal onto a PCB” gets the ball rolling, gets you looking at the components, gets you thinking about how things work, and can present next steps.
Next time you get started with a project, try coming up with just two things you can do. Once you do those two things, more ideas will present themselves. And when you’ve done enough projects, you will build the confidence required to start bigger and more complicated ones in the future. Don’t think that you need to understand everything about how to solve something before you start. All of the knowledge will come with time!