Device |
Purpose |
Comments |
LoraWAN Dev Board
|
Core microcontroller runs the software and has the radio to
transmit the data
|
Switched to an ESP32 running arduino-lmic.
This version
is more often in stock, very similar.
needs a solar panel charge module. using a custom
BQ2412 PCB
caution, DFN, challenging to hand-solder.
Adafruit bq24074
is similar, CN3791-based units are readily available. This board
runs the network code, does the
encryption/decryption/authentication, and has logic to support
firmware updates for itself and the avr.
|
GPS Module
|
Precise timekeeping. Location if it floats away. Maybe current
direction.
|
Not strictly required. I had hoped to use the altitude output but
it is not particularly precise or repeatable. This draws more
power than the rest of the system combined.
|
BMP390 Barometric Pressure Sensor
|
The best way to measure small vertical displacement over short
time scales is changes in atmospheric pressure.
|
A more common
BMP180
would work but the BMP390 is more precise.
|
Battery
|
Battery with the correct connector for dev board (Molex PicoBlade
1.25)
|
Preliminary data suggests a smaller battery would suffice.
Measurements every 2 minutes with GPS cost 15ma. This provides
lots of margin since the solar cell will probably not provide much
current on rainy days.
|
Solar Cell
|
Powers the system. Empirically provides up to about 60ma peak and
around 20-30ma for much of the day on clear days.
|
Now running 3 of these in paralell on v1 of the housing as a
single cell did not appreciably charge the battery on a rainy day.
Getting up to 150ma
|
INA2331 3-channel current sensor
|
Optional. Provides data on the solar panel performance and makes
it easy to tune and verify the power saving logic.
|
I would actually rather use an INA233 which has an integrated
accumulator but those are unobtainium due to the pandemic.
|
Antenna
|
915mhz antenna |
Chosen to sit a bit higher off the water it is kind of top heavy.
The range was way better than expected (40dbm of link budget left)
so I will probably drop to a +3 or +5 dbi antenna and drop the
transmit power.
|
UFL to rp-sma
|
connects the antenna to the dev board |
verify that both the antenna and the pigtail are either SMA or
RP-SMA
|
Custom watchdog board |
power monitoring, battery charging, system reset/power cycle
|
attiny1614 based board, attached to the ina3221 breakout |
Custom avr64db32 board |
Has a socket for the esp32 dev board. |
avr64db32 runs the data collection logic and periodically wakes
the esp for transmission
|
GY-87 10DOF - MPU6050
|
Removed Seemed like a reasonable way to measure wave
induced motion.
|
Many hours later I gave up. If you get this working... |
LoraWAN Dev Board
|
Removed Replaced with an esp32 version. Core
microcontroller runs the software and has the radio to transmit
the data
|
This version was chosen instead of the esp32 as it integrates a
solar charger and is low power. It also has external power control
circuitry to allow switching the GPS on and off to save power. It
is also based on the SX1262 which supports listen-before-talk
unlike the more common SX1278. The major caveat is it is not
supported by LMIC, but the heltec library works fine.
This version
integrates the GPS for the soldering-adverse but probably needs
external solar panel circuitry
|
GPS Module
|
Removed Replaced with a neo8m version. Precise timekeeping.
Location if it floats away. Maybe current direction.
|
Not strictly required. I had hoped to use the altitude output but
it is not particularly precise or repeatable. This draws more
power than the rest of the system combined. At some point I'll
reduce the frequency with which the GPS is switched on. There are
better GPS modules out there, but not available immediately off
Amazon.
|
Assembly |
Revision |
Changes |
Firmware |
07/07/22 (8pm) |
-
adjusted GPS settings to 2-minute interval, 2 second keep on
after lock, will dramatically reduce power (from 80 second
with 6-second post-lock).
-
added on-device power-averaging over the GPS cycle to produce
cleaner power graphs (previous power readings were over the
15-second network cycle)
- now reporting GPS search time
|
Firmware |
06/25/22 |
-
beacons are now transmitted across 8 channels most of the time
and 37 channels every 8th transmission. This is expected to
increase power usage noticably but it is clear there is plenty
of margin (at least in the summer).
-
data from the beacons is being used to adjust the link
frequency
- gps now set to keep on for 6 seconds
- join timeout added
|
Hardware |
06/25/22 |
-
Anchor line was severed (probably by a boat), buoy turned up
in Kingston and was returned (thank you!)
- Added hot glue to render the reset switches inoperative
- Added hot glue hold boards in place
- Replaced the anchor and safety buoy
- Re-painted
|
Firmware |
06/10-11/22 |
-
added the ability to dynamically change spreading factors to
increase radio robustness
-
added a 16-byte beacon on SF12 to announce the correct
settings. Responses are supported also at sf12 to allow
changes under adverse conditions.
-
tweaked gps logic, staying on for
10,5 3 seconds
after lock to increase accuracy<
-
with the SF12 beacon or the use of slower than SF7 speeds need
to drop the transmit power to 17 for some packets to stay
within the SX1276's 1% duty cycle at +20 limit.
- join timeout added
|
Firmware |
06/04/22 |
- final tweaks successfully deployed via OTA
- fixed bug where esp build timestamp was not set
- far less agressive about rebooting the esp from the avr
-
tweaked bmp390 settings, now using 16x oversampling and 100hz
collection
-
Mostly due to the support for OTA, added AES-GCM encryption as
well as a SHA256 hash to the network layer.
-
Mixed LoRaWAN and LoRa. Still sending the 24-byte every ~2
minutes data over LoRaWAN. But now sending all the raw
measurements every 16 seconds over raw LoRa.
-
New GPS control algorithm tries to obtain a fresh GPS
datapoint ever 60 seconds but limits duty-cycle to 1/8 if the
lock is slow.
|
Electronics |
v1.1 06/04/22 |
Added an i2c fram connected to the esp for LoRaWan session
storage. Replaced the ewdt board that got wet with a new copy.
|
External Housing |
v1.2 06/04/22 |
Drilled a 12-mm hole in the original housing and mounted the 1.1
vent. Installed a shelf. Not entirely sure what caused the leak so
put the electronics in an inner ziplock bag. Also added a moisture
absorber and a hose to direct any leakage from the vent to the
absorber. Repositioned buoy 2m shallower as it was slightly
submerged at high tide in high waves.
|
Electronics |
v1.0 05/22/22 |
Split appliation into 3 MCUs
-
LoRa board is now a Heltec Wireless Stick Lite (esp32). The
straw that broke the camel's back on the cubecell was the
inability to switch between raw LoRa and LoRaWan without
re-joining. This draws ~20ma when awake and ~40ma
transmitting. The ESP SPI driver makes power management not
work well.
-
The main application logic now runs on an avr64db32. This
wakes up at 16hz to collect samples continually. It wakes the
ESP every ~16 seconds to transmit data. This chip draws ~1-2ma
at 4mhz.
-
An attiny1614 is used as a watchdog. It runs an i2c slave, and
is configured to power-cycle the other components if the
system is not making progress for 90 seconds. I discovered
late that SLEEP_MODE_STANDBY seems to make the I2C slave
unreliable and so need to run this at 1Mhz with
SLEEP_MODE_IDLE. Unfortunately this chip draws more power
(3ma) than the AVR64DB32. A future revision will switch to 2x
AVR64DB32
-
Since the Wireless Stick Lite doesn't include solar charging,
a BQ24210DQCR charger is being used. This has a not-quite MPPT
version of MPPT and seems to harvest power far more
efficiently. Have seen up to 168ma off the solar panels,
although ~130 is a more common peak.
- The GPS was switched to a NEO-8M.
|
Firmware |
05/22/22 |
new features
-
Complete rewrite for new hardware. (That was the goal of
moving to esp32).
-
Continuous data collection. Raw data transmitted over raw lora
(256x samples per 16-second cycle).
-
OTA firmware updates! AVR firmware takes 35 seconds. ESP
firmware takes ~3.5m.
-
Mostly due to the support for OTA, added AES-GCM encryption as
well as a SHA256 hash to the network layer.
-
Mixed LoRaWAN and LoRa. Still sending the 24-byte every ~2
minutes data over LoRaWAN. But now sending all the raw
measurements every 16 seconds over raw LoRa.
-
New GPS control algorithm tries to obtain a fresh GPS
datapoint ever 60 seconds but limits duty-cycle to 1/8 if the
lock is slow.
|
External Housing |
v1.1 05/22/22 |
Now using a
gore-tex vent
instead of the silicone membrane. Also the top now has a shelf to
secure the components.
|
External Housing |
v1 03/12/22 |
3d-printed version deployed. Supports 3 solar cells and has a USB
port that requires only partial disassembly.
|
Electronics |
v0.2 03/12/22 |
Removed resistors for unneeded LEDs on INA3221 board.
|
Firmware |
v0.03 03/12/22 |
- Enabled WDT (which may increase current draw).
- Switched measurement to a single data collection pass.
-
Changed threshold for 2m transmission from 4.1V to 4.0V.
|
External Housing |
v0.1 03/05/22 |
Mason jar version deployed. Single solar cell. Ran 3/5/22-3/7/22
before water ingress killed the pressure sensor (and shorted out
the i2c bus).
|
Electronics |
v0.1 03/05/22 |
Removed GY-87 |
Item |
Purpose |
Comments |
Silicone
|
Pressure membrane |
Allows the pressure inside a rigid container to vary |
Silicone Sealant
|
Keeps saltwater out |
Seal the antenna and pressure membrane. |
PicoBlade M-F Cable Kit
|
Battery connector (cut in half), battery monitor |
Useful kit to assemble your own 1.25mm cables. This kit is M-F.
M-M version
|
JST-SH kit
|
Sparkfun QWIIC/Adafruit stemma cable kit |
1.0mm Pre-crimped wires and housings. Allows threading between
smaller holes. Can cut in half and solder end to device.
|
QWIIC Adapter
|
Adding qwiic ports to i2c devices, acting as a F-F adapter |
Also available
here for a
less silly price.
|
Silicone wire
|
28-awg wire |
connecting random things together |
Hard Buoy
|
Leaving the anchor in the water |
also keeps the buoy afloat if it leaks |
Weighted Line
|
Attach buoy to anchor |
sinks to avoid getting caught in props. Attached to a cinder block
as a cheap anchor.
|
Mason Jar |
Cheap pressure housing |
While I was debugging the 3d-printed one |
Lids
|
Drillable rustproof lids |
While I was debugging the 3d-printed one |