Halloween 2017: Ezra’s Gaara Costume

Woohoo, I’m not an entire year late yet!  Since I have some newer projects I’d like to post, here’s an older one I haven’t gotten to yet.

Gaara costume
Ezra as Gaara
Gaara
Gaara

Ezra’s Halloween costume for 2017 was Gaara: a character from the Anime/Manga series Naruto.  The main props we needed to build for this costume were his sand gourd, and the leather bandolier. The clothing portions were all done with street clothing for simplicity.

Here are a few pictures of the finished costume, with a few more showing how it was constructed and made to work.

Gaara costume, backGaara manipulates sand, and so he always carries with him a giant gourd-shaped container made of sand. This prop defines the character, but it’s huge and potentially unwieldy.  Construction was theoretically simple: use paper mache.  However, it wasn’t easy.

As a base, we used punching ball balloons, chosen because they’re larger and thicker than ordinary balloons. For our first few attempts, we taped the balloons together before applying paper mache.  This was a problem when one of the balloons deflated, and the half-finished shell shrank and wrinkled.  Extracting the bad half and replacing it didn’t work well, so we eventually ended up building up the second balloon separately and attaching them with masking tape and then paper mache after the shell was hard.

Gaara's sand gourd prop
Gaara’s sand gourd prop

The cork on top was a natural cork from the craft store, and the lip was formed using Crayola Model Magic, which is basically an air-dried clay with the consistency of foam.  It’s easy to work with, light, and takes paint well.

The whole giant peanut was painted tan, and then the seals were painted on after tracing the outline from a stencil, and cracks were hand-drawn.

Gourd harness
Test fitting the gourd harness. It’s usually worn under his shirt.

After the gourd was completed, it was obvious that the decorative pleather bandolier would not be strong enough to support it without it sliding around and looking horrible.  To solve this problem, I constructed a harness out of leftover nylon straps and buckles.  The picture here shows Ezra trying on the harness for fit. In actual use, the harness went under his black shirt, and the attachment buckle went through a small hole in the shirt.

Gaara costume, side view
The leather bandolier and buckles are slightly clearer here

The buckle was sewn to the red sash around the gourd, and clipped onto the harness.  This made it removable, so he could take it off at school, and supported the weight completely without putting any stress on the leather bandolier.

The leather bandolier was not difficult: I made a pattern out of paper, cut, and sewed it up.  The multiple matching metal buckles came from a snakeskin leather purse from the thrift store, and were hot-glued into place.

The pleather came from one of our many trips to Pittsburgh Center for Creative Reuse, and the white sash and foot wraps were muslin cloth. He rounded it out with red hair dye and Halloween face paint for the eye liner. The forehead tattoo worked better with acrylic paint than cheap Halloween face paint.

No User Serviceable Parts Inside

It used to be that electronic devices were printed with the warning, “No user serviceable parts inside.” That was never true, and it still isn’t. They’ve stopped printing this on most devices, but not because it isn’t true.

Instead, they’ve eliminated any obvious way to disassemble the device. This prevents people from hurting themselves if they’re skilled enough to use a screwdriver, but not skilled enough to avoid shorting a capacitor and blowing themselves up. Luckily, it doesn’t prevent people from learning how to repair things themselves.

Ezra’s hand-me-down iPod had a failing battery. Instead of buying a new one, or paying to have the battery replaced, we got him a battery replacement kit for Christmas, and shared the experience of disassembling and repairing the device.

No User Serviceable Parts Inside?
Ezra unscrews an RF shield

The procedure went smoothly, but not perfectly. Unfortunately the home button did not function after we were finished with it, but Ezra wasn’t bothered by this, since he already uses an on-screen home button. He declined my offer to order another replacement part, and now he knows what the inside of an iPod looks like.

 

Wooden Weapons

The kids aren’t allowed to get wooden weapons at the Renaissance Festival, because then I don’t get to make them.

A wooden hammer (maul) prop I made for Ezra’s Dwarf costume. Wooden curtain rod, pine wood head, craft foam and fake leather on the handle.
Details of the hammer head show the Gunnerkrigg Court symbol carved into the side of the head, just as Ezra requested.
Short swords for Martine’s Ranger costume. Pine board blades, and masonite reinforcement at the hilt. Handles wrapped with pleather.
The props in use.

 

Fantasy Dwarf Helmet

Before I can post this year’s costume creations, I need to do last year’s.

Here are some in-process photos of a fantasy Dwarf helmet I made for Ezra’s costume last year.

It all started with a baseball batting helmet I found at Pittsburgh Center for Creative Reuse, and some chunks of 2×4 I glued into blocks.
I cut the helmet down and roughed out horns on the blocks.
I carved the horns with a spoke shave, and sanded them. They’re bolted into the helmet using large lag bolts from behind, with hot glue to fill in the gap between horn and helmet.
Details were applied using flexible craft foam attached with hot glue.
I sprayed the entire helmet black, and then painted most of it metallic steel. After spraying a protective varnish, I added fur to the horns.
The finished costume included a “wizard” beard that we braided, scale armor made from aluminum flashing that I had when I was a kid, one of many home made cloaks, and a wooden hammer I’ll show off in another post.

Line6 FBV: Part 2

I’ve started looking into the Line6 FBV protocol again, after letting it sit for a year. This time, I had another Line6 pedal that is compatible with the Amplifi. By observing serial traffic between the pedal and amp, I was able to emulate the basic functionality of the pedal using an Arduino.

Hardware

I am vague in this section, because I do not know if the circuits I built are truly safe for the Amplifi hardware. I didn’t have any problems with the amp, but I did generate enough electrical problems via USB to cause my laptop to spontaneously reboot several times… that can’t be good, right? Any attempts to mess with your hardware will probably void your warranty, and a mistake could blow up your amp or burn your house down. You have been warned.

I used the same input/output circuit found on the FBV2 pedal. Sending data to the Amplifi did not work without both of the balanced signals on the cable. I believe this may be using RS-422 signaling, which requires that differential input. If so, a proper RS-422 chip might work better than the Schmitt triggers, but I haven’t tested it.

The serial specifications are the same as I used on the FBV2, and the same as MIDI uses: 31250 baud, 8N1. I used a higher serial speed for USB debugging channels, to reduce the chance of interrupting an incoming byte.

I assumed the connector wiring was the same as on the FBV2 pedal, and verified this is the case. However, the amp supplies far more than 5v, and the voltage will need to be regulated to be compatible with a 5v or 3.3v Arduino.

On the Arduino side, listening to both sides of an amp/pedal conversation, USB debugging, and controlling an LCD and buttons all at the same time was much easier using an Arduino Mega, which has multiple hardware serial ports. I wasn’t able to get SoftwareSerial or AltSoftSerial to do what I needed here.

I used an Adafruit character display I2C backpack with four on-board buttons to mock up a user interface. I can’t find this board for sale anymore on adafruit.com, so I’m glad I got an extra.

Protocol

The data sent between amp and pedal is sent in packets of the same basic format, and it matches what I found on the FBV2: “F0” followed by a length byte, and that many bytes of data.  The interesting parts are the messages those packets can contain.

By recording the traffic between the amp and pedal while interacting with the pedal, I was able to identify many of the features of the communication protocol. However, there are also spontaneous handshake packets sent between the devices, and I have no clue what they’re for.

The messages themselves start with one byte that identifies the type of message, followed by message-specific data. Messages sent from Amp to Pedal had message IDs with the high bit off (0x00-0x7F), and messages from Pedal to Amp had IDs with the high bit on (0x80-0xFF).

Here are the message IDs I have identified, with my hypothesis as to what each one is used for. I made up all the message names based on what I think they’re for.

01 00

Every ~100ms, the amp emits this Heartbeat message, and the pedal emits a standard response (80, see below).  I don’t know what this is for, but I assume it’s a heartbeat so the amp knows the pedal is still connected.

04 NN BB

I call this the LED message, because when it is sent, the pedal turns an LED on or off.  NN specifies which LED is changing state, and BB is 00 for “off” or 01 for “on.” Values of NN I have observed:

  • 61: Tempo. The amp flashes an LED on and off to mark the current “tap” tempo for effects.
  • 20, 30, 40, 50: Patch LED A, B, C, D
  • 21, 31, 41, 51: Unknown.
  • 02, 03: Unknown; Wah/Vol LED, maybe?

When patches are changed by the pedal, the amp responds with a set of messages to update the pedal state for the new patch. Included are an LED message for each Patch LED, configuring its state, as well as some of the other unknown LED numbers.

08 C1 C2 C3 C4

The Small Display message sends 4 ASCII characters. When the amp is in Play mode, a message is sent whenever the patch changes, with the characters representing the bank and patch, such as ” 01A”. When the amp is in Tuning mode, this displays the note the amp thinks you’re playing, whenever it changes.

10 NN DD C1..C16

The Large Display message sends a longer text message to be displayed on the pedal. In practice, I have only observed messages with NN=00 and DD=10, followed by 16 (0x10) bytes of ASCII data. I am guessing DD is a byte count. NN might be a line number if the target device has a multi-line display, but I don’t know of any such device.

