Electronics for Curious Brains.

ShareBrained Technology makes electronic kits and devices for music, radio, and timekeeping. The Chronulator is our first product -- an analog, retro-ish clock with modern, programmable guts. Like all our (future) products, the Chronulator hardware and software are open-source. So you can customize it to look and work however you choose. Read more about the Chronulator or take a look at our gallery.

Chronulators

Signals from Space! (part 1)

A few weeks ago, I posted about an inexpensive software radio receiver product I’m working on. Joby suggested last week that I try and receive weather satellite signals — yes, from SPACE! I was skeptical that I could pick up such a small and exotic signal with my modest hardware, but decided to give it a shot. Even if it didn’t work, I was sure I’d learn a few things in the process.

Credit: NOAA

Joby was interested in receiving APT (automatic picture transmission) signals from the NOAA POES (polar operational environmental satellite). POES satellites orbit the earth every 102 minutes, and scan the entire Earth twice a day. They beam back radio signals containing images that we see every time we check the weather.

Credit: Fred E. Piering

I checked out the status of the POES satellites. NOAA-19 seemed like my best bet for reception of an APT signal on 137.1MHz. So I consulted Heavens Above (a great planet/star/satellite tracking Web site) to see when NOAA-19 would go over my town.

Credit: Heavens-Above GmbH

A few minutes before NOAA-19 was due to go overhead, I scrambled outside with my laptop, radio board, and cheap telescoping antenna. I hooked everything up and enticed my wife outside to help. As she monitored the waterfall spectrum on the computer, I waved the antenna around, trying to get the strongest possible signal. And here’s what we caught:

Wow! I didn’t expect my radio and antenna to be sensitive enough to receive a 10-Watt signal from 1,000 kilometers away! That signal should be strong enough to decode — which I’ll do in an upcoming post. Until then, stay tuned for tomorrow’s post: “Doppler Shift: How to calculate the speed of a satellite from your back yard”!

On to part 2 (computing satellite speed with “Doppler” shift) or part 3 (decoding the signal).

Comments [2]

Software-Defined Radio Receiver: first signals!

I’m working on several projects in parallel. In addition to my “audio ARM-duino” (I need to give it a real name), I’m also working on a software-defined radio receiver. The primary goal is to keep the cost, size, and power consumption low and the spectrum coverage and bandwidth high. So I’ve been shopping around for highly-integrated receiver chips. Michael Ossmann of Great Scott Gadgets pointed me toward the ADRF6850. It’s got an integrated variable-gain amplifier (VGA), quadrature mixer, and a PLL/VCO for tuning across a 100MHz – 1GHz range. You put an RF signal in, and you get baseband out. Nice.

I designed a breakout board and had it made via Laen’s PCB order. Last night, I soldered it up, and this morning I started working with it through the I2C interface, using my Bus Pirate. By the afternoon, I was receiving pager signals at 929.675MHz, and aviation voice signals in the 118-137MHz band.

Here’s a POCSAG pager data burst. You can see the preamble as a square-ish zig-zag at the left side (start) of the burst:

For the aviation audio signals, all I had to do was amplitude demodulate the quadrature data (which I captured with my computer’s stereo audio input). Treat the quadrature sample pairs as complex numbers (which they are…), compute the magnitude of the complex vector, bandpass-filter the result, and you have the original audio!

Comments [25]

FM Synthesis!

More progress on my “audio Arduino” prototype: I got FM (frequency modulation) synthesis working a few days ago, but it didn’t sound terribly interesting. Then I spent a couple of days building C headers for the STM32F205 processor (libopenstm32 and libmaple don’t yet have support). Yawn. Today I returned to FM synthesis and added modulation of the operators, just to make the sound a bit more spicy. Check it out:

Before long (like maybe tomorrow?), I should hook up an input device so I can control parameters live…

Comments [1]

First Audio!

I’m working on a low-cost audio synthesis platform — kinda like an Arduino, but with much higher audio capabilities. And tonight, I got my first synthesized audio out of it!

Here it is, generating two sine waves (tuned at A440 and a fifth above). It’s fading slowly between the two. I’m probing the audio output on the board so you can see the signal on the oscilloscope.

