I’m trying to connect an Arduino micro to the Pixhawk through the i2c port.
Actually it doesn’t works, I think it depends on voltage levels of the i2c bus.
You can get a 3V Arduino mini as compared to a 5V one., then you dont need a level translator. The 3v one is the same microcontroller but it runs at 8MHz rather than 16 MHz so has a different crystal. You need to select it in the Arduino IDE to get the right timings etc
If you do that you should have no problem wiring it up. You can just wire the I2C pullups to 3.3V and it should work easy, just beware that you may need a 3v FTDI I think, you will have to chaeck that
Hi,
I’m doing something similar by connecting an arduino over I2C to simulate a Maxbotix sonar (with the cheap ultrasonic distance sensor). It turned out i have to remove the bootloader from the arduino, because it booted too slow, therefore the arducopter did not recognize it.
If you have some similar issue, try powering the arduino before powering the pixhawk (or pixracer) OR restart the arducopter program from NSH shell.
Hope this helps.
Hi Marcell,
thanks for sharing your experience, your project is pretty similar with what I’m doing.
Actually I’m far to get it to works, after I have tried to connect an Arduino micro through i2c, it’s bricked out and stops to work after few seconds it’s powered!
Hi,
Im using special board:
Ultrasonic Sonar module dedicated for APM 2.5 2.6 2.8 flight controller, plug and play, no need to change hardware and software http://s.aliexpress.com/2yqYVZni
(from AliExpress Android)
It has a hc sr04 and an atmega328, where i modified the software to provide i2c instead of pwm. Shared it on this forum. Please check my topics created.
Hi skyscraper, im having issues with my maxbotix mb 1202 and mb 1242, i would like connect it on my arduino mini pro, do you mind share the correct wiring of the sensor on the arduino mini pro board and the ino file for the configuration.
Hope in a your positive answer
I’ve already try i don’t know how many times, and also i saw that every
time you upload sketch on the arduino one im having errors even im
following the instructions of the site