Project Page for MAS961

Yasuhiro Ono <ono_at_media.mit.edu>, Visiting Researcher, MIT Media Lab

 

 

Posted on 11.8.2005

 Memo on Plug Experiment

 

Notes on plug experiments conducted (1) to be familiar with the data-extraction process, and (2) to know the difference of current waveform among devices. Tested devices are;

-         Light

-         Fan of a humidifier

-         Cell phone charger

-         Toaster

-         Finger Tap

 

--------------------------------

Memo

-------------------------------

 

1. PC:

    -Windows XP SP2

    -Python Enthought edition (contains python2.3.5, wxpython2.6.1.0, scipy0.3)

      http://www.enthought.com/python/

    -Matplotlib (matplotlib-0.84.win32-py2.3.exe)

      http://matplotlib.sourceforge.net/

      Scipy’s graph didn’t work, which is the reason I installed matplotlib.

 

 

2. Connection

If the right firmware was on the plug, green light responds to vibration after usb cable plugged to the plug.

 

3. Communication between PC-Plug

   

    On the linux(ubunto) box in resenv, type; “sudo python –i PlugUSB.py log temp.dat“.

To parse data, the option is ‘parse’, instead of ‘log’. Note that this doesn’t require pyUSB, which seems fairly unstable. After parsing, draw graph with matplotlib. It’s very slow. Maybe something is wrong on the code.

 

4. Graphing

 

The 7 sensor data value, without vibration, is the output of ADC, 0-255. The vibration data is timings when the voltage output change with microcontroller’s interruption. The timestamp is done by PC, and it’s a “unix time”, where the unit is second. The interval is almost 2ms, with some variation.

 

Savefig command can save the figure, such as savefig(xxx.png’, dpi=300). 300 dpi seems good in resolution and file size (138KB for an example). Note that show() command should follow savefig, otherwise no image is saved, and show command blocks the code.

 

 

-----------------

. Light

  ono_lightonoff_11042005.dat:1.3MB, 26756 sample points, 58seconds

 

    The light, found in the lab “Electrix k909 20W”, has a button to turn on/off. I plugged it, and turn it on/off several times.

---------------

 

 

 

 

(current and voltage)

 

 

 

 

 

--

Fan

ono_fan_11062005.dat: 1311KB, 15605 sample points, 35sec

Holmes HM1700 120V, 60Hz, 0.8A

I used a part of humidifier. I turned on the fan after start recording. I plugged on, and turn the switch on.

--

 

 

 

 

(current and voltage)

 

 

 

--

Cell phone charger

Samsung  Travel Adapter TAD037jbe, 0.15A

ono_cellphonecharger_11062005.dat: 860KB, 17702 sample points, 36seconds.

I plugged the AC adapter firstly, and put the cell phone on the charger.

--

 

 

 

 

 

 

 

(current and voltage)

 

 

--

Toaster

Ono_toaster_1107.dat 537KB, 11081 points, 22sec

RIVIAL TT9270 120V 60Hz 800W

I plugged it on, and turn on the heat. As for Mark, the max amplitude of the current measurement is 5A, 10A peak to peak.

--

 

 

 

(current and voltage)

 

 

--

Finger tap

ono_vibration_110602005.dat:  311KB, 6379 points, 15sec

I tapped the plug with finger several times.

--

 

 

 

 

 

(mic and vibration)