I might be able to address this question:
I would like to setup the sonde to sample every 20 minutes for 30 seconds and transmit data out every 1 hour. How should I approach this? Should I program the sonde for that sampling period using YSI’s KOR software or will the flashed firmware (my code) be responsible for putting the sonde to “sleep”, “waking up” for sample events, recording data, and transmitting data?
Sofar’s preferred way to do sample periods and duty cycles is to cycle the entire Smart Mooring bus using the Bridge Conroller. This has a few advantages:
- Saves power by having the entire system off when not sampling
- Adjustable configurations that can be set over the terminal without adjusting the code on the mote
- Can be adjusted over Satellite or LTE by contacting support@sofarocean.com which can help during remote testing or seasonal deployments (e.g. less sun in Alaska in the winter…)
One way to approach this…er…approach would be:
- Find out how much time the Exo needs to do all the things it needs to do such as power on, self check, run all the different sampling things, and retrieve the data over serial (with the necessary RS232 adapter board they sell) or SDI12. Don’t forget the wiper operations on any optical sensors! Let’s call that time hypothetically, 6 minutes.
- Think about how often you wan to sample like this. Let’s say every hour.
- You code should be set up to leave alone the bridge configurations as we’ll be adjusting these manually in this approach…but it should run when it starts, wait the appropriate amount of time (6 minutes + 1 minute to be safe) and then trigger the telemetry, SD card saves, and any logs you want to log.
- Manually set the bridge configurations for every, let’s say 8 minutes (6 for the Sonde to do it’s thing, one minute for you code to do all it’s things, and 1 more minute for some unforseen issues), every hour. A more confident firmware programmer can probably suggest more educated timings. To manually set the bridge use these commands on the terminal on SPOTTER:
bridge cfg set 0 s u bridgePowerControllerEnabled 1
bridge cfg set 0 s u sampleIntervalMs 3600000 # Sets interval to 1 hour (ms)
bridge cfg set 0 s u sampleDurationMs 480000 # Sets on-duration for 8 min (ms)
bridge cfg commit 0 s
You can give this a try with just the regular “simple” example in the guide as that would provide internal data at this cadence.
I don’t know how to answer the next question:
I cannot figure out how to successfully send a message to the sonde. I would like to have code written that sends a command to initiate the wiper process before the sonde starts its sample period. Again, would this be hard coded or part of the sonde’s deployment setup?
@umakat , do you have any ideas on what @cmchrist can do here that’s pretty straightforward? Does the Exo do this on it’s own or do we need to send these commands as part of the code?
@cmchrist I’d also take a minute to follow @umakat’s outsanding documentation on her effort to use SDI12 to talk to the Exo3.