June Issue: Vehicle Tracking, Bit Banging, and More

Circuit Cellar’s June issue is now online, outlining DIY projects ranging from an automated real-time vehicle locator to a  GPS-oriented solar tracker and offering solid advice on bit banging, FPGA reconfiguration, customizing the Linux kernel, and more.

June issueA persistent problem typically sparks the invention of projects featured in our magazine. For example, when the campus at Penn State Erie, The Behrend College, had a growth spurt, the local transit authority provided a shuttle bus to help students who were rushing from class to class. But ridership was low because of the bus’ unpredictable schedule.

So a college engineering team constructed a mobile application to track the bus. That system inspired the cover of our June issue and complements its communications theme.

The three-part system consists of a user’s smartphone running a HTML5-compatible browser, a base station consisting of an XTend 900-MHz radio connected to a Raspberry Pi single-board computer, and a mobile tracker including a GPS receiver, a Microchip Technology PIC18F26K22 microcontroller, and an XTend module.

The Raspberry Pi runs a web server to handle requests from a user’s smartphone. The user then receives accurate bus arrival times.

Also aligning with June’s theme, we present an article about implementing serial data transmission through bit banging. You’ll gain a better understanding of how serial data is transmitted and received by a microprocessor’s hardware UART peripheral. You’ll also learn how bit banging can achieve serial communication in software, which is essential when your embedded system’s microprocessor lacks a built-in UART.

Recognizing a rapidly unfolding communications trend, this issue includes an inventor’s essay about how the presence of Bluetooth Low Energy (BLE) in the latest mobile devices is sparking a big boom in innovative hardware/sensor add-ons that use your smartphone or tablet as an interface. Other communications-related articles include Part 2 of a close look at radio-frequency identification (RFID). This month’s installment describes the front-end analog circuitry for the RFID base station of a secure door-entry project.

In addition, we offer articles about adjusting your FPGA design while it’s operating, modifying the Linux kernel to suit your hardware and software designs, tools and techniques to boost your power supply, digital data encoding in wireless systems, GPS orientation of a solar panel, and an interview with Quinn Dunki, an embedded applications consultant and hacker.

The June issue is available for membership download or single-issue purchase.

Q&A: Embedded Applications Consultant and Hacker Quinn Dunki

Quinn Dunki is more than just a hacker. This Los Angeles, CA-based embedded applications consultant and software game developer enjoys working on her homebrew 8-bit computer and dreams of a future filled with hackerspace-type libraries.—Nan Price, Associate Editor

 

NAN: Tell us about your computer game company, One Girl, One Laptop Productions. How did the company begin?

Quinn Dunki

Quinn Dunki

QUINN: I had been in the AAA games industry for most of my career. I’ve been making games in my spare time since I was six years old, but the “actually-getting-paid-for-it” time started in the 1990s with the Nintendo 64.

I’ve written games on everything from the Apple II to the Playstation 3. I worked at various companies including Bungie Studios and 3DO.

My longest stint was eight good years at a small studio called Pandemic in Los Angeles, CA. In 2009, the company was in financial trouble and was sold to Electronic Arts with the intention it would keep it going. Electronic Arts opted to close the studio down shortly thereafter. We got some severance with our walking papers, and I decided to spin that money into One Girl, One Laptop Productions

This was just at the tail end of the initial gold rush on Apple’s iOS platform, and it still seemed like there was money to be made there. Unfortunately, there was subsequently a mad rush to the bottom on pricing for iPhone games. Before I could establish a presence, the space got very crowded almost overnight. Low-volume, high-quality indie games became financially unviable (though I think they’re coming back now). I still do independent game development on the side, but my primary business now is consulting and hired-gun engineering for other companies needing mobile or embedded applications.

Quinn has two workspaces. She uses this one for the “small clean stuff.”

Quinn has two workspaces. She uses this one for the “small clean stuff.”

Quinn’s other workspace is used for the “big dirty stuff.”

