Help with I2C devices

Discussion in 'UDOO NEO' started by Vinz87, Jan 16, 2016.

  1. Vinz87

    Vinz87 UDOOer

    Joined:
    Nov 11, 2015
    Messages:
    105
    Likes Received:
    19
    Hi,
    I managed to properly connect to the temperature sensor, through the brick snap in port. I see the device on I2C bus 1 with address 0x48 and I can read its register without problems.

    I would like to connect another I2C device (IMU MPU9265), do I have to export GPIOs in order to connect it to one of the 4 I2C buses? Or I just need to wire the Vcc pin to the 5V or 3V3 pin on Neo, the GND pin to one of the GND pin on Neo, and SCL/SDA to pins SCL/SDA of the internal row on Neo?
    I did just that and I can't see the device appear on any of the four buses with i2cdetect. Connecting it to those pins I should see it on I2C2, i.e. with i2cdetect -y 1, right?
     
  2. Pilif

    Pilif New Member

    Joined:
    Jan 11, 2016
    Messages:
    15
    Likes Received:
    2
    I have to try about the GPIO but check what voltage your sensor package supports - does it have a voltage regulator from goggle I see that it is a 3V3 sensor - so don't just connect it to 5V ..
    you have to use the i2c 2 bus on the j5 header if you want to access it from linux (possible this can be changed)
    http://www.udoo.org/docs-neo/Hardware_&_Accessories/I2C.html

    http://www.udoo.org/docs-neo/img/gionji/DOCS_i2c_pads.PNG

    on i2c 4 you can have also other sensors and access them from linux, but they have to have a different address as the already connected Neo 9-axis motion sensors. i2c 4 is on the external pins not internal.
     
  3. Vinz87

    Vinz87 UDOOer

    Joined:
    Nov 11, 2015
    Messages:
    105
    Likes Received:
    19
    Therefore only pins 34/35 and 36/37 are accessible from Linux? Is this written somewhere in documentation?
    And do I have to export GPIOs to make the device appear on the I2C bus? Or should it appear as soon as I plug in all the wires?

    Actually I have no other device attached to I2C 4 bus since it's a Neo Basic. Instead I have the brick temperature sensor which is connected to I2C 2 bus. Whatever bus I connect the new sensor to, anyway, it should not be a problem since it's address should be different according to the datasheet
     
  4. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
    You can use the Device Tree Editor to make the pinmuxing.
    Anyway, all the external row of pins is accessible from Linux.
     
  5. Vinz87

    Vinz87 UDOOer

    Joined:
    Nov 11, 2015
    Messages:
    105
    Likes Received:
    19
    Thank you Andrea. Anyway, I'm a complete noob with I2C, what I would like to know is: as soon as I wire an I2C device to power, ground, SDA and SCL pins I should immediately see it with the command i2cdetect on the correct bus number, is it correct?


    Inviato dal mio iPhone utilizzando Tapatalk
     
  6. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240

Share This Page