Tapatalk

i2c communication

i2c communication

3

PostMay 23, 2017#1

Hello,

I am discovering the world of electronics through a project and i discovered your whisper.
So thanks for this board and all documentation around, this is very usefull.

Currently, I attempt to connect a proximity sensor (VL53L0X from Adafruit) to the whisper but i have some problems with i2c communication.

On documentation, you defined A5 and A4 for SCL and SDA, like an arduino uno.
Is i2c bus active or do i need to add a rtc module ?

By the way, do you have an idea for proximity sensors who can work in very low power ? and is it possible to programmaticaly stop voltage on 3VR1 ?

I research proximity sensor for a long autonomy (6 months to 1 year / send request all 15min will be fine).
I have tested a Maxbotix LV-MaxSonar EZ1, 2ma in typical current, which uses too battery, and i will test an US-100 sensor soon.

Thank you by advance

1885
1885

PostMay 23, 2017#2

Hi Alex,

Thanks for the feedback. Regarding the I2C, it works the same way in an Arduino, there's no need to any additional component apart from the I2C device you need to communicate with.

Now, make sure you also put the I2C Pull-ups on SCL and SDA "lines". For that you can use the R30 and R31 pads to solder, for example, a 4.7K as those are connected to the SDA and SCL. If you plan to use the Adafruit VL53L0X, I believe this breakboard already have the required pull-ups.

There's not way to interrupt 3V3_R1, this is the board's power rail. Now, if your device does not offer a good sleeping mode or you're connecting a "dummy" device, like the US-100, you can always "hard" disconnect it from ground and interrupt the power consumption. You just going to need a N-Mosfet working as a low-side switch and you can control by another GPIO. For example, turning the GPIO HIGH you will turn the N-Mosfet ON, and it'll permit the current to flow from the Device you're using to the Ground.

Another option, if your device consume very low current - let's say no more than 20mA, you can power it from a GPIO... like an LED. Just make sure the device does not consume too much current otherwise you can damage the MCU. As far I remember the absolute maximum per GPIO is 40mA and no more than 200mA for the whole MCU, so half of this is pretty safe.

Have a look on this post from another Whisper Node user: https://www.thomaslang.nl/talk2-whisper ... tion-code/, I believe the customer is not using the VL53L0X, but each distance sensor has it's pros and cons but both, if working in "pulses" can be used at very low power setup.

Cheers,
Mike M.

3

PostMay 23, 2017#3

Thanks for this complete answer !

Sorry but i'm not sure to understand the tip with R30-31.
Do i have to sold them (each one, two piece of copper) ? Will this connect a 4,7k to A5 and A6 present on the board ?
Or do i have to connect a 4,7K between A5-A6 and SCL/SDA pins of the VL53L0X ?
It seems that the the Adafruit VL53L0X haven't resistors (but Pololu perhaps have).

1885
1885

PostMay 23, 2017#4

Hi again Alex,

Sorry if I confused you. As part of the I2C connections you must have the SDA and SCL lines "pulled-up", in other words, connected to a voltage rail via resistors, normally 4.7K.

As you guesses, yes, the R30 and R31 are connected to the 3V3_R1 and to the A4 and A5 pinds (SCL and SDA). So if you're connecting an I2C boards or chip that doesn't already have the pull-up resistors present, you could simply solder 4.7K resistors there.

Now, looking at the Adafruit VL53L0X breakboard specifically, they already implemented the pull-ups (https://cdn-learn.adafruit.com/assets/a ... _schem.png), and you just need to connect the board to the A4, A5, 3V3_R1 and GND pins.

3

PostMay 25, 2017#5

Thanks it works ! I will ask glasses for christmas, A5/A6 isn't A4/A5 ^^
For information, I'm testing on battery (CR2032) - almost 1 day with data send every 15sec for now.