Using the 9-DOF sensors

Discussion in 'UDOO NEO' started by ftollenaar, Nov 3, 2015.

  1. ftollenaar

    ftollenaar New Member

    Joined:
    Jul 27, 2014
    Messages:
    13
    Likes Received:
    2
    I've started this threat as a general discussion on how to use the Neo's various IMU sensors. Please post your thoughts about accessing the data, calibrating the sensors and combining the results into meaningful metrics.

    My current objective is to develop a contribution to Jonny-Five OR a separate Node.js package that provides an API to retrieve and watch the following values: heading, rate-of-turn (ROT), yaw, pitch and roll, altitude (through the barometric pressure sensor?) and temperature. Related functions (calibration, validity of the data) should be in there too.

    Cheers,
    Fabian
     
    Last edited: Nov 3, 2015
    Richard McCausland likes this.
  2. ftollenaar

    ftollenaar New Member

    Joined:
    Jul 27, 2014
    Messages:
    13
    Likes Received:
    2
    I've been playing with the sensors quite a bit now. Reading data is no problem, but a few things are not clear:
    - Is the mag sensor tilt-compensated?
    - Do the sensors auto-calibrate or is this something we need to do in software?
    - Do the axis of the sensors align?

    @Andrea Rovai - can you clarify?
     
    Last edited: Nov 7, 2015
  3. ftollenaar

    ftollenaar New Member

    Joined:
    Jul 27, 2014
    Messages:
    13
    Likes Received:
    2
    The first module is out: barometric pressure utilities. It's written in Node.js (so get node.js v4.x or greater) and provides a command-line interface for quick data fetching.

    Installation:
    Code:
    npm install [-g|-s] neo-barometer
    GitHub: https://github.com/fabdrol/neo-barometer
     
  4. Mateusz

    Mateusz New Member

    Joined:
    Nov 22, 2015
    Messages:
    14
    Likes Received:
    4
    Is it possible to use SPI to fetch the data from the sensors ? Seems unlikely from the schematics, but I might be wrong. Anyone can confirm ?
     
  5. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
    @Mateusz no, it shouldn't be possible. Anyway, what frequency you need for these sensors?
     
  6. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
    @ftollenaar: I haven't answered yet, but I do want you to know this is high-priority task
     
  7. Mateusz

    Mateusz New Member

    Joined:
    Nov 22, 2015
    Messages:
    14
    Likes Received:
    4
    The I2C might be quite limiting when it comes to reading data, it is only 400kHz. I am not much into technical details, and I might not be right here, but roughly I2C sends 1 bit start + 7 bits address + 1 bit read or write + 8 bits register address + 1 bit stop. That's 18 bits, rounding it up to 20, I also need both edges so 40 cycles to transfer single I2C command. I assume the response looks similar, that would make it 80 cycles.
    That's 1/400 000 * 80 cycles * 1000 = ~0.2ms right ? If I would read 3 sensors that makes it 0.6ms update rate.

    But I just looked at the sensors, they're only 800Hz sampling which I guess makes I2C sufficient but copters use at least 8kHz gyro, and probably wider range accel, so I am not sure if those sensors can be used for stabilization and if I2C can. Though, I might be wrong.

    Would be really nice if sensor was connected via SPI with max 10Mhz speed and gyro was 8kHz.
     
  8. ftollenaar

    ftollenaar New Member

    Joined:
    Jul 27, 2014
    Messages:
    13
    Likes Received:
    2
    @Andrea Rovai have you had a moment to look at my questions? I've been looking into software for tilt-compensating the compass using the Gyro/accelometer and calibration, but I have no idea where to start. Some help would be appreciated, that way I can give back to the community.
     
  9. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
    [​IMG] Dear @ftollenaar,
    please forgive for such a late reply.
    Here is an explanatory picture, tomorrow I'll put it in the docs.
    Tell me for any question you got.
     

    Attached Files:

Share This Page