1 2 Previous Next 21 Replies Latest reply on May 20, 2016 2:00 AM by IoT_srinivas

    BMP180 on I2C with mini breakout ...

    Fab-Lab.eu

      made some progress with I2C sensor connected to the mini breakout board:

       

      root@fablab:~# i2cdetect -y -r 6

           0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

      00:          -- -- -- -- -- -- -- -- -- -- -- -- --

      10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

      20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

      30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

      40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

      50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

      60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

      70: -- -- -- -- -- -- -- 77 

       

      shows the sensor … on address 77 - great, but when running BMP180 cylon.js example I do get strange values back, any hint?

       

      root@fablab:~# node cylon_bmp180_edison.js

      I, [2014-10-28T02:04:48.915Z]  INFO -- : Initializing connections.

      I, [2014-10-28T02:04:48.930Z]  INFO -- : Initializing connection 'edison'.

      D, [2014-10-28T02:04:48.933Z] DEBUG -- : Loading adaptor 'intel-iot'.

      D, [2014-10-28T02:04:49.172Z] DEBUG -- : Registering intel-iot adaptor for Robot 26309

      D, [2014-10-28T02:04:49.172Z] DEBUG -- : Registering upm-hmc5883l Driver for Robot 26309

      D, [2014-10-28T02:04:49.173Z] DEBUG -- : Registering upm-lcm1602 Driver for Robot 26309

      D, [2014-10-28T02:04:49.174Z] DEBUG -- : Registering upm-jhd1313m1 Driver for Robot 26309

      D, [2014-10-28T02:04:49.186Z] DEBUG -- : Registering i2c BlinkM driver for Robot 26309

      D, [2014-10-28T02:04:49.197Z] DEBUG -- : Registering i2c HMC6352 driver for Robot 26309

      D, [2014-10-28T02:04:49.199Z] DEBUG -- : Registering i2c MPL115A2 driver for Robot 26309

      D, [2014-10-28T02:04:49.200Z] DEBUG -- : Registering i2c BMP180 driver for Robot 26309

      D, [2014-10-28T02:04:49.201Z] DEBUG -- : Registering i2c MPU6050 driver for Robot 26309

      D, [2014-10-28T02:04:49.201Z] DEBUG -- : Registering i2c LCD driver for Robot 26309

      D, [2014-10-28T02:04:49.202Z] DEBUG -- : Registering i2c LSM9DS0G driver for Robot 26309

      D, [2014-10-28T02:04:49.203Z] DEBUG -- : Registering i2c LSM9DS0XM driver for Robot 26309

      I, [2014-10-28T02:04:49.210Z]  INFO -- : Initializing devices.

      I, [2014-10-28T02:04:49.212Z]  INFO -- : Initializing device 'bmp180'.

      D, [2014-10-28T02:04:49.216Z] DEBUG -- : Loading driver 'bmp180'.

      I, [2014-10-28T02:04:49.226Z]  INFO -- : Starting connections.

      I, [2014-10-28T02:04:49.231Z]  INFO -- : Connecting to 'edison'.

      I, [2014-10-28T02:04:49.240Z]  INFO -- : Starting devices.

      I, [2014-10-28T02:04:49.241Z]  INFO -- : Starting device 'bmp180'.

      I, [2014-10-28T02:04:49.265Z]  INFO -- : Working.

      getTemperature call:

        Temp: 89.5 C

      getPressure call:

        Temperature: 89.5 C

        Pressure: 461230 Pa

      getAltitude call:

        Temperature: 89.5 C

        Pressure: 461230 Pa

        Altitude: -14819.812087235687 m

        • 1. Re: BMP180 on I2C with mini breakout ...
          DiegoV_Intel

          Hi Fab-Lab.eu,

           

          I'm not familiar with this sensor but I was checking the datasheet of it. The datasheet mention that SCL and SDA signals needs a pull-up resistor from 2.2 kohm to 10 kohm, and also I'm not sure if the value read needs a proper conversion to get the true value, or if the calibration required is correct. I'd suggest you to take a look to the datasheet in order to check these details: BMP180 Datasheet.

           

          Regards,

          Diego.

          • 2. Re: BMP180 on I2C with mini breakout ...
            Fab-Lab.eu

            Diego, All,

             

            yes and no ;-) I am using th Cylon library for communication with the BMP180 sensor - I guess they have done a good job on this part,

            the issue might be the access to I2C, I wired to I2C-6-SCL and I2C-6-SDA as supported by the MRAA library … the i2cdetect showed

            the sensor on address $77 - all good … but still strange values ...

             

            o anyone out their made experience with I2C?

            o i2cdetect -y -r 6 worked well, but now it shows only strange behavior while sending system message … any experience on this?

            • 3. Re: BMP180 on I2C with mini breakout ...
              faceplant

              I'm afraid I can't be of much help, since you've gotten father than I have.  I have yet to detect anything on any Edison I2C bus.  I've tried several devices on the Arduino breakout without any success, and now I'm working on a custom board with an ms5611 and an mpu9250 with no success.

               

              In my case, the mpu9250 is connected to i2c1 directly using 1.8V I/O.  The ms5611 is connected to i2c6 via a logic level converter.  I can't see either device when I do i2c detect.

               

              The mpu9250 is a much more complex device that could easily have soldering issues, etc, so I've been concentrating on the ms5611.  I have confirmed that the bus is being pulled up on both sides of the level converter.  I also see I2C signals being sent to the ms5611, but no response on i2cdetect.  I've checked the solder joints, schematics, and even replaces the ms5611 with no effect.

               

              Could you please provide more details on how you connected your bmp180 to the breakout board (level converters, pullups, etc).  Also, what do you do to configure the i2c bus?

              • 4. Re: BMP180 on I2C with mini breakout ...
                Fab-Lab.eu

                I am using the Sparkfun BMP180 breakout - all on 1.8V no level shifter needed:

                 

                + >> J19-2 (V_V1P80)

                - >> J19-3 (GND)

                SCL >> J17-7 (I2C-6-SCL)

                SDA >> J17-9 (I2C-6-SDA)

                IO >> not connected, default connected to +

                 

                As said in my first testing on build 68 I got success with the i2cdetect showing the BMP180 on address 0x77 (see above)

                but since the last reboot (even I did install a fresh image) i2cdetect is NOT of success any more … ??

                • 5. Re: BMP180 on I2C with mini breakout ...
                  Fab-Lab.eu

                  just added a pic - using my "breadboard hook" for the mini breakout (check project section for an how-to) -

                  showing the wiring ...

                  bmp.jpg

                  • 6. Re: BMP180 on I2C with mini breakout ...
                    faceplant

                    Ah, so you're running it at 1.8V.

                     

                    Since you're not seeing it anymore, have you tried running cylon.js again and then trying i2c detect?  Maybe cylon.js reconfigures the i2c port.

                    • 7. Re: BMP180 on I2C with mini breakout ...
                      Fab-Lab.eu

                      root@fablab:~# i2cdetect -l

                      i2c-1 i2c       i2c-designware-1                 I2C adapter

                      i2c-2 i2c       i2c-designware-2                 I2C adapter

                      i2c-3 i2c       i2c-designware-3                 I2C adapter

                      i2c-4 i2c       i2c-designware-4                 I2C adapter

                      i2c-5 i2c       i2c-designware-5                 I2C adapter

                      i2c-6 i2c       i2c-designware-6                 I2C adapter

                      i2c-7 i2c       i2c-designware-7                 I2C adapter

                      i2c-8 i2c       PMIC I2C Adapter                 I2C adapter

                       

                      root@fablab:~# i2cdetect -y -r 1

                           0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

                      00:          -- -- -- -- -- -- -- -- -- -- -- -- --

                      10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

                      20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

                      30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

                      40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

                      50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

                      60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

                      70: -- -- -- -- -- -- -- -- 

                       

                      so far so good - now with scan for I2C-6 I get only this panic response ...

                       

                      root@fablab:~# i2cdetect -y -r 6

                           0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

                      00:          --

                      Broadcast message from systemd-journald@fablab (Wed 2014-10-29 19:42:46 UTC):

                      kernel[187]: [  340.709567] CPU: 0 PID: 296 Comm: i2cdetect Tainted: G        W  O 3.10.17-poky-edison+ #1

                      Broadcast message from systemd-journald@fablab (Wed 2014-10-29 19:42:46 UTC):

                      kernel[187]: [  340.709572] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 466 2014.06.23:19.20.05

                      Broadcast message from systemd-journald@fablab (Wed 2014-10-29 19:42:46 UTC):

                      kernel[187]: [  340.709579] task: f51426f0 ti: f64f0000 task.ti: f64f0000

                      Broadcast message from systemd-journald@fablab (Wed 2014-10-29 19:42:46 UTC):

                      kernel[187]: [  340.709641] Stack:

                      Broadcast message from systemd-journald@fablab (Wed 2014-10-29 19:42:46 UTC):

                      kernel[187]: [  340.709712] Call Trace:

                      Broadcast message from systemd-journald@fablab (Wed 2014-10-29 19:42:46 UTC):

                      kernel[187]: [  340.710210] Code: b3 ff ff 89 f8 09 d0 80 ce 04 83 ff 02 0f 44 c2 8b 15 54 8b b0 c1 89 82 00 b3 ff ff f7 c6 00 02 00 00 74 14 e8 67 f7 0a 00 56 9d <83> c4 04 5b 5e 5f 5d c3 90 8d 74 26 00 56 9d e8 51 f3 0a 00 83

                      Broadcast message from systemd-journald@fablab (Wed 2014-10-29 19:42:46 UTC):

                      kernel[187]: [  340.710235] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G        W  O 3.10.17-poky-edison+ #1

                      Broadcast message from systemd-journald@fablab (Wed 2014-10-29 19:42:46 UTC):

                      kernel[187]: [  340.710240] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 466 2014.06.23:19.20.05

                      Broadcast message from systemd-journald@fablab (Wed 2014-10-29 19:42:46 UTC):

                      kernel[187]: [  340.710249] task: f6c83d30 ti: f6e1c000 task.ti: f6e1c000

                      ...

                      • 8. Re: BMP180 on I2C with mini breakout ...
                        faceplant

                        That one I know...  You need to configure i2c6.  By default it's configured as just GPIO.

                         

                        This is working from memory, but I believe the command id:

                         

                        echo "mode1" > /sys/kernel/debug/gpio_debug/gpio27/current_pinmux

                        echo "mode1" > /sys/kernel/debug/gpio_debug/gpio28/current_pinmux

                        • 9. Re: BMP180 on I2C with mini breakout ...
                          Fab-Lab.eu

                          faceplant - great hint, it worked - cylon.js is going to configure something … see result! Btw still the measurement is not showing correct data ...

                          now we do need to understand what cylon.js is doing on the Edison platform to enable i2cdetect in bus 6 ???

                           

                          root@fablab:~# node bmp.js

                          I, [2014-10-29T19:51:21.375Z]  INFO -- : Initializing connections.

                          I, [2014-10-29T19:51:21.390Z]  INFO -- : Initializing connection 'edison'.

                          D, [2014-10-29T19:51:21.393Z] DEBUG -- : Loading adaptor 'intel-iot'.

                          D, [2014-10-29T19:51:21.768Z] DEBUG -- : Registering intel-iot adaptor for Robot 48775

                          D, [2014-10-29T19:51:21.768Z] DEBUG -- : Registering upm-hmc5883l Driver for Robot 48775

                          D, [2014-10-29T19:51:21.769Z] DEBUG -- : Registering upm-lcm1602 Driver for Robot 48775

                          D, [2014-10-29T19:51:21.770Z] DEBUG -- : Registering upm-jhd1313m1 Driver for Robot 48775

                          D, [2014-10-29T19:51:21.833Z] DEBUG -- : Registering i2c BlinkM driver for Robot 48775

                          D, [2014-10-29T19:51:21.895Z] DEBUG -- : Registering i2c HMC6352 driver for Robot 48775

                          D, [2014-10-29T19:51:21.895Z] DEBUG -- : Registering i2c MPL115A2 driver for Robot 48775

                          D, [2014-10-29T19:51:21.896Z] DEBUG -- : Registering i2c BMP180 driver for Robot 48775

                          D, [2014-10-29T19:51:21.897Z] DEBUG -- : Registering i2c MPU6050 driver for Robot 48775

                          D, [2014-10-29T19:51:21.898Z] DEBUG -- : Registering i2c LCD driver for Robot 48775

                          D, [2014-10-29T19:51:21.898Z] DEBUG -- : Registering i2c LSM9DS0G driver for Robot 48775

                          D, [2014-10-29T19:51:21.900Z] DEBUG -- : Registering i2c LSM9DS0XM driver for Robot 48775

                          I, [2014-10-29T19:51:21.906Z]  INFO -- : Initializing devices.

                          I, [2014-10-29T19:51:21.908Z]  INFO -- : Initializing device 'bmp180'.

                          D, [2014-10-29T19:51:21.911Z] DEBUG -- : Loading driver 'bmp180'.

                          I, [2014-10-29T19:51:21.923Z]  INFO -- : Starting connections.

                          I, [2014-10-29T19:51:21.930Z]  INFO -- : Connecting to 'edison'.

                          I, [2014-10-29T19:51:21.940Z]  INFO -- : Starting devices.

                          I, [2014-10-29T19:51:21.941Z]  INFO -- : Starting device 'bmp180'.

                          I, [2014-10-29T19:51:21.960Z]  INFO -- : Working.

                          getTemperature call:

                            Temp: 89.5 C

                          getPressure call:

                            Temperature: 89.5 C

                            Pressure: 461230 Pa

                          getAltitude call:

                            Temperature: 89.5 C

                            Pressure: 461230 Pa

                            Altitude: -14819.812087235687 m

                           

                          root@fablab:~# i2cdetect -y -r 6

                               0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

                          00:          -- -- -- -- -- -- -- -- -- -- -- -- --

                          10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

                          20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

                          30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

                          40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

                          50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

                          60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

                          70: -- -- -- -- -- -- -- 77 

                          • 10. Re: BMP180 on I2C with mini breakout ...
                            faceplant

                            It looks like cylon.js uses the MRAA library, which changes the pinmode just as I suggested.  From what I can tell, that's all it does, and I am already doing that, so I believe we're both just back to where we started.  You are seeing your device but getting garbage back, and I don't have anymore clues on how to get my device working...

                            • 11. Re: BMP180 on I2C with mini breakout ...
                              Fab-Lab.eu

                              are you using cylon.js as well?

                              • 12. Re: BMP180 on I2C with mini breakout ...
                                faceplant

                                No.  I'm just trying to get the device (any device) detected with i2cdetect.  I suppose I could try running it and see if it does anything magic.

                                • 13. Re: BMP180 on I2C with mini breakout ...
                                  Fab-Lab.eu

                                  now moving to command lines … will keep posting results

                                   

                                  root@fablab:~# i2cset -y 6 0x77 0xF4 0x2E

                                  root@fablab:~# i2cdump -y 6 0x77

                                  No size specified (using byte-data access)

                                       0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef

                                  00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

                                  10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

                                  20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

                                  30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

                                  40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

                                  50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

                                  60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

                                  70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

                                  80: a5 94 45 18 00 27 55 87 9f 63 1d 1e fb 88 c8 27    ??E?.'U??c?????'

                                  90: 85 48 62 14 3f 22 19 73 00 2c 80 00 d1 f6 0a c2    ?Hb??"?s.,?.????

                                  a0: a5 94 45 18 00 27 55 87 9f 63 1d 1e fb 88 c8 27    ??E?.'U??c?????'

                                  b0: 85 48 62 14 3f 22 19 73 00 2c 80 00 d1 f6 0a c2    ?Hb??"?s.,?.????

                                  c0: 00 00 bc 33 00 00 00 00 00 00 00 10 00 00 00 03    ..?3.......?...?

                                  d0: 55 02 06 00 00 00 00 00 00 00 00 00 00 00 00 00    U??.............

                                  e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

                                  f0: 00 00 00 00 0a 00 61 1c 00 00 00 00 00 00 00 00    ....?.a?........

                                  • 14. Re: BMP180 on I2C with mini breakout ...
                                    Fab-Lab.eu

                                    cool got it running! based on C ;-) (there is a thread [HowTo] BMP180/BMP085 Sensor über I2C am CB/CT)

                                     

                                    root@fablab:~# ./bmp

                                    Temperatur: 25.7 ?C

                                    Luftdruck: 965.94 hPa

                                     

                                    now as we know I2C-6 works, the Bosch BMP180 works - we need to fix cylon' s device driver ;-)

                                    1 2 Previous Next