Fundamentals for Electronics Design
Fundamentals are all about learning the small tips and trick that will make life easier when building a project. From ways to preventing errors to faster ways to prototype; it’s all here.
Check out the ever-growing table of contents below and start absorbing!
Contents
- Wire Wrap
- Batteries
- Reviewing your Gerbers
- Current Measurements Over Time
- Device Recovery Using RC Circuits
- Library Management
Wire Wrap
Wire wrapping one of my favorite prototyping techniques. Used previously for making the interconnections between integrated circuits on motherboards in the 60’s and 70’s it has since gone by the wayside due to the advent of printed circuit board assembly.
I stumbled upon it a few years ago while I was developing some test fixtures for the company I was working for at the time. Turns out that the vendor that was building our fixtures uses it every day!
Since then, I’ve used it to prototype circuits that otherwise would have been much more time intensive to prototype. I’ve also created assemblies that otherwise would have required lots of frustrating soldering which often leads to mistakes or damaging the parts in involved.
Ingredients
- Wire wrap wire
- Breakaway headers (This is a 10 pin but there’s plenty of other combinations out there!)
Some development boards to make connections to. Here are links to the boards that I was using:
Tools Used
- Wire wrap gun OK Industries G-100 Speed Wrap tool or similar. There’s also manual ones available. Best place to check is eBay.
- Wire Strippers
- Flush snips (I use a pair of Xcelite cutters on my bench)
Making the connection
The process to make these connections is relatively simple. I’m using an old OK Machine & Tool Corp Speed Wrap gun and some 30AWG wire wrap wire.
Attach a header to the board if it’s not already attached. Or if you have a board with female headers you can purchase a breakaway header with log leads on both ends.
Next, take your wire wrap wire and strip the insulation about an inch off.
Insert the wire into the smaller hole on the wire wrap tool you have. This is the same whether you have a gun or a pen-tool
Place onto the header
Spin or activate the hand crank. A delicate pressure is required here to allow the wire to “ride up” the metal post of the header. If you push to hard, the wire often wraps over itself making a not-so-great connection.
Repeat this process as needed.
Batteries
When designing in a battery to a project they should do the following:
- Provide sufficient voltage throughout the life of a battery.
- Provide enough current at full and at nearly depleted
- Operate in the temperatures that are within the operating range
- Self-discharge rate
- Total cost of integration
- Size of the battery
Voltage
Voltage is important because integrated circuits have a range of voltage that they are able to operate at. When you go above or below those voltages you risk damaging or causing unexpected operation.
From the video above, here are some typical battery ranges that I have seen for the mentioned battery chemistries.
| Lithium Polymer | Lithium Manganese | Alkaline | |
|---|---|---|---|
| Charged | 4.2 V | 3.1 V | 1.5 V |
| Discharged | 3.0 V | 1.2 V | 0.6 V |
More interestingly, all of these batteries discharge differently over time. For instance the lithium batteries tend to have a stable voltage up until they’re completely dead while alkaline batteries decay and fall off at different times.
Here are some graphs of all three types of batteries with a 10mA load. Notice how they look different over time. Also notice that some last longer than others.

