Razor 6DOF IMU + Arduino + DCM

I recently got SparkFun's 6 IMU board and played with it a bit. Basically I connected Arduino and Razor 6DOF board and ported DCM code. Code is ArduIMU v13 but just made to work with Razor board. I am not sure what to think about gyros on that board as it takes them a while to "warm-up". Below you can see run from cold start for over an hour and "zoom' on first minute or so (just raw ADC values). On the link referenced above, you can see same data plots for both gyros and accelerometers.

I also modified ArduIMU Labview code - mainly that "cube" is within main window rather then separate one. I haven't compiled the code but whoever has LabVIEW should be able to run it (developed with version 8.5)

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Here are plots:
    200mW


    1mW


    Oh, due to boards physical size I couldn't measure distances closer then 2" (that's why I am starting at 2")
    In retrospective I should of kept data colecting for longer at each time step.....

    Due to plots above, I repeated 200mW run but taking data for longer at each step (actually I made individual runs for each distance).
    Data is:
    baseline - with XBee - baseline

    I started at 2" separation and kept going until I couldn't see effect which was at 9"

    Separation at 2"


    .
    .
    .
    separation at 8"
  • Per Bill P.'s suggestion I tested effect of having Xbee in proximity of the board. Set up is:
    - Razor IMU board on top of Arduino
    - XBee Pro 868 ( I don't have 900 MHz (yet...maybe). I got the Dev set few months ago when they were on sale
    - Two Xbee modules are separated bu 7.5 meters
    - Module close to Razor / Arduino has wire antena
    - Xbee is not connected to Arduino (i.e. Arduino doesn't read signals)
    - I used range Test feature to send data back and forth between X-bees
    - - settings: 9600-8-N-1 none and 32k data
    - Used power settings of 1mW, 25 mW, 100mW, and 200 mW
    - For each power level setting I started with Xbee being 2" from IMU board, recorded data, and moved it further away in 1" increments, recording data at each increments

    On plots you'll see that data drops to 0 level at times, this is artifact of me marking the transitions. Somehow I wanted to mark data file when I moved it further away, but without affecting physical set-up (i.e. shaking the board might disturb gyros and introduce other effects...., also data is at 20ms and is going so fast that thee is no way for me to just accurately record time stamp). So what I did in my acquisition code is to have an option to record 0s instead of real data. Every time I wanted to make a transition, I would start recording 0's and that would be reliable marker in the file, but without disturbing set-uo. (hope this makes sense).

    Also each run was stated just with IMU board sitting still, but without XBee turned on - in order to obtain base line; also last data set is the same thing - checking that base line did not affected. So on next few plots where you see data it's in this order:

    baseline - plug-in/power up Xbee (no Tx yet) - gyro data at 2" - gyro data at 3" - .....-gyro data at 12" - baseline ( Xbee disconnected and non-powered).

    There are a lot of plots, and if there is desire I'll post them (all) but in interest of space (and focus) here is data from extremes - with power level of 200mW (I short changed 11") and 1 mW
  • After thinking about voltage levels ( gyro amplified, gyro non- amplified and refs) and staring at the schematic I figured that I can't reliably measure non amplified gyro levels without affecting them.So I connected NON-amplified gyro outputs, v1 and v2 ref , and gyro Y 4x amplified output. Arduino has only 6 analog ports so I could only use one output from amplified ports. ( I could of used "RCtime" technique to read additional analog values from digital ports but I didn't want to introduce that to an 'equation'...).

    Plot shows non-amplified gy, gx, gz, as well as V1 ref, v2 ref, and gy x4 (4x amplified - which was shown in previous plots). V1 ref is for gyro x and y signals, and v2 ref for z. On the plots Gy X4 is dark green and V2 ref is black...the rest of the colors should be easily identifiable. Some plots look like "thick" solid line - they are not, as there is a lot of data on this scale and sensor output frequently changed with delta ADC of 1. Data was taken from 'cold start' at 20ms intervals


    and here is close up of the stat-up


    Also I wanted to see how outputs behave when board is moving - I first slowly moved the board and then had moved it fast few times. Last dip on the plot (Gy x1 and Gy x4) is me putting DVOM leads accros ground and Gy x1 pins.....Notice how non-amplifed values respond / return to "no movement" just after 4825000 ms mark - i.e. they slowly settled. Motion here was fast and I quickly put IMU board back on the table ( or no slow movement on my part). I've seen this in other tests, and am not exactly sure why - my best guess is that it is effect of filters on the board ( capacitor related).



    This plot might be of interest as well - it's a "close-up" of movement and it's possible to see how gyro Y amplified and non-amplified signals behave. Note that amplified signal got saturated couple of times. According to specs amplified signal is +/- 300 deg/ sec and non amplified +/- 1200 deg /sec

  • T3
    Actually, let me correct myself, it may be that 4x outputs are different from VREF, it depends on gyro opamp design. It would be interesting to know, what is the voltage on board 1x and 4x outputs during static conditions.
  • @Andrus,
    yes on both - part and schematics. I went through set-up and measured outputs numerous times. I did not short caps....It is peculiar and I am trying to understand it (still nothing from ST...)
  • T3
    Hi, something is not correct. Your Razor is This, correct? And its chematics is here?

    It simply is not possible that board outputs stay different from VREF for long, unless you did short capacitors C1, C2 and C19 (which is correct thing to do IMO). But then, I would expect to have to adjust gyro zero value according to drift. For that I use position control vector in in my autopilot, which I contruct with help of other sensors - everybody does something like that, imo.
  • @ Andrus - yes I left v1 and v2 unconnected on purpose (for now at least). Before I got the board I also evaluated schematics, and was under the impression that I'll be able to subtract x,y and z gyro outputs from refs and get a handle on drift - basically same thing you described. However when I got the board, that did not turn out to be the case. v1 and v2 are rock solid at 1.250 VDC and 1.260 VDC, however output of gyros vary...
    Even while board is motionless, gyro voltage level is not same as references (as I expected it to be) - it varies from the start (see graph in OP), and even when it settles it's not at the same level as refs (it's about 1.12 - 1.14). So if I subtract reference from output I'll think that I am rotating. I emailed ST (gyro mfg.) but haven't heard anything yet...So until I figure this out I just calculate average at the beginning an go from there
  • T3
    Hi, you wrote that you left VREF's unconnected. When checking Razor schematics we see, that board outputs are separated from gyros outputs by capacitor in all 3 axes and are tied to VREF with resistor. Meaning, that under static conditions, board signal Xout-1 and Yout-1 are same as VREF1 and Zout-1 is same as VREF2, this is guaranteed by board design. So you can get acceleration by subtracting VREF1 from Xout and Yout and VREF2 from Zout. If you do that, then you see gyro zero drift only if its rapid enough to make it through board's high-pass filter.
    I believe I wrote in another thread, what I think about high-pass filters in IMU in general, but they do cancel zero drift in static conditions.
  • @surva -hmm..I think everything is ok on the pics. Look at the connection diagram - it's the same wiring as in the later pic where you can see Razor on top of Arduino, I did use black wire to go from 3.3v to AREF so perhaps that's confusing you ( I had short piece of black wire around so I used it ...I should of used red to be consistent)
  • Is the connection pic (http://voidbot.net/razor-6dof.html) for the 6DOF Board and Arduino wrong ? I think he's swapped the 3.3V and the GND connections.
    voidbot.net
    This domain may be for sale!
This reply was deleted.