3D Mouse Drives Robot Arm

You’ve built the perfect robotic arm. How do you drive it? If you are [angrymop] you interface a 3D mouse from 3DConnexion via a few microcontroller boards. The Spacenavigator mouse is a staple anywhere professional CAD people are working, and it looks like it is a natural fit for a robot arm.

According to [angrymop], the Raspberry Pi can read the mouse’s commands via /dev/hidraw (that’s the raw human interface device). Each motion generates two lines of output. Each line has a unique identifying byte and values corresponding to the axis positions.

The Raspberry Pi then uses an SPI interface to talk to an ARM microcontroller and that drives the servos. The arm (the robot arm, not the processor) itself is well done, made from Lego Technic parts and common RC servos. Not that this is the most amazing thing we’ve ever seen built from Technic, but it is still pretty impressive.

You have to wonder if other 3D controllers might be useful for controlling robot arms or how the Spacenavigator would do controlling a bigger, more capable arm. Then again, maybe this arm would be the right size to build something inspired by Escher.

Continue reading “3D Mouse Drives Robot Arm”

Using A TeensyLC To Emulate The XBOX 360 Controller

After the release of Mortal Kombat X, [Zachery’s] gaming group wanted to branch out into the fighter genre. They quickly learned that in order to maximize their experience, they would need a better controller than a standard gamepad. A keyboard wasn’t going to cut it either. They wanted a fight stick. These are large controllers that look very much like arcade fighting controls and include a joystick and large buttons. [Zachery’s] group decided to build their own fight stick for use with a PC.

[Zachery] based his build around the TeensyLC, which is a 32 bit development board with an ARM processor. It’s also compatible with Arduino. The original version of his project setup the controller as a HID, essentially emulating a keyboard. This worked for a while until they ran into compatibility issues with some games. [Zachery] learned that his controller was compatible with DirectInput, which has been deprecated. The new thing is Xinput, and it was going to require more work.

Using Xinput meant that [Zachery] could no longer use the generic Microsoft HID driver. Rather than write his own drivers, he decided to emulate the XBOX 360 controller. When the fight stick is plugged into the computer, it shows up as an XBOX 360 controller and Windows easily installs the pre-built driver. To perform the emulation, [Zachery] first had to set the VID and PID of the device to be identical to the XBOX controller. This is what allows the Microsoft driver to recognize the device.

Next, the device descriptor and configuration descriptor had to be added to the Teensy’s firmware. The device descriptor includes information such as USB version, device class, protocol, etc. The configuration descriptor includes additional information about the device configuration. [Zachery] used Microsoft Message Analyzer to pull the configuration descriptor from a real XBOX 360 controller, then used the same data in his own custom controller.

[Zachery] programmed the TeensyLC using the Arduino IDE. He ran into some trouble here because the IDE did not include the correct device type for an Xinput device. [Zachery] had to edit the boards.txt file and add three lines of code in order to add a new hardware device to the IDE’s menu. Several other files also had to be modified to make sure the compiler knew what an Xinput device type was.  With all of that out of the way, [Zachery] was finally able to write the code for his controller.

CCCamp 2015 rad1o Badge

Conference badges are getting more complex each year. DEFCON, LayerONE, Shmoocon, The Next Hope, Open Hardware Summit, The EMF, SAINTCON, SXSW Create, The Last Hope, TROOPERS11, ZaCon V and of course the CCC, have all featured amazing badges over the years. This years CCCamp 2015 rad1o badge is taking things several notches higher. The event will run from 13th through 17th August, 2015.

The rad1o Badge contains a full-featured SDR (software defined radio) transceiver, operating in a frequency range of about 50 MHz – 4000 MHz, and is software compatible to the HackRF One open source SDR platform. The badge uses a Wimax transceiver which sends I/Q (in-phase/quardrature-phase) samples in the range of 2.3 to 2.7 GHz to an ARM Cortex M4 CPU. The CPU can process the data standalone for various applications such as FM radio, spectrogram display, RF controlled power outlets, etc., or pass the samples to a computer using USB 2.0 where further signal processing can take part, e.g. using GnuRadio. The frequency range can be extended by inserting a mixer in the RF path. Its got an on-board antenna tuned for 2.5GHz, or an SMA connector can be soldered to attach an external antenna. There’s a Nokia 6100 130×130 pixel LCD and a joystick, which also featured in the earlier CCCamp 2011 badge known as the r0ket.

A 3.5mm TRRS audio connector allows hooking up a headphone and speaker easily. The LiPo battery can be charged via one of the USB ports, while the other USB port can be used for software updates and data I/O to SDR Software like GnuRadio. Check out the project details from their Github repository and more from the detailed wiki which has information on software and hardware. There’s also a Twitter account if you’d like to follow the projects progress.

This years Open Hardware Summit also promises an awesome hackable badge. We’ll probably feature it before the OHS2015 conference in September.

Thanks to [Andz] for tipping us off about this awesome Badge.

Micro:bit — BBC Gets A Million Kids Into Embedded Dev

In the Early 1980s, the BBC launched a project to teach computer literacy to a generation of British schoolchildren. This project resulted in the BBC Micro, a very capable home computer that showed a generation exactly what a computer could do. These children then went home, turned on their ZX Spectrums, and became a generation of software engineers. Still, the BBC Micro is remembered fondly.

The computer revolution is long over, but today we suffer a sea change of embedded processors and microcontrollers. With Arduinos and Raspberry Pis, the BBC has decided it’s time to put the power of an ARM microcontroller into the hands of a million 11- and 12-year olds. The result is the Micro:bit. It’s a small microcontroller board with an ARM processor, an IMU, buttons, Bluetooth and a 5×5 LED array – exactly what you need if you’re teaching a million kids how to blink an LED.

