A libre breakout board for the ADXL346 accelerometer

Submitted by fabio on Wed, 2011-02-02 14:23.

The ADXL346 is the new smaller version of the ADXL345, the accelerometer used in FreeIMU version 0.1 and 0.2. So, I designed a simple breakout board for it.

Kicad sources for this breakout board can be obtained from my personal repository using bzr using the following command:

bzr co http://repository.varesano.net/LibreBB_ADXL346/

So, there you have it. Designed with the wonderful libre software KiCAD and released under CC-BY-SA 3.0 Unported so you are free to do whatever you like with it, just remember to share alike your modified version so that we can keep the libre hardware ball rolling.

I'm getting 6 of these breakout boards on the next Dorkbot PDX pcb order, so if you want one get in touch!

LibreBB ADXL346 breakout board Kicad view

LibreBB ADXL346 breakout board 3d top

LibreBB ADXL346 breakout board 3d bottom

Posted in:

A libre breakout board for the HMC5883L

Last updated on Tue, 2011-03-29 19:10. Originally submitted by fabio on 2011-01-31 11:38.

I just finished designing a breakout board for the HMC5883L. Just a very simple breakout board, just for me to get started with this new chip. Actually it's just a smaller and more fast and accurate version of the HMC5843, schematics are really similar to that chip.

Btw, here you have it. Designed with the wonderful libre software KiCAD and released under CC-BY-SA 3.0 Unported so you are free to do whatever you like with it, just remember to share alike your modified version so that we can keep the libre hardware ball rolling.

For best results you will need also to get my personal kicad library, where you find the footprint and schematic module for the HMC5883L.

Kicad sources for this breakout board can be obtained from my personal repository using bzr using the following command:

bzr co http://repository.varesano.net/LibreBB_HMC5883/

I'm no more adding zip files to this kind of posts as it is too time consuming to keep the attached archives updated with the current designs. You'll have to stick with bzr. The schematics are attached at the bottom of this page.

Here some picture of the design:
HMC5883 LibreBB Kicad view

HMC5883 LibreBB 3D top view

HMC5883 LibreBB 3D bottom view

UPDATE 2011/03/29:

Assembled first batch of breakout boards. They are working great! See picture below.

Picture of the breakout board for the HMC5883L assembled

My KiCAD library

Last updated on Wed, 2012-04-11 01:53. Originally submitted by fabio on 2011-01-30 17:23.

I think that it could be useful for people having access to my KiCAD library. Everything is licensed using a Creative Commons Attribution-ShareAlike 3.0 Unported.

You can get access to it using bzr with the following command:

bzr co http://repository.varesano.net/fv_kicad_lib/
Posted in:

Femtoduino is Alive!

Submitted by fabio on Sat, 2011-01-29 17:22.

Femtoduino, my ultrasmall Arduino compatible board is alive! It's working great and looks really neat!

Here a presentation video of Femtoduino!

Posted in:

First picture of Femtoduino, the smallest, lightest Arduino compatible board ever

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

First picture of Femtoduino

This is the first picture of Femtoduino, an ultra small Arduino compatible board.

Manually assembled by me, including 0402 capacitors and reflowed using a reflow oven and a hot air gun.

Soldering went smooth, even easier than I tought.. but I'm having problems uploading the bootloader. I'm able to query the ATMEGA using avrdude but I always get a programmer out of sync error when doing the real bootloader upload..

This will require some investigation.

UPDATE 2011-01-29:

It looks like the ArduinoISP sketch that I'm using to burn the bootloader on the ATMEGA 328p has problems under Linux.. so I had to use Win and it burnt it perfectly fine. Expect a demonstration video tomorrow. ;-)

From the AHRS sensor fusion orientation filter to a 3d graphical rotating cube

Submitted by fabio on Fri, 2011-01-28 12:52.

In a comment from Ciskje on my sensor fusion implementation, I've been asked to explain how the Processing graphical uses rotations to visualize the orientation informations coming from the sensor fusion algorithm.

The question was basically, what's the reason about using the Yaw, Pitch and Roll in a "strange" order in the following lines of code in my Processing graphical cube example:

rotateZ(-Euler[2]); // phi - roll
rotateX(-Euler[1]); // theta - pitch
rotateY(-Euler[0]); // psi - yaw

The following explanation assumes some basic knowledge of rotation matrices and 3d coordinate systems. For a good introduction on the topics, I strongly suggest reading Chapter 2 of "Robot Modeling and Control" by Mark W. Spong.

Demonstration

The first thing you have to understand is that we have 3 coordinate systems here.

  • OsXsYsZs attached to the sensor array
  • OwXwYwZw attached to the real world, with Xw pointing to the Hearth North and Zw pointing to the sky
  • OmXmYmZm the coordinate system of the graphics program, usually it is attached on the top left corner of the monitor with Xm pointing right, Ym pointing down and Zm pointing forward to the monitor.