NAN: Describe some of the software One Girl, One Laptop Productions develops. Do you have a favorite?

QUINN: As much as I love games, my true love is engineering itself. My favorite projects always end up being the ones with the most complex challenges. I don’t think I could pick just one.

A good recent example is the Olloclip, which is a combination photography app and lens attachment for the iPhone. The main killer feature is real-time barrel distortion correction that made for some very interesting development challenges.

Much like game consoles, working on mobile devices is often about taking a well-understood algorithm and making it work on a platform so small that nobody thinks it will be possible. On AAA games, I used to try and build complex artificial intelligence (AI) systems that ran in 3 ms of frame time. Now I’m trying to cram gigabyte-scale image processing systems into devices with little memory, minimal graphics processing units (GPUs), and slow CPUs. They are similar challenges with completely different contexts. Some days it feels like you’re trying to model high-energy particle physics on a washing machine, but it’s a great when you finally do solve a problem like that. It’s the engineering of the thing that’s exciting, whatever that thing is this week.

Another favorite has been the ICEdot project. It’s a health and safety sensor system that works with your mobile device and is targeted at athletes and coaches. It’s a fun mix of mobile and embedded systems development and it has pushed my skill set into a number of new areas—in particular, Bluetooth Low Energy (BLE), which is an exciting new technology. ICEdot is on the bleeding edge of that, and it’s been a big challenge to use it in the real world.

NAN: What types of projects did you work on while you were a Senior Engineer at Pandemic Studios?

QUINN: I started my tenure there on a squad tactics training simulator Pandemic was building for Simulation, Training, and Instrumentation Command (STRICOM), an experimental technology branch of the US Army. It’s a long story, but that simulator was later spun into a series of Xbox games called Full Spectrum Warrior.

The biggest project I worked on was an open-world game set in World War II called Saboteur. Unlike the usual shooter format the WWII genre is littered with, this was a third-person action-adventure game with a noir art style. Saboteur was a hugely ambitious project, and the awesome team there solved some very big challenges. We did things with physics, rendering, AI, clambering, animation, toolchains, content streaming, and game design that no game had done before. As so often happens with AAA games, the marketing budget was pulled at the last moment, so you can add it to the long list of “Greatest Games That Nobody Played.”

NAN: Your blog-style website BlondiHacks features hacking projects involving everything from development boards to two-layer PCB etching. Tell us about the types of projects you enjoy hacking.

QUINN: BlondiHacks is my outlet for whatever whim that comes to mind as far as hacking. I think hacking is more than a hobby—it’s kind of a way of life. It’s about shaping your environment to be what you think it should be. It’s about saving things from landfills and giving new life to forgotten or underappreciated artifacts. It’s part creativity, part environmentalism, part self-reliance, and all good times.

It’s fun to talk about stuff you’re doing, but most of my flights of fancy are so obscure or odd that only a select few would find them interesting. The power of the Internet is that it connects all of us oddballs to each other. Hence, BlondiHacks.

NAN: How did you become interested in technology?

QUINN: I don’t recall a time when I wasn’t interested, honestly, so that transition must have occurred before my brain was retaining memories. What age is that? Three? Four?
I may have been born with a multimeter in my hand (though my mom would probably have noted that in the medical report). My mom likes to say, the day they brought the Apple II into the house (when I was around age five) I crawled up on the stool and haven’t moved since.

To prolong her toothbrush’s life, Quinn replaced a toothbrush battery with a nickel–cadmium battery and added wires to the old battery’s PCB mount points.

To prolong her toothbrush’s life, Quinn replaced a toothbrush battery with a nickel–cadmium battery and added wires to the old battery’s PCB mount points.

NAN: What was your first project?

QUINN: That’s difficult to say, since my life is a series of endless overlapping projects. As soon as I was old enough to hold a soldering iron, I built a lot of things from the seminal Forrest Mims book RadioShack sold. You know the one: Getting Started in Electronics.
That book was my bible for many years. I remember hacking a remote-control truck to have headlights and speed control. I remember building a working guillotine for a school project about the French Revolution. It was 4’ tall and genuinely dangerous. I carried it on the bus and demonstrated it on bourgeoisie bananas in class. I don’t imagine kids would get away with that today.

