Join the Ben Heck team every week for amazing hacks! Watch them build and mod community-inspired projects using electronics! | Connect with TBHS | |
Featured Bonus Content | ||
See All Episodes |
See also: Episode 258: Ben Heck's Halloween Superhero Wearables Part 2: Assembly Episode
Karen daydreams about being a Superhero. Can Ben transform Karen into Captain Tangent using accelerometers to detect speed, magnetometers to detect orientation, a microcontroller, and speakers that make sounds for punches and kicks? Episode 258: Ben Heck's Halloween Superhero Wearables Part 2: Assembly
Supporting Files
|
The team begins work on a Superhero combat costume for Halloween. To get started on the sound effects for punches and kicks; Ben uses a Parallax Propeller Prop Dev Stick, four FLORA LSM303 Accelerometers for each limb, and an I2C expander to multiplex the signal. The I2C expander allows communication with individual Accelerometers even though each one shares the same I2C bus address. Ben attaches and solders the Parallax Propeller and the IC2 expander onto a perf board. He then runs experiments with the help of an oscilloscope to get the Propeller to talk to the expander.
You can send a command to the expander telling it what device you want then all further commands go to that device. First you tell I2C where to read from then you connect again and get the requested data. MCU’s have dedicated I2C lines, but you can also bit-bang it with any available I/O.
Karen supplies speakers from a stereo that was taken apart. They use 3D printed parts to connect the speaker parts to a belt clip. The plan is to place an EL inverter in the back and stereo speakers on each side to provide good stereo separation. The EL wires require AC so they use a DC-AC converter, often called an inverter.
To get the propeller to work Ben uses some Arduino code that Felix has already tested. Because there is a lot of example code for the ATMEGA328 (Arduino Uno) it’s a fast way to get stuff running. Ben works on the sensors profiles used to register kicks and punches. In phones, a magnetometer is used to determine the orientation of each sensor. Although phone apps use much more advanced sensor profiles but their profile should be enough to register fast movement. It’s also necessary to examine change over time (10-50ms) to determine the change speed and intent of Karen’s movements.