Getting Started with GNU Radio

Software Defined Radio (SDR)–the ability to process radio signals using software instead of electronics–is undeniably fascinating. However, there is a big gap from being able to use off-the-shelf SDR software and writing your own. After all, SDRs require lots of digital signal processing (DSP) at high speeds.

Not many people could build a modern PC from scratch, but nearly anyone can get a motherboard, some I/O cards, a power supply, and a case and put together a custom system. That’s the idea behind GNU Radio and SDR. GNU Radio provides a wealth of Python functions that you can use to create sophisticated SDR application (or, indeed, any DSP application).

If Python is still not up your alley (or even if it is), there’s an even easier way to use GNU Radio: The GNU Radio Companion (GRC). This is a mostly graphical approach, allowing you to thread together modules graphically and build simple GUIs to control you new radio.

Even though you usually think of GRC as being about radios, it is actually a good framework for building any kind of DSP application, and that’s what I’ll show you in the video below. GRC has a signal generator block and interfaces to your sound card. It even has the ability to read and write data to the file system, so you can use it to do many DSP applications or simulations with no additional hardware.

UPDATE: Don’t miss the follow-up post that uses SDRPlay to build a GNU Radio based receiver.

Continue reading “Getting Started with GNU Radio”

KiCad Script Hack for Better Mechanical CAD Export

Open source EDA software KiCad has been gaining a lot of traction recently. CERN has been devoting resources to introduce many new advanced features such as differential pair tracks, push and shove routing and this plenty more scheduled in the pipeline. One important requirement of EDA packages is a seamless interface with mechanical CAD packages by exporting 3D models in industry common formats. This improves collaboration and allows further engineering designs such as enclosures and panels to be produced.

KiCad has had a 3D viewer available for quite a long time. But it uses the VRML mesh format (.wrl files) and there are compatibility issues which prevent it from rendering certain versions of VRML files. Moreover, the VRML mesh export is not particularly useful since it cannot be easily manipulated in mechanical CAD software. Recent versions of KiCad now offer IDFv3 format export – the Intermediate Data Format, a mechanical data exchange specification for the design and analysis of printed wiring assemblies. Taking advantage of this new feature, [Maurice] created KiCad StepUp – an export script that allows collaborative exchange between KiCad and FreeCAD.

A FreeCAD macro and a corresponding configuration file are added to the KiCad project folder. You start with .STEP files for all the components used in the KiCad design. The next step is to convert and save all .STEP files as .WRL format using FreeCAD. On the KiCad side, you use the .WRL files as usual. When you want to export the board, use the IDFv3 option in KiCad. When [Maurice]’s StepUp script is run (outside of KiCad) it replaces all instances of .WRL files with the equivalent .STEP versions and imports the board as well as the components in to FreeCAD as .STEP models. The result is a board and its populated components which can be manipulated as regular 3D objects.

Continue reading “KiCad Script Hack for Better Mechanical CAD Export”

This Animatronic Hand is So Metal

According to his Instructables profile, [bwebby] wants to make cool stuff in the special effects industry. We think he has a pretty good chance at it based on the animatronic hand he built.

The finger segments are made from copper pipe. They are connected to each other and to the sheet metal palm with tiny hinges and superglue. That stuff inside the finger segments is epoxy putty. It keeps the ends of the tendons made from bicycle gearing cable firmly attached to the fingertip segments, and provides a channel through the rest of the fingers. These cables run through 50mm aluminium tubes that are set in a sheet metal forearm, and they connect to high-torque servos mounted on a piece of MDF. [bwebby] used a Pololu Mini Maestro to control the servos using the board’s native USB interface and control software.

Watch [bwebby] run through some movements and try out the grip after the break. If you want to make an animatronic hand but aren’t ready for this type of undertaking, you could start with an approach closer to puppetry.

Continue reading “This Animatronic Hand is So Metal”

Passive, but not Innocuous

Maxim Integrated recently posted a series of application notes chronicling how there’s more going on than you’d think in even the simplest “passive” components. Nothing’s safe: capacitors, resistors, and even printed circuit boards can all behave in non-ideal ways, and that can bite you in the reflow-oven if you’re not aware of them.

