Go Down

Topic: Quickly logging data with a arduino. (Read 877 times) previous topic - next topic

david97

Hi everyone, wanting to quickly log data using a arduino over a short period of time.

The idea is that I want to build a thrust stand, that can test the performance of propellers, brushless motors and ESC.

Wanting to be able to read the amount of thrust that a motor is putting out in any period of time. And use this to build graphs, showing what the power curves of specific props/motors/esc are, and how they react over time.

Would give a real insight into why certain props feel more "locked in", and be able to set up quads using real data, rather than just by feel.

Would also be able to set up tests, like the power curves from a dead stop, or from a armed position.

Eventually, I would like to expand, adding features like an RPM sensor, and current sensors.

So how would you go about this? Alot of the motors I plan on testing spool in a fraction of  a second, and I need to capture enough data to be able to construct a decent curve that means anything.

Thanks everyone for youre help  :) .

jremington

Which sensors will you be using?
How many data points per second will be logged?

DrDiettrich

You should consider to use one of the more powerful controllers, with sufficient RAM to hold the measured values.

Johnny010

Bolt the motor on to a strain gauge?
10kg Strain Gauge

The weight of the motor is practically negligible compared to the thrust I guess...

For speed, use Port Manipulation...read the analog voltage on the pin.

Store the results in an array. Trigger a second arduino to start doing the sampling (using interupt pin?)
While the second is doing the sampling, the first sends the data via serial to a the monitor/serial monitor.

Repeat as a cycle.

Might be an idea?

DrDiettrich

When should the sampling Arduino send its data to the data transmission Arduino?

Johnny010

#5
Sep 11, 2016, 10:20 pm Last Edit: Sep 11, 2016, 10:21 pm by Johnny010
When should the sampling Arduino send its data to the data transmission Arduino?
They work in delayed parallel?

Arduino A: Samples say 500 ints in a buffer. Sets a "I am finished collecting a set of data" pin high.
Arduino A: Starts outputting the data via serial.
Arduino B: On being told A has done its sampling...it starts sampling.
Arduino B: When sampled 500, signals A to start sampling again (hopefully done shifting data out of its buffer).
Arduino B: Sends data via serial to PC.

Repeat.

The Serial lines can be connected in parallel no?

DrDiettrich

What's the difference between
Arduino A: Starts outputting the data via serial.
and
Arduino B: Sends data via serial to PC.

Connect the serial output of A to the PC, and B can be omitted.

dave-in-nj

#7
Sep 11, 2016, 11:38 pm Last Edit: Sep 11, 2016, 11:39 pm by dave-in-nj
we often have an X/Y problem that is thinly veiled.

May I offer that this is such a thread.

IHMO, I would offer that the first question should be :

I want to data log at high speed,   sensors to include RPM. voltage, current, temperature and load cell.
I need 5 data points and the total length of any test will be about 5 minutes.
I would like to data log at 1khz (10khz ? )

If possible, I would also like to have real-time display on my PC

now for the question :

What would be recommended to do this ?
Arduino? teensy ?  something else ?

this is looking for a solution, not trying to fit a solution into a box.

Johnny010

What's the difference between
Arduino A: Starts outputting the data via serial.
and
Arduino B: Sends data via serial to PC.

Connect the serial output of A to the PC, and B can be omitted.
I assumed while it was sampling it could not send via Serial (one CPU core).

So I thought to collect the most possible measurements youd need to collect and store them in RAM (relatively fast?) and send them via serial once you fill a buffer.

Maybe read ADC -> Send via Serial -> Repeat may be fast enough...untill we have a poper spec we do not know?

DrDiettrich

A controller has much hardware that can operate in parallel. But my point was that the target of a serial transmission is unimportant - if there is time to send data to a second Arduino, this time is also sufficient to send to a PC.

But let's look at the most important details first:

How many bytes are required to hold one sample?
How much time is required to collect data from the various sensors?

An 8 bit Arduino most probably doesn't have enough RAM to hold a reasonable sample. This will require to transmit the data in parallel to the data acquisition. Using a 32 bit controller will solve both issues at the same time: it has RAM for a big sample, and can transmit the data with less impact on parallel data acquisition.

Go Up