Maxbitics ultrasonic sensor with beaglebone blue in Ardrover

Hi,
I am running Ardurover on beaglebone blue.
How can i interface Ultrasonic sensor with this setup?
Any help?

Thanks.

There is documentation on the wiki on how to configure the sonar’s we support. I’m not sure what specific sensor your using.

Thanks, Grant.

Hi,
Thanks for the reply.
I am using Maxbotics MB1240 Sonar sensor. There is documentation with pixhawk i found but not with beaglebone blue.
Can you please elaborate ?

Thanks.

The BBBlue should work in exactly the same way as the other ArduPilot hardware platforms. If you follow the wiki instructions it should work. Are you having a specific problem?

Thanks, Grant.

Yes.
I am just confused the connection and settings for BBBlue. Other platform is having a dedicated port for its connection.
Can you please share the link document or wiki page that shows its connection and setup with BBBlue?

Thanks.

Hello,

You need to assing the TTY port to the FC Serial ‘‘logical’’ port according to these instruction son Mirko’s github: https://github.com/mirkix/BBBMINI/blob/master/doc/software/software.md

Parameter mapping:

start parameter ArduPilot serial port
-A SERIAL0
-B SERIAL3
-C SERIAL1
-D SERIAL2
-E SERIAL4
-F SERIAL5
Check http://ardupilot.org/copter/docs/parameters.html#serial0-baud-serial0-baud-rate to set the right value for SERIALx_BAUD and SERIALx_PROTOCOL

And then you assign the correct device to the port:
http://ardupilot.org/copter/docs/parameters.html#rngfnd-type-rangefinder-type

And you start ArduPilot like this example:
sudo /home/debian/arducopter -B /dev/ttyO5 -C /dev/ttyO4

so you have assigned:
MAVBOTIC SERIAL output connected on BBBlue /dev/ttyO4 and sending signal to SERIAL1
GPS connected on BBBlue /dev/ttyO5 and sending signal to SERIAL3

1 Like

Hi,
I have started my rover with
sudo ./ardurover -C udp:IP_ADDRESS:14550. I have connected my MB1242 Sonar (i2c based) with the I2C port of beaglebone blue.
That means should i start the rover with -B /dev/ttyO5 parameter also for Sonar data? I am using APMPlanner2.

Hi,
Its done. I am able to get the Sonar value.
Thanks for the support.

My explanation was for the mb1240 -withe the serial interface - as you mentionned on the beginning. The mb1242 is I2C and does not require serial port mapping. Glad it worked :wink:

Oh my bad.
Thanks.

Also can you please help me in waypoint navigation steps?
What i am doing is in APMPlanner, i want to have waypoint navigation without GPS. I have attached my two Quadrature Encoder (ky-040 rotary encoder).
I have set WENC_TYPE for quadrature encoder and did EKF3_enable with EKF2 disable.
After this i set my waypoint on map and change the mode as Auto mode.
I have also disabled the GPS option.
What else should i take care? Am i doing right?

The Rover 3.2 has just been released this week and its Beta on the PixHawk, so it is not yet implemented yet on the Blue.
Hopefully this will be done pretty soon , but we have to build the QuadEncoder Libraries and control DC Motors with the PRU using the onboard H-Bridge. Unfortunately , the Robotic Capes examples are not directly compatible with Ardupilot so we have to write it from scratch.

Ok,
I am able to integrate Roboticscape library with Ardurover and running my DC motor with on-board H-Bridge of Beaglebone.
I am using Rover 3.2 and is having Quadrature libraries too. But if you are saying those are only for Pixhawk, so can i also integrate roboticscape quadrature encoder library with ardurover.
But not sure where to implement that for waypoint navigation.

If you can implement it, that would be fine, once its working with ArduPilot, the Odometry from the wheel encoders will be fused into the EKF for navigation.

Oh that will be Great.
Thanks.

Hello Mr. Poirier,

i am trying to do sth similar. As far as i see Ardupilot is capable of integrating 10 Rangefinders: RangeFinders Setup Overview — Copter documentation

I achieved this in our Gazebo Ardupilot simulation. Now i am trying to do the same with Beaglebone blue. Based on this discussion thread, one can only integrate 6 rangefinders over serial communication.

My dilemma is as follows, i’d like to use JSN-SR04T, so i need serial connections of 10. That means, i need Rx Tx pair of 20 pins. I ran out of GPIO and UART ports of BBBlue.

I could also set the JSN-SR04T as analog, but this time i’d need to use PRU and then my possibility of range sensor integration falls to 1.

Briefly, do you have any suggestions that you could share? I could use the I2C matbotix sensors, but they are not waterproof so that is also why i chose JSN-SR04T.

I could buy a rotating lidar, Terrabee but these are expensive solutions and i think it is an overkill using these sensors only for proximity (not for object avoidance, only as visuals similar to a car park sensor, that is my aim).

So that is my story so far. If you or someone could help with that i would appreciate it.

I think i found my own solution :smiley: but in benefit of all, i will use a I2C to UART converter. I hope it works. What disturbs me in that case is that, i’d also use the I2C for 5 additional servos i’d use, i have the fear if i will reach the bandwidth capacity of I2C after integrating 10 range + 5 Servo node on the I2C bus line. I hope it works! I wish BBblue has an additional I2C port :confused:

Hello,

Thats a lot of hardware for a crappy sensor… :wink:
Suggestion : Try 2 of theses and make them work correctly first.
Then, I would probably go analog and use 10 gpio to send individual triggers and, depending on how the echo electronic is build ( ok if pull-down), a single gpio to read back echo signal.

1 Like

One last question, of standard boards it is easy to findout pin nrs:

But for BBBlue, no hwdef file file a litte bit difficult to findout the pins. I found this on the net for finding out pinnrs:
:black_small_square: GPIO1_25: (1 * 32) + 25 = 57

:black_small_square: GPIO1_17: (1 *32) + 17 = 49
from: https://groups.google.com/g/beaglebone/c/jLHwz30JuUI

And a second question is there an easy way to see the pin values of gpio ports? e.g. for SBUS i use the
rc_test_encoders_pru of robot control lib. But none found for GPIO. For testing and getting comfotable with BBBlue i thnki i also need to know this.

I dont want to sound like an idiot, i want to explain why i am asking the question above: the pin values are not fully listed on BBBlues git site: https://github.com/beagleboard/beaglebone-blue/blob/master/BeagleBone_Blue_Pin_Table.csv

But i found a free online class,

referencing this site:
http://exploringbeaglebone.com/wp-content/uploads/resources/BBBP9Header.pdf

here one can find the GPIO3_20’s pin is 116. but on the githubs csv it is left empty.

I want to be sure of what i am doing, that is why i am asking. And i think many people should have faced the same problem i did… :thinking:

Well…in that case, if you are not familiar with Directory Tree structures you may get lost in the PINS configurations, better is to work with Arduino and transmit back detection as a MavLink proximity message. Check on @geofrancis works on this subject .

BTW, you should start a new conversation if you want to get better support as this discussion is old and not directly related.

1 Like