orgua / shepherd

Synchronized Energy Harvesting Emulator and Recorder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SHEpHERD: SyncHronized Energy Harvesting Emulator RecorDer

QC-Tests Documentation Build Pru Code Quality PyPiVersion CodeStyle

Testbed-Webinterface: https://shepherd.cfaed.tu-dresden.de

Python-Modules for Users: https://github.com/orgua/shepherd-datalib

Documentation: https://orgua.github.io/shepherd

Main Project: https://github.com/orgua/shepherd

Target-HW & -SW: https://github.com/orgua/shepherd-targets

Webservice-Repo: https://github.com/orgua/shepherd_webservice

Dev-Documentation: https://github.com/orgua/shepherd_v2_planning


Batteryless sensor nodes depend on harvesting energy from their environment. Developing solutions involving groups of batteryless nodes requires a tool to analyze, understand and replicate spatio-temporal harvesting conditions. shepherd is a testbed for the batteryless Internet of Things, allowing to record harvesting conditions at multiple points in space over time. The recorded data can be replayed to attached wireless sensor nodes, examining their behavior under the constraints of spatio-temporal energy availability.

Features

  • High-speed, high resolution current and voltage sensing
  • Technology-agnostic: Currently, solar and kinetic energy harvesting are supported
  • Remote programming/debugging of ARM Cortex-M MCUs using Serial-Wire-Debug
  • High resolution, synchronized GPIO tracing
  • Configurable, constant voltage power supply for attached sensor nodes
  • Level-translated serial connection to the attached sensor nodes

For a detailed description see our Paper or the official documentation.

A shepherd instance consists of a group of spatially distributed shepherd nodes that are time-synchronized with each other. Each shepherd node consists of a BeagleBone, the shepherd cape and either an energy harvesting source or a target MCU board to test.

This repository contains the hardware design files for the shepherd cape, the software running on each shepherd node as well as the tool to orchestrate a group of shepherd nodes connected to a network.

Quickstart

Start by assembling your shepherd nodes, consisting of a BeagleBone Green/Black, a shepherd cape, a harvesting capelet and a target capelet. The next step is to manually install the latest Ubuntu Linux on each BeagleBone. You can install it to SD-card or the on-board eMMC flash, following the official instructions. Make sure to follow the instructions for BeagleBone. Alternatively there are two more detailed guides in the shepherd documentation.

The following instructions describe how to install the shepherd software on a group of shepherd nodes connected to an Ethernet network. We assume that your local machine is connected to the same network, that the nodes have internet access and that you know the IP address of each node.

If you haven't done it yet, clone this repository to your local machine:

git clone https://github.com/orgua/shepherd.git

Next, install the tools used for installing and controlling the shepherd nodes. We'll use Ansible to remotely roll out the basic configuration to each shepherd node and shepherd-herd to orchestrate recording/emulation across all nodes. The tools are hosted on PyPI and require Python version >= 3.6. You'll also need to have sshpass installed on your machine, which is available through the package management system of all major distributions. Install the tools using pip:

pip3 install ansible shepherd-herd

The inventory/herd.yml file shows an example of how to provide the host names and known IP addresses of your BeagleBones. Adjust it to reflect your setup. You can arbitrarily choose and assign the hostnames (sheep0, sheep1, in this example) and the ansible_user (jane in this example). [TODO: update description with roles].

sheep:
  hosts:
    sheep0:
        ansible_host: 192.168.1.100
    sheep1:
        ansible_host: 192.168.1.101
    sheep2:
        ansible_host: 192.168.1.102
  vars:
    ansible_user: jane

Now run the bootstrap.yml Ansible playbook, which sets the hostname, creates a user and enables passwordless ssh and sudo:

ansible-playbook deploy/bootstrap.yml

Finally, use the deploy.yml playbook to set up the shepherd software with the configured roles from inventory:

ansible-playbook deploy/deploy.yml

Usage

Record two minutes of data:

shepherd-herd harvester -d 120 -o recording.h5 -a mppt_voc

The command starts the recording asynchronously and returns after all nodes have started recording. While the nodes are still recording (indicated by blinking of LED 1 and 2), prepare a directory on your local machine:

mkdir ~/shepherd_recordings

After the nodes stop blinking, you can retrieve the data to analyze it on your local machine:

shepherd-herd retrieve recording.h5 ~/shepherd_recordings

For a detailed description of the HDF5 based data format, refer to the corresponding documentation.

Finally, replay the previously recorded data to the attached sensor nodes, recording their power consumption:

shepherd-herd emulator -o consumption.h5 recording.h5

Try shepherd-herd --help or check out the documentation here for a list of all options.

Problems and Questions

If you experience issues or require additional features, please get in touch via e-mail or by creating an issue on GitHub. The issue-tab also gives an overview for current roadmaps and milestones.

People

shepherd development is lead at the Networked Embedded Systems Lab at TU Dresden & TU Darmstadt as part of the DFG-funded project Next-IoT.

The following people have contributed to shepherd:

About

Synchronized Energy Harvesting Emulator and Recorder

License:MIT License


Languages

Language:C 78.2%Language:Python 19.7%Language:Makefile 0.9%Language:Roff 0.5%Language:Assembly 0.4%Language:Batchfile 0.2%Language:Alloy 0.1%