Next tasks:

  • Set up DMA to move audio buffer data automatically to the audio output.
  • Set up I2C bus so I can configure the audio codec at startup, instead of having to plug in my Bus Pirate and do it manually.
  • Design an alpha-version board that incorporates everything I’ve learned up to this point. Laen’s next board order is Monday…

Progress is really coming fast and furious lately…

Comments [0]

Fear The Bus Pirate, For It Is Awesome

I got my Bus Pirate today, just in time to talk to my project’s audio codec via I2C. It is no exaggeration to say the Bus Pirate saved me a metric crap-ton of time. In about ten minutes, I had the Bus Pirate hooked to the audio codec, figured out the text command interface, and started configuring the audio codec to interact with the microcontroller.

Here’s the Bus Pirate (red, foreground) hooked up to my audio prototype board (purple, in the background):

I’ve been through this before, the hard way. Bringing up new devices on the I2C bus can be tedious, and it’s hard to know what you’re doing wrong. Is my I2C peripheral driver bad? Or am I sending bad commands to the I2C device? Without a fancy logic analyzer, it’s hard to tell for sure. Now I can remove one variable from the process. I have a set of commands I *know* will correctly configure my audio codec, so later on, when I’m programming the microcontroller to do the configuration, I can rule out having a botched or malformed set of I2C configuration commands. Woo hoo!

Oh, wait. I still need to write an I2C driver for the STM32 microcontroller… Eeeew.

Comments [0]

Microcontroller PLL and I2S operating!

Yesterday was spent getting the clock system in the STM32F205 up and running. ST provides an Excel spreadsheet which makes this task easy — or at least, I’m assuming it does, because I don’t have Excel and can’t open their *secured* spreadsheet on my non-Microsoft platform. So I had to do it all by hand. (Hey, ST! Make an online JavaScript+HTML5 clock configuration tool! Or I’ll do it for you! :-) )

So that now I have the processor running full-blast at 120MHz, it’s time to get the audio stuff working. It didn’t take long, really. I just had to get the right multiplication and division factors in place, turn on the I2S peripheral and configure it (only two registers), and then enable the “alternate function” for the pins that I used to interface to the audio codec chip. And here’s what I get:

The 11.2896MHz MCLK signal, which is 256x the audio sampling rate (44.1kHz):

The 44.1kHz LRC (left/right clock) or frame clock:

Bullseye!

Now to wire up the audio codec and try to speak with it via I2C. Perhaps I’ll start with my brand new Bus Pirate, then move on to doing it from the STM32.

Comments [0]

Audio Prototype is Alive!

I soldered up my prototype PCBs for my audio project today, and got some JTAG/SWD hardware help from Jim Larson. The net result is a partially-populated STM32F205 board that will talk to me via SWD and OpenOCD!

Foreground (purple DorkbotPDX laen-board) is my prototype. Behind it is an STM32VL-Discovery board modified to run the Maple bootloader and Versaloon firmware. And behind that, my laptop running openocd and vsprog.

Here’s a bit of the communication via Versaloon:

Info: Chip name undefined, try auto-detecting.
Info: Versaloon(0×33)by Simon(compiled on Jul 11 2011)
Info: USB_TO_XXX abilities: 0×00000008:0×00000040:0xC0000006
Info: SWDID = 0x2BA01477
Info: AHB-AP_ID = 0×24770011
Info: ROM_ADDRESS = 0xE00FF003
Info: CFG = 0×00000000, Little-endian
Info: CORTEX-M3 r2p0 processor detected
Info: CPUID = 0x412FC230
Info: STM32F2 type: XL device
Info: STM32F2 revision: Y
Info: Chip-id read is 0×411.
Info: Auto-detect signature is 0×411
Info: stm32f2_xl found
Info: SWDID = 0x2BA01477
Info: AHB-AP_ID = 0×24770011
Info: ROM_ADDRESS = 0xE00FF003
Info: CFG = 0×00000000, Little-endian
Info: CORTEX-M3 r2p0 processor detected
Info: CPUID = 0x412FC230

And from OpenOCD:

Info : OpenOCD runs in SWD mode
trst_and_srst srst_pulls_trst srst_gates_jtag trst_push_pull srst_open_drain
1000 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
Info : Versaloon(0×33)by Simon(compiled on Jul 11 2011)
Info : USB_TO_XXX abilities: 0×00000008:0×00000040:0xC0000006
Info : clock speed 1000 kHz
Info : stm32f2xxx.cpu: hardware has 6 breakpoints, 4 watchpoints

I should’ve put an LED or two on this board, so I could write an appropriate “Hello World”…

Comments [0]

Audio Project Trade-offs

I want to build a device that serves the audio experimenter in the same way the Arduino serves the artist community. The Arduino won’t do the job for audio because AVR8s are woefully underpowered (max clock speed, multiplier performance, very little RAM). The AVR8 also doesn’t have an I2S or AC97 interface to a true audio codec. In shopping around, I’ve settled on the STM32F205RB, a 120MHz ARM Cortex-M3 processor. It has I2S interfaces, so I can hook it up to a real audio codec — I’m thinking the inexpensive but very functional Wolfson WM8731. This should be a powerful platform for running bare-metal audio synthesis and processing algorithms, and some limited Pure Data (pd) or Supercollider patches.

In this design, I’m rapidly running into a bunch of competing constraints:

  • Arduino shield compatibility. This makes the board design bigger and awkward to lay out, especially if I include lots of built-in peripherals like MIDI in/out and headphone jack (see below). I’ll never be 100% compatible with all Arduino shields anyway, since my processor architecture is totally different than Arduino. So my compatibility would be limited to shields I (or others) make the effort to support on the STM32Fxxx platform. LeafLabs has done some good work on this front already. As an alternative, I can develop my own custom shield format and provide shield kits that customers can hand-assemble.
  • Built-in MIDI in/out. It’d be nice to plug my device straight into a keyboard or controller and go to town. But MIDI connectors are big and clumsy and would make my device bigger and harder to build into a hand-held instrument. MIDI ports also add a fair bit of cost — the connectors and opto-isolator, through-hole assembly, and the extra circuit board space. Are MIDI interfaces still important if I can instead provide USB MIDI using the STM32F205′s USB OTG functionality (e.g. just plug your USB-MIDI controller straight into my device and play)?
  • Headphone output. I’m already building in 1/8″ stereo line input and line output. The WM8731 also provides a headphone output. Would you want to listen on headphones, or would a line-out into a headphone amplifier work just fine for you?
  • Microphone input. The WM8731 has a mono microphone input, designed for cheap little electret capsules (like those you find built into laptops). It’s not a high-quality input. Would it still be worth having a jack where you could plug in a cheap Logitech computer microphone — instead of connecting some sort of microphone pre-amplification to my device’s line input?
  • Micro SD card slot. Would it be important to have access to vast amounts of data stored on an SD card? Or would the 128K or so of flash inside the ARM chip be enough for most applications?

Leave a comment and let me know what you think.

Comments [8]

Kevin Thornbloom’s Chronulator

Kevin writes:

After seeing some other great Chronulators on flickr that join the two meter panels into one display, I knew that’s where my design would go. I made a simple box out of Red Oak, and stained it dark. The front panel is acrylic with the back spray-painted black (except for a strip in the middle). After painting, I applied aluminum tape behind the black areas to help reflect light back at the meters. I used a second piece of acrylic inside the box to mount everything on. Four white LEDs point straight out at the aluminum tape backed faceplate to light it up. (I found this worked much better than trying to aim the LEDs at the meters.) I added a toggle switch for the lights, and called it a day! I love my new clock!

Comments [0]

Michael Walker’s Chronulator

Michael writes about his Chronulator project:

The face plate is curly maple. The front edge of the case is hand oiled black walnut, milled from a tree that had to be removed when I built my house. It’s made to sit on a shelf so the back half of the case is pine, joined with wood biscuits to the walnut. The meters are industrial meter relays I bought on eBay. My wife is quite good with Photoshop so she helped me with the scales on the meters. I removed the scales, scanned them on a flat bed scanner, altered the images, printed them out on heavy paper stock and attached the paper scales to the original plates with a glue stick. They are 100uA meters so I didn’t have to alter the circuit. Because they are meter relays I could use it as a timer/alarm clock but that would require 120VAC and I like the long battery life you designed into the original circuit.

Comments [1]