Hey I'm new to Arduino and starting a project so correct me if im wrong with anything.
The goal is to create a waterproof and as compact as possible device that will take accelerometer and gyroscope data and transfer it to a computer where the data can be interpreted. I will use this data to track statistics for swimmers
My plan was to use an Arduino Nano 33 IoT to collect data using its internal imu and potentially a micro sd card module for storage. The data transfer is where the issue arises. I want to use Bluetooh/BLE to transfer this data by connecting it to a computer after a race where data is taken.
I want the computer to be able to collect the data from multiple units of this device like if a coach had multiple swimmers with devices so after the race the swimmers could all get their info in succession. I dont want the coach in this scenario to have to use individual keys to register each device to get the data.
From my research I was thinking about using nfc tap to connect technology so one swimmer would tap the device to a reciever on the computer and transfer the data then rhe next swimmer would tap their device after first's the data is sent.
I want to ensure this is possible and what nfc device I would need to make that work. Or if it is not possible I am open to any other solutions to this problem.
Describe what the large picture is. Drawing a logic block diagram could be useful. Maybe a Nano 33 IoT is good for that, maybe not.
The main idea sounds like solving a matter, not performing certain exercises.
You are probably looking for the dumpfile example included in the IDE, but unless you have one Arduino as a central clearing point, I think this will be more of a PC job than an Arduino one. In the light of that, you may find that a NRF24 network is a better bet than Bluetooth.
So larger picture I am just taking the data collected by the built in gyroscope/accelerometer on an arduino and transfer it to a pc. On the pc the calculations will be done so the info can be displayed.
The problem is getting data from arduino to pc and I thought a bluetooth connection would be able to perform this as it is built into the IoT and BLE models. The other issue is quickly switching bluetooth or whatever data transfer method so multiple devixes can upload data.
Bluetooth calls for a pairing process when establishing the connection. Then the Pc BT is occupied and can't receive BT from any other device.
Switch BT on and off sounds like slowing down things.
I was intending on using the nfc bluetooth connection capabilities to quickly switch bluetooth devices. I would also have a button in the software to disconnect the device and prepare to accept the new one. What would you recommend for a different wireless data transfer method?
Looking into the NRF24 network it seems like a wifi or BLE module which is built into the 33 BLE or 33 IoT so would the external module be necessary and would that overcome the connection switching abilities.
worked on a similar project some time ago reading data from several LSM9DS1 9-axis iNEMO inertial modules and transmitted over BLE to an Android phone for analysis
how often do you wish to sample data and how much data in each sample?
This IS possible with classic Bluetooth but I'm not sure how suitable it is for your purposes. It may be a lot more practical with BLE, but I don't know anything about that.
Be that as it may, a single channel to the PC is surely the best way to go, i.e. you use an Arduino as a PC interface.
I dont know how often ill need to sample data. I know Im going to use the gyroscope and accelerometer so 6 data points but i dont know how often ill need to sample probably about 4 to 8 times a second?
I have never heard of NFC Bluetooth connection. You normally set up an automatic connection using the MAC address and then use serial read/print commands the same as you do when connecting by wire.
Your sample rate doesn't sound like it will be a problem!
"In summary, it is possible to use the accelerometers to estimate velocity and position, but the accuracy will be very poor so that in most cases, the estimates are not useful."
The idea was almost like establishing a wifi connection through NFC and applying that to a BLE setting as the device may be used in an area without wifi available. I think a MAC address connection would be hardcoded which is what I am trying to avoid.
Thanks for the information I was initially a little worried about how much data that would be but this is much more reassuring. I don't have a program to receive BLE data or process/display it. I am just now getting an the Nano IoT and BLE models so I can try taking these data points. The plan is to store the data from a period on a SD card or SRAM on the Arduino as the BLE likely wont work while the swimmer is swimming because of interference from the water and distance of the pool.
I am going to create a program to process and display the data later once I can reliably get the data from the Arduino to the computer.
if you are storing gyroscope and accelerometer readings as 12 bytes of data /sample at 8 samples/second for 5 minutes that would be approx 30000bytes of data
the Nano 33 IoT has 256KB of SRAM so should be no problem
I would tend to use WiFi to transfer the data as it is simpler to use than BLE
you could set up a laptop or PC as an WiFi access point and transfer data to it for analysis when sampling is complete
possibly transfer the data directly into excel?
Sure the Nano IoT/BLE boards onboard IMU is great so it's a good choice and thus your project is feasible, but I'm not sure the Nano 33 BLE board, in particular, is suitable using the Arduino IDE. The reason is that you still cannot use the nRF52840's NFC tag capability through Arduino core. To use the NFC tag you will have to look at the Nordic NRF52 SDK and use something like Segger Embedded Studio together with a JTAG programmer.
If you look at the Nordic NRF52 SDK examples there are some (experimental ones) for NFC, which allow you to connect to BLE once you've tapped on the NFC tag. It basically transfers the credentials via a specific NDEF formatted record.
Now there is another board you could consider, which can still be programmed using Arduino IDE and also includes the nRF52840 and allows you to use the NFC tag capability. It is the new SeeedStudio XIAO Sense board.
Note that you will still need to consider how much data is likely to be stored and whether you plan to transfer all the data stored in one go. If this is quite large then using BLE is a little trickier.
So I have the xiao microcontroller you suggested and am now trying to code on it. I did some basic code, like blinking the light in the Arduino core but now I am working with the Segger Embedded Studio. I wanted to know if this could be programmed using the USB-c that is built in rather than a JTAG programmer.
No you can't. The bootloader will only recognise the Arduino IDE or I suppose Platform.io too. Did you download the Seeed board manager files for this board. It has BLE library and it has a workable NFC library too.