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
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?
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
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 ?
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.
@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.
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.