Note: I purposefully stuck some mostly discharged AA’s. They did not last nearly as long as they should have (approximately 700mAh vs 2500mAH typical)
Engineers sometimes use the battery voltage as an indicator for battery capacity. The problem with this is, as you can see above, the voltage is not a straight line starting from beginning to end. This leads to firmware engineers getting crafty with their approximations using best fit curves and temperature as their guides.
Current
Batteries have limitations to how much current they may safely and reliably provide. This is due to the internal chemistry of the batteries.
For instance, some consumer grade lithium polymer batteries can discharge current upwards of 2-4 times their rated capacity whereas lithium coin cells only allow you to draw a fraction of their capacity. Alkaline cells can typically provide just as much as their lithium cousins.
Side note the ratio of discharge can be indicated in the units “C”. If you have a 1AH battery and discharge at 1A you are discharging the battery at 1C. 0.5A is 0.5C, 2A is 2C and so on. The official formula for this would be:
Current * Capacity (in Amp Hours) = C
Temperature
Ever use a cell phone and have it turn off it it’s too hot or cold? This wasn’t because your phone was sleepy. It was to protect the battery from damage when exposed to temperatures outside the normal operating range.
According to Apple’s specifications the laptop i’m using right now is specified from 50° to 95° F (10° to 35° C). It can be stored in temperatures from –13° to 113° F (–24° to 45° C) but it will likely cause damage to the battery should you use it.
For now we’re going to be focusing on applications that are used in the same environment you’d find a human wearing a t-shirt and pants; not Antarctica and not the sun.
Self-discharge
In the video, I talked about the importance of self-discharge. Every battery has it and there’s no way of getting around it. Some battery technologies, particularly Lithium Thionyl Phosphate and Lithium Manganese have lower self discharge which leads to longer battery life when not in use. Lithium Thionyl Phosphate batteries are known to last decades without having to be replaced. Whereas Lithium Polymer batteries don’t go more than a week or two without completely discharging.
Total cost of integration
Often folks will go right for the rechargeable batteries when designing new products. The problem is, there is a level of cost that gets added to a product that isn’t considered until it’s too late.
For example, what’s required for a lithium battery?
- Recharge circuit + passive parts
- Connector to interface a cable and the printed circuit board
- A cable to connect from the device to a power source
- A power source to plug the cable into
Not only that, but there are many regulatory requirements that are necessary to place batteries inside products. These certifications can cost thousands of dollars and are avoidable if other battery technologies are used.
Size
The size of a battery dictates how much charge it may contain. This translates to how long the circuitry can run before the batteries need to be charged and/or replaced. If possible, always lean towards a larger cell if possible. There are calculations that we’ll get into later on but they never beat real world testing.
Reviewing your Gerbers
One of my favorite tools to view final gerbers is gerbv. It’s my go-to for doing final checks on a printed circuit board.
Here’s an example of a few things that can be done: h 1. It can be used to make sure the final art is not missing important functionality or features.
As an example, I typically use gerbv to make sure that the soldermask layer does not have openings for vias except for ones underneath components on pads. (Common on QFN parts) 2. Make measurements. 3. If you’re basing a design off art, the art can be reviewed to confirm footprints and connections (at a high level)
Installation
Gerbv works on all systems. The latest version with a Windows installer can be found here. I will be continuing my instructions and use on OSX.
For Mac, gerbv can be installed with homebrew
homebrew install gerbv
(Note: you can get hombrew here.)
Use
Open a terminal and then type gerbv and press enter. As long as your install was successful you should see a blank gerbv window!

Opening artwork is as simple as going to the File menu and clicking Open Layer(s)

I’ve loaded up the Nordic Thingy52 Gerbers in this example. You can get those over at Noridc here.

At this point you can uncheck each layer if you want to hide it. You can also drag and reposition one layer above another in the left hand box. The is useful to make sure that all pads have a paste mask if you are going into mass production.
For navigating the design itself, I use a 3 button mouse to zoom-in and out. Then using the various tools on the top bar (move, select) I manipulate the deign as needed. Note: 3-button mice are ideal for CAD work because they give you just enough buttons to manipulate the design but also zoom in and out. I’d be lost without my mouse wheel, let’s just say that!
Summary
gerbv is extremely handy for viewing art files for final checks or when you’re doing debugging or trying to remember how a certain trace runs in a design. It should be a tool in the pocket of anyone who designs circuit boards!
Current Measurements Over Time
I’ve owned a Fluke multimeter for a while now but, frustratingly, it hasn’t always been useful for current measurements <1mA. So I searched around the internet and stumbled upon the uCurrent designed by Dave at the EEVblog.
Powered by a single coin cell battery (CR2032 I believe), this handy little device can be hooked up to banana clips and banana-to-banana adapters for current measurements.

The bottom port are used for the measurement itself and the top ports are used to provide a differential voltage output that can be read on a multimeter.
The coolest thing is that for each measurement level (1mV/nA, 1mV/uA, 1mV/mA) 1mV is equal to the unit of measure. So, when you’re switched to nA mode, the output in mV will be equivalent to how many nA being measured.
You can then attach the output voltage pins to a multimeter in the millivolt range and make small current measurements with ease.

