Adding a external TI LMP91000 and LM4120 circuit to MetaMotionR via I2C

I would like to know after connecting the custom build board with Texas Instrument analog front-end chip (LMP91000) and a reference voltage controller (LM4120) to metaMotionR pin 3, 5, 6, 7, and 8 (See diagram). How can I
1. make MetaMotionR supply the Regulated 3V output from pin 7 to the peripheral board.
2. Read the values from pin 8?
3. Do I need to change the code in the firmware of your BLE controller or just the code in MetaBase App or do something else?
datasheet of LMP91000, LM4120, and schematic diagram of the peripheral boad are attached

diagram =

Comments

  • @wee said:
    1. make MetaMotionR supply the Regulated 3V output from pin 7 to the peripheral board.

    It should supply the voltage once the board is powered

    1. Read the values from pin 8?

    Use the APIs to read the gpio voltages

    1. Do I need to change the code in the firmware of your BLE controller or just the code in MetaBase App or do something else?

    You will need to write your own app

  • @Eric Thanks! Could I modify the code from your MetaBase App and use it to read from pin 8?

  • @Eric do I need to use gpio.pin((byte) 7).setOutput() to instruct MetaMotionR board to supply me with a 3V output to my peripheral board?

  • There is no gpio pin 7. The pin 7 in your diagram is explained in the product specification, sections 2.3 and 2.4.

    https://mbientlab.com/documents/MetaMotionR-PS3.pdf

  • thanks! So I can take it board pin 7 is always alive with 3V for powering any peripheral devices?

  • @wee said:
    thanks! So I can take it board pin 7 is always alive with 3V for powering any peripheral devices?

    Quoting myself from last month...

    @Eric said:

    @wee said:
    1. make MetaMotionR supply the Regulated 3V output from pin 7 to the peripheral board.

    It should supply the voltage once the board is powered

  • @Eric I use the following example codes to read in register values from the bmp280 sensor on my MetaMotion R board but i keep getting null result. it should be 0x58 right?

    // Reads the ID register (address 0xd0) from the BMP280 barometer (rpro, cpro, motion)
    serialPassthrough.readI2cAsync((byte) 0x77, (byte) 0xd0, (byte) 1)
    .continueWith(new Continuation<byte[], Void>() {
    @Override
    public Void then(Task<byte[]> task) throws Exception {
    Log.i("MainActivity", String.format("bmp280 id = %d", task.getResult()));
    return null;
    }
    });

    05-30 12:34:53.117 10699-10710/com.mbientlab.metawear.tutorial.starter I/MainActivity: bmp280 id = null

  • Please format your code.

  • // I2C Setting up LM9100
            SW_I2C=view.findViewById(R.id.i2c_ctrl);
            SW_I2C.setOnCheckedChangeListener((buttonView, isChecked) -> {
                serialPassthrough = metawear.getModule(SerialPassthrough.class);
                Log.i("I2C Switch State=", "" + isChecked);
                if (isChecked) {
                    // Reading LM9100 Slave address 1001000 or 0x48. Status Reg = 0x00
                    serialPassthrough.readI2cAsync((byte) 0x48, (byte) 0x00, (byte) 1)
                            .continueWith(new Continuation<byte[], Void>() {
                                @Override
                                public Void then(Task<byte[]> task) throws Exception {
                                    //Log.i("MainActivity", String.format("Register Value = %d", task.getResult()));
                                    Log.i("MainActivity", "Register Value = " + task.getResult());
                                    return null;
                                }
                            });
                    // Reads the ID register (address 0xd0) from the BMP280 barometer (rpro, cpro, motion)
                    serialPassthrough.readI2cAsync((byte) 0x77, (byte) 0xd0, (byte) 1)
                            .continueWith(new Continuation<byte[], Void>() {
                                @Override
                                public Void then(Task<byte[]> task) throws Exception {
                                    Log.i("MainActivity", String.format("bmp280 id = %d", task.getResult()));
                                    return null;
                                }
                            });
                } else {
                    metawear.tearDown();
                }
            });
    
  • @wee said:
    @Eric I use the following example codes to read in register values from the bmp280 sensor on my MetaMotion R board but i keep getting null result. it should be 0x58 right?

    Yes, it should be 0x58. Check what Exception the task is returning if the result is null.

Sign In or Register to comment.