OPEN RB-150 vs IRSS-10 in Arduino

How can i use OPEN RB-150 and Arduino to read IR sensor
I already have Arduino and SAMD library but i still can’t read sensor signal.
when i upload code, serial monitor return random number 0 1

Screenshot 2024-09-19 153228

You almost got it right. If you go back to OpenCM IDE, you can see some old Arduino code that you can adapt to your situation. You need to control both Pins SIG1and SIG2.

image

Screenshot 2024-10-05 062455
I write new code but serial moniter still return random number

Below is my hardware setup:

IRSS10_SetUp

And my Arduino code is similar to yours:

RB150-IRSS-10_A1

And this code obviously did not work - like yours.

So I went back and put 3.3V into Pin A1 - just to make sure that I do not have any ADC issue with my OpenRB-150:

Analog33V_A1

And you can see that my A/D conversion worked fine.

Then I went back to the OpenCM IDE web page to read it up again and I saw this picture

image

So SIG2 has some extra circuitry attached to it in the ROBOTIS 5-Pin Connector found on their CM-XXX controllers. So SIG2 is not just some simple digital pin. Sorry that I missed all that the first time around: so the IRSS-10 is just not compatible with standard digital pins on the OpenRB-150 at all.

It looks like that the DMS-80 may be a better choice

image

and it looks like that it needs only the ADC pin for programming

image

But the DMS-80 needs 5V to operate! :thinking: So, it will need a Level Shifter (5V <> 3.3V) between the DMS-80 and the Analog Input Pin that you are going to use!

I do not know if we can use the DMS-80 with only 3.3V to drive it or not.

Or you will be better off to use a 5V Arduino Controller like the UNO R3?

On my OpenRB-150, I used ToF sensors (3.3V) for Distance Measurements.