This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Thingy 52, best way transmit real time data to AWS GreenGrass

Hi, 

I am experimenting with the Thingy52, how do I transmit data from it to the cloud platform of my choice?

  1. In the menu options, I see cloud, what is it for?
  2. What is a Cloud Token, and from where will this value be populated?

I want to build an end to end solution using Thingy52 at the end sensor, finding ways to get the real time data out of it, please assist me here.

What am I missing here?

I plan to use Pi as a Gateway, but wanted to explore the option of not configuring a gateway, or if there is way to transmit real time data directly. 

Parents
  • Hello Ketil, we finally managed to get the stack working.

    Question - We have mapped Thingy's sensor values as-is to a dashboard. Everything is working ok, but when the thingy is stationary - we observed the gravity vector to jump some points.

    Eg. Earth's gravity is 9.81m/s represented by z axis - perfect.

    On the x and y axis, the -.10 and 0.05 sometimes change, +-.2 Is that possible?

    My inference is:

    1. There may be noise due to micro-fluctuations in power supply
    2. My device is not calibrated correctly 
    3. Since its a deduced value, this is normal
    4. The sensitivity is very high so it may be recording veryyy minor vibrations 

    Please help me zero in on the root cause

    .

  • Hi Ankit,

    I'm very happy to learn that you have made such great progress. I hope you will consider open-sourcing the project on GitHub or similar as I know there is a lot of interest in this subject. Please let me know if you do.

    Not immediately sure what is causing the fluctuations from the accelerometer. I will ask one of our developers who has worked with the MPU9250 IMU which is inside Thingy:52. The fluctuations might be within spec or it might be possible to do some calibration or configuration. I have a hunch that you might be right about the sensitivity but we will see.

    Could you try to point the X direction downwards? Can you observe 9.81 on the X axis? Do the Y and Z fluctuate when you do this?

    Ketil

Reply
  • Hi Ankit,

    I'm very happy to learn that you have made such great progress. I hope you will consider open-sourcing the project on GitHub or similar as I know there is a lot of interest in this subject. Please let me know if you do.

    Not immediately sure what is causing the fluctuations from the accelerometer. I will ask one of our developers who has worked with the MPU9250 IMU which is inside Thingy:52. The fluctuations might be within spec or it might be possible to do some calibration or configuration. I have a hunch that you might be right about the sensitivity but we will see.

    Could you try to point the X direction downwards? Can you observe 9.81 on the X axis? Do the Y and Z fluctuate when you do this?

    Ketil

Children
  • Thanks for the reply Ketil.

    Yes, if X Axis is being exerted with 1G, then Y and Z fluctuate a bit even when stationary.

    Best,

    Ankit

  • Hi Ankit,

    According to the MPU9250 datasheet there might be inaccuracies of ~1%. In addition the circuitry of Thingy:52 might add to this and specifically the speaker which contains a coil and a permanent magnet.

    If the fluctuations are periodic they might be caused by the Magnetometer compensation interval which periodically calibrates the magnetometer. It might also be worth looking at the Temperature compensation interval. The characteristics for changing these values are documented in the Thingy:52 GATT Profile Motion Service. Try changing these intervals and observe if they have any effect on the fluctuations.

    If this does not work you might try using the raw accelerometer data which is available in the Raw data characteristic. This will give you unfiltered data unlike the Gravity Vector which is the result of sensor fusion of accelerometer, gyro and magnetometer. This means that any disturbances caused by the speaker are irrelevant.

    If you use the Raw data characteristic for displaying accelerometer data note that the data is unfiltered and likely to fluctuate quite a bit. It is common to run accelerometer data through a running average algorithm. Try different sample sizes for your algorithm until you find a result you are pleased with. It will now be trivial to compare the result of using only accelerometer to the Gravity Vector. I hope you will share the result with us.

    Note that the Accelerometer Full-scale range (FSR) is set to the default value of ±2g. If you want to change this you will have to modify the Thingy:52 firmware.

    Ketil

     

  • Thanks Ketil, that explains it.

    Also, where can I find the documentation to configure Thingy as an eddystone compatible beacon?

  • Hi Ankit,

    You write a new Eddystone URL using the Eddystone URL Characteristic in the Thingy:52 Configuration Service.

    Other Eddystone beacon protocols such as UID, EID and TLM are not supported. If you need these you will have to merge our Eddystone example with the Thingy firmware.

    Ketil

Related