pingswept.org
now with web 1.0 again

September 24, 2012

Preparing to inflict Beriberi

There's a new batch of Rascals at the assembler right now. When they're ready, I'll be putting new, better software on them. In the Rascal tradition of alphabetized ailments, the new release will be called "Beriberi." (The last release was "Anthrax." Up next is "Cooties.")

If you have an older Rascal, you can download the new software. Beriberi should be compatible with all existing Rascals, though this release candidate has only been tested on Rascal 1.2's. The point of release candidates is to test the software before we send it out to newly-minted Rascal zealots, so please let us know if you run into difficulties with Beriberi.

More details are on the Beriberi release page; a few highlights are summarized below.

Wireless connections via USB

The Beriberi release candidate comes with precompiled wireless drivers that can be loaded into the Rascal kernel automatically when the Rascal boots. The process is still less polished than we'd like, but at least it works. Currently, two wireless adapters are supported: the IOGear GWU523 and the Edimax EW-7811UN. The Edimax is cheaper and smaller, but also a bit flakier-- it's worth the few extra bucks for the IOGear if it's available in your country. In theory, other adapters that use the zd1211rw or 8192cu driver should work too. If you get an adapter working, please drop me (brandon at rascalmicro dot com) and email and share the details.

Useful libraries

A lot of the libraries on the Rascal have been updated, but there are also a few new ones. One of the more exciting ones is the OpenCV library. Here's an image of a Rascal that was run through an edge detection algorithm found in OpenCV.

Templeman Automation has been using the Rascal for benchmarking image processing performance on an ARM processor for their touch table project

Controlling SPI port from Python