In Play mode, the amp sends the patch name in this message whenever the patch is changed. In tuning mode, the amp sends a string of characters that visually depicts how far off-pitch you are from the note sent in the Small Display message.

For example, when the note is perfectly tuned, it displays:

I---- ** ----I

When the note is off-pitch, it uses > < arrows to point which way to tune the string.

80 00 02 00 01 01 00

Message 80 with this specific byte sequence is sent by the pedal in response to each Heartbeat message it receives. I don’t know what the byte sequence represents, and it doesn’t seem to change depending on the state of the pedal’s buttons or LEDs. It may be a device-specific ID or some other kind of identifying information.

If I remember correctly, I found the amp starts to spam packets at the pedal when the pedal stops responding to heartbeats. It was easy enough to add a response handler for this, so I did.

81 NN BB

The pedal sends this Button Press message whenever a button on the pedal is pressed or released. NN represents the button number, and matches the NN sent in the LED message response: 20, 30, 40, and 50 are used for buttons A, B, C, and D. BB is 01 when the button is pressed and 00 when it is released.

The “tap for tempo” and “tune” features are implemented in the amp, not in the pedal. The pedal tells the amp when buttons are being pressed, and the amp tells the pedal what to display; it’s up to the amp to interpret the button presses as a patch change, tempo change, or tuning request. This makes development of the pedal software much simpler, and allows the amp to change its features in firmware without requiring a new pedal.

82 NN VV

The Expression message is sent whenever the pedal’s expression pedal changes position. NN has always been 0 in the messages I observed, but it probably denotes which expression pedal is being adjusted, in cases where more than one expression pedal is supported. VV is the value of the expression pedal: 0-127.

Startup, Patch Change, Mode Change

The pedal powers up when it is connected to the amp, and after a brief pause sends a few startup packets. In full packet form, the pedal sends:

f0 02 90 00 
f0 02 30 08

Each line is one packet containing a message of length 2. The first one is message 90, value 0; the second one is message 30, value 08. This is the only case I’ve seen when the pedal sent a message without the high bit set. Either my interpretation of the message ID high bit isn’t correct, or I did not read the packet data correctly. I have no idea what these messages mean.

In response, the amp sends these two packets:

f0 01 40
f0 03 31 01 16

I don’t know if this startup sequence varies depending on the hardware involved, but it doesn’t seem to change depending on the device state.

Then, the amp sends packets containing a complete set of state to the pedal: Small Display, Large Display, and an LED message for each LED. The pedal only needs to remember these values and only change its LED and display when new settings are received from the amp.

Whenever the pedal sends button presses that are interpreted as a patch change by the amp, the amp replies with a complete state set, just as when the pedal starts up.

If the pedal user presses the button corresponding to the currently selected patch, the amp interprets this as a tempo change.  Shortly after, the tempo LED messages will start arriving at the updated rate.

If the pedal user presses the “tuning” button combination, the amp enters Tuning mode. In Tuning mode, the amp sends Small Display and Large Display messages in real time as the user tunes their guitar. Further button presses reset to Play mode.

The future…

Before I left for vacation in August, I made plans for a few devices. These plans are on hold until I get another flash of inspiration, unfortunately.

First, I plan to replace the microcontroller in my FBV2 pedal with an ATTiny85 running emulation software that implements the two FBV2 buttons as “next patch” and “previous patch.” It listens to the incoming packets to determine the current patch, and calculates the button value to send for the left and right buttons based on the current patch. I got as far as emulating this behavior on the Arduino Mega, but didn’t successfully emit messages from the ATTiny.

The ATTiny is inexpensive and small, but unfortunately its limited feature set makes debugging very challenging. I may have to build an amp emulator with the Arduino Mega, just to debug the pedal emulator running on ATTiny…

My second project was a full 4-button pedal with expression. I mocked up all of the required functionality on the Arduino Mega, using the Adafruit LCD character/button shield. I will replace the on-board buttons with beefy pedal switches. Tempo will be marked by changing the LCD backlight color, and all tuning and patch names are displayed.

When I was working on this more actively, I thought I might be missing a large chunk of the FBV Mkii controller’s functionality: MIDI over USB. Thinking about it again, I’m not so sure. It feels like it would be a lot easier to implement MIDI in the device driver rather than in the pedal hardware. Maybe the USB port is connected to the same internal serial lines as the RJ-45 connector, and the device’s drivers convert the simple button press messages into MIDI messages before they make it to userspace?

This is a fun project… sometimes. The rest of the time, I don’t work on it, because I’m doing something I need to do, or something fun, instead.