A self balancing robot with FreeIMU and Arduino

Submitted by fabio on Sat, 2011-04-16 19:07.

My friend Danilo, just published a nice video of his project: a 2 wheels self balancing robot made with Arduino and FreeIMU! That's pretty cool!

Posted in:

WARNING: error in my footprint for the MS5611-01BA

Submitted by fabio on Fri, 2011-04-15 23:39.

Just a quick note to let you know that I had an error in my footprint for the MS5611-01BA. The spacing between the pads I used was 0.5mm while it's actually 0.625mm.. not an huge error but still something to fix.

The repositories of my KiCAD library, the MS5611-01BA breakout board and FreeIMU v0.4 have been fixed.

A libre breakout board for the MS5611-01BA high resolution altimeter sensor

Submitted by fabio on Fri, 2011-04-15 14:48.

As a first step in the development of FreeIMU v0.4, I'm starting my first steps with the MS5611-01BA high resolution altimeter sensor. According to its datasheet, this chip looks extremely accurate as it's capable of a 10 cm resolution in altitude estimation.

I already sorted out most of its electrical connections when I drafted the first designs of FreeIMU v0.4, however I wanted to start testing it before having FreeIMU v0.4 PCBs ready, just to start experiencing a little with it.

So, I designed a very simple breakout board for it. I tried to keep the design as simple as possible to allow etching a PCB from it, something I'll try in the next days. For this design I choose to use the I2C bus as it's the one I'm more experienced with, however the chip also supports SPI.

You can find the schematics in the attachments below. The KiCAD designs of the breakout board for the MS5611-01BA, released under CC-BY-SA, on my personal repository using Bazaar (bzr), with the following command:

bzr co http://repository.varesano.net/LibreBB_MS5611-01BA/ 

Below a picture of it.

A libre breakout board for the MS5611-01BA high resolution altimeter sensor

FreeIMU v0.4: work in progress

Submitted by fabio on Fri, 2011-04-15 00:33.

The first units of FreeIMU v0.3 have just been assembled, tested and shipped to the testers but I'm already at work for the next FreeIMU v0.4.

With FreeIMU v0.4 I'd like to start experiencing with the new generation of high resolution altimeter sensors, specifically the MS5611-01BA which is, according to its datasheet, capable of an altitude resolution of 10 cm. I'd also like to try the new MPU6050 which should be finally out when FreeIMU v0.4 will be ready.

I'm going to remove the integrated logic level converter we had in v0.2 and 0.3 as it adds considerable complexity in the schematics, PCB designs and at assembly time. So, the idea with FreeIMU v0.4 is to make it pluggable into my logic level converter thus reducing the complexity of FreeIMU while maintaining the LLC features with an easy to add plug-in.

I already sketched some designs of FreeIMU v0.4, which I add a picture below. If you are interested in them, they are available on FreeIMU repository as usual.

I expect to be able to build the first units of FreeIMU v0.4 in something like 2 to 3 months, so don't hold your breath. I've been able to source the MS5611-01BA as well as all the other chosen components, the only problem is still the MPU6050 which is still not available. My last communications with Invensense EU distributor told me its availability around end May or beginning of June, however they had delayed it's release date constantly for the last six months so I don't know if we can rely on this expected date.

Btw, here it is, my new design of FreeIMU v0.4:

FreeIMU v0.4

Posted in:

Research Assistant at UNITO

Submitted by fabio on Fri, 2011-04-15 00:09.

Dear friends,

I'm happy to announce that yesterday I signed my first serious work contract of my life. I'll be a research assistant at the Università degli Studi di Torino for the next months.

What does this means? Well, I'll be payed (actually not much) to continue the work started during my thesis: creating prototypes of human computer interaction devices. I'll be able to continue working on my FreeIMU project and keep pushing its usage in prototypes of next-gen controllers.

I will publish soon a roadmap of what will be my working plans for the next months, so stay tuned!

My MoS Thesis: Using Arduino for Tangible Human Computer Interaction

Submitted by fabio on Mon, 2011-04-11 15:29.

I'm happy to announce that last week I've got degreed with a cum laude degree in a Master of Science in Computer Science. Great!

I can now share my thesis: Using Arduino for Tangible Human Computer Interaction.

The thesis is available in PDF as well as Latex project archive (~80MB) where you will find all the Latex sources, images sources (where available), bibliography, etc.. this could be pretty useful if you plan to produce documents regarding the topics I covered in my thesis. The thesis and the sources are released under CC-BY-SA.


This thesis presents the results of a nine months internal stage at the Department of Computer Science, Università degli Studi di Torino.

During my stage, supervised by Prof. Luca Console, I experienced with electronics, Arduino, micro-electromechanical sensors (accelerometers, gyroscopes and magnetometers), orientation sensing algorithms and 3D computer graphics to develop prototypes of Human Computer Interaction devices, with a a particular interest on Tangible User Interfaces.

