Energiemeter

From VoidWarranties - Hackerspace Antwerp, Belgium
Revision as of 23:55, 30 September 2014 by Warddr (Talk | contribs)
Jump to: navigation, search


Energiemeter
What:
We zijn bezig met het uitzoeken van de werking van AC current clamps, en hoe we ze kunnen gebruiken om het stroomverbruik van de space in kaart te bregen. Hier is de progress.
Event.png
Participants:
warddr, Berz
Category:
Electronics
Locations:
Den Bunker

Contents

11 maart

5V ----- 330kR ------ 330kR ----- GND -----
                 |                 |      |
                 |                 |      |
                 |                 |      |
             SPOEL p1 --------- 100nF -- 10µF
                 |
                 |
                 |
                68R
                 |
                 |
                 |
A1 --------- SPOEL p2


code

arduino

void setup() {
  Serial.begin(115200);
}
void loop() {
  Serial.println(analogRead(A0));
}

python

from serial import Serial
from matplotlib import pyplot
import time

def millis(): #give current time in miliseconds
    return int(round(time.time()*1000))

ser = Serial('/dev/ttyACM0',115200,timeout=2)
ser.open()
start = millis()               
x=[]
y=[]
while True:
            mytime = millis()-start
            reading = ser.readline()

            if ((mytime > 3250) and (mytime < 3500)):
                x.append(mytime)
                y.append(reading)
            if (mytime>3500):
                break
ser.close()

pyplot.plot(x, y, '-' )
pyplot.show()
for idx,item in enumerate(x):
        print (str(x[idx]) + ";" + str(y[idx]))

resultaten

onbelast

Noload.png RAW: File:Noload.txt

160mA

160mA.png RAW: File:160mA.txt

4,22A

4A22.png RAW: File:4A22.txt

7,78A

7A78.png RAW: File:7A78.txt

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
Content Creation
Belgian Spaces