loading

Brainlink: atxmega, Bluetooth, rechargeable battery, accelerometer and more

It looks to me like I'm the only person on Instructables who uses a Brainlink in projects, so I wanted to share my experience with it.  

The Brainlink is an atxmega with a cute case, Bluetooth module, a USB-rechargeable battery, accelerometer, multicolor LED, photo diode, IR transmitter, IR receiver, TTL serial uart, a bunch of pwm and digital and analog i/o lines and a regulated 3.3V output.   Full specs and official website are here.  It was produced by a Carnegie Mellon University spinoff.

It originally sold for an overpriced $129 but unsurprisingly the product couldn't succeed at that price and it was discontinued.  SurplusShed has them for $39, which is more reasonable, and they periodically have 30-50% off everything sales if you sign up for their emails (for instance, they have a 48% off through the end of today with coupon code SS81420).  When on sale for $20 it's a lot of goodies economically put in one package (and you can pick up some lenses for Google Cardboard from SurplusShed while you're at it).

The Brainlink seems to be primarily designed to interface computers or Android devices with all sorts of robotic devices.  There is an open source Java framework for talking to the Brainlink (though the serial protocol is simple enough to just roll your own).  

I've used the Brainlink to decode IR signals (the official website has software for analyzing IR signals) and to control a Roomba via the serial uart.  Lately I've been using the Brainlink as a serial-to-Bluetooth bridge to talk to the Mindflex toy EEG (works better with my modded Brainlink firmware--the mods make it fast enough to capture raw data from the Mindflex: I will probably eventually write an Instructable)--see the photo.

If you want to use it standalone, Arduino-style, you can upload your own firmware, either writing it from scratch or starting with the original firmware (source code is available).  I haven't actually worked with a real Arduino, but I was pleased to see how smooth the process of building and uploading the firmware was.  I just used WinAVR and it all worked just fine.  They have instructions and a link to the firmware source here.

My own firmware mod was to add a full serial bridge mode.  Just send a 'Z' command to the Brainlink and until it's next turned off it bridges between Bluetooth and serial (at whatever baud rate you set with the regular Brainlink 'C' command).  The regular serial communication code may be OK for sending occasional commands to a robot, but it doesn't seem to work for sustained data receiving, at least not at the 57.6K baud that the toy EEG I was using works at.  With the bridge mode and an S-video cable, you basically get the functionality of a Rootooth for Roomba connection at a much smaller price.

Presumably, with appropriate firmware you can make autonomous things, but I've been using it with a phone or a PC.

For connecting stuff to the Brainlink, you use what look like 1.25mm spacing JST-style connectors (there is one 8-pin port and one 10-pin port;  for serial only connections, you only need three pins near one end of the connector, so a 3-pin connector works for serial).  They include one connector for each port.  I've ordered a bunch of 1.255mm JST connectors from a Chinese ebay seller--hopefully they will fit.  

I have no affiliation either with SurplusShed or the makers of the Brainlink.

Picture of Brainlink: atxmega, Bluetooth, rechargeable battery, accelerometer and more
IMG_4461.jpg
arpruss (author) 2 years ago

I added Roomba 5xx support to my custom firmware (github.com/arpruss/custom-brainlink-firmware). With the custom firmware, you can use the Brainlink as a drop-in replacement for a Roomba-Bluetooth bridge like the Rootooth, at least with software that doesn't expect responses to AT commands. All you need to do is to use the 8-pin connector (I use a 3-pin connector, actually) of the Brainlink, and connect ground to ground, RX to TX and TX to RX. For the Roomba plug, I just used one of the many spare S-video cables I had sitting around, with a plastic stub broken off so it would fit. Even at SurplusShed's regular price, it's less than half the cost of a Rootooth (but unlike the Rootooth, it needs to be charged; a voltage regulator from the Roomba's battery line to the Brainlink would solve that problem).

The custom firmware is fully backwards compatible with all of the ordinary Brainlink functions. The Brainlink website has information on how to upgrade firmware, and you can just download the latest version of the .hex file directly from the github source directory: just click on mainFirmware.hex, click on raw, and press ctrl-S in your browser to save.

Once I finish adding other goodies to the firmware, I will post it. I am thinking of adding some rudimentary oscilloscope functions to the Brainlink.

By the way, I glued one half of a hook-and-loop fastener on the underside of the Brainlink, and then I glue another half on each device I want to use the Brainlink with.

20140810_104148.jpg
arpruss (author)  arpruss2 years ago

The 57k-roomba directory in the repository now has a firmware that will bridge with the older 57.6K baud iRobots (Roomba 4xx, Create).

But I guess I should stop updating this if nobody is interested. :-(

arpruss (author)  arpruss2 years ago

I made the firmware upgrades to the Brainlink much easier by making an Android app that upgrades the Brainlink via Bluetooth: https://play.google.com/store/apps/details?id=mobi...

Surplus Shed has a 40% off sale on everything this week with code: SS141014