Getting Started with ARM Using mbed

Even though the Arduino was hardly the first 8 bit microcontroller board to support a bootloader and the C/C++ language, it quickly became the de facto standard for hobby-level microcontrollers as well as a common choice for one-off or prototype projects. I’m sure there are a lot of reasons why this occurred, but in my mind there were three major reasons: price, availability of lots of library and sample code, and the existence of a simplified GUI IDE that you could install in a few minutes. The build process is simple, too, even though if you ever have to actually figure it out, it is quite ugly. For most people, it works, and that makes it not ugly.

I like the ATMega chips. In fact, I had boards based around the ATMega8 and a bootloader way before there was an Arduino. However, they are fairly small parts. It is true that the Arduino infrastructure has grown to support more ATMega chips, many with more memory and I/O and clock speeds. However, 32-bit processors are getting inexpensive enough that for all but the simplest or highest volume projects, you should be thinking about using 32-bit.

If you’ve tried to go that route before, you’ve probably been daunted by the price, especially the price of development tools. Your alternative is to roll your own tool chain which is very doable (and there are some nice scripts out there that will help you). You also need to worry about libraries and how to integrate them. Not to mention, many of the advanced processors require a lot of setup to get, say, an A/D converter turned on. Most processors keep things they aren’t using turned off, and each pin requires setup to select the 4 or 5 things shared on that pin.

All of this has been a barrier to entry. The vendors have all figured this out, though, and many have tried to build tools aimed at breaking up the Arduino market ranging from inexpensive development boards to code-generating wizards, to full blown IDEs. I want to tell you (and show you, in the video below) how you can make the jump from 8-bit to 32-bit much easier than you might think.

Continue reading “Getting Started with ARM Using mbed”

Hackaday Prize Entry: An FPGA’d Propeller

The Parallax Propeller is an exceptionally interesting chip that doesn’t get the love it deserves. It’s a 32-bit microcontroller with eight independent cores that are each powerful enough to do some real computation.  Around this time last year, the source for the Propeller was opened up and released under GPL 3.0, along with the mask ROM and an interpreter for the Propeller-specific language, Spin. This release is not only a great educational opportunity, but a marvelous occasion to build some really cool hardware as [antti.lukats] is doing with the Soft Propeller.

[antti]’s Soft Propeller is based on the Xilinx ZYNQ-7000, a System on Chip that combines a dual core ARM Cortex A9 with an FPGA with enough logic gates to become a Propeller. The board also has 16MB of Flash used for configuration and everything fits on a Propeller-compatible DIP 40 pinout. If you’ve ever wanted to play around with FPGAs and high-power ARM devices, this is the project for you.

[antti] already has the Propeller Verilog running on his board, and with just a bit more than 50% of the LUTs used, it might even be possible to fit the upcoming Propeller 2 on this chip. This build is just one small part of a much larger and more ambitious project: [antti] is working on a similar device with HDMI, USB, a MicroSD, and 32MB of DDR2 RAM. This will also be stuffed into a DIP40 format, making it an incredibly powerful system that’s just a bit larger than a stick of gum.

The 2015 Hackaday Prize is sponsored by:

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.

An Electronic Woodwind With An Onboard Synthesizer

About a year ago, we saw a project on Hackaday.io for a MIDI wind controller. Keyboard MIDI controllers are a dime a dozen, but if you want something that actually sounds like a brass or woodwind instrument, you need something that’s controlled by a breath sensor. Since then, this project has been updated with an onboard synthesizer. It sounds great, and thanks to some interesting components, the part count is actually really low.

The synthesizer used for this project is just a single chip – the DSP-G1 from [Jan Ostman]. This isn’t a custom ASIC or anything fancy; it’s just an 8-pin ARM microcontroller in DIP format, the LPC810.

The rest of the instrument is just a series of pressure sensors along the body, and a breath sensor. The plan is to stuff all the electronics – a microcontroller to read the touch and breath sensors, the DSP-G1 chip, and the battery  – inside the body of the instrument. That’s something that would be incredibly cool, and much more capable than the wind controllers that are available today.

You can see a few videos of the wind controller below.

Continue reading “An Electronic Woodwind With An Onboard Synthesizer”

Hackaday Prize Entry: A Bit Dingus

There was a time when just about every computer – even laptops – came with a parallel port. That’s 25 pins of bit-banging goodness, accessible from every programming environment, that could control any random pile of electronics sitting on a desk. The days of parallel ports are behind us now, and if you want to blink a pin with a computer, you’re looking at controlling a microcontroller over USB or something.

[ajlitt]’s Tiny Bit Dingus is just that: a microcontroller stuffed into a USB plug with a few pin headers. With the right app, you can control these pin headers over USB. It’s the closest you’re going to get to a parallel port with modern hardware.

This bit dingus isn’t meant to replace the Bus Pirate, an Arduino, or anything else; it’s meant to be a small and simple way to connect random electronics to a computer with as few parts as possible. If you’re looking for a part to add to your electronic tinkerer everyday carry rig, this would be it.

There’s a few bits of interesting hardware inside the Bit Dingus. A while back, [ajltt] ran into the Freescale KL27, a Cortex M0+ that does USB without a crystal, has a USB bootloader, and doesn’t require many additional components at all. It’s the perfect size for the project at 5x5mm, and is unbrickable while still being flashable over USB.


The 2015 Hackaday Prize is sponsored by:

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.

Interview with the Creators of CHIP, a $9 Single-Board Computer

Single-board computing is hot on the DIY scene right now and riding that knife edge is C.H.I.P., a project currently in crowd-funding which prices the base unit at just $9. I was happy to run into the crew from Next/Thing Company who developed C.H.I.P. They were happy because, well, the project’s reception has been like a supernova. Right now they’re at about $1.5M of their original $50k goal. We spoke about running Linux on the board, what connectors and pinout headers are available, as well as the various peripheral hardware they have ready for the board.

Continue reading “Interview with the Creators of CHIP, a $9 Single-Board Computer”