(The picture above is making a measurement in the mA range)
Data Logging
You can go one step further with the uCurrent by logging the output using an analog capture tool. The problem is, the output of the uCurrent is differential by nature thus making it hard to do any measurements from a single ended logger like a Saleae Logic 8 Analyzer. (By the way, you can get them directly from Saleae or from Amazon)
The solution? Configure a difference op-amp across the two output terminals and connect it to one of the single ended inputs on your logic analyzer or capture tool.
Doing so ended up resulting in some nifty waveforms like the one below:

This is the current profile of a CAT-M modem during power on and transmission of a data package via HTTPS. I would have missed the spikes in this capture if I had used a plain ol’ multimeter. Yes, the multimeter does have some averaging, max and min functions but they don’t tell you where in the the process it’s happening or how many times the signal reached the “max” level.
I used an op-amp development board from TI to keep the difference amplifier circuitry sane. You can get your own at the TI store. The circuit was this below:

The best way to get started if you have short duration captures is to directly use the Saleae Logic application. For extended captures that last hours (if not days) I adapted the script that the Saleae folks had written for such a purpose. You can check it out on Github here.
If you haven’t already, check out the video at the top of the page for a walkthrough on how to take some captures using the Logic 8 and the uCurrent Gold.
Device Recovery Using RC Circuits
An RC circuit tied together with some 5V tolerant buffers can be immensely helpful and versatile in projects.
Let me set the stage:
Imagine you have a project with only one button. Yea, only ONE. Imagine it can be plugged into the wall some how but it also has its own power source.
If it bricks, which all devices do at some point in time, how do you get it in a DFU mode so you can re-flash?
Enter the multi-function button.
You can connect the output of the button, which is typically tied to something that is on all the time (a battery in this case). That button gets tied to the input of a 5V tolerant buffer which runs off a constant voltage rail.
That signal then propagates through the non-inverting buffer, at a lower stable voltage, and starts charging a resistor/capacitor combination. Once that voltage level gets to the Vih or the Voltage Input High of the second buffer chip, the output goes high. This first RC circuit is used as a timer for the first timing interval. Consider this timing interval the “waiting” time between when the person using the device presses the button and until a reset takes place.
The problem is, that output will remain active forever as long as you hold that button. If we have it tied to something like the reset signal on the micro-controller, your device will forever stay in reset and this circuit is pointless and a waste of time.
So, let’s add an additional RC element at the output of the second buffer plus an NFET to pull the input of that second buffer low once the VTH of the NFET is reached. This extra RC element is used to provide a consistent pulse to the RESET signal. Some micro-controllers require a minimum pulse. If yours does, this is the place to tune that value.
Now, you have a nifty reoccurring circuit which according to that second RC Circuit pulses for a certain amount of time before resetting and starting all over again.
Here’s a quick and dirty web calculator you can use to do to get the approximate timing parameters you need.
Remember: because every passive component has an inherent tolerance, you may have to account for the extremes at both ends of the spectrum. Higher resistance + higher capacitance == longer charge time. Lower resistance + lower capacitance == shorter charge time.
Additionally, i’ve tuned the values to the VIH and the buffers i’m using. The range is between approximately 1.76V to 2.2V maybe slightly higher because i’m running everything at 3.3V rather than 3V.
Finally, you can prevent the reoccurring triggers with an extra NFET plus some logic in your bootloader to hold that pin high. That way the device doesn’t keep getting reset if someone absentmindedly continues to hold the multi-purpose button.
Here’s everything in a much easier to read format below:

Don’t get me wrong, I’m a big fan of buttonless DFU but when it comes to shipping out devices that run on some type of code, having the ability to fix it in the field is huge. It crosses off one more potential reason for someone to return the device and it gives you insight as to what may be breaking so you can push a fix and prevent it from happening again!
Library Management
Wrangling your bill of materials can be rough. I’ve seen many engineers fall before the great three headed spreadsheet of doom. It’s tedious work and it’s often filled with frustration and error. That frustration can be fixed with a PLM system, a little organization and some elbow grease.
First of all Jared, what the heck is a PLM system?
PLM stands for Product Lifecycle Management. PLM software tools exist to help hardware folks organize their product assemblies in logical ways so when the product assembly information changes hands it goes as effortlessly as possible.
Think of it another way:
I could send you a bill of materials with resistor values and some reference designators, maybe some component sizes, the problem is there are no manufacturer part numbers. That would lead to an hour or two of searching on Digikey/Mouser in order to fill out all the missing information.
Or, I could send you a bill of materials with fully filled out and populated information about the components; part numbers, vendor part numbers, component information like footprints etc. All of this information is added when the part is created in the database essentially spreading out the search for component information over long periods of time and avoiding a second search altogether. You can simply upload the file to your favorite distributor, map your columns, and you’ll be buying your components in no time.
I’ve yet to mention the best part about a PLM system.
Are you ready for it?
…
I don’t think you are….
… 🥁🥁 Drumroooollllll …
Versioning.
Most PLM systems make it very easy for you to track changes to your bill of materials (BOM). When your bill of materials is composed of several spread sheets it generally makes you want to curl up and die when you need to make a change and then communicate said change to your factory. As an aside, I still have nightmares of creating red-line BOM changes for a factory in China only for them to go line by line looking for changes (and taking what felt like ages to do so).
So, using a PLM system can save lots of headaches by redlining items that are removed and ones that are added.
The most important thing here is you have to admit your humanity. You won’t get your BOM 100% right the first time, period. Speaking from experience you will thank yourself when you do use one of these systems.
So, cool but I don’t have hundreds, if not thousands, of dollars to spend on a PLM system. How can I replicate at least some of this functionality without plunking down a bunch of cash each month?
Creating part numbers
Organize your parts into category buckets and create your own part numbers for each.
Each bucket gets a prefix:
- IND - for inductors
- RES- for resistor
And so on.
That prefix is followed by a 4 number suffix starting with 0001. As you start adding more components that increases every time you add a component per bucket.
- RES-0001
- RES-0002
- RES-0003
Great, but how’s this useful?
It becomes useful when you start adding the part characteristics to the part itself.
- Value? 10k
- MPN? YAG060310K
- Digikey PN? YAG060310K-ND
All of a sudden, when you drop these parts on boards they automagically come with all the pertinent information that, when you export your BOM to CSV, you will have for purchasing or for procurement by your board house.
But, what if that part is out of stock?
Inevitably this happens and it feels like a never-ending game of whack-a-mole. Luckily, EagleCAD has a feature where you can associate an alternate suffix at the end of the part number to specify an equivalent part.
To get there you can open a part that you made, and click on the technologies section. Create a suffix or check an already existing one. In the screnshot below, you can see what the heck i’m talking about.

Next, I’ve already created a suffix and filled out the information in the screenshot below. I’ve ensured that the values for each are set to constant so they can’t accidentally changed during use in a schematic. Any changes to values should be made here or you should create a new component!

When you are creating a new technology or variant you can even copy the information over from the other part by right clicking and selecting all (see below) This would be typical for copying over the value of the part, tolerance, temperature spec, etc.

Now, you just simply navigate to the parts in your schematic with the old part number and use the replace command to replace them with the new part number with the added suffix of your choice.
Re-export your BOM file, send it of to your factory. Done. (Or, depending on who it is, save your board file and just send that to your factory because they’re up on the times and directly use CAD files to make your circuit board assemblies)
The only drawback here is that it’s still a bit difficult to see what has changed from one version to another. The nice thing now that you’ve done all this work is it can be later imported into a PLM system once you get to the point that you need one.
Hmm, sounds interesting. What system do you use Jared?
You should definitely check out Aligni. I’m a big fan (😍😍😍) and have used it since 2014. They continue to be my PLM system of choice year after year. It’s most impressive because they’re constantly iterating and making the system better. Plus, they’re great about taking feature requests and then acting on them.
Created: 2018-05-24 | Last Modified: 2018-08-03