Teensy 3.0 + Free IMU?

Status
Not open for further replies.

helium

Member
Hi all, first post here :) .

I am planning a quadrocopter project, and have decided to use Teensy 3.0 as the brains of the quad, since it's much more powerful and capable than any other similarly-sized Arduino-esque microcontrollers I've found (Pro Mini, Pro Micro, Nano, etc...). Also, I just think the Teensy is a wonderful board and haven't gotten the chance to play with it yet, so maybe this will be a good opportunity. Also, my first quad project :D .

I want to use the FreeIMU v0.4 board together with the Teensy 3.0. On the software side, I want to use the FreeIMU library designed for this board. I had come across this thread: http://freeimu.varesano.net/node/34 in which Fabio (designer of FreeIMU) and Paul discussed getting Teensy3.0 to work with FreeIMU, and from that I got the impression that the FreeIMU library would indeed work with Teensy 3.0.

But I'm not sure, so I ask: Does Teensy 3.0 currently work with the latest FreeIMU library/software? As well as interfacing hardware-wise with the FreeIMU v0.4 board?

And what if I instead use a different IMU board that's supported by the FreeIMU library?

And how should I configure the FreeIMU library/software specifically for the Teensy?

I know the best way to find the answer would be to pick up a Teensy and IMU myself, but I'm on a limited budget :)
So hopefully someone here has experience with this.

Thanks.
 
Hi, I saw on another forum that you had achieved 1 kHz sampling with the Teensy 3 and the FreeIMU with the MPU6050? Would you possibly be able to share how you achieved it?

I had attempted high sampling rates using a SparkFun breakout board that I had, but was getting invalid data in the FIFO, not sure if this was because the breakout had 10k resistors instead of the recommended 3k. Also, the FIFO was also overflowing at 1 kHz, which I had thought was due to the I2C speed (until I saw that you had done it).

Thank you in advance for any help!
 
So, I've got the FreeIMU stuff working quite well with Teensy 2.0 and 3.0... As soon as I add WS2811 Led strip the IMU stops giving reliable data.

This feels like a Timers issue. Any one have experience with this? I've tried the FastLED and NeoPixel Libraries for driving led strips.

thanks!

-matt
 
Here is the code Im testing with:

#include <ADXL345.h>
#include <bma180.h>
#include <HMC58X3.h>
#include <ITG3200.h>
#include <MS561101BA.h>
#include <I2Cdev.h>
#include <MPU60X0.h>
#include <EEPROM.h>

//#define DEBUG
#include "DebugUtils.h"
#include "CommunicationUtils.h"
#include "FreeIMU.h"
#include <Wire.h>
#include <SPI.h>

#include "FastLED.h"

#define SPINE_COUNT 30
#define SPINE_PIN 6
CRGB leds[SPINE_COUNT];


#define LED 13



int raw_values[9];
//char str[512];
float ypr[3]; // yaw pitch roll
float val[9];

// Set the FreeIMU object
FreeIMU my3IMU = FreeIMU();

void setup() {
Serial.begin(57600);
Serial.println("hi");

FastLED.addLeds<NEOPIXEL, SPINE_PIN>(leds, SPINE_COUNT);
Wire.begin();

pinMode(LED,OUTPUT);
my3IMU.init(); // the parameter enable or disable fast mode
delay(5);
}

void loop() {

digitalWrite(LED, HIGH);

my3IMU.getYawPitchRoll(ypr);

Serial.print("Yaw: ");
Serial.print(ypr[0]);
Serial.print(" Pitch: ");
Serial.print(ypr[1]);
Serial.print(" Roll: ");
Serial.print(ypr[2]);
Serial.println("");

static uint8_t hue = 0;

// WHEN THIS NEXT LINE COMMENTED OUT I GET GOOD IMU DATAS
FastLED.showColor(CHSV(hue++, 255, 255));

delay(10);
}
 
First, try the easiest thing: add a 100 ms delay at the beginning of setup(). There've been "starting too soon" issues with FreeIMU and NeoPixel stuff.

Regarding the code in #6, which Teensy and which IMU sensor(s) are connected? Those details matter...
 
Status
Not open for further replies.
Back
Top