VCNL4010: Sensor not found

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
GerlachvB
 
Posts: 2
Joined: Tue Jul 27, 2021 10:20 am

VCNL4010: Sensor not found

Post by GerlachvB »

Hello,
I use a VCNL4010 on an Arduino One board. If I connect it with short cables everything works fine.
But I need the IC on a distant of 3 metres. If I connect it with (4) longer cables it tells me: Sensor not found.
All 4 cables are well connected. Is this a timing problem?
I checked the code in file VCNL4010.cpp and it looks like it gets a wrong REGISTER_PRODUCT.
This happens at line 32.
Can anyone help?

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: VCNL4010: Sensor not found

Post by dastels »

Yes, I2C is meant for short distances, originally between chips on the same board. It doesn't do as well with long distances.

Have a look at https://www.adafruit.com/product/4756 for a way to get around that. That should be enough for 3m. For longer cables you should use twisted pair to reduce RF noise. The guide at https://learn.adafruit.com/adafruit-ltc ... terminator discusses that.

Dave

User avatar
GerlachvB
 
Posts: 2
Joined: Tue Jul 27, 2021 10:20 am

Re: VCNL4010: Sensor not found

Post by GerlachvB »

Thanks. I didn't know that. This answer really helps.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”