How to Add UART to Your FPGA Projects

Being able to communicate between a host computer and a project is often a key requirement, and for FPGA projects that is easily done by adding a submodule like a UART. A Universal Asynchronous Receiver-Transmitter is the hardware that facilitates communications with a serial port, so you can send commands from a computer and get messages in return.

Last week I wrote about an example POV project that’s a good example for learn. It was both non-trivial and used the board’s features nicely. But it has the message hard coded into the Verilog which means you need to rebuild the FPGA every time you want to change it. Adding a UART will allow us to update that message.

The good news is the demo is open source, so I forked it on GitHub so you can follow along with my new demo. To illustrate how you can add a UART to this project I made this simple plan:

Continue reading “How to Add UART to Your FPGA Projects”

Intro to Docker: Why and How to Use Containers on Any System

If you have your ear even slightly to the ground of the software community, you’ll have heard of Docker. Having recently enjoyed a tremendous rise in popularity, it continues to attract users at a rapid pace, including many global firms whose infrastructure depends on it. Part of Docker’s rise to fame can be attributed to its users becoming instant fans with evangelical tendencies.

But what’s behind the popularity, and how does it work? Let’s go through a conceptual introduction and then explore Docker with a bit of hands-on playing around.

Continue reading “Intro to Docker: Why and How to Use Containers on Any System”

How to Mash Up BLE, NodeJS, and MQTT to Get Internet of Things

We’re living in the world of connected devices. It has never been easier to roll your own and implement the functionality you actually want, rather than live with the lowest common denominator that the manufacture chose.

In a previous article I walked though a small python script to talk to a BLE light and used it to cycle through some colors. Now I want to delve deeper into the world of Internet Connected BLE devices and how to set up a simple Internet-Of-Things light. With this example in hand the sky’s the limit on what you can build and what it will be able to do.

Join me after the break as I demonstrate how to use NodeJS to bridge the digital world with the physical world.

Continue reading “How to Mash Up BLE, NodeJS, and MQTT to Get Internet of Things”

Circuit VR: Measuring with LTSpice

Usually, with Circuit VR we look at some circuit in detail with simulation — usually LTSpice. This one will be a little meta because I wanted to look at a capability in LTSpice which ironically is very useful, but not often used. Along the way, though, we’ll look at why you get maximum power transfer when your source impedance matches your load impedance. This is something you probably already know about, but it is interesting to look at in simulation if you know how to coax LTSpice — no pun intended — into showing you a meaningful graph.

The circuit is super simple. An AC source and a 50-ohm resistor stand-in for a 40-meter ham transmitter. With 100 volts into a 50-ohm load. So far, so good.

Continue reading “Circuit VR: Measuring with LTSpice”

Circuit VR: A Tale Of Two Transistors

Last time on Circuit VR, we looked at creating a very simple common emitter amplifier, but we didn’t talk about how to select the capacitor values, or much about why we wanted them. We are going to look at that this time, as well as how to use a second transistor in an emitter follower (or common collector) configuration to stiffen the amplifier’s ability to drive an output load.

Several readers wrote to point out that I’d pushed the Ic value a little high for a 2N2222. As it turns out, at least one of the calculations in the comments was a bit high. However, I’ve updated the post at the end to explore what was in the comments, and talk a bit more about how you compute power dissipation with or without LTSpice. If you read that post, you might want to jump back and pick up the update. Continue reading “Circuit VR: A Tale Of Two Transistors”

Circuit VR: Starting an Amplifier Design

Sometimes I wish FETs had become practical before bipolar transistors. A FET is a lot more like a tube and amplifies voltages. Bipolar transistors amplify current and that makes them a bit harder to use. Recently, [Jenny List] did a series on transistor amplifiers including the topic of this Circuit VR, the common emitter amplifier. [Jenny] talked about biasing. I’ll start with biasing too, but in the next installment, I want to talk about how to use capacitors in this design and how to blend two amplifiers together and why you’d want to do that.

But before you can dive into capacitors and cascades, we need a good feel for how to get the transistor biased to start with. As always, there’s good news and bad news. The bad news it that transistors vary quite a bit from device to device. The good news is that we’ll use some design tricks to keep that from being a problem and that will also give us a pretty wide tolerance on component values. The resulting amplifier won’t necessarily be precise, but it will be fine for most uses. As usual, you can find all the design files on GitHub, and we’ll be using the LT Spice simulator.

Continue reading “Circuit VR: Starting an Amplifier Design”

Lathe Headstock Alignment: Cutting A Test Bar

Let’s say you’ve recently bought a lathe and set it up in your shop. Maybe you’ve even gone and leveled it like a boss. You’re ready to make chips, right? Well, not so fast. As real machinists will tell you, you can use all the levels and lasers and whatever that you want, but the proof is in the cut. Precision leveling gets your machine in the ballpark (machinists have very small ballparks) but the final step to getting a machine to truly perform well is to cut a test bar. This is a surefire way to eliminate any last traces of twist in the bed.

There are two types of test bars. One is for checking headstock-to-ways alignment, which is what we’re doing here. There’s another type used for checking tailstock alignment, but that’s a subject for another day.

Continue reading “Lathe Headstock Alignment: Cutting A Test Bar”