Note that when Xw and Zm are aligned (you point the monitor to the Earth north in your location) there is a simple relationship between OwXwYwZw and OmXmYmZm: a point pw defined in the coordinate system W having coordinates pw = [pw_x, pw_y, pw_z] can be expressed in the coordinate system M doing pm = [-pw_y, -pw_z, pw_x]

The sensor fusion algorithm running on Arduino computes a quaternion representing the orientation of OsXsYsZs with respect to OwXwYwZw, and from the quaternionToEuler function in the Processing code we can get the Euler angles expressed in the aerospace sequence, so they are the yaw (ψ - psi), pitch (θ - theta) and roll (φ - phi) angles.

We can use them in the following way: supposing that OsXsYsZs and OwXwYwZw are aligned in the beginning we can rotate OsXsYsZs so that it would assume the orientation described in the quaternion or yaw, pitch, roll angles by:

  1. rotate by ψ around Zs
  2. rotate by θ around Ys
  3. rotate by φ around Xs

After doing the above we will obtain that OsXsYsZs is oriented with respect to OwXwYwZw according to the orientation described by the output quaternion from the sensor fusion algorithm.

The same result could have been produced by rotations relative to the W coordinate system, but using the reverse order:

  1. rotate by φ around Xw
  2. rotate by θ around Yw
  3. rotate by ψ around Zw

However, we are interested in rotating the graphical cube which is defined in the OmXmYmZm coordinate system so a slightly different approach is needed. From the relationship between OwXwYwZw and OmXmYmZm described above we can see that there is a relationship between the rotations made in the W and M coordinate system:

  • a rotation φ around Xw corresponds to a rotation of -φ around Zm
  • a rotation θ around Yw corresponds to a rotation of -θ around Xm
  • a rotation ψ around Zw corresponds to a rotation of -ψ around Ym

Given the above and remembering that in Processing the rotations are made in respect to the monitor frame we can conclude that, in order to align a graphical cube defined in the OmXmYmZm to the orientation described by the quaternion and then Euler angles coming from the sensor fusion algorithm of the sensors coordinate system OsXsYsZs, we have to do the following rotations:

  1. a rotation of -φ around Zm
  2. a rotation of -θ around Xm
  3. a rotation of -ψ around Ym

as we wanted to demonstrate.

FreeIMU is alive!

Submitted by fabio on Wed, 2011-01-26 19:18.

Yeah! I soldered everything and all went smooth.. only a little bug.. the connectors have a 0.032" drill hole while it should be 0.04".. so, regular squared pins array wont fit inside. You can use rounded pins, female thin pins (as the one shown in the video below) or wires directly.

But everything works great. Communication on I2C running at 400Khz directly from Arduino through the on board I2C level converter.. works great!

Next days more tests, I'm expecially interested in having a look at how the I2C signals looks on a scope with or without the I2C level converter.. I'll also try to simulate some noise and using long wires to check what happens..

Here is a short video on the progresses done these days.

PCBs are here! Today is delivery day!

Submitted by fabio on Mon, 2011-01-24 22:18.

Finally, the PCBs are here! I received the PCBs from the 10th January and from the 22th December ... lot of cool stuff!

Here we have:

  • FreeIMU v0.1
  • FreeIMU v0.2
  • Femtoduino v0.1
  • Femtoduino Breakout Board v0.1
  • I2C level converter & voltage regulator v0.1
  • ADXL345 brekout board
  • HMC5843 breakout board
  • ITG3200 breakout board

All the PCBs I received

FreeIMU

v0.1:
FreeIMU v0.1

v0.2:
FreeIMU v0.2 top

FreeIMU v0.2 bottom

Help me pushing writeTo and ReadFrom into Arduino Wire

Submitted by fabio on Sun, 2011-01-23 17:26.

If you ever worked with I2C in Arduino you probably have seen or have implemented yourself, the following code blocks:

When writing a value to one of the registers of the slave device:

  Wire.beginTransmission(DEVICE_ADDRESS);
  Wire.send(REG_ADDRESS);
  Wire.send(VAL_TO_WRITE);
  Wire.endTransmission();

When reading a value from the register of the slave device:

  Wire.beginTransmission(DEVICE_ADDRESS);
  Wire.send(REG_ADDRESS);
  Wire.endTransmission();
  Wire.beginTransmission(DEVICE_ADDRESS);
  Wire.requestFrom(DEVICE_ADDRESS,NUM_BYTES_TO_READ);

Finally some pictures of real PCBs of my projects!

Submitted by fabio on Thu, 2011-01-20 18:24.

This is like fresh air.. Just came out from fabrication.. and just arrived into James hands.. now.. FedEX to me this time.

I feel good!

FreeIMU v0.2

FreeIMU v0.2 top view

FreeIMU v0.2 bottom view

Femtoduino v0.1

Femtoduino v0.1

Femtoduino Breakout Board v0.1

Femtoduino Breakout Board v0.1

I2C logic level converter

I2C logic level converter

Posted in: