Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 9 of 9

Thread: Teensy 3.0 how many Gyros can it support

  1. #1

    Teensy 3.0 how many Gyros can it support

    Hey I want to use multiple Gyros on a teensy 3.0

    How many Gyros Accelerometers and Magnetometers ( IMU ) can it support?

    I read about multiplexing...would this help?

    I would like to hook up as many as possible without having to go to another teensy

  2. #2
    Senior Member
    Join Date
    Jan 2014
    Location
    London, UK
    Posts
    122
    Most gyros use either an I2C or SPI interface, these support multiple devices so you can pretty much have as many as you need... Not trying to pry, but you only really need one, more will only give you the same answer...

  3. #3
    Well I'm trying to record rotation and position of joints(arm). So every joint would need an imu. OK so my main concern is recovering all the data and using it through midi. Right now I have a couple potentiometers doing it and they work great. Each pot gives a rotation value of 0-127. How would I collect the gyro accel and magno data? I imagine there's more math involved.?

  4. #4
    Senior Member
    Join Date
    Jan 2014
    Location
    London, UK
    Posts
    122
    Here is the data sheet for the gyro I use in my UAV designs...

    http://dlnmh9ip6v2uc.cloudfront.net/...-MPU-9150A.pdf

    The unit gives the offset from its normal position, no maths really needed, they offer various units.

  5. #5
    Thanks for the info. Which do you recommend for joint movement? I've seen all types. I'm looking to put all the sensors In a small box. Like as small as a cigarette box.

  6. #6
    Senior Member
    Join Date
    Jan 2014
    Location
    London, UK
    Posts
    122
    Well, the 9150 I use has a compass so probably overkill for your project.

    The 3050 might be suitable for you, cheap and small

    All the 3050s could be strung on a single I2C bus (I think the spec allows quite long link lengths), with the teensy as the master perhaps clipped to your belt with a couple of AAs for power.

  7. #7
    Quote Originally Posted by bloodline View Post
    Here is the data sheet for the gyro I use in my UAV designs...

    http://dlnmh9ip6v2uc.cloudfront.net/...-MPU-9150A.pdf
    Page 15: 6.5 Electrical Specifications
    I2C ADDRESS
    AD0 = 0 -> Adress 1101000
    AD0 = 1 -> Adress 1101001

    As i understand it, only two of these devices on the same I2C bus!?

  8. #8
    Senior Member
    Join Date
    Mar 2013
    Location
    Austin TX
    Posts
    429
    Quote Originally Posted by aikx View Post
    Page 15: 6.5 Electrical Specifications
    I2C ADDRESS
    AD0 = 0 -> Adress 1101000
    AD0 = 1 -> Adress 1101001

    As i understand it, only two of these devices on the same I2C bus!?
    It is a pretty common situation. Many small slave devices only have a limited set of address options and will collide with each other on the same bus. It is why bus multiplexers exist.

    However, the Teensy 3.1 can operate as a Master on 4 I2C buses (multiplexing two sets of output pins on each of the two buses). With that you could conceivably hook up to 8 devices (two on each bus). Refer to the quad_master example here: http://forum.pjrc.com/threads/21680-...ry-for-Teensy3

  9. #9
    Senior Member
    Join Date
    Jan 2014
    Posts
    189
    I don't understand why you are using a gyroscope? If you are replacing a pot, then you would want absolute angle which a gyroscope won't give you. A gyroscope provides angular velocity. Still would produce 0 degrees/second.

    If you want an absolute measure (inclinometer) you could use an accelerometer. I use the ADXL345. Adafruit has an excellent tutorial and Arduino code for SPI. You would not be limited to any number of devices with SPI. The accelerometer measures acceleration and since you are interested in absolute angle, you could simply consider your local accelerations (movement) to be insignificant compared to the 1g gravity always imposed. Simple trig gets you to the 3d angle you desire. This will take a bit of math.

    The IMU6150 has an accel/gyro and the IMU9150 has accel/gyro/compass and the fusion in the device can provide the Euler angles for you thus requiring no additional trig. However, and a big however, the code for the 9150 is not for beginners and most of the available code DOES NOT WORK.


    Richard

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •