High Speed Controller/Data logger... HELP!

Hello,

I am trying to design a controller/data logger test system on Arduino Mega 2560. Here are the specs:

There are also a lot of conditions dependent on captured data in place for the protection of the electronics being monitored.
I need help with programming architecture on this. Any thing done similar to this? (Remember its not just a datalogger, its a controller too).
Any help on this would be appreciated.

Thanks

The timing is looking a bit marginal in several respects.

About 20% of your time will be taken up just by those analog reads.

I don't know what format you plan to use when you send the measurements to the PC, but you will need a high speed on the serial port and a very concise format to achieve 1KHz updates.

You don't mention the control algorithm so I assume it will be simple - as long as it is, that remaining 80% of the CPU time should be ample.

Thanks for the reply.
However my understanding was that analogRead() is quite fast. The website says that it is 10000 time a second: http://arduino.cc/en/Reference/AnalogRead (oh and you are right about 20%)
I thought the problem at this speed was sending data to computer via serial.
So my question is what is the fastest method to send 5 data to the computer? to make matters worse, to capture two of these data I have to do serial comm with the two temp sensor breakout boards.
What is the solution for super fast serial communication?

Thanks

What is the solution for super fast serial communication?

Find/develop an alternative. There is only so much you can do with serial communication.

PaulS:

What is the solution for super fast serial communication?

Find/develop an alternative. There is only so much you can do with serial communication.

Any help with this would be nice...

Thanks

I don't understand your requirements.

  • it has to read and send to computer two temperature sensors
  • all this has to happen at a minimum frequency of 1kHz.

Is your temperature really changing fast enough that you need to sample it 1000 times per second or more?

What is the PC doing with the data? Why can't the Arduino make those decisions?

Hi Paul,

The temp sensors that I am using are these: Thermocouple Amplifier MAX31855 breakout board (MAX6675 upgrade) : ID 269 : $14.95 : Adafruit Industries, Unique & fun DIY electronics and kits
Out of the two temp sensors, one of them is measuring the temp on an electronic component that can have a temp change of 25 to 100 degrees C in 100 milliseconds. So quite fast. And I need to read these two sensors (in addition to two analog sensors and one digital) every milliseconds and send the values via serial to computer for data logging and analysis.
On the PC the data are being graphed in real time using SimPlot (also the data are being stored as text files).

Thanks

FardinB:
So my question is what is the fastest method to send 5 data to the computer? to make matters worse, to capture two of these data I have to do serial comm with the two temp sensor breakout boards.

You haven't mentioned the break-out boards until now. How are they connected? What serial settings and protocol do they use? Can they actually provide samples at a sustained 1KHz?

To send the results to the PC you will need to whack the serial port speed up, use a concise message format, and hope for the best. I don't know whether you'll be able to achieve 1 KHz sample rates, but perhaps you will manage it.

Hello Peter,

This is a example code for how the temp sensor breakout board is connected and run: https://github.com/adafruit/MAX6675-library/blob/master/examples/serialthermocouple/serialthermocouple.pde
As you can see in this example the delay at the end is 1 second. I can change that to what ever I want. So no problem there (only the serial comm speed between the breakout boards worries me).
The highest speed for serial comm to PC is 115200bps. I am not sure if that is enough for this application.
Any thoughts on this?

Thanks

That thermocouple that you linked to is an SPI device. Why would you not use fast SPI protocol to talk to it, in favor of slow serial?

Hi Paul,

Could you explain the SPI protocol. Example code would be nice too.

Thanks

You're kidding, right?

I think the library that comes with the temp sensor board already uses this SPI protocol.
Am I right?