I’m new at this Forum and have to say that my english is not the best, but I do my best to make my problem clear.
For my schoolproject I have to use the Pixhawk on the Iris-Copter. On the Pixhawk I have to add up to six sonar sensors Mb1200. I have to write a program for the Pixhawk. With the program and the sonars the Copter should be able to see obstacles and move around them.
For this Problem I have a few starter questions:
Is it possible to add so much Sonars? ( I have seen the thread about analog sonars on Pixhawk on the site: copter.ardupilot.com/wiki/common … ix-analog/
But can I add some of the sonars on the analog Inputs 3.3V and some on the Serial Input 4/5?
What are the names of this Pins and how can I configure them all?
Is there any Software with a grafical userinterface to write the program and load it on the Pixhawk? My teacher said, that I should use the arduino Software, but as I find out, arduino Software don’t know anything from the Pixhawks core.
@NewRox,
I have successfully used only two analog Maxbotix MB1240 sonars on the Pixhawk ADC 3.3v inputs as there are only two inputs.
The Pixhawk STM32 processor is not programmable with the Arduino IDE.
About the only way to support more than two sonars is to use the Maxbotix I2C capable sonars which will probably require additional code for the additional sonars.
Here is how I connected two Maxbotix MB1240 analog sonars to a Pixhawk: http://ardupilot.com/forum/viewtopic.php?f=36&t=8124
Regards,
TCIII AVD
So, is there also no possibility to multiplex the signals? I ask because I have on this I2C Connection something else. The only Plug-Ins I have free to use are: Serial 4/5, SPKT/DSM, ADC 3.3V, SPI, CAN and ADC 6.6 V. But the last one doesn’t help me anything, because the sonar hase a voltage range between 3.3V and 5V.
Because my i2c is already in use, I think I have to do it as TCIII has described. Ithink this is also the easier way to do it, because no seperate Arduino is used.
I honestly think the simplest solution would be to use an Arduino with the analog sonar modules to read in your sonar data and then send that data to the pixhawk over one of your SPI lines.
You could potentially use the i2c sonar modules and attach all of them to your i2c line but it will take more software manipulation on the pixhawk to address each of the modules and I’m not sure how many diffent i2c addresses they offer for those sonar modules so you may have to mediate address clashes as mentioned in this post: electronics.stackexchange.com/qu … ss-clashes
Cheers,
Brandon
Hello everyone. Questions, I want to use only a rangefinder MB1200 and I was interested to enter PixHawk digitally to avoid problems with signals as do those who use the analog mode (do shielded cables, capcitores and others).
My PrGunTa is something already set to digitally enter from the rangefinder to PixHawk?
I’m new at this Forum and have to say that my english is not the best, but I do my best to make my problem clear.
For my schoolproject I have to use the Pixhawk on the Iris-Copter. On the Pixhawk I have to add up to six sonar sensors Mb1200. I have to write a program for the Pixhawk. With the program and the sonars the Copter should be able to see obstacles and move around them.
For this Problem I have a few starter questions:
Is it possible to add so much Sonars? ( I have seen the thread about analog sonars on Pixhawk on the site: copter.ardupilot.com/wiki/common … ix-analog/
But can I add some of the sonars on the analog Inputs 3.3V and some on the Serial Input 4/5?
What are the names of this Pins and how can I configure them all?
Is there any Software with a grafical userinterface to write the program and load it on the Pixhawk? My teacher said, that I should use the arduino Software, but as I find out, arduino Software don’t know anything from the Pixhawks core.
Thank for your help![/quote]
Hi everyone,
I am in the same case as NewRox, I am not english speaker and I have to use the Pixhawk on the Iris-Copter with a sonar to avoid obstacles for a school project.
Have you more informations about the issues of your project, do I have to use arduino to connect the sonar or directly on the pixhawk source-code ?
My Project is the same as yours, it sounds so. At the beginning there was the plan to connect up to six sonars on the pixhawk to avoid obstacles. The logic I have to use is Fuzzy Logic. Depending on the distances to the obstacles and the speed of the Iris, I have to set another speed.
During my Project I found out, that only two sonars can be pluged in at the 3.3V ADC Input. So you only need the pixhawk for two Sonars. For more sonars, it would be a possibility to plug them in at the I2C. On my Iris, this was used for something else, so I couldn’t use this possibility.
I configured the sonars in Mission Planner and this works fine. Afterwards you can use them in your source code. What I didn’t find out yet, is how to change the speed.