I2C Addresses

273 views
Skip to first unread message

Nitay Megides

unread,
Aug 31, 2015, 4:42:53 AM8/31/15
to drones-discuss
Hello,

I'm developing a sensor i'd like to integrate with Ardupilot, and I'm wondering which I2C address could I give it without causing a address collision.
Is there a table of some sort that specifies all the I2C sensors Ardupilot uses and their I2C addresses?

Thanks
Nitay

Randy Mackay

unread,
Aug 31, 2015, 7:30:58 AM8/31/15
to drones-...@googlegroups.com

Nitay,

 

     I don’t know of a list that’s maintained anywhere.  I did a quick search through the code and these are the addresses I came up with:

     Airspeed sensor (MS4525DO) = 0x28

     Solo Smart battery = 0x0B

     Compass (MS5843) = 0x1E

     Toshiba LED = 0x55

     Maxbotix I2C Sonar = 0x70

     Pulsed Light Lidar = 0x62

 

-Randy

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nitay Megides

unread,
Aug 31, 2015, 7:47:12 AM8/31/15
to drones-discuss
Thanks Randy!
(The IR-Lock integration looks great by the way)

Do you reckon such list should go in the Wiki?

Thanks
Nitay

Andrew Tridgell

unread,
Aug 31, 2015, 8:50:01 AM8/31/15
to Nitay Megides, drones-discuss
Hi Nitay,

It depends on the type of sensor of course, but it is really nice when
the sensor has a settable I2C address. I've just added support for the
LightWare I2C Lidar and having the address be settable and stored in the
Lidars eeprom is very nice.

I'd also recommend having a WHOAMI register for the device so drivers
can be sure a sensor on the address is the one they want. That means if
we do have address conflicts we can at least tell them apart.

What sensor are you developing?

Cheers, Tridge

Nitay Megides

unread,
Sep 1, 2015, 4:55:39 AM9/1/15
to drones-discuss, nit...@gmail.com
Thanks for the tips! Added a WHOAMI register, A settable address is a problem for us at the moment. But I guess we'll add it when needed.

We're developing a camera capable of receiving commands from Ardupilot and reporting all kinds of info.
I'll give a proper introduction to the diy community (hopefully) in the near future.

I gotta say I expected implementing an I2C module will be the easiest way to go - Then I ran into this post (After a lot of tinkering around with the code). Is there a better way to implement an I2C device without adding a driver to the firmware?

Also, what's the preferred interface for adding devices to the pixhawk?

Al B

unread,
Feb 27, 2016, 6:57:59 PM2/27/16
to drones-discuss, nit...@gmail.com
Hi Tridge,

Copter-3.3.3 was released this week and the release note indicates that it supports Lightware I2C.  I tried to test it using the APM instructions, but “sonarrange” just displays 0 in MP.

You mention that "is really nice when the sensor has a settable I2C address", do I need to change the sensor default 0x55 address to something else?

TIA!
Reply all
Reply to author
Forward
0 new messages