More recently, my interest in hacking was probably rekindled with the simple act of replacing the “non-user-serviceable” battery in a very expensive toothbrush (see “Toothbrush Repair”). That was five years ago, and I’m still using that toothbrush today. To me, that’s the purest essence of hacking right there—fixing the one weakness in a product that would have otherwise halved its useful life.

Quinn’s homebrew computer, Veronica, includes a clock circuit and a CPU. The breadboard is shown.

Quinn’s homebrew computer, Veronica, includes a clock circuit and a CPU. The breadboard is shown.

NAN: Are you currently working on or planning any projects?

QUINN: My biggest hobby project recently has been my homebrew computer, Veronica (see “Veronica”). The Apple II I mentioned was very formative for me, and [Apple Computer founder] Steve Wozniak was a bit of a hero figure. My whole life, I wanted to know how one person could just sit down and create something like that.

A couple of years ago, with no formal training in electrical engineering, I decided to see if I could do it. Veronica is the result, and it was the fulfillment of a lifelong goal to build a functioning, usable, 8-bit computer from scratch, complete with video graphics array (VGA) bitmapped video, a keyboard, game controllers, and built-in Pong.

Today, my most active project is repairing, restoring, and modifying an early 1990s Bally/Williams pinball machine called Johnny Mnemonic (see “Johnny”). Anyone who likes hacking should be into pinball machines. They are wonderlands of mechanical systems, electronics, software, and game theory all rolled into one. They are also bottomless pits of hacking and tinkering potential (not to mention money pits and time sinks).

Another big ongoing project is our 24 Hours of LeMons race team. The short version is that it’s a (very) low-budget form of endurance auto racing that involves a whole lot of hacking of all kinds. That’s probably an entire interview unto itself, but I feel I should at least mention it, since it’s such a big part of my hacking time.

Quinn is in the process of hacking a Bally/Williams Johnny Mnemonic pinball machine. This photo shows the machine’s circuitry.

Quinn is in the process of hacking a Bally/Williams Johnny Mnemonic pinball machine. This photo shows the machine’s circuitry.

NAN: What do you consider to be the “next big thing” in the industry?

QUINN: One “big idea“ that has been put forward that I’m excited about is the notion of hackerspaces replacing public libraries. The Internet is gradually replacing the role of pure information access that libraries have served. It has been suggested that access to high-end technology creation tools is the next such area where playing field leveling is required. Anyone wanting to improve their station in life by executing their ideas in a high-tech world will need access to CNC machines, 3-D printers, machine tools, high-end computer-aided design (CAD), video production software, and so forth.

Libraries are generally well located and already equipped with things such as fire exits, sprinkler systems, and commercial-grade electrical. Converting some libraries into hackerspaces sounds to me like a terrific use of public funds. It’s a bit “pie in the sky,” but places like Edmonton in Alberta, Canada, and North Logan, UT, are already experimenting with the idea. This is like hacking democracy itself, and I love it.

Bluetooth Low Energy Changes the “Wireless Landscape”

In 2010, the Bluetooth Special Interest Group (SIG) took Nokia’s existing Wibree standard and renamed it Bluetooth Low Energy (BLE). In doing so, it combined the latest in a series of evolutionary engineering improvements with brute-force market pressure to change the wireless landscape.

Adding BLE to the Bluetooth 4.0 specification has spurred rapid adoption. In fact, the SIG predicts that 90% of Bluetooth-enabled smartphones will support BLE by 2018. Before this wide adoption, a Wibree-based product had to include both sides of the radio link. Now a BLE-based device can ship with the assumption that the customer already owns the receiving half. This enables system architects to consider the user interface (UI) to be a software problem, not a hardware one. Hardware UIs are expensive and their power requirements are many orders of magnitude higher. BLE-based design can cut total product costs by more than half and increase usability by leveraging the customer’s smartphone. This provides a high-resolution screen, an already familiar user experience, and an Internet connection essentially for free.

