How to use I2C board for a rangefinder and the compass from GPS

Hi I have a I2c board , I tried to connect the gps ( The compass from the gps ) and the lidar but I get an ‘Internal error x 0.800000" , ‘Compass 2 not found’ and "Rangfinder 1 was not detected’ So i need to figure out how to tell the pixhawk that there is 2 device on the i2c port. Thx

I would check your wiring it sounds like you have SDA and SCL mixed up.
does the LIDAR and compass work individually? if they do then its the patch cable to the i2c splitter.

1 Like

Thx for your reply : here’s a photo

You can see the red and black wires on the rangefinder don’t line up with the red and black of the i2c patch wire. you need to re order the pins on the rangefinder as they are currently reversed.

that might be why i get this error : 'Rangefinder1 was not detected ’ ?

it will stop all devices on the i2c bus from working when you connect something backwards like that.

1 Like

I unpluged the rangefinder and the error 'internal error x80000 is gone ’

hey you might be right , even when i plug the rangfinder alone without the i2c board i get the error :‘Internal error x 0:8000’ and " Rangefinder 1 was not detected’

Are you on battery power or USB…You get that 8000 error while on USB.
Also the Lidar should be powered on it’s own and not from the flight controller…if you do it browns out and gives you a not found error.

Just some past experiences.

1 Like

I think this is the main issue , i don’t have a battery yet . I will try to get one this week . But what do you means by ’ Lidar should be powered on it’s own’ ? because i have a Tf mini plus and it came with only one cable directly connected to it with the i2c plug in the other end ( and it needs 5v, it is a small rangefinder) so I can’t see how i am supposed to powered it other than with the pixhawk .
Thank you Ricky

Hey there.
So no battery then you will get that 8000 error for sure.
So for the I2C what I do is pull the two wires out for the LIDAR that supply ground and Positive and connect them to a dedicated BEC. If you read up on the TF Mini it can draw .5 amp or more depending on what it’s doing. Way to much for the FC to handle.

What I do on my builds is take the positive and ground off the main connector to the I2C hub and just connect SDA and SCL to the hub from the FC. Then I take a 5vdc bec and power the hub. This gives all I2C devices separate power source and takes teh demand off of the FC.

2 Likes

Thank you a lot mate you are the first one that actually take the time to help me .
Do you think i can do the same wiring as you but instead connect the positive and negative wire to a 5v ping on my pdb ?
Or i have another idea: I


Do you think if i do this instead and use the Serial 4/5 i will need to power the lidar to another source ? Because on the image it is clear that the gnd and positive are connected directly to the fc .

Sure same idea.
You just need to power it separate that’s all.
I do the hub because I move all power demands off the FC to make redundancy with external components. But what you want to do will work. Just get teh polarity right and your good to go.

1 Like

Thx a lot . I will let you know as soon as i get my battery :grinning:

Hi Ricky hope your doing well. I got my battery and connected my lidar directly on the i2c port with no modification but still arduxopter can’t find it. You told me to connect the 5v and ground connector to another source of power like the pdb so I conclude that the i2c port can’t deliver power. But I saw this :


So if I connect it via the serial 4/5 does it deliver power and then I wouldn’t have do wire the lidar to another source. Overall I will just have to change the connector of the lidar. Do you think it will work?

Hey Pierre.
I am well hope your the same. I think it’s sort of 50 50 whether it will provide enough power.
Also might I ask what version of TF Mini yo have. It needs to be the TF Mini Plus and not the S model.
I spent days trying to get the S Model to work only to find out it’s not compatible.
IF it is a mini plus try the separate power that may make the difference.

1 Like

I am good thx for asking. Yeah it’s a Tf mini plus. So you don’t think pluging it directly to the serial 4/5 will work? So i have to power it from the pdb if I understand correctly

Are you looking to run it as I2C or Serial.
And yes the best way is to run it from the PDB direct with it’s own supply. If you read the spec’s it can draw a lot of juice and that may be more then the FC can manage.
If I was you I would run it off the I2C and save your ports, but thats me. You may not have a need for them as I do.

cheers

1 Like

Well I already have my GPS on the i2c and I am not using the serial port.

I am sorry if I’m so annoying but I don’t want to touch the connectors or wire before I am sure or at least condident that it will work.