In Water Vel Sensor FFT SD Logging Test
Test Details
Date: 2020-07-08 to 2020-07-15++
Location: (-37.844963, 145.210917)
Hardware ID: 5K6
BoSL Velocity Database ID: VEL_SD_TEST
Description: Logging of FFT output of velocity sensor to determine the best way to extract velocity information and determine the effect of different speed particles.
On 2020-09-29 A second sensor was added to the logging site:
Hardware ID: ID008
BoSL Velocity Database ID: VELOCITY_ID008
Data:
1. CSV file uploaded to: http://www.bosl.com.au/IoT/testing/a.php, SITE ID: VEL_SD_TEST,
2. CSV file retrieved from SD card of ID5K6
3. CSV file retrieved from hach velocity sensor
4. CSV file uploaded to: http://www.bosl.com.au/IoT/testing/a.php, SITE ID: VELOCITY_ID008,
2. CSV file retrieved from SD card of ID008
Hardware
A BoSL Velocity sensor is to be installed next to a hach probe. The BoSL sensor is to be connected to an Arduino Uno with SIM5320 shield and SD card reader. Wiring is as follows.
BoSL Velocity | Arduino Uno |
---|---|
GREEN | 5V |
HALF GREEN | GND |
ORANGE | D7 |
BLUE | A1 |
BROWN | A0 |
SD Card Shield | Arduino Uno |
---|---|
5V | 5V |
GND | GND |
CS | D6 |
MISO | D12 |
SCK | D13 |
MOSI | D11 |
The SD card should be format as FAT16 and empty before inserted. Only remove the SD card when the blue "W" LED is flashing on the SIM5320, else corruption of data may occur.
The velocity id 008 sensor should be connected to a bosl board with a 3V3 - 5V converter and SD card the wireing should be as follows:
BoSL Velocity | 3V3 - 5V converter |
---|---|
GREEN | 5V |
HALF GREEN | GND |
ORANGE | RST |
BLUE | TX |
BROWN | RX |
HALF ORANGE | WKE |
3V3 - 5V converter | BoSL |
---|---|
VPP | VPP |
GND | GND |
RST | D7 |
RX | D8 |
TX | D9 |
EN | D6 |
Code
Code to be uploaded to Arduino Uno: File:SIM5320SD.ino.
Velocity sensor:
File:Velocity Code.zip
The board selected in the Arduino IDE should be: Arduino Pro/Pro Mini 3V3 8 MHz
After week 2, the following code was used: File:Velocity Firmware rev 0.1.1.zip The main changes being that the number of scans was increased to 8 in a test to reduce the noise of the sensor
After week 6, the following code was used: File:Velocity Firmware rev 0.1.3.zip
To upload code to the velocity sensor. The velocity sensor should be wired
BoSL Velocity | USB - TTL Converter |
---|---|
GREEN | 5V |
HALF GREEN | GND |
ORANGE | RESET |
BLUE | RX/TX |
BROWN | TX/RX |
Note: the RX/TX labeling is not always consistent so both combinations may need to be tried.
For the velocity sensor (ID: 008) the following code was used on the BoSL board: File:BoSL Velocity SD logging.zip The code on the sensor itself was: File:Velocity Firmware rev 0.1.3 ID008.zip
After week 10 the following code was used: File:BoSL Velocity SD logging 0.2.zip, File:Velocity Firmware rev 0.1.4 ID008.zip
Data Format
1.,4.
This is a CSV with sample line:
02/07/20 08:44:00 AM,10 ,,,,,,52 ,0 ,,,,
[DATE] , [LOG ID],,,,,,[VEL],[VEL SD],[VEL AMP],,,
DATE -- datetime of logging (UTC)
LOG ID -- number incremented each log. Used to synchronize with logs on SD card. Reset on power up.
VEL -- Calculated velocity (mm/s).
VEL SD -- Calculated standard deviation of velocity FFT peak (mm/s).
VEL AMP -- Calculated amplitude of velocity FFT peak (mm/s).
2.,5.
This is a CSV with sample line:
6 ,,,1331.67,26003.81,...[x128 total]...,17.86,J ,19.69 ,,,,276 ,214
[LOG ID],,,[VEL BIN x128] ,[J],[SCALE],,,,[VEL],[VEL SD]
LOG ID -- number incremented each log. Used to synchronize with logs on SD card. Reset on power up.
[VEL BIN x128] -- amplitude of velocity bin of FFT, lowest frequency bin first.
[J] -- Break character to signal end of FFT
[SCALE] -- Scale factor which is internally used to scale data before computing FFT to fit in 16-bit int limit. Logged data does not need to be scaled
VEL -- Calculated velocity (mm/s). (Same as upload)
VEL SD -- Calculated standard deviation of velocity FFT peak (mm/s). (Same as upload)
3.
This is a CSV with sample line:
19/JUN/20 16:02 0.081 0.12
[DATE] [TIME] [LEVEL] [VEL]
[DATE], [TIME] -- datetime of logging timezone of logger. Not always same as BoSL date
[LEVEL] -- water depth (m)
[VEL] -- Water velocity (m)
Data
1. File:In water velocity sensor FFT sd logging test 1.csv
2. File:In water velocity sensor FFT sd logging test 2.1.csv, File:In water velocity sensor FFT sd logging test 2.2.csv, File:In water velocity sensor FFT sd logging test 2.3.csv
3. File:In water velocity sensor FFT sd logging test 3.csv
In the second week of the test the following data was collected.
1. File:In water velocity sensor FFT sd logging test 1 week2.csv
2. File:In water velocity sensor FFT sd logging test 2 week2.csv
3. File:In water velocity sensor FFT sd logging test 3 week2.csv
Week 3:
Week 4:
Week 5 *non-consecutive:
Week 6 :
Week 7 :
Week 8:
Week 9: