jvoermans / Vibration_Logger

Logger to measure sea ice vibrations
3 stars 1 forks source link

addition of temperature sensors #21

Closed jerabaul29 closed 3 years ago

jerabaul29 commented 3 years ago

@jvoermans I added the temperature sensors. The latest version of the c++ code should log the whole array of temperature sensors in real time during the whole time, not just at the end. I think this may be quite interesting, I am curious if for example we may see temperature fluctuations under the ice when there is wave activity.

There are for now 4 temperature sensors. You can change this here:

https://github.com/jvoermans/Vibration_Logger/blob/3c5321806c81e251bba3ad74b8802f9be7b0e67f/material_Jean/Due_SD_high_frequency_logger/src/params.h#L70

Can you:

It is difficult to debug when I do not have all the hardware myself, so we may need to iterate a bit between you and me back and forth to debug. I will add some serial printing in the hours to come, that will help find problems if there are any. Let me know if anything does not work. You should see some messages in the kind now in the CHR messages:

TMP,20.00,21.00,20.50,20.45

for example if the temperature you measure is typically around 20 degrees and you use 4 sensors.

jerabaul29 commented 3 years ago

I added some serial debugging in the temperature sensors management class. You can turn it on or off together with the rest of the debugging information by setting this:

https://github.com/jvoermans/Vibration_Logger/blob/c35d6c199e359fc67f17bbc6ea438b2aca2c23ae/material_Jean/Due_SD_high_frequency_logger/src/main.cpp#L51

jvoermans commented 3 years ago

Great thanks. I only have 1 temperature probe right now though. I wanted to test the sonar first this weekend before buying more sensors from them! I'll test with one probe on Tuesday, then I'll be in the lab again.

Not sure if we can see temperature variability at wave scale as accuracy is only 0.1 degrees (I bet such variability is much smaller), and not sure how fast its response actually is.

jerabaul29 commented 3 years ago

Ok, then can you just set the number of temperature sensors to 1 in the code and try it? You will still need to use the multiplexer chip between the Due and the temperature sensor for things to work well I think. I will be excited to hear about how it goes with more temperature sensors.

We will see :) . We can at least easily compute the mean, min, max, and standard deviation, I could compute this on the fly and make it available :) .

jvoermans commented 3 years ago

It is working :) should be around 24-25 degrees (it is warm today). in 2 files, the temperature should have increased to 29ish temporarily. I added the files in a folder. I've added/committed/pushed files for first time, so if something is done incorrect/weirdly, let me know.

I attached the temperature probe to first port of the multiplexer. Couldn't find quickly whether or not you specified that anywhere...

jerabaul29 commented 3 years ago

Perfect :) Will look at it now.

Yes, the idea is that you should have multiplexer -> sensors, with the sensors on the ports, from first port to last port.

jerabaul29 commented 3 years ago

Updated the wiring readme in the sketch now. Did you try with only 1 sensor for now? Can you let me know when you are able to try with several sensors? :) Remember when you change the number of sensors in the future to set the right value in the code, see first post here :) .

jerabaul29 commented 3 years ago

Ok, I confirm that I can see the temperature measurements, this looks to be working fine :)

I did a small improvement now, if you have the possibility to have a new test and upload new test files that could be great :)

There was no GPS fix last time, if you have possibility to have some GPS fix next time great too, but this is not too critical. Looking forward to the testing with several sensors too when you receive them :) .

jvoermans commented 3 years ago

Yes, I changed the number of sensors to 1.

I'll redo Thursday and will walk outside with the instrument ;)

I'm not sure when I can test with multiple sensors, still need to decide what exactly to buy from them (which is a lot). Perhaps I'll have to do that in two terms...

jerabaul29 commented 3 years ago

Ok, no worries :)

jvoermans commented 3 years ago

I uploaded some files including the latest sketch and gps fix: https://github.com/jvoermans/Vibration_Logger/tree/master/material_Jean/BinarySdDataParser/all_example_data/example_data_Joey_temperatureprobe2

There is a backorder on the temperature probes, so I think I'll have them in about 3 weeks.

jerabaul29 commented 3 years ago

The data you collected looks perfect, everything is working well :)

Just by curiosity: the geoduinos were not connected, right? :) I can see it because of how the fluctuations on the ADC channels look like. No hurry, but will be curious to see how well the geoduinos work.

jerabaul29 commented 3 years ago

So this seems to be fully functional now, closing.