Skip to content

gillhofer/HumPi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published