The Mooshimeter displays a car startup transient.

The Mooshimeter displays a car startup transient. (Photo courtesy of Mooshim Engineering)

Wibree’s main technical value proposition is its extremely small power draw. Our company, Mooshim Engineering, offers the Mooshimeter, a wireless multimeter and data logger that uses your smartphone as a display. The transceiver we use for the Mooshimeter consumes a little less than 100 µW average draw to both send broadcast announcements every few seconds and listen for wake-up requests. This is roughly 10 to 100 times more power than a quartz watch, but 10 to 100 times less power than the watch’s backlight. Like the wristwatch, this draw is extremely peaky and depends heavily on usage. Products that only need to transmit can pull as little as 155 µJ per announcement. This provides more than a year of standby time.

Using 100-μW average draw as a starting point and assuming perfect power conversion, power could be provided by 2 to 4 mg per day of storage with a rechargeable lithium-ion battery; 1 to 3 g per day of storage with a supercapacitor; 10 mm2 of solar cells placed in a good spot outdoors; 5 cm2 of skin contact using thermal harvesters (e.g., a narrow but secure wristband); vibration harvesters, either on our limbs or in heavy industrial settings; or –10 dBm of wireless power transfer. An alkaline AA battery could ideally provide four years of service, although its self-discharge is more than 10% of the energy budget.

These power levels enable devices to have a high level of energy independence and become truly wireless—no data wire and no power wire. Thus architects can explore new relationships among devices, their environments, and their users. Connectors don’t compromise environmental seals, and frequent recharging doesn’t compromise the user’s experience.

The 100-μW  budget assumes the device just periodically announces its existence (as with wireless tethers and remote wake-up). But in uses that require more interesting payloads, the value proposition may be that the wireless link can fade into the noise of the energy budget. Remoting the user interface can also save energy, as even a dim indicator LED draws a milliwatt.

BLE is gaining its heaviest traction in electronic wearables, where users are likely to have BLE-enabled smartphones and a willingness to try new technologies. Fitness aids are enjoying early success because their sensor payloads are relatively low power and they address a large user base.

Medical wearables will take longer because of regulatory concerns and the user base. Diabetics may carry several screens with them, and often these devices will use proprietary radio protocols. Moving to a standard protocol could reduce the carry burden and provide a more secure data link. Standardization improves security through the principle of “given enough eyeballs, all bugs are shallow.”

Home appliances may be third-wave BLE adopters. The power draw is irrelevant here. A high-efficiency transformer wastes 10,000 times more power than the radio uses. It likely won’t eliminate the need for a hardware user interface either. Who wants to load an app to microwave their dinner? The convincing use case is to provide powerful diagnostic and monitoring capabilities. A refrigerator can tell a user’s phone when it needs a new filter. Washing machines can push notifications. Smoke detectors will proactively demand replacement batteries.

Until 2010, Wibree and its competitors offered incrementally improved energy independence. But BLE’s rapid market growth offers an inexpensive and unobtrusive way for system architects to provide new and compelling user experiences.

 

Eric VanWyk

Eric VanWyk

ABOUT THE AUTHOR
Eric VanWyk, who wrote this essay for Circuit Cellar, is co-founder of Mooshim Engineering and an adjunct instructor at Franklin W. Olin College of Engineering in Needham, MA, where he earned his BSc in Electrical and Computer Engineering in 2007. His background is in educational robotics, short-range wireless, and medical device development. Eric and his business partner, James Whong, have joined the rapidly growing number of innovators developing hardware and sensor add-ons that take advantage of Bluetooth Low Energy (BLE) 4.0 in today’s mobile devices. Their crowdfunded Mooshimeter is a multichannel circuit testing meter that uses a smartphone or tablet, via BLE, as a wireless, high-resolution graphical display.