Mar 26 2013
The Coat Rack is a flame effect with eight effect heads (individually controllable solenoid valves) that sits on top of a 100lb. accumulator. I have a number of control systems for it, and have just updated a project page for it with some details.
Last month, I brought the Coat Rack to Frostburn. Since it was so cold out, it was set up with a very simple interface: push buttons, receive fire.
The tablet interface (written by Kate as an offshoot of the Super Street Fire tablet control) is very simple, providing buttons for each and an eruption button to blast everything at once. At some point, it's likely that the interface will have the capability to record and play back effects.
Pushing a button sends a message over UDP to a wifire16 board with a RN-XV radio, which activates the solenoid valves. Each time the wifire16 receives a message to activate a flame effect, it increases that effect's shut-off time by 100ms. Since the update messages are sent out approximately every 50ms, holding a button will keep the flame effect constantly on, but an interruption in communication will cause the effect to shut off quickly.
The tablet interface is a great alternative to using physical buttons - having it be wireless seems to make it magic to many people! I'm hoping to integrate the EEG headset for Pyrokinesis to the tablet interface for this summer, and bring the Coat Rack with both the Pyrokinesis and Dance Dance Revolution pad controls to Atomic Lollipop again.
Mar 19 2013
The documentation for Arduino's attachInterrupt function lists the pins for the four interrupts available on an Arduino Leonardo. But the Leonardo uses the ATMega32U4, which has a fifth external interrupt (called external interrupt 6, or INT6, just to be confusing). INT6 is not available from the attachInterrupt() function, but is available if you access it directly via the registers EICRB (External Interrupt Control Register B) and EIMSK (External Interrupt Mask Register):
EICRB |= (1<<ISC60)|(1<<ISC61); // sets the interrupt type
EIMSK |= (1<<INT6); // activates the interrupt
For more information, see sections 11.0.2 and 11.0.3 of the ATMega32U4 datasheet.
To set the interrupt function, define it in the normal AVR way:
// interrupt code goes here
The interrupt type is described in Table 11-3 of the datasheet, and is similar to interrupts 0 - 3:
||Any logical change on INT6
||Falling edge between two INT6 samples
||Rising edge between two INT6 samples
For INT6 to work, it requires the AVR I/O clock to be present, unlike INT0 - INT3.
INT6 uses Port E Pin 6 (PE6), which corresponds to Digital Pin 7 on the Leonardo.
Mar 13 2013
All of the electronics projects I write about here are open source hardware. The schematics, the hardware layouts, and the component libraries are all freely available.
I've been working on cleaning up the KiCad files; many of my projects are now in my new repository on GitHub. I've also been trying to make sure that all of the symbols and parts are in the libraries, the schematics are back-annotated with footprints, and all of the other details are included in the project, schematic, and board files. This project cleanup is taking a while, so while not everything is online yet, it's getting there.
If you're interested in following what I'm working on or taking a look at any of the PCB designs mentioned here, you can find all of my repositories on GitHub under propane-and-electrons.
Mar 9 2013
As always, prototypes have mistakes.
The first glove IMU prototype had a couple of showstoppers. In particular, the KiCad symbol for a USB connector has the D- and D+ lines reversed. I was also using a standard USB pinout, not the 5 pin connector that mini- and micro-USB has. With these problems fixed, and a few other modifications such as moving the MPU-9150 sensor chip out from underneath the metal radio shielding, it was time for another prototype run.
Using a stencil for one board was a lot of work, so this time I used a solder paste syringe. Even though the needle was not as small gauge as it should have been, applying the solder paste was much easier and more consistent than my attempt at a stencil with card stock and paste that wasn't warm enough. Unless I'm making many boards, this is the method I'll use in the future.
The assembly method was the same as last time: apply solder paste, place parts with tweezers, use the hot plate to reflow the solder, clean up bridged joints. This time there were far fewer solder bridges, and finding them was easy using a USB microscope.
Fixing them was as simple as wicking away the extra solder with copper braid, applying some flux, then just touching each solder joint with an iron.
In the end, I assembled two boards. On the first board I left the MPU-9150 chip out; I wanted to make sure the rest of the board was tested before committing an expensive chip. Initially I had the same problem as I did on the first prototype: the ATMega32U4 would accept an Arduino bootloader via ICSP, but it would not work over USB. On the first prototype, this was due to the D- and D+ USB lines being reversed; in this case, the 32U4 pins weren't soldered well enough. Adding solder to dry joints fixed the problem. Once this was solved, I tried adding the MPU-9150 using a hot air station, but ended up lifting the pads on the board.
Where did the pads go? On the bottom of the QFN chip!
The second attempt included the MPU-9150 as part of the hot plate reflow process. Fixing the solder bridges on the QFN pads involved the same process as on the larger components and wasn't difficult.
The good news is that the hadokenIMU board works. I tested the sensor with the example programs from Jeff Rowberg's I2C Device Library, and it communicates data back to the Arduino program over I2C without any problems. (Note: the MPU-9150 is pin-compatible with the MPU-6050, and the example program there will work with the 9150.)
The assembled IMU board is just smaller than the 1000mAh battery it uses:
The design files have been uploaded to the project repository on GitHub, details and documentation will be posted soon.
Jan 24 2013
One of the hardware systems of Super Street Fire unrelated to fire control is the motion sensing gloves we use for gesture recognition. While playing the game, players wear special gloves which have multiple accelerometers, gyroscopes, and magnetometers in them. The gloves take the sensor data and stream it wirelessly to a central control system which does gesture recognition. The control system then activates the fire control system based on what gestures are recognized - for example, a punch will send a wave of fire towards the other player, but different kinds of punches will change the timing and amount of fire. A jab will send one quick wave, while an uppercut will be slower but activate two flame effects at the same time.
The gloves were originally assembled using off the shelf parts. The main components of the glove hardware are an Arduino-compatible IMU, a radio, and a LiPo battery charger. The first prototype used SparkFun boards, attached to plastic pieces:
Once the gloves were successfully streaming data, the parts were boxed up for protection. The original gloves used XBee radios, but we moved to WiFly in the second year due to range issues. This also required the use of the Adafruit XBee Adapter Kit instead of the SparkFun XBee Explorer, as the version at the time did not do proper level shifting. The second year gloves had three boxes, one each for the IMU, radio, and LiPo battery and charger:
While this glove design worked (and was held together by beautiful leatherwork done by Carl Penny), it was still bulky, rattled when people threw strong punches, and the quality of some of the boards was a bit suspect - we lost multiple Micro USB connectors from the SparkFun charger boards.
Up until a few weeks ago, I hadn't done any real surface mount electronics design, and only a small amount of SMD assembly. A glove hardware redesign seemed like a good project to work on, so I decided to make custom glove hardware that would incorporate all of these components into one board. The design goal was to have an Arduino-compatible board, using a ATMega32u4 microcontroller, with integrated 6- or 9-axis IMU, headers for a WiFly radio, and LiPo battery charger. The gloves currently use 1000mAh LiPo batteries, so the board would hopefully be no larger than 2" x 1.32".
The first glove prototype came together quickly. I kept the parts mostly to 0805 as I'd been able to work with them before without any difficulty. The original design looks like this (minus many 3D models):
It uses the MCP73831 for LiPo charging, the 32u4 for the microcontroller, and the InvenSense MPU-9150 9-axis sensor. This would have to be a SMD project - the MPU-9150 only comes in a QFN package. The board production only took three days by Seeedstudio, giving me ten of these:
The plan was to use a stencil and solder paste - which, although I'd never done before, seemed like a good idea because I have a laser cutter. This took a decent amount of work using CorelDRAW, Inkscape, and LaserCut 5.1, but eventually gave me a stencil that was just about the correct size.
Some examples of testing with card stock to determine a good speed and power level:
The last of the parts came in today, so I attempted to put it together. First up was using the stencil and solder paste. This was the hardest part of the assembly - getting the paste to the pads cleanly and uniformly. I felt that this may have been way too much in some areas (especially the MPU-9150) and not enough in others, but figured I'd give it a shot:
Placing the parts was surprisingly easy using a pair of tweezers. I started with curved tweezers but eventually found regular ones were easier to work with:
From there, the board went on my hot plate. The smaller parts snapped into place easily, but there was definitely too much solder paste on the two chips. The 32u4 had many solder bridges, and the MPU-9150 didn't seat itself properly. I cleaned off some of the excess solder around the MPU-9150, reheated the board, and nudged the chip. It seemed to fall into place without too much trouble:
Unfortunately, I had no solder wick readily available, so I wasn't able to fix all the bridged pins on the 32u4. It definitely was way too much solder paste, giving huge bridges such as this one:
So while I haven't been able to test the new glove hardware prototype yet, the surface mount soldering for it was much easier than expected. The total time for placing parts and soldering was just under two hours, giving me this:
I'll be cleaning up the 32u4 tomorrow and testing the board's functionality then. I'll have a full technical writeup including schematics and layout files once it's been tested and any revisions have been made. This design looks like it will be a huge improvement over using off the shelf parts, and allow us to make gloves that look much nicer for our next run of Super Street Fire.