Sage Advice for the New Ham

If you’re on the edge about getting your amateur radio license, just go do it and worry about the details later. But once you’ve done that, you’re going to need to know a little bit about the established culture and practices of the modern ham — the details.

Toward that end, [McSteve] has written up a (so far) two-part introductory series about ham radio. His first article is fairly general, and lays out many of the traditional applications of ham radio: chatting with other humans using the old-fashioned analog modes. You know, radio stuff.

The second article focuses more on using repeaters. Repeaters can be a confusing topic for new radio operators: there are two frequencies — one for transmitting and one for receiving — and funny control tones (CTCSS) etc. This article is particularly useful for the new ham, because you’re likely to have a relatively low powered radio that would gain the most from using a repeater, and because the technology and traditions of repeater usage are a bit arcane.

So if you’re thinking about getting your license, do it already. And then read through these two pages and you’re good to go. We can’t wait to see what [McSteve] writes up next.

Learn Bluetooth or Die Tryin

Implementing a Bluetooth Low Energy (BLE) device from scratch can be a daunting task. If you’re looking for an incredibly detailed walkthrough of developing a BLE project from essentially the ground up, you’ve now got a lot of reading to do: [Jocelyn Masserot] takes you through all the steps using the ARM-Cortex-M0-plus-BLE nRF51822 chip.

The blog does what blogs do: stacks up in reverse-chronological order. So it’s best that you roll on down to the first post at the bottom and start there. [Jocelyn] walks you through everything from setting up the ARM compiler toolchain through building up a linker script, blinking an LED, flashing the chip, and finally to advertising your device to your cell phone. It’s a lot of detail, but if you’re doing something like this yourself, you’re sure to appreciate it.

Of course, all the code is available for you to crib peruse on [Jocelyn]’s GitHub. And for yet more background reading on BLE, check out the Hackaday Dictionary.

VOCore Tutorial Gets You Started with Tiny Router

[Vadim] wrote up this short but sweet tutorial on getting started with the Vocore (tiny) OpenWRT-router-on-a-stamp. If you need more computing power than you can get with an ESP8266, and you want an open-source Linux-plus-Wifi solution in a square inch of board space, the Vocore looks pretty sweet.

We covered the Vocore a while ago. It has 28 GPIOs, all accessible from system calls in OpenWRT. It becomes much more computer-like if you add a dock that breaks out the USB and Ethernet functionality, but that also doubles the price.

IMG_5299_tnGetting started with a no-frills Linux box (chip?) can be intimidating. So it’s a good thing that [Vadim] details a first setup of the Vocore over WiFi and SSH, and then takes you through a button-and-LED style ‘Hello World’ application that makes simple use of the GPIOs.

He says he’s going to interface it eventually with a TI CC110 sub-gig radio unit, but that’s going to involve writing some drivers and will take him some time. We’d love to see how to connect peripherals, so we’re waiting with bated breath.

[Vadim] also helpfully included an un-bricking script for the Vocore, which restores the default firmware and gets you out of whatever hole you’ve managed to dig yourself into. Basically, you connect to the device over a USB-Serial adapter, run his script, and you should be set.

Any of you out there using a Vocore? Or other OpenWRT routers? Give [Vadim]’s tutorial a glance and let us know what you think.

SDR Tutorials From Michael Ossmann

If you’re just getting into software-defined radio (SDR) but you find some of the math and/or terminology a bit of hurdle, you could absolutely do worse than to check out these SDR tutorials by [Michael Ossmann]. While they’re aimed at people using his HackRF One tool (which we love), most of the tutorial videos are very generally applicable, and we realized that we hadn’t mentioned them explicitly before. Shame on us!

Ossmann focuses on SDR using the open-source GNURadio Companion GUI tool, which makes implementing a lot of cool SDR techniques as easy as dragging and dropping items into a flow diagram. If you want an overview of GNURadio or SDR in general, these videos are a must-watch.

