Using externel sensor via bus
Risposta
09/07/19 14.51

Hello,

I am collecting acc sensor data and storing it in sd card with the help of on board sensor.

Problem is I need to place sensor at new position where i cannot place whole xdk due to constraints.

Has anyone used an acc. sensor (like bosch BMI055) or any sensor with xdk by connecting it via the extension module?

Can any one please guide me over this? also some starter gist of code would be really helpful. 

0 (0 Voti)
RE: Using externel sensor via bus
Risposta
10/07/19 9.14 come risposta a Hiren Patel.

Hello Hiren,

your use case should be easy to implement. Most of the MEMS sensors from Bosch or other companies use standard protocols like SPI or I2C. For both protocols you can find a base API from the EMLib library from Silicon Labs on the XDK.

The exact implementation depends on your custom use case and the sensor you want to use.

So it would be helpful if you could go more in detail about your use case.

Best regards,

Christian

0 (0 Voti)
RE: Using externel sensor via bus
Risposta
10/07/19 9.23 come risposta a Christian Köhler.

I can elaborate my usecase,

Basically we want to collect vibration data from a coffee machine and store it in SD card. then later on send them to cloud via wifi.

But I cant place the device directly. Hence i need to used some externel sensor.

Since i don't have much electronics knowledge I am not sure how to use the pins or which pins i should connect to. We can implement any sensor which gives reading between +-2g (The BMI055 is perfect for our use).

0 (0 Voti)
RE: Using externel sensor via bus
Risposta
10/07/19 9.40 come risposta a Hiren Patel.

Hello Hiren,

first of all i want to mension that it is not really usefull and recommendable to send a whole file over Wi-Fi from the XDK.

If you want the measured data to be in a cloud at the end of the day i would recommend to store the measured data in an internal buffer on the XDK and send that buffer to the cloud directly.

Since your physical space is restricted, i am afraid you have to build a hardware solution by yourself. The wiring of the pins can vary depending on the package. But the pins you need have always the same name.

VDD: Supply voltage
GND: Ground
CSB: Chip Select
SDI: Serial Data In
SDO: Serial Data Out
SCK: Clock rate

With these pins you can either implement a SPI or an I2C communication between the XDK and your sensor.

I hope this was helpfull.

Best regards,

Christian

0 (0 Voti)