Power meter

From neil.tappsville.com
Jump to navigationJump to search

Describe power_meter here.


2014

I have chosen to go with the openenergymonitor.org products (because they do 'real' usage by using voltage calibration and its all built on ardunio and raspberry pi) http://openenergymonitor.org/emon/


I've chosen (for now) to use a standalone emoncms installation and to run it on a raspberry pi (eventually I'll migrate it to the Synology NAS).


How to partition the raspberry pi hdd http://superuser.com/questions/662614/raspberry-pi-how-to-format-hdd - ssh into raspberrypi as pi

Update to the latest version of emoncms

cd /var/www/emoncms/
git pull /var/www/emoncms
git pull /var/www/emoncms/Modules/packetgen

expand the disk
get gparted

sudo apt-get install gparted

export display
export DISPLAY=x.y.z.a:0
start mobaxterm on windows machine

sudo gparted
- browse to sda
create ext4 partition in remaining space


make a mount point
sudo mkdir /hdddata
sudo vi /etc/fstab

add entry
/dev/sda3       /hdddata        ext4    defaults          0       2

sudo mount -a

verify the additinal mountpoint is in use

df -h
pi@raspberrypi / $ df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs          2.6G  2.3G  250M  91% /
/dev/root       2.6G  2.3G  250M  91% /
devtmpfs        235M     0  235M   0% /dev
tmpfs            49M  260K   49M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs            98M     0   98M   0% /run/shm
/dev/mmcblk0p1   59M   19M   41M  32% /boot
/dev/sda3       915G   72M  868G   1% /hdddata


sudo vi /etc/fstab

Problem with recieving data from the monitors

Emon Pi losing connection to EmonTX and EmonTH Sometimes the Pi simply doesnts talk to the SPI device.

run

sudo reset_rfm2pi
sudo /etc/init.d/emonhub restart


resetrfm2pi rfm2pi.txt openenergymonitor.org/emon/sites/default/files/resetrfm2pi.txt

#!/usr/bin/env python
"""


"""

__author__ = 'Paul Burnell (pb66)'
__date__ = '14-05-2015'
# http://openenergymonitor.org/emon/node/5549

import RPi.GPIO as GPIO
import time

pin = 7 # P1-7 (BCM pin 4 or WiringPi pin 7)

try:
        GPIO.setmode(GPIO.BOARD)
        GPIO.setup(pin, GPIO.OUT)
        GPIO.output(pin, GPIO.HIGH)
        time.sleep(0.12)
        GPIO.output(pin, GPIO.LOW)
        GPIO.cleanup()
except Exception as e:
        print(e)


Tools to format a USB HDD as fat32

install dosfstools

apt-get install dosfstools

then use gparted (if you dont install dosfstools you cant format a disk using fat32)


Older

Stand alone unit - serial out apparently Current Cost - £49.64

www.amazon.co.uk/dp/B004NCS0BW/?tag=fsa001-21


www.filesaveas.com/powermeters.html


NZ Sales agent $183.50 www.smartnow.co.nz/store/product.php?id_product=10


Fluksometer www.rowetel.com/blog/?page_id=312


2 way power switch 240v AC



G ---------------------------------->

    1 ---------- 1

L-->C            C--BLUE----(x) ----+
                                    ^
    2 -----------2                  ^
                                    ^
N ----------------------------------^

Blue from second switch tailed back to first then off to the light