Author Topic: Moteino Mega + Lora + GY-521  (Read 2215 times)

arimus

  • NewMember
  • *
  • Posts: 3
Moteino Mega + Lora + GY-521
« on: January 12, 2020, 07:18:08 PM »
Hey all,

I've been trying to track down a way to connect a GY-521 to my Moteino Mega. The issue that I'm having is that I can't seem to detect it, no matter which method I use to scan (e.g. i2c_detect, etc.).

From what I can discern from other posts, the LMIC chip is using i2c, but I should be able to add at least one other i2c device into the mix without too much trouble. I've looked at the pin-out (https://lowpowerlab.com/forum/general-topics/hook-moteino-mega-wlmic-to-public-lorawan/) and I should be using pins 16 (SCL) and 17 (SDA) as marked on the headers, which map to pins 19 & 20 on the chip.

I've tried resistors for the SDA/SDL pins from 3.3K -> 50K with no change.

Has anyone successfully connected another i2c device? Any assistance would be appreciated.


Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Moteino Mega + Lora + GY-521
« Reply #1 on: January 13, 2020, 10:33:17 AM »
I see you have 4.7k (?) resistors on the MEGA. That is enough for your I2C bus. You should not add more resistors elsewhere.
This value is a good overall value, can vary depending on project conditions, clock speed etc. But 10K is the most I would go. If you have 4.7K that is enough.
If another sensor has i2c pullups to the same 3.3V bus on the MEGA, they will contribute to the total resistance (parallel resistance).
And yes you can have multiple I2c devices on the same bus as long as they have different addresses (or are configured to distinct addresses if they do happen to have the same default address).

arimus

  • NewMember
  • *
  • Posts: 3
Re: Moteino Mega + Lora + GY-521
« Reply #2 on: January 13, 2020, 02:43:53 PM »
Thanks for responding!

Yeah, then not sure what's going on. This is a brand new accelerometer board and I've tried without the extra resistors, as the picture shows. Those resistors on the board tie into the eui-64 chip, which appears to be inline and functioning. I just can't seem to get the other device to respond, which is supposed to be on 0x68 by default. I've also tried swapping it to 0x69, but it isn't responding still. All the Lora stuff has worked great with these so far btw. I'll try my other moteino just to verify.

arimus

  • NewMember
  • *
  • Posts: 3
Re: Moteino Mega + Lora + GY-521
« Reply #3 on: January 19, 2020, 08:29:36 PM »
Just an update. I swapped which moteino mega I was using and the accelerometer module detected immediately on 0x68 with the basic i2detect code. Same setup and same resistors, but I will have to trace everything and ensure my soldering job didn't cause a problem on this unit.

Thanks again for the quick response.