Data logging software advice - beginner

Hello! Sorry for what are probably some very basic questions - I've just started using an Arduino.

I have a Nano 33 BLE and I want to use it to wirelessly transmit data from a load cell to my laptop (mac) so it can be plotted in real time and stored as a CSV file. I want to be able to start and stop data collection using my laptop. What is the best approach to do this?

Would you recommend downloading a particular software, such as Python, and connecting to laptop via Bluetooth or use an additional Nano 33 BLE, which is connected to my laptop and simply connect the two boards via Bluetooth and retrieve the data using python over the serial port?

Thank you for any recommendations

I assume your laptop has BLE built in and that should be able to communicate with Nano BLE - no need for another one. All you might need is have Nano check for a start/stop code each time round the loop, although I don't see any real need for that. You could have Nano continuously report, and you listen when you need. I don't really know what Python is. You certainly don't need it.

Welcome to the forum, and there is no need to apologise for anything.

Hi Nick, thank you for your reply! I've checked and my laptop does have BLE, so should be able to connect okay. Once they are connected what software would you use to store the data as a CSV file?

ch4rl0tt3:
Once they are connected what software would you use to store the data as a CSV file?

Whichever software you know how to program in.

ch4rl0tt3:
Once they are connected what software would you use to store the data as a CSV file?

Nebulous question..
If you want to create a .CSV on Arduino SD card, the data logging example in the IDE should be about all you need. If you want the .CSV on the laptop, any standard terminal programme will do. All you do is send a properly formatted data stream. Note that a CSV on Arduino's SD can be dumped to laptop at leisure.

If I understand your question correctly, all Arduino programming is done with the standard Arduino IDE.

Once they are connected what software would you use to store the data as a CSV file?

I recently made a poor-man's oscilloscope using an Arduino to do ADC and funnel the data back to my PC for logging. This was implemented using the serial interface for data transmission.

My approach is:

  • run the arduino, and then run the Python script on the PC to generate a CSV file
  • once I have captured the data, use GnuPlot to produce a graph

This batch-style approach is fine for me, although it would also be possible to integrate plotting with the Python script for real-time logging of the data.

I've not done much with BLE, so I don't really know much about the constraints there. However, I ended up having to think reasonably carefully about the data transport between the Arduino and PC in order to (almost) keep up with the samples generated by the Arduino.

I started out effectively printing CSV from the Arduino (microsecond timestamp and sample value); but this was far too slow. I ended up writing each uint16_t sample as two bytes on the serial port, and using periodic sync bytes to keep the PC and Arduino in sync with one another. The python script reverse-engineers timestamps.

So it's worth having a bit of a think about data rates, and the speed of transport over BLE.

The above may be fine for a specific need, but just makes the job look far more difficult than it really is, in order scare a beginner. Things have to be getting pretty damned serious in order to justify fartarsing around with python scripts.

As things are, I submit all that is needed is a freebie terminal programme to recieve the data stream, apply timestamp from the PC clock, and record it. I don't actually see any reference to speed but, essentially, Bluetooth should be able to convey data faster than you can collect it.

Having said that, there is a chance that I'm making things too simple....
If you want to send data faster than the clock can stamp it, you may need to send a millis mark in the data stream.
If you want live graphs, the obvious way is to use the PLX macro with Excel, but I don't know if that applies to the MacBook.

The above may be fine for a specific need, but just makes the job look far more difficult than it really is, in order scare a beginner.

Not my intention!

To OP, I agree with Nick, keeping it simple as possible is certainly the way forward. I was really just trying to make some useful software suggestions and encourage thinking about data rate sooner rather than later. If writing CSV from the Arduino and logging to a file using a terminal program works, do that!

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.