ultrasonic sensor SMT 6500 range module though MIDI

Hello, we are working on a project using distance sensors through MIDI and we are having troubles making it work.

We’re using polaroid SMT6500 sonar ranging module, the idea is to use the distance data collected by the sonar module and patch it to max/msp to control some sound effects and lights. The best idea will be if it the communication works via MIDI.

I have the Sonar connected to the Arduino using the following pins:

SMT6500---------Arduino
GND (1) ---------- GND
INIT(4) --------- Pin 4
V+ (9) --------- 5V
ECHO(7) ------- Pin 2 (4.7k resistor)
BINH(8) ------- GND
BLNK(2) ------ Pin 12

MIDI (out)……….Arduino
2 ………………… GND (220 resistor)
5………………….Pin1 (220 resistor)
3………………….5V

We tried with this patch (MIDI_senscomp) that we got from a friend, and is not working. The script produces some errors, we have tried to fix them, but we aren’t sure if the mistake is in the code or in the libraries that we are using.

Then we tried for parts, the first just MIDI out: DONE its working :slight_smile: so MIDI is well connected.

So then we tried the sensor with serial communication, (attached as serial1.1_smt6500) not working. We connected a simple sensor (the one that looks like eyes) and it receives distance data, but when it comes to this more complex it only outputs 0.

We are working on a project in a really cool space and will like to use this system so please any help will be great. I’m attaching also the data sheets of the sensors.

Thanks

MIDI_senscomp5.ino (2.52 KB)

serial1.1_smt6500_.ino (831 Bytes)

6500 1.pdf (692 KB)

6500-ranging-modules-spec.pdf (844 KB)

Can you post a schematic, your table of connections is too ambiguous for my understanding.

So then we tried the sensor with serial communication, (attached as serial1.1_smt6500) not working.

OK

We connected a simple sensor (the one that looks like eyes) and it receives distance data,

Oh come on, how do you expect anyone to know what you mean here. A part number is needed and preferably a link to it.

but when it comes to this more complex it only outputs 0.

What does this mean? Is it this “eyes” sensor? What is this “more complex” code?

You know these things because it is in front of you, we do not have that luxury.

Reading How to use this forum will help you ask a good question and also tell you about posting code correctly, not as attachments, reserve that for long code that will not fit.