Hi @Chris,
I am not sure if someone has asked already this question on forum before. The APM 2.5 has accelerometer, gyros, magnetometer, barometric pressure sensors.
Apart from this I wanted to use 4 IR sensors, 1 sonar and optimal flow sensors (which I believe would use I2C). From the APM2.5 board, I see that there is only one slot for I2C interface. I am looking forward to this is for obstable avoidance (4 IR's) and better stability (optical flow).
Could you help answer if such extensions are possible and if so how?
Thanks.
Replies
Hi Shyam,
Although the I2C bus is connected to GPS+Compass, I think we can connect multiple other I2C devices on the same bus (isnt that the purpose of having I2C instead of many I/O ports). I dont think there is a need to use another board. As long as you have unique addresses for all the devices on the i2c bus, you should be fine.
By the way, did you already integrate IR sensors? I am doing something similar so any info on your setup will be appreciated.
-Santosh
Hi Santosh,
I posted this over the forum a year and a half ago, I have moved on with other projects now;)
Your statement on the I2C is right. However, I did not integrate the IR sensors then for some reason or the other. If you do manage to integrate it on APM, I would love to hear about your setup.
I have added you as a friend on DIY.
Regards,
Shyam
Hi,
Well you can connect multiple devices to one I2C bus. The ATMEGA2560 has only one.
The optical flow sensor from DIYDrones for Ardupilot uses SPI. Better stability? I don't think it will help you with that. But it can improve position hold.
You can connect the IR sensors to available analog input (all analog signals, then).
Alternatively, you could use one more Arduino to connect all the sensors to, and then have it send all the measurements to Ardupilot (using some protocol of your choice or design), by SPI or by using UART2 serial, or maybe I2C.
Regards
Soren