Arduino Underwater Sonar/Altimeter

Here is a Video of testing the module.

Here are some information with characteristics:

|259x500

It supposed to be $100 cheaper than Bluerobotics Ping sonar but it isn't being sold yet. We are looking for Arduino enthusiasts who able to maintain this device and who can make open libraries.

|500x375

I still wonder if here is somebody who could help me out with making libraries for the module?

Hi Kogger Do you still need help or have you found someone to help you?

The issue is still actual.

You can find description of the protocol here: https://github.com/koggertech/Kogger-Protocol Filename: "KoggerSonic SB protocol.odt"

These weekends I tested the module on the river. Here are some pictures I got:

|500x281 |500x281

|500x281

Hello Kogger,
Just to make sure I get this right, could you clarify that the ID passed in the protocol :

actually corresponds to the Commands IDs?

and it’s not a frame ID or something else? (a small typo in that second table, although less poetic, I suppose you meant Euler angles not angels :slight_smile: )

Also can you confirm the MARK and RESPONSE are mutually exclusive? and what’s the exact logic to confirm you received a response from the device?

Does the host need to set the RESPONSE bit for every commands it sends? Seems the description of this bit is incomplete, should I read that as ”Request response from the device. Used only for the direction host to device commands”

What are the default Serial specifications of the connection (baud, data, parity, and stop bits). SERIAL_8N1 is common on Arduino (eight (8) data bits, no (N) parity bit, and one (1) stop bit)

I went through the spec and as I had a couple hours available this morning, I threw some test code together (attached below)

That could form a first exploration path for your device from an Arduino and later made into a class/library.

Of course I don’t have the device, so this is based on high level read of the spec and a couple of hours of work, so not much is implemented nor even tested (I just know this compiles :slight_smile: )

if you run this code on an ARDUINO MEGA, with your board attached on Serial1 (pins 18 and 19 - careful 5V) and join grounds, and if your device does communicate at 115200 bauds in SERIAL_8N1 mode, then may-be you should be able to see some action…

The Serial config is defined at the very top of the code by

#define KS_SERIAL_BAUD_RATE (115200)
#define KS_SERIAL_CONFIG (SERIAL_8N1) // see options @ https://www.arduino.cc/reference/en/language/functions/communication/serial/begin/
#define KS_SERIAL Serial1

Opens the Arduino Serial monitor @115200 bauds

The program will display

[color=purple]Enter Command:
1. CMD_YPR
2. CMD_QUAT
3. CMD_TEMP
4. CMD_VERSION
------------------------------
[/color]

type either 1,2,3 or 4 and enter

A command request frame (hopefully according to your spec) is built and sent over the Serial port to your device.

The program listens for any correct frame asynchronously (there is a state machine to wait for the SYNC1 and SYNC2 bytes and then read the frame of the right length till the Check Sum bytes).

When I get a well formed frame back (ie the checksum was correct), I print some information.

I did not implement any data extraction and of course only basic commands, it’s not memory optimized either.

I don’t have much time at the moment, but may be that could help get things started from this community.

KoggerSonic.ino (12.8 KB)

Hi, J-M-L!

J-M-L:
Of course I don’t have the device, so this is based on high level read of the spec and a couple of hours of work, so not much is implemented nor even tested (I just know this compiles :slight_smile: )

However, it works great!

Thanks for the easy start with Arduino!

Cool news!

After all, we implemented NMEA protocol.

0183 I suppose Good idea ! Is the device shipping?

J-M-L: Is the device shipping?

Yes, but shipping time is unpredictable nowadays because of COVID.

J-M-L: 0183 I suppose

It is. The sonar is supported by ArduPilot

1 Like