# Packages
# README
#+TITLE: README for glacier #+EMAIL: [email protected]
This repository contains the hardware and software design for a two station geophone/accelerometer glacier installation. There are two stations connected via a point-to-point wireless link. The "glacier" station houses the sensors and the "lodge" station houses the internet communications.
-
Lodge ** Summary The Lodge station is composed of the following high level components:
- Battery Bank
- Solar Panels
- Charge Controller
- Raspberry Pi
- AC Mains Charger (Summer)
- Proxim Wireless
- ExplorNET Router/Dish
It's function is to receive data from the glacier over the Proxim wireless link and then relay that information to the web. Note that it does this merely as a router/NAT gateway. The glacier itself runs software that connects to the internet. The Lodge station also has a hard drive backup of the data that the Glacier station has collection.
** Hardware This is a description of the hardware components. For wiring/connection diagrams see below.
***** Raspberry Pi 3 Model B v1.2 https://www.amazon.com/Raspberry-Pi-RASPBERRYPI3-MODB-1GB-Model-Motherboard/dp/B01CD5VC92/ref=sr_1_1
See 'Software' section for a description of the operating system and daemons/services/etc...
***** USB To Ethernet Adapter Provides two extra USB ports as well as the Ethernet port for the Proxim.
***** Power Bus Board This board consolidates a fuse as well as supplying connections for various voltage regulators. Fewer of the on-board regulator positions ended up being used as power consumption and plans changed.
The schematics and PCB for this board are in the ~power-bus/hardware~ directory.
Attached to this board are:
1) 1 12V 2A voltage regulators (for powering a monitor during maintenance tasks and Obsidian)
https://www.pololu.com/product/2577
2) 1 5V 3A voltage regulators, soldered in place.
https://www.amazon.com/1PCS-Converter-Regulator-Power-CPT-UL-1/dp/B075KCLDBC
3) A 12V 3A regulator (mounted below)
https://www.powerstream.com/DC3611.htm
***** Power Control Board
This board is used to turn on/off external devices, specifically the Proxim and the Internet (via a Relay)
The schematics and PCB for this board are in the hardware/power-control directory. These can be ordered from OshPark.
***** Proxim Wireless Station http://www.proxim.com/products/point-to-multipoint/tsunami-mp-10100-series
See Proxim Wireless section for details.
***** MorningStar Solar Charge Controller, Modbus to RS232 Adapter, and RS232 to USB Adapter https://www.amazon.com/Morningstar-PS-MPPT-40M-Prostar-Charge-Controller/dp/B01N2773O8/ref=sr_1_1
See MorningStar Charge Controller section for details.
***** Batteries (x24) ***** AC Battery Charger http://www.xantrex.com/power-products/battery-chargers/truecharge-2.aspx
This charges the batteries off the generator power that's available during Lodge operating hours.
***** Internet Provider's box and AC Inverter https://www.amazon.com/BESTEK-300W-Power-Inverter-Adapter/dp/B004MDXS0U/ref=sr_1_19
It might be possible in the future to run the Internet directly from the
DC, unfortunately we learned the power details related to this box too
late to get that in.
** Software
***** Scheduled cron jobs:
| Schedule | Name | Task |
|------------------+----------------+---------------------------------------------------------------------------|
| daily | time | Sync time via ntpdate. |
| 30min | resilience | Checks for connectivity and or any other problems that a restart may fix. |
| hourly | morningstar | Read MorningStar status over ModBus and write to logs. |
| hourly | logrotate | Rotate log files. |
| 5min | status | Log disk status and uptime information. |
| 5min | local-backup | Copy archived data to the external HDD. |
| 5min | glacier-logs | Copy glacier logs to the lodge. |
-
Glacier The Glacier station houses the Geophone and other sensors itself and transmits their information, live, down to the lodge. It's high level components are:
- Battery Bank
- Solar Panels
- Charge Controller
- Raspberry Pi
- Proxim Wireless
- Geophone
** Hardware This is a description of the hardware components. For wiring/connection diagrams see below.
***** Raspberry Pi 3 Model B v1.2 https://www.amazon.com/Raspberry-Pi-RASPBERRYPI3-MODB-1GB-Model-Motherboard/dp/B01CD5VC92/ref=sr_1_1
See 'Software' section for a description of the operating system and daemons/services/etc...
***** USB To Ethernet Adapter Provides two extra USB ports as well as the Ethernet port for the Proxim.
***** Power Bus Board This board consolidates a fuse as well as supplying connections for various voltage regulators. Fewer of the on-board regulator positions ended up being used as power consumption and plans changed.
The schematics and PCB for this board are in the ~power-bus/hardware~ directory.
Attached to this board are:
1) 2 12V 2A voltage regulators (for powering a monitor during maintenance tasks and Obsidian)
https://www.pololu.com/product/2577
2) 1 5V 3A voltage regulators, soldered in place.
https://www.amazon.com/1PCS-Converter-Regulator-Power-CPT-UL-1/dp/B075KCLDBC
3) A 12V 3A regulator (mounted below)
https://www.powerstream.com/DC3611.htm
4) 1 Adjustable Regulator (set to 15V for the Geophone)
https://www.pololu.com/product/2573
***** Proxim Wireless Station http://www.proxim.com/products/point-to-multipoint/tsunami-mp-10100-series
See Proxim Wireless section for details.
***** MorningStar Solar Charge Controller, Modbus to RS232 Adapter, and RS232 to USB Adapter See MorningStar Charge Controller section for details.
***** Batteries (x15)
** Software ***** uploader Monitors for incoming data, uploads the files, and then archives them.
***** Scheduled cron jobs:
| Schedule | Name | Task |
|----------+-----------------+---------------------------------------------------------------------------|
| daily | time | Sync time via ntpdate. |
| 30min | resilience | Checks for connectivity and or any other problems that a restart may fix. |
| hourly | morningstar | Read MorningStar status over ModBus and write to logs. |
| hourly | logrotate | Rotate log files. |
| 5min | status | Log disk status and uptime information. |
| 5min | local-backup | Copy archived data to the external HDD. |
| 5min | mirror-obsidian | Copy obsidian data. |
| 5min | data-roller | Delete old files to ensure free space on the memory card. |
-
Operating System Each of the Raspberry Pi's is running an instance of Tiny Core Linux (piCore-14.1.0) Tiny Core Linux is specifically designed for embedded situations where reliability is important. Key features include:
- Low memory (runtime and physical)
- Resiliencey via a read only runtime.
TCL will start and run directly from RAM and any changes that should be saved across restarts need to be specifically saved.
Several changes were made to the default piCore image, documented below. Note, also, that the process for generating images is automated and stored in the
tcedirectory. These scripts serve as a more authoriative source of documentation for how to regenerate these images, should tha tbe necessary.
** Networking
The private network used by the Pis and spanned by the Proxim wireless is 169.254.128.0/24 This is the default network for the Proxim stations. The obsidian is configured to run on 169.254.127.0/24 Because the Pi's only have one network port, USB Ethernet Adapters are used to provide a second one.
| IP | Iface | |-----------------+-----------------------------| | 169.254.128.129 | Lodge IP | | 169.254.128.130 | Glacier IP | | 169.254.128.131 | Lodge Proxim IP | | 169.254.128.132 | Glacier Proxim IP | | 169.254.127.130 | Glacier Obsidian Network IP |
** Startup
Startup is controlled via /opt/bootlocal.sh and /opt/bootsync.sh like any
other standard TCL installation. These are configured to call machine
specific scripts after common work is done. These are located under
/opt/glacier and /opt/lodge
| Script | Tasks |
|-----------------------------+----------------------------------------------------------------------------------------|
| /opt/bootlocal.sh | Configure Pi powersave mode. Start SSH/hamachid and start await-wireless.sh |
| /opt/bootsync.sh | Configure DNS. Create folders that must always be present. Run ntpd. |
| /opt/glacier/bootlocal.sh | start tunnellers for SSH and uploader, adc wrappers. |
| /opt/glacier/bootsync.sh | Configure proxim (eth0) and obsidian (eth1) interfaces. |
| /opt/lodge/bootlocal.sh | Start tunnellers for SSH and rsyslog. |
| /opt/lodge/bootsync.sh | Configure proxim network iface (eth1) Start DHCPC for internet connection on eth0. |
** Cron Jobs A number of cron jobs are included by default on either machine (see above) Those scripts that only run at a specific machine are toggled during the image creation. They can also be customized via tweaking mydata.tgz (see TCL documentation)
** Rsyslog
Tiny Core Linux uses a trimmed down syslogd by default. We opted to include
rsyslog for the remote forwarding and configuration. There are patches in
tce that are applied to disable syslogd and enable rsyslogd. Also, the
configuration is available there as well.
-
Monitoring AWS Server Can be a small instance, even free tier. This is only used to aggregate logs for monitoring and serve as a location for backup SSH tunnels to originate.
-
Proxim Wireless ** Power The Proxim wireless can be powered using 12V DC (max 3A) over the 12V/Access Port. There are directions in the Proxim documentation for creating an RJ11 cable to provide this power. This cable is then connected to the 12V 3A voltage regulator.
** Hardware/Installation Antenna is mounted to the side of the Laundry building at the lodge and was aligned using the Proxim aiming dongle. This dongle is connected to the 12V/Access Port and emits a tone at a frequency that indicates how good the alignment is. Because the 12V/Access Port is how we power the device in standard operation aiming is done while running on AC power using a PoE injector.
The Proxim station has an internal heater and can be mounted outside. A log of it's temperature is also available in the UI.
The unit was grounded and the all the cabling was wrapped in weather proofing tape as suggested in the documentation.
** Configuration Only one thing was changed in the Proxim wireless configuration from a standard factory installation and that is the Channel was changed to 140 from 160.
The link status can be monitored via the Proxim's internal web server (available on port 8080) In the out of the box configuration the interfaces are located at:
Lodge: http://169.254.128.131
Glacier: http://169.254.128.132
There is a script open-proxim-forwards that can be used to forward local
ports to these interfaces over SSH to make browsing them easier remotely. For
more details on the Proxim stations please see the reference folder for their
manuals.
- MorningStar Charge Controller ** Configuration Set the DIP switches to force 12V mode and to enable ModBus. All other defaults are acceptable.
- Obsidian Accelerometer ** Hardware See design files for mounting information. ** Configuration See repository for an export of the configuation.