How to connect 3rd Party I2C Sensors to mBot 2


#1

Hi all,

I just bought mbot2 and I want to expand it with many different sensors, but in my area all resellers are out of stock.
so i tried buying a few parts from third party (not built with mbuild).
The first is led matrix 8x16 with TM1640 has I2C connection with GND, VCC, SCLK, DIN port.
The second is PIR sensor with IC: AS312 has Digital connection with GND, VCC, SIG

Can you teach me how to connect to them?
Thanks in advance.


#2

It’s not very easy to connect non-mBuild sensors to the mBot, as mBuild ha a special method of communication. I’ll look around for an mBuild adapter, but the best thing to do now is to contact support (support@makeblock.com).

Good luck!
@ugnobita


#3

@Best_codes

Thanks for your response!
I contacted support but unfortunately, they did not give instructions to connect non-mBuild. They advised me to buy a mbuild module.

I have read some documents, mBuild may be communicated through the I2C mechanism of 1 master as mbot and many slaves as corresponding sensors. And each mbuild sersor will be built-in with a fixed I2C slave address. If I know that slave address, I think I can somehow connect to the led matrix.

For the PIR sensor, I think it can connect to mbot via multi-function port S1, S2. Then in mblock, we can use [read digital at port] to get value from PIR sensor. I plan to try it tomorrow. I’ll tell you if it works.


#4

Well, good luck! I’m a bit occupied on a trip right so I can’t help you that much. I’ll help you more when I get back on April the 16th.
@ugnobita


#5

Did you get this to work? I’m also looking into using third party sensors and wondering how to connect S1 / S2. I’ve noticed it only has 3 pins, so I’m guessing it should be UART then?
I also have no clue which connector it accepts.


#6

@zwervertje @ugnobita After further research, I couldn’t fine much, sorry. :confused:
You can contact support, I guess.

Good luck!


#7

I tried and it works for PIR sensor, but not for other.
With PIR sensor has 3 pin (gnd, vcc, digital), I connected it to S1/S2 port, then using “read digital value” block. It returns 1 if human detected, and 0 if not.
I also tried with IR receiver but it always return 1.


#8

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.