GithubHelp home page GithubHelp logo

gillhofer / humpi Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 4.0 651 KB

Using a Raspberry Pi to measure the frequency of the synchronous grid of continental europe

License: GNU General Public License v2.0

R 11.83% Python 88.17%

humpi's Introduction

#HumPi Using a Raspberry Pi to measure the frequency of the synchronous grid of continental europe

Hardware requirements

  • Raspberry Pi 2
  • USB-Soundcard with a microphone or line input
  • AC-Power supply with V_out smaller than ~10V.
  • Voltage divider to 30mV for microphone input, 1V RMS for line in
  • Phone connector

Sample circuits can be found within the HW directory.

Software requirements

  • Python
  • SciPy (HowTo)
  • numexpr, alsaaudio and ntplib. You can install these via pip:
    $ pip install -r requirements.txt

==========================

Version 0.6

Once started, HumPi captures the signal from an USB-Soundcard and calculates the frequency continuously by fitting a sine on the last second of 'sound'. The frequency of this sine (= the measurment) may be stored to disc using the --store parameter or may be sent to netzsinus using the --sendServer parameter. In case of sending, please also provide an API-Key by specifying the --apikey option as well as a meterID (--meterid). More information about sending can be found within the netzsinus server documentation. If you are annoyed by the console output, there is a --silent option. With higher number only more important messages are given.

HumPi requires you to provide a device parameter as the first argument. It specifies the ALSA device to use. The parameter can be found by either try and error, or by using the script within the python directory.

Install & Run

git clone https://github.com/gillhofer/HumPi.git
./HumPi.py 3 --sendServer http://netzsin.us:8080 --apikey secretkey1 --meterid meter1 --store m.csv --silent 0

TODO

  • Correct for soundcard clock errors.
  • Limit the number of POST requests if data is sent.
  • store raw signal in case of an unusual power grid event

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.