Table of Contents

  1. Introduction
    1. How everything got started
  2. Electronic Circuits in DC
    1. Basic concepts of electricity
    2. Schematic Diagrams
    3. Ohm's law
    4. Capacitors
    5. Kirchoff's circuit laws
    6. Series And Parallel Circuits
  3. Arduino
    1. Why Arduino?
    2. What can we do with Arduino?
    3. Arduino Hardware
    4. Arduino Shields
    5. Kirchoff's circuit laws
    6. Series And Parallel Circuits
    7. Arduino Duemilanove
    8. Arduino Base Workshop KIT
    9. Arduino Software
    10. Arduino Community
    11. Critics to Arduino
  4. First steps with Arduino and electronic prototyping
    1. Hello World!
    2. digitalRead(): using pushbuttons and tilt sensors
    3. analogRead(): Reading analog values with Arduino
    4. Driving bigger loads: Transistors and Optocouplers
    5. Pulse Width Modulation (PWM): analog outputs with digital means
    6. Serial communication with Arduino
    7. A multisensors game controller with Arduino and Processing
  5. MEMS Sensors: accelerometers, gyroscopes and magnetometers
    1. The accelerometer
    2. The gyroscope
    3. The Magnetometer
    4. ADXL330: an analog 3-axis accelerometer
    5. Digital sensors
    6. Low cost, do-it-yourself method for making printed circuit boards
    7. ADXL345: a digital 3-axis accelerometer
    8. ITG3200: a digital 3-axis gyroscope
    9. HMC5843: a digital 3-axis magnetometer
    10. 9 degrees of measurement MARG sensor array on a breadboard
  6. Orientation Sensing
    1. Tilt sensing using an accelerometer
    2. Fusing accelerometer and gyroscope data for reliable tilt sensing
    3. Tilt compensated digital compass
    4. Accelerometer, gyroscope and magnetometer fusion for orientation sensing
  7. FreeIMU
    1. Dorkbot PDX group PCB buying service
    2. FreeIMU version 0.1
    3. FreeIMU version 0.2
    4. Making FreeIMU a libre hardware project
    5. Competing commercial products
  8. Palla
    1. Previous works
    2. Palla's schematics
    3. Building Palla
    4. Palla capabilities and possible usages
  9. Femtoduino
    1. Schematics
    2. PCB desing
    3. A libre hardware: media coverage and commercial productions
  10. Conclusions
    1. Future Works
    2. PCB desing
    3. Acknowledgments

Overclocking I2C to 800KHz with FreeIMU v0.3

Submitted by fabio on Mon, 2011-04-04 10:53.

I'm having some fun with my new Rigol DS1052E oscilloscope and the brand new FreeIMU v0.3 and it's integrated logic level converter.

I'm using the scope to stress test the I2C logic level converter and I found out that with Arduino and the Wire library hacking the code to overclock I2C to non-standard frequencies is actually extremely simple.

It's just a matter of changing the line

#define TWI_FREQ 100000L

in twi.h and upscale that to whatever you want by changing 100000L into eg 400000L or 800000L.

With FreeIMU v0.3, I've been able to reach the unbelievable speed of 800 KHz. Even at this speed, communication looks extremely stable and reliable. Also the quality of the signals through the logic level converter is still very good.

Of course, as all the sensors on FreeIMU v0.3 aren't designed for such speed, going so fast may actually damage the sensors and "woid your warranty". So, I wouldn't suggest trying this on your boards.

Here is a picture of the SCL signal scoped when running at 800KHz through the logic level converter. Cool!!!

FreeIMU SCL signal scoped when running at 800KHz through the logic level converter

Preview of FreeIMU v0.3

Submitted by fabio on Fri, 2011-04-01 18:01.

Ok, I'm back hacking after a couple of months of hard work on the thesis which has been completed and submitted to the committee. 7 or 8 April degree! I still have to realize all of this..

Well, after a couple of days of relax I'm back to my regular hacking and I've been able to assemble the very first FreeIMU v0.3.

FreeIMU is my libre inertial measurement unit which I developed during my thesis. For all the informations please visit FreeIMU project page.

FreeIMU v0.3 is the latest version of FreeIMU which includes the ADXL346, the HMC5883L and the ITG3200. Initial test have been successful but I'm testing it.

So, here you have a couple of pictures:

FreeIMU v0.3 top view

FreeIMU v0.3 bottom view

I also made a quick video of FreeIMU v0.3

In this revision, I made some changes in the components used for the voltage level translation. It seems that the results are great. This is the signal quality of the SCL line running at 400KHz through the integrated logic level converter of FreeIMU v0.3.

FreeIMU v0.3 scope

First Flight of FreeIMU!

Submitted by fabio on Sun, 2011-02-20 19:22.

I designed FreeIMU for human computer devices prototyping, but you know.. when you give a good tool to people you can't really know what they will come up with.. so, it seems that FreeIMU is actually pretty good to be used on quadcopters as AHRS for stabilization.

My friend Francesco Ferrara (aka ciskje, head developer of the Baronpilot project), who bought one of my FreeIMU v0.1 prototypes, has finally uploaded a very nice video showing the first real flight of FreeIMU on one of his quadcopters. If you are into quadcopters, you should really keep an eye on Francesco Simplo project, he's doing great things (like rewriting Arduino's Wire for sensors access in less than 1 millisecond and without using interrupts).

I don't have any experience in quadcopters but this looks pretty good to me! What do you quadcopters guys think?

FreeIMU on a quadcopter

FreeIMU on a quadcopter

Posted in:

FreeIMU project page just launched

Submitted by fabio on Fri, 2011-02-11 00:53.

I almost completed working on a project page for FreeIMU.

You can find it here: FreeIMU: a libre 9DOM/DOF inertial measurement unit

From now on, that page will be the central point of information about the FreeIMU project while blog posts on it will follow regularely also in my blog.

Posted in: