Go Down

Topic: Save data to file (Read 3 times) previous topic - next topic

Emix

Hi,

I've been looking for a way to store the data of the Serial Monitor to a file on my computer and I found a lot of topics talking about it but no suitable answer. I think this would be a great improve of the arduino program. Here's a first try to allow the Serial Monitor to switch between writing to the screen the aquired data and writing to a file. Only three arduino java files have been modified and all modifications are starting with a comment //bay.
Maybe this could be helpful to someone...

Best regards

AWOL

Most proper terminal emulators allow storage to a file - no need to change anything.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Emix

How do you do that ? I haven't found anything on the web but weird scripts that try to catch what the Serial Monitor says... If you have a better solution, I'm really interested !

AWOL

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Emix

Alright but there you need to run a script in parallel to the arduino program. I thought that it would be nice if the arduino program could do this on his own.

liudr

Try this:

https://sites.google.com/site/terminalbpp/

You can even plot data with it besides simple logging. Toggle arduino reset. etc.

aarondc

Thanks for the idea :D

Do you mind providing a little more information about why you wish to save serial output to a file?
Windows serial port monitor: Tellurium | Arduino serial port debugging library: DBG | Cusom LCD char generator | Technical questions will only be answered in forum threads

Emix

My arduino is aquiring data from a circuit with a scintillation cristal in order to measure the spectrum of radioactive sources. It is displaying instantly the histogram on a lcd screen and the number of the channel of each hit is displayed in the serial output. So in order to be able to save the histogram created, I'd like a way to say to the program that it should save it into a file.

liudr

Emix,

Is this some sort of physics experiment? I am interested in more details, such as how arduino is hooked up to the scintillator.

AWOL

Yes, I'd be interested in the details too.
Is it an array of scintillators responding to different energies/frequencies?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

aarondc

+1, video too, please :D
Windows serial port monitor: Tellurium | Arduino serial port debugging library: DBG | Cusom LCD char generator | Technical questions will only be answered in forum threads

Emix

Hi guys, it's nice to see that there are some people interested by physics !  :)

So, yes, it's a physics experiment. It's a small setup for the practical work of physics students. I only have one cristal, so the energy range is limited but good enough for the purpose of this experiment. The scintillator is connected to a PIN diode which is in turn connected to a pcb specifically designed for this experiment. The most important part of the circuit is the sample and hold feature that holds the signal detected long enough so that the arduino can read it and process it. It's quite nice and it's starting to work well but the setup is not fully finished yet, so the video will maybe come later, ^^.

liudr

So you are doing less than say 200,000 counts per second then with sample and hold? I only know how to use the detector with single or multichannel analyzers, which turn the pulses into digital signals for the next stage of things, such as counters. So you are not using these analyzers or counters but a sample and hold circuit? I could do something like this if it doesn't involve high voltage. The detector needs a few thousand volts, but the current is low, right?

pito

#13
Jul 27, 2013, 05:50 pm Last Edit: Jul 27, 2013, 06:02 pm by pito Reason: 1
In TeraTerm: File->Log
and everything you see in the monitor get logged into a file of your choice..
Quote
So you are doing less than say 200,000 counts per second then with sample and hold?

Hopefully not too close to the experiment, though :)

PS: long time back I built a detector with PIN diode (7mm2 active area), without a scintillator. I get 0.05 - 3 pulses per second (needle-shaped pulses with different amplitudes, ~30uS long) based on irradiation. Looking for a good peak detector with S/H too..  :)

Emix

It's a small scale experiment for students, so the source is really weak, < 100 ?Cie and it needs a low voltage, 12 Volts.

Go Up