fabio's blog

An USB Inertial Mouse with FreeIMU and Arduino Leonardo in 10 lines of code

Submitted by fabio on Mon, 2012-07-23 18:20.

Today the Arduino team officially presented the Arduino Leonardo with a video from Massimo Banzi, while it's been a while that the board has been launched and available for sale.

I really like the Arduino Leonardo and I'm already using it in some projects.. today however, I decided to make a simple little example program which shows the potential of the Arduino Leonardo.

I connected one of my FreeIMU to the Leonardo, wrote a bunch of lines of code and then, I had a simple USB inertial mouse! The code for this example is attached below.

Here is a video demonstration and a little explanation on how it works!
Kudos to the Arduino team for this great board!

QFN64 Hand Soldering with hot air gun

Submitted by fabio on Fri, 2012-07-20 09:33.

I've recently had to hand solder a QFN64 package chip (CC430 microcontroller) on a PCB for a project. This was the first time I soldered a QFN this big, it turned out quite well.

I recorded the process in the following video:

Posted in:

Inside an MS5611 high resolution barometer

Submitted by fabio on Thu, 2012-07-19 13:32.

During the tests of the last FreeIMU v0.4.3 batch, which are now available for sale on our online shops, I found out that a faulty MS5611 lost its plastic white package allowing to see what's inside of it.. I took a picture of it using my USB microscope, looks interesting!

Unfortunately, I've been only able to shoot at 20x magnification as I then cracked the inside when trying to shoot at 400x. Maybe next time.

MS5611 picture of the inside

Posted in:

Using FreeIMU or the FreeIMU library in a research project? Please let me know!

Submitted by fabio on Tue, 2012-07-17 15:22.


I'm currently writing a paper for TEI 2013 about the FreeIMU and the FreeIMU library as well as all the prototyping they enable.

The FreeIMU has been already used in quite some nice research/educational projects! Here are some:

So, are you using FreeIMU in a research project? Please let me know! I'll be happy to cite your work in my paper! You can reach me on my mail: fvaresano [at] yahoo [dot] it

Thanks :-)

Posted in:

New FreeIMU batch "almost" ready...

Submitted by fabio on Wed, 2012-07-11 18:40.

I only need to test each one of them.. ouch.. :-)

FreeIMU July 2012 Batch

Posted in:

Hacking Adafruit NFC shield for Arduino Leonardo compatibility

Submitted by fabio on Mon, 2012-07-09 10:59.

Yesterday night, me and Federico Vanzati (one of the guys working for Officine Arduino at Fablab Torino) had a good time hacking the NFC shield by Adafruit so that it could work with the new Arduino Leonardo.

The hacking started when we connected the Leonardo to the NFC and discovered that I2C, the default hardware communication bus used by the shield to communicate with the Arduino, was not working on the Leonardo. This shield, even if already designed for Arduino UNO R3 pinout, wasn't working with the Arduino Leonardo at all! This blog post is a small summary of what we did to address these issues.

Adafruit NFC shield hacked for Arduino Leonardo compatibility

We started investigating the problem.. the first strange thing worth noting is that this shield, even if it comes with the various Open Hardware logos on it, it doesn't actually have any shematics nor EDA CAD designs available The designs were actually available on Adafruit github but simply not linked from the product page, that's why we missed them. So, we had to kind of reverse engineering the shield in order to understand the problem.

So, the first problem we discovered is that the IRQ pin of the PN532, used to signal the microcontroller on a successful read, is connected to pin Digital 2 on the shield.. this is not good at all with the Leonardo since D2 is also I2C SDA making communication impossible. Fixing this was as simple as cutting out the trace going from the IRQ pin into the D2 pin on the shield.

We decided to use a two ways on-on switch (see picture below) connecting IRQ to D2 in one position and IRQ to D8 in the other position.. the idea was being able to switch between D8 and D2 when used with UNO or Leonardo respectively. On a second thought, it is probably better to move that to another pin usable on both the UNO and Leonardo.

The next problem we had to address was a pin conflict: this shield connects I2C SDA and SCL both on the new SDA and SCL pins on the new Arduino UNO R3 pinouts (top left near the various digital pins) as well on the legacy A4 and A5 pins used for I2C in legacy Arduino Duemilanove and previous boards. Fixing this was as simple as cutting out the traces connecting I2C to A4 and A5.

With a small modification to the reference code from the Adafruit NFC library (attached below), instructing the library to use D8 instead of D2 as IRQ connection, we finally had a perfectly functioning NFC shield with I2C on the Arduino Leonardo!

Suggestion for Adafruit: in case backward compatibility with legacy boards is needed, I'd use a 2 ways on-on switch (eg: JS202011SCQN) allowing the connection to A4 and A5 when needed on legacy boards. Solder jumpers will work too.

Soldering Saturday (NFC PN532 Breakout board)

Submitted by fabio on Mon, 2012-06-04 20:42.

The past Saturday me and Franco met up at Fablab Torino to solder the PN532 NFC/RFID breakout board from Adafruit/Microbuilder. This should be a pretty good learning platform to dig into NFC/RFID.. stay tuned for more on this...

Btw, Franco had the nice idea of making a timelapse of the day.. here it is.. almost 6 hours of bloody soldering!

Result? Well, the chip communicates fine with Arduino but it still didn't recognize any RFID tag: I found out that the RF inductors were completely wrong (ordered a different part), so I hope that once I get them it will work. Stay tuned ;-)

Posted in:

KiCad getting awesome 3D rendering

Submitted by fabio on Sun, 2012-06-03 22:27.

Wow.. check out what just landed on KiCad developers mailing list!

Thanks to the work of Thomas Spindler, we'll soon see many improvements in KiCad's 3D rendering tool.. Check it out!

KiCad new 3D rendering tool

Posted in:

LibreMote v0.1 is Alive!

Submitted by fabio on Wed, 2012-05-30 16:53.

During the past weekend, with the precious help of Franco Magni, we assembled the very first prototype of LibreMote v0.1, the simple remote controller programmable just like an Arduino Pro Mini which has an integrated accelerometer and a joystick, we developed during the electronics workshop I held at Fablab Torino.

Here is a first video of LibreMote v0.1 and below some pictures of the assembling. Thanks Franco and Davide for the videos.

LibreMote Soldering

LibreMote Soldering

LibreMote Soldering

LibreMote Soldering

LibreMote Soldering

LibreMote PCBs are here!

Submitted by fabio on Thu, 2012-05-24 10:30.

During the past months, I held a workshop at the FabLab Torino teaching people how to design their own hardware using KiCAD. (workshop lessons archive)

During the workshop, we designed LibreMote, a simple remote controller programmable just like an Arduino Pro Mini which has an integrated accelerometer and a joystick. This served us as a pretty good example to introducing the design of simple hardware, from the electronics schematics to the PCB routing.

Yesterday, I finally received the LibreMote PCBs from Dorkbot PDX. I'll be assembling them soon and see how (if?) they work!

Here some pictures, looking not bad!

LibreMote top view

LibreMote used as controller

LibreMote top view closeup

LibreMote bottom view closeup