You might already know that capacitors have an equivalent series resistance that limits how fast they can discharge, and an equivalent inductance that models departures from ideal behavior at higher frequencies. But did you know that ceramic capacitors can also act like voltage sources, acting piezoelectrically under physical stress?

For resistors, you’ll also have to reckon with temperature dependence as well as the same range of piezoelectric and inductance characteristics that capacitors display. Worse, resistors can display variable resistance under higher voltages, and actually produce a small amount of random noise: Johnson Noise that depends on the value of the resistance.

Finally, the third article in the series tackles the PCB, summarizing a lot of potential manufacturing defects to look out for, as well as covering the parasitic capacitance, leakage currents, and frequency dependence that the actual fiberglass layers themselves can introduce into your circuit.

If you’re having a feeling of déjà-vu, the same series of articles ran in 2013 in Electronic Design but they’re good enough that we hope you won’t mind the redundant repetition all over again. And if you’re already quibbling with exactly what they mean by “passive”, we feel your pain: they’re really talking about parasitic effects, but we’ll let that slide too. We’re in a giving mood today.

[via Dangerous Prototypes]

How Retractable Pens Work

[Bill Hammack], aka the [EngineerGuy] is at it again, this time explaining how retractable ballpoint pens work.

pen-thumbIn this excellent video, he describes the simple (but remarkably sophisticated) engineering of the mechanism that allows a pen to pop the ballpoint mechanism out, then back in again. It is a great example of how to illustrate and explain a complex concept, much like his videos on how the CCD sensor of your camera works.

Perhaps the most interesting part of the video is an off the cuff observation he makes, though. The Parker company, who first developed the retractable mechanism, were worried that this new design might flop. So they didn’t put the distinctive Parker arrow clip onto the pen until a few years later, when the pen was a big seller. It seems that while some engineering problems are easy to solve, short-sighted accountants are a harder problem.

Continue reading “How Retractable Pens Work”

Making Lichtenberg Figures in Wood

Ever heard of a Lichtenberg Figure? It’s the branching electrical discharge you can sometimes see on an insulating material… That’s right — when the voltage is high enough — it’ll find a way. Using one of our favorite low-cost high voltage transformers from a microwave, [TheBackYardScientist] shows us how to make our own Lichtenberg Figures!

It’s actually pretty easy. All you need is an old microwave, some plywood, and water with baking soda mixed in. First, you’ll need to take the transformer out of the microwave — a simple hack we’ve covered many times before — you’ll need to wire it in a way that allows you to get a few thousand volts out of it.

Then by mixing baking soda in water, you can increase the conductivity — let the wood soak it up overnight, and now you’re ready to go! By attaching the leads to either side of the wood, it’s now conductive enough to allow the electricity to branch across the wood, burning awesome patterns as it goes — just take a look at the following video!

Continue reading “Making Lichtenberg Figures in Wood”

Embed with Elliot: Interrupts, The Good…

What’s the biggest difference between writing code for your big computer and a microcontroller? OK, the memory and limited resources, sure. But we were thinking more about the need to directly interface with hardware. And for that purpose, one of the most useful, and naturally also dangerous, tools in your embedded toolchest is the interrupt.

Interrupts do exactly what it sounds like they do — they interrupt the normal flow of your program’s operation when something happens — and run another chunk of code (an interrupt service routine, or ISR) instead. When the ISR is done, the microcontroller picks up exactly where it left off in your main flow.

Say you’ve tied your microcontroller to an accelerometer, and that accelerometer has a “data ready” pin that is set high when it has a new sample ready to read. You can wire that pin to an input on the microcontroller that’s interrupt-capable, write an ISR to handle the accelerometer data, and configure the microcontroller’s interrupt system to run that code when the accelerometer has new data ready. And from then on everything accelerometer-related happens automagically! (In theory.)

This is the first part of a three-part series: Interrupts, the Good, the Bad, and the Ugly. In this column, we’ll focus on how interrupts work and how to get the most out of them: The Good. The second column will deal with the hazards of heavyweight interrupt routines, priority mismatches, and main loop starvation: the Bad side of interrupts. Finally, we’ll cover some of the downright tricky bugs that can crop up when using interrupts, mainly due to a failure of atomicity, that can result in logical failures and corrupted data; that’s certainly Ugly.

Continue reading “Embed with Elliot: Interrupts, The Good…”