Beriberi also contains a new version of Pytronics, the Python library for controlling the Rascal hardware. The new version has added functions for talking to the SPI port on the Rascal. (SPI is a digital communication protocol similar to I2C or RS-232, but faster. The latter two top out at a few hundred kbps, while SPI can reach the Mbps range. (Someday, I'll write a blog post that explains the tradeoffs between the different protocols that the Rascal uses, but today is not that day.)) The Python code still needs a lot of testing. Sending data and adjusting transmission speed is working well, but receiving data and full duplex communication still need to be written.

The bootloader now saves settings

New Rascal user Dave Hylands contributed a patch to the Rascal's bootloader setup that allows the Rascal to store boot settings back to the serial flash chip. This vastly increases the customizability of the Rascal, as you can now configure it to load a custom kernel over the network. Previously, you could make the Rascal load a custom kernel, but only by interrupting the boot process manually on a serial console.

Being able to load a custom kernel is a big deal because it means that the Rascal can learn to support more hardware after it leaves the factory (where "factory" is a euphemism for this table I'm sitting at).

The real release of Beriberi will occur in a few weeks; the first release candidate is up on the Beriberi release page now.

August 30, 2012

Batch of 100 Rascals on the way

There are a lot of small bits of news since the last update a couple of weeks ago.

100 Rascals at the assembler

Last week, I sent a large box of components and bare PCBs off to the assembler-- over 10 kg in all. I'll get the first two Rascals back in a few weeks; if they work, the remaining 98 will be assembled and get shipped back to me. I'll put the new software release, codenamed "Beriberi," on them and put them up in the store. All I have to do in the meantime is finish the new software release!

SPI transmission working from Python

The oscilloscope screenshot below shows the results of pytronics.spiWrite('aaron burr'), which was the first data transmission via SPI by the Rascal with the new Python SPI code that I wrote last week. This week, I figured out how to slow the bus down from 15 MHz so that it can operate slowly enough to talk to an Arduino. (If you send data too fast, the Arduino can't process characters fast enough. I'm not sure if it's a limitation of the SPI hardware on the Arduino missing edges or the processor getting overwhelmed by the characters arriving too fast. Anyway, it works fine at 528 kHz.)

Battery tutorial

I made new tutorial about running a Rascal off batteries recently. Along with the wifi success from 3 weeks back, it's been very exciting to be able to run a Rascal with no tether whatsoever. I've been quite impressed with how well the Rascal handles running off batteries-- I haven't been able to detect any difference from wall power yet.

Come to World Maker Faire in New York

More news when the new batch arrives. I'm getting ready for the World Maker Faire in New York at the end of September; I hope to have new Rascals ready by then. I'm always interested to meet Rascal users and enthusiasts, so stop by the booth on Saturday or Sunday and ask me all your Rascal questions!

August 13, 2012

The Rascal at Maker Faire Rhode Island 2012

On Saturday, August 11th, I drove down to Providence, Rhode Island for this year's Maker Faire. It lasted from noon until pretty late into the evening. The last two years, it's been outside; last year I had a table in the sun, which would have proved grueling even if I hadn't spent 11 continuous hours talking to people. I sounded like Doc Rivers by the end of it.

This year, the event was inside the Pell Chafee Performance Center, which is next door to AS220, an enormous artists' space in Providence, which in some way helped put on the event. As usual, the Maker Faire was filled with all sorts of interesting stuff. My home makerspace, Artisan's Asylum, was well represented with three different booths (Dan, Aleks, and Glen with their crazy tank, Arcbotics, and me). You can see the Rascal booth on the far left of the picture below; I'm sitting next to a red Sparkfun box.

I was adjacent to an interesting character by the name of Jadrian Miles, who has created Fibbly, which is both math and art. Jadrian drew a crowd for hours (mostly of kids who hadn't been run through the math hate machine yet).

A large room jammed with tables and people

(Photo from Chris Connors under Creative Commons license. Thanks, Chris!)

What's great about Maker Faire

From a monetary perspective, Maker Faire is always a lousy deal for Rascal Micro. It's a lot of work to prepare demos, and most of the visitors don't really know what I'm talking about when I show them the Rascal. (Overheard this year: "I don't understand anything here other than that cardboard airplane.")

Still, I think the Maker Faire is the most direct opportunity I have to push society in a healthy direction. The message that I try to pass on at Maker Faire is that no matter who you are, you can learn to make stuff. You don't have to sit on the couch and watch other people have adventures on TV. Sure, you won't turn into Leonardo da Vinci overnight, but with a couple evenings and the cost of a month of cable, you can get started. You can learn to design stuff for a 3D printer or build some simple furniture or fix your bike. Keep at it, and you can build a robot or a suit of armor or whatever you want.

We're living in era where the building blocks for making stuff are more widely available than ever before. For $30, I can get a microcontroller board similar in capabilities to the Apple II. The open source software movement has been developing a huge body of software that covers a wide swath of human endeavour, and now the open source hardware movement is taking off. Outside the areas of software and electronics, the internet is giving rise to niche forums for everything from knitting to old woodworking machines. I feel lucky to have the chance to take part in Maker Faire.

Time for you to grab some friends and head over to your local hackerspace!

August 09, 2012

Testing the Rascal with a wireless adapter and battery

The most frequent feature request for the Rascal is, "It should do wireless!" I've avoided putting a wireless transmitter on the Rascal so far because FCC-approved wireless modules cost more than Ethernet, and wireless can be fiddly to set up, especially if you're new to boards like the Rascal. I had suspected that cheap USB wireless adapters would work with the Rascal. While I'm waiting for the next batch of Rascals to be assembled, I had a chance to test it out, and it works!

Here's a quick video that shows the Rascal running completely wirelessly-- power supplied from a battery and communication supplied via wifi. (Thanks to robotics zealot Adam Bercu for lending me the battery.)

The wireless adapter I used is an Iogear GWU523, which uses the ZyDAS ZD1211B chipset. ZyDAS was bought by Atheros in 2006; it seems that the ZD1211B is now called the Atheros AR5007UG in some adapters. A list of wireless adapters that may work with this driver is on the Linux kernel wireless site.

To make the adapter work, you need a driver module. Fortunately, since all the Rascal kernels so far are identical, there's no need to compile it yourself. You'll need two files to make the adapter work: the driver and the firmware blobs. The firmware blobs are precompiled binaries that ZyDAS/Atheros makes you upload to the wireless adapter after it's plugged in. (They do this because it's cheaper than adding flash memory to the adapters.)

Preparing the Rascal to use the wireless adapter

First, install some software and fetch the driver and firmware blobs.

language-bash opkg install wireless-tools wpa_supplicant wget http://rascalmicro.com/files/kernel-modules/zd1211rw.ko wget http://rascalmicro.com/files/kernel-modules/zd1211-firmware-blobs.tar.gz

Install firmware blobs to /lib/firmware/zd1211/ on your Rascal.

language-bash mv zd1211-firmware-blobs.tar.gz /lib/firmware/ cd /lib/firmware tar xzvf zd1211-firmware-blobs.tar.gz

Edit /etc/wpa_supplicant.conf so that it has a section with your wireless network's name and password. This is a bit tricky in that the right setting will vary depending on what kind of encryption your network uses. There are a lot of examples in /etc/wpa_supplicant.conf

language-bash network={ ssid="Skynet" # Change this to your network's name psk="skynetresearchinitiatephasetwoprojectjudgementday" # Change this to your password priority=5 }

Bringing up the adapter

At this point, plug in the wireless adapter. You can leave it plugged in forever.

Insert the wireless driver into the kernel.

language-bash insmod zd1211rw.ko

When you run the dmesg command, you should see something like this.

language-bash usb 1-1: new full speed USB device using at91_ohci and address 2 usb 1-1: reset full speed USB device using at91_ohci and address 2 phy0: Selected rate control algorithm 'minstrel_ht' zd1211rw 1-1:1.0: phy0 usbcore: registered new interface driver zd1211rw

Now you're ready to connect to your wireless network.

language-bash ifconfig wlan0 up # Brings up the wireless interface wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0 # Authenticates with your access point udhcpc -i wlan0 # Requests an IP address via DHCP

If those three commands succeed, victory is yours!

If you get this working with a wireless adapter other than the Iogear GWU523, please let me know. Eventually, my hope is to make the Rascal work out of the box with several wireless adapters.

Notes about building the kernel module

You shouldn't need to build the kernel module, as there's a prebuilt binary available, but if you're running a custom kernel on your Rascal, you might want to. Here are some notes that will make sense to the kernel-savvy.

language-bash make ARCH=arm menuconfig

In menuconfig, enable the module: Device Drivers > Network device support > Wireless LAN > ZyDAS ZD1211/ZD1211B USB-wireless support

Build the kernel modules.

language-bash make ARCH=arm modules

The file that you want is ~/linux-2.6/drivers/net/wireless/zd1211rw/zd1211rw.ko. Be sure to get the firmware blobs mentioned above as well.

About the battery

I have a bunch of interesting notes about the battery as well, but I'll save those for the next blog post. A quick summary is: get a 7.4 V lithium polymer battery from hobbyking.com.

older postsnewer posts