Although the BBC has finalized the design for the Micro:bit, there are no specs at all. However, a few educated guesses can be made. The USB controller is provided by Freescale, who also provide the digital compass and magnetometer. Programming is done through a web-based, Arduino-like IDE with what appears to be a decent Micro:bit specific library. The board is also mbed compatible. Bluetooth, and apparently the ARM Cortex M0 core, is provided by a Nordic nRF51822. There are only three alligator clip-compatible I/Os, and its doubtful any student will be building anything that would be too complex for an entry level ARM. It’s also 3V logic; finally, the tyranny of 5V has fallen.

The Micro:bit is best seen as a tool that enables the relatively recent addition of a computer science curriculum in UK schools. There is now a requirement for seven-year-olds to understand algorithms and create simple programs. Previously computer education in the UK has consisted of PowerPoint. Now, secondary school students will be learning Boolean logic.

While the Micro:bit is utterly useless as a tool for doing real work, education is not real work. For blinking a few LEDs, having a device react to movement, playing with Bluetooth, and other lesser evils of electronics, the Micro:bit is great. Not everyone will become the digital technologists this initiative is trying to create, but for those who have an inclination towards semicolons and electrons, this is a great introduction to technology.

New Part Day: STM32F7, An ARM Cortex-M7

It was announced last year, but ST is finally rolling out the STM32F7, the first microcontroller in production that is based on the ARM Cortex-M7.

The previous go-to part from the ST catalog was the STM32F4, an extremely powerful chip based on the ARM Cortex M4 processor. This chip was incredibly powerful in its time, and is still a respectable choice for any application that needs a lot of horsepower, but not a complete Linux system. We’ve seen the ~F4 chip pump out 800×600 VGA, drive a thermal imaging camera, and put OpenCV inside a webcam. Now there’s a new, even more powerful part on the market, and the mind reels thinking what might be possible.

Right now there a few STM32F7 parts out, both with speeds up to 216MHz, Flash between 512k and 1MB, and 320kB of RAM. Peripherals include Ethernet, USB OTG, SPDIF support, and I²S. The most advanced chip in the line includes a TFT LCD controller, and a crypto processor on-chip. All of the chips in the STM32F7 line are pin compatible with the STM32F4 line, with BGA and QFP packages available.

As with the introduction of all of ST’s microcontrollers, they’re rolling out a new Discovery board with this launch. It features Ethernet, a bunch of audio peripherals, USB OTG, apparently an Arduino-style pin layout, and a 4.3 inch, 480×272 pixel LCD with capacitive touch. When this is available through the normal distributors, it will sell for around $50. The chips themselves are already available from some of the usual distributors, for $17 to $20 in quantity one. That’s a chunk of change for a microcontroller, but the possibilities for what this can do are really only limited by an engineer’s imagination.

Teensy Adds S/PDIF to Library

With Arduino library support on an ARM Cortex M4 processor, it’s no surprise that we’re fans of the Teensy 3.1. And lately, [Paul Stoffregen] has been building out the Audio Library for this platform, making it even more appealing to the synth / audio geeks among us. And now, with just the addition of a highfalutin LED and some software, the Teensy can output digital audio over optical fiber.

S/PDIF, and more specifically optical TOSLINK, uses LED light sent down an optical fiber to encode audio data. The advantage of this over any voltage-level signals (like with regular wires) is that the source and destination devices aren’t electrically connected at all, which gets rid of the dreaded ground loop hum and any RF interference.

An S/PDIF audio data stream is a bit complex, but if you’re interested [Micah Scott] has a fantastic dissection of it up on her blog. Of course, you don’t have to know anything about any of that to simply use S/PDIF with the Teensy Audio Library.

We love open source hardware and software because of the collaborations that make ultra-rapid development of niche stuff like this possible. You can follow along with the development of the Teensy’s S/PDIF capabilities on the PJRC forum. Contributor [Frank B] modestly claims that “everything was already on the internet”, but that doesn’t make it any less cool that they got from zero to working library in a few weeks. (And note the clever use of a precomputed lookup table for speed.)

LED_TOSLINK2On the hardware side, [Paul] has posted up his adapter board for a cheap, but very professional looking, optical TOSLINK sender. But if you’re feeling ghetto, you can simply use a red LED pointed just right into the optical cable.

The end result? Lossless transmission of CD-quality audio from an Arduino-esque microcontroller, sent on a beam of light, for less than the cost of a latté.

A Very, Very Small IMU

The reason we’re playing with quadcopters, flight controllers, motion controlled toys, and hundreds of other doodads is the MEMS revolution. A lot is possible with tiny accelerometers and gyroscopes, and this is looking like the smallest IMU yet. It’s an 18mm diameter IMU, with RF networking, C/C++ libraries, and a 48MHz ARM microcontroller – perfect for the smallest, most capable quadcopter we’ve ever seen.

The build started off as an extension of the IMUduino, an extremely small rectangular board that’s based on the ATMega32u4. While the IMUduino would be great for tracking position and orientation over Bluetooth, it’s still 4cm small. The Femtoduino cuts this down to an 18mm circle, just about the right size to stuff in a model rocket or plane.

Right now, femtoIO is running a very reasonable Kickstarter for the beta editions of these boards with a $500 goal. The boards themselves are a little pricey, but that’s what you get with 9-DOF IMUs and altimeter/temperature sensors.