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...
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 !
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.
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.
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, ^^.
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?
In TeraTerm: File->Log
and everything you see in the monitor get logged into a file of your choice..
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..
So here are a few news about this experiment. It is able to acquire data from a detector made of a scintillator and a PIN diode or from a PhotoMultiplier. It will display directly the histogram of the spectrum on the screen connected to the Arduino. When the spectrum is thought to be good enough, one can press a physical button connected to the Arduino in order to save the actual histogram into a file. I find this method much more efficient and useful than using a terminal emulator and saving each entry in the file. I guess that will depend on what data you have and what you want to do with them.
Here are the final version of the files that allow to do that, maybe this will be useful to someone.
HTerm is the best, it has the connect + save data buttons right next to each other. All the main functionality you'd expect is on the main screen. Nothing to install either, it is one file.
Their homepage below has the download link at the top, it is in german, but the application is in English.