In particular, we loved his entries on complex numbers and complex numbers in DSP because he goes through the whole rationale behind using imaginary numbers in radio work with a graphical presentation that helps add rationale to the otherwise slightly spooky math. Heck, watch these two even if you’re not interested in radio.

The newest entry, covering DSP filters includes a great hands-on introduction to finite impulse response (moving average) digital filters. We really like the practical, simulation-based approach presented in the video — it’s just perfect for a quick introduction.

So if you’re looking for a relatively painless way to get into SDR, grab yourself an RTL-SDR dongle, burn yourself a GNURadio Live DVD, and work through these videos.

Firmware Factory: Bit Fields vs Shift and Mask

Working with embedded systems usually involves writing code which will interface with hardware. This often means working on the register level. It doesn’t matter if we’re talking about a UART, an analog to digital converter, an LCD controller, or some other gizmo. Sooner or later, you’re going to have to break out the datasheets and figure out how to talk to an external device. To succeed at this you must become a master of bit manipulation.

Hardware designers don’t like wasting space, so modes, settings and other small pieces of information are often stored as packed bits. Our processors usually access things a byte (or a word) at a time, so what is the best way to handle this? Like so many other topics in software engineering, there are multiple ways to skin this cat. In C (and its derivatives) there are two major options: shift and mask, and bit fields.

Continue reading “Firmware Factory: Bit Fields vs Shift and Mask”

Designing a CPU in VHDL for FPGAs: OMG.

If you’ve been thinking about playing around with FPGAs and/or are interested in CPU design, [Domipheus] has started a blog post series that you should check out. Normally we’d wait until the whole series is done to post about it, but it’s looking so good, that we thought we’d share it with you while it’s still in progress. So far, there are five parts.

minispartan6In Part One, [Domipheus] goes through his rationale and plans for the CPU. If you’re at all interested in following along, this post is a must-read. The summary, though, is that he’s aiming to make a stripped-down 16-bit processor on a Spartan 6+ FPGA with basic arithmetic and control flow, and write an assembler for it.

In Part Two, [Domipheus] goes over the nitty-gritty of getting VHDL code rendered and uploaded to the FPGA, and as an example builds up the CPU’s eight registers. If you’re new to FPGAs, pay special attention to the test bench code at the end of the post. Xilinx’s ISE package makes building a test suite for your FPGA code pretty easy, and given the eventual complexity of the system, it’s a great idea to have tests set up for each stage. Testing will be a recurring theme throughout the rest of the posts.

In Part Three, [Domipheus] works through his choices for the instruction set and starts writes up the instruction set decoder. In Part Four, we get to see an ALU and the jump commands are implemented. Part Five builds up a bare-bones control unit and connects the decoder, ALU, and registers together to do some math and count up.


We can’t wait for further installments. If you’re interested in this sort of thing, and are following [Domipheus]’s progress, be sure to let him know: we gotta keep him working.

Of course, this isn’t the first time anyone’s built a soft-CPU in an FPGA. (The OMG was added mostly to go along with the other TLAs.) Here’s a tiny one, a big one, and a bizarre one.

Using a Voltage Regulator as a Constant Current Source

[Afroman] contacted us to share his new video on the LM317. The humble LM317 adjustable voltage regulator is everywhere. From wifi routers, to high spec lab equipment. Given a noisy input and a variable load, a voltage regulator will give a nice clean, stable output voltage. We’ve covered the basic operation and usage of the LM317 many times. But even the most common of parts can be used in new and interesting ways.

In his video [Afroman] describes how the LM317 can be used to regulate current rather than voltage to provide a constant current source under varying load. This can useful for a number of applications including driving LEDs and laser diodes. While this circuit may not be as efficient as an LED driver module or a switching solution the LM317 is cheap and readily available. [Afroman] also describes how the circuit works in detail allowing us to enjoy this ubiquitous part in this slightly unusual application.

Continue reading “Using a Voltage Regulator as a Constant Current Source”