Connect pins with KiCad Bus, Labels, and Global Labels

When to use them and why in a KiCad Schematic

When your schematic has a large number of related signals, it is helpful to group them. In its schematic editor, KiCad has a few tools to help. Your end-goal helps determine which tools to use. For example, do you need a KiCad bus or a label? In this post, I explore how you can define signals, group them, and reference them across schematic sheets.

Up until recently, I did not need to use a bus or multiple sheets. However, the Apple IIgs project I’m working on is too large for a single page. In a KiCad live stream, I looked at how to create busses and connect them. In a separate tutorial, I will show how to work with multiple sheets in KiCad.

tldr; KiCad does not require the use of a bus to connect signals together. Wire labels already provide that connection. A KiCad bus offers two things: 1) a visual representation and 2) an easier way to create global connections (across sheets.)

Lastly, if you are not familiar, KiCad is an Open Source eCAD tool. Although I have used others, this one currently my preferred platform.

KiCad Bus, Label, and Wire

Before jumping to how to use a bus, first, we need to start with the basics. KiCad connects nodes with a “wire” element. KiCad gives each wire drawn a unique name unless it connects to an existing node. The user can override the name by adding a label.

KiCad Wire and Label Example

Wire and Label Example

Continue Reading »

What is the Apple IIgs? – AddOhms Live Clip

Bald Engineer Twitch Channel
2018-11-18

Watch What is the Apple IIgs? Highlight | AddOhms Live from 

During a live stream, I was asked: “What is the Apple IIgs?” In this AddOhms Live Twitch Clip, I answer the question.

The Apple IIgs was the last of the highly successful Apple II line of computers. The “GS” stood for “graphics” and “sound.” Compared to previous Apple II computers, the IIgs was a fully 16-bit machine. When connected to its proprietary RGB monitor, it rendered a gorgeous display. Sadly, not much software took advantage of the improved graphics and sound capabilities. The IIgs was fully backward compatible with the older 8-bit line of Apple II computers. Its compatibility was so good that most IIgs users only used it in the compatibility mode.

How did the Apple IIgs achieve backward compatibility?

The IIgs contains an ASIC called the “MEGA-II.” (Which has nothing to do with the “Mega” Arduino boards.) It includes all of the individual logic chips from the original Apple II design as a single IC. Well, in addition to that IC you also need to add a CPU, RAM, and a ROM.

In my opinion, the Apple IIgs is best of the Apple IIs. In fact, of computers in that era, it is my overall favorite. When I got the IIgs, it replaced my previous pick: a Macintosh SE/30.

Creating Custom KiCad Schematic Symbol in 5 Steps

Quickly make a KiCad Part

KiCad Schematic Symbol

A new project I have started working on involves the Apple IIgs. It was Apple’s last 16-bit (and 8-bit) computer. Inside are many application specific integrated circuits, or ASICs, that make the IIgs an extraordinary member of the Apple II family. One chip, in particular, is called the “MEGA-II.” This chip takes all of the individual logic chips from the original Apple II design and incorporates them into a single 84-pin PLCC.

The project I have in mind needs the MEGA-II. I need to design some printed circuit boards for it and a few other IIgs chips. That goal means I need at least one custom Kicad schematic symbol. I plan to create a custom library of Apple IIgs components.

Like other computers from the same era, complete schematics are available. However, they are not in a modern format. Since I need to create symbols for so many of the chips as it is, I may end up re-creating the entire IIgs schematic.

For now, here is the process I use to create custom KiCad schematic symbols and parts.

Continue Reading »

Looking through my parts boxes, I have counted at least 15 distinct “Arduino boards” in my collection. Either they are variants of the Uno form factor or they have different processors from the 8-bit boards. That number easily goes to 30 if I include boards with just the “Arduino header” on them. This pile of microcontrollers got me thinking, how does anyone ever choose the right board?

For example, I have had several people tell me the ESP32 is the “ultimate Arduino.” But is it? Well, yes and no. Extra hardware you do not need can lead to complexity and unexpected behavior. When using an advanced module like the ESP32, it is important to learn how to use sleep modes to limit current consumption, especially for battery applications. But if you need WiFi, Bluetooth, I2C, SPI, UART, and high-performance processing, capacitive touch, GPIO, and analog inputs then the ESP32 is an obvious choice.

As for the other boards, I have written a guide to picking the right Arduino. You can find it over on the Hackster.io blog.

Read: Picking an Arduino

Appearance:How to pick from all the Arduino boards
Outlet:Hackster.io Blog
Format:Magazine

Arduino millis() plus addition does not add up

Here's why you should use subtraction with millis()

Arduino millis banner

In the past, I’ve covered how to reset Arduino millis() and have provided a growing list of examples using millis(). While reviewing the code for the elegoo Penguin Bot, I was reminded of a millis() mistake I see often: addition. The only way to properly handle millis() rollover is with subtraction. Let’s look at why (and how.)

What is Arduino millis()

The Arduino library has a function called millis() which returns the number of milliseconds the processor has been running. On other platforms, you might see references to a “tick counter.” It is the same idea. A hardware timer keeps incrementing a counter at a known rate. In this case, that rate is milliseconds.

A mistake new programmers often make is trying to “reset millis().” A better method is to compare two time-stamps based on millis(). So this if-statement is comparing a previous timestamp to the current value of millis().

Continue Reading »

Penguin Bot from elegoo hands-on review of the kit build

Reviewing a dancing robot

Penguin Bot Black Red and Clear

Recently I received three packages from Elegoo Industries. They are a company based in Shenzhen China. Before those packages, I noticed there name several times on various electronics kits on Amazon. They asked me if I’d help them with a video that shows how to assemble their latest creation: Penguin Bot.

There is not much point in sharing that video with you unless you’ve purchased one. So instead, here is my review, or hands-on, of the kit. I will, however, show you a short Instagram video I made to show off Penguin Bot’s cuteness

Continue Reading »

Arduino MKR Vidor 4000 Hands-On

Is the Arduino FPGA worth buying?

Arduino MKR Vidor 4000 - Blue

Earlier this week, I looked at the Arduino MKR Vidor 4000 during an AddOhms live stream. My goal was to understand the Vidor better. It is the new FPGA-based Arduino which started shipping this month. It runs about $60. You can learn more at the Vidor Product Page on the Arduino website.

In this post, I briefly touch on the difference between an FPGA and a microcontroller. Then I walk you around the MKR Vidor 4000’s board. Using one of the examples, I talk a bit about how the various chips communicate with each other. This section also highlights what makes the Arduino FPGA board different from other development boards. Lastly, I answer “should you buy an Arduino MKR Vidor 4000?”

Continue Reading »

This AddOhms episode is part 3 of the “design your own Arduino” series. In this one I populate a bare PCB, reflow solder it, debug a few issues, and load the Uno bootloader. Originally, I designed 2 versions of the board. One version contained an error that I planned to fix in the episode. Well, turns out, the “correct” board had two issues which were more interesting.

Check out the #27 show notes for links to a bunch of stuff in the episode, including the design files.

Watch on YouTube

Five Arduino math fixes for when it is wrong

Check these when your Arduino can’t math

Arduino Math

While the Arduino library does an excellent job of hiding some of C/C++’s warts, at the end of the day, it is still just C/C++. This fact causes a few non-intuitive issues for inexperienced programmers. When it looks like Arduino math is wrong, it is probably one of these reasons.

When people ask me for help with their programming, I check each of these Arduino math mistakes. If your code seems to be hitting a bug, check to make sure it is not how the compiler handles math.

Continue Reading »

Arduino EEPROM stores any datatype

.get() and .put() make saving floats easy

Arduino EEPROM Hero 1600px

Funny how a simple idea can spider out into multiple paths. Arduino EEPROM seemed like a straightforward concept. A few a years ago it was as easy as having either 512 or 1024 bytes of flash memory. The Arduino IDE offered an EEPROM library which let you read and write a single byte. Today, however, with many different processor architectures saving data to EEPROM varies. It is now possible to save any datatype to EEPROM but not on all boards and not all using the same method.

While programming an coin accepter sold by Adafruit on an AddOhms live stream, I discovered two “new” methods in the Arduino library. At least, these functions are new to me! A couple of years ago EEPROM.get() and EEPROM.put() appeared. Using these functions, you can store any datatype in EEPROM.

This post covers tidgets related to using Arduino EEPROM to store any value across multiple boards, or platforms. Specifically boards such as the Uno, Nano, Mega, and Zero are covered. Additionally Arduino-compatible boards from Espressif, PRJC, and Adafruit are covered as well.

Continue Reading »