![](media/image1.png){width="4.385416666666667in"
height="0.6868055555555556in"}

# Obtaining Live Video of Total Current via Wireless Webcam

(**CD-doc-923, version 1)**

 

Fermi National Accelerator Laboratory

![](media/image2.png){width="0.3236111111111111in"
height="0.3236111111111111in"}

 

Eric Rivera

University of Illinois at Urbana-Champaign

 

Supervisor: Dr. David Ritchie

 

July 20, 2005

## 

##  

## Introduction

 

A set of projects were done for the Fermilab Computing Division
Operations Group during the Summer of 2005. The projects were:

1.  Setting up a wireless webcam to monitor the Total Current meter for
    FCC

2.  Move existing thermocouples at GCC and install the new thermocouples

This paper describes the first project. In addition, some of the tasks
done to learn various tools are described.

## The Problem

 

With the enormous amount of energy used by thousands of computers in the
Feynman Computing Center (FCC), it's no wonder that closely monitoring
the total current at FCC is considered to be very important. In the
summer, the heat poses an added problem as more energy is consumed to
keep FCC computers and FCC people cool.

FCC consumes an average of 1650 Amps per phase from the Laboratory's
commercial power provider. The backup 1.5 MWatt generator for FCC
provides up to 1744 Amps per phase at 480 Volts in the event that the
laboratory loses power.

The backup generator is checked every Tuesday to make sure it starts
automatically; however, the FCC building electrical load is not actually
transferred to it at that time. The load transfer is actually done on
the third Thursday of every month to test the transfer switch and the
generator power supply capabilities. The one requirement is that the
building load must be less than 1744 Amps, otherwise FCC's generator
would not be able to pick up the building load and all the computers and
other electronic equipment in FCC would shutdown with resulting loss of
analysis capability and an estimated 4 to 8 hours to recover. Of course,
in addition to these scheduled transfers, the backup generator must be
prepared to accept the FCC load at any time should commercial power
fail.

For the above reasons it is very important to monitor FCC's total
building current.

Before this project was completed, one way this monitoring was done was
by someone standing in front of the current meter in Room 141 of FCC and
reading the dial. This is a very inefficient way of checking the total
current\--especially if the person checking the current had to travel
from the other side of FCC, another building, or from offsite!

Of course, there are other monitoring methods, such as the Metasys Site
Facilities Computer Control System. Metasys has a detailed summary
screen that can be accessed *by those with permission*. This allows the
total current of FCC to be checked as frequently as every minute, and
even provides a way to plot graphs of the current, updating every
minute.

This monitoring method beats walking to the meter and reading it, but
Metasys is available only to authorized users on site. Offsite access is
even further restricted. These restrictions are mainly required because
of the Metasys ability to control (i.e. change) as well as to monitor
values.

There is a need within the Computing Division to allow a much more
widespread capability to monitor the total building current for FCC than
Metasys allows.

Further, satisfying that need must pass extremely stringent security
considerations in that it must be obvious that in giving out the
capability to monitor the FCC total current, one is NOT giving out the
ability to change it or any other part of the various control systems
upon which Fermilab relies.

How can this be done?

The solution is a webcam.

## The Solution

 

We used the usual internet search tools (Google, etc.) to look for
webcams within our price range and needed capability.

The requirements were that the webcam:

1.  Be simple to setup

2.  Be reasonably inexpensive (certainly less than a thousand dollars)

3.  Not require special software for use

In addition, the location of the electrical meter we needed to monitor
was such that routing an Ethernet cable to the location was considered
difficult. Thus, another requirement was that the webcam

4.  Allow for wireless operation

After several days of reviewing various product offerings we decided to
with the Linksys Wireless WVC54G product \[1\].

This model is relatively cheap at \$180.00 with a built-in stand-alone
web server, so no PC is needed, and it can handle up to four viewers
simultaneously. The "four simultaneous users" feature was an important
characteristic of the webcam we were going to buy because we wanted to
have this video viewable to the people that need to see it at anytime,
even if more than one person is viewing it. This way, there should never
be a time, based on our estimate of simultaneous usage, when someone
can't access the video when s/he needs to.

The webcam is wireless so that we wouldn't have to worry about wiring.
There are timestamp and text display toggles available. The timestamp
displays the date and time digitally in the upper left corner of the
video image. The text display option allows the user to show a message
of up to 20 characters in the upper right corner of the video.

The webcam has 1x and 2x zoom capabilities, and low to very high options
for quality and lighting settings. The webcam can go as high as 640x480
resolution. However, higher quality means slower video playback, so we
decided to keep it on the low quality setting; the webcam is setup so
close that the video is still well-focused and easily readable, and at
that setting we can receive streaming video coverage.

**Implementation**

 

A. Installing/Configuring

1.  The Linksys webcam came with an installation/setup CD to get us
    started. Once the installation was complete, we configured the
    settings in the program to our liking. The webcam is first setup by
    connecting it to the network by wire. After we tested this format to
    ensure that the IP address was showing up on the webcam and that our
    video was playing, we unplugged the network wire and tested the
    webcam's wireless capabilities. The new IP address showed up on the
    webcam, and the site came up with our video!

B. Location

> 1\. We realized that location would be a problem from the start,
> especially if we had a webcam that was physically wired to the
> network. The wireless characteristic made location a little bit
> easier, but there were still some aspects we could not avoid regarding
> where we would place the webcam.

2.  The initial location of the wireless webcam that was *thought* to be
    the best possible position for the webcam was about six or seven
    feet away from the target meter. We discovered that the location was
    too far away to deliver crisp video images (the dial's arrow was
    visible, but the numbers were not).

3.  Because of the inadequate visibility of the numbers, we decided to
    see if we could attach a telescope of our own design to the webcam.
    The vendor Linksys did not offer any options for increasing the
    magnification. We obtained lenses from the local American Science
    and Surplus store \[2\].

> We began with an optics starter kit for \$3.50 that had eight lenses
> with different shapes and sizes. We tried holding each lens up to the
> webcam to see if there was any noticeable difference, but the lenses
> had little magnification help and most of them inverted the image. We
> decided to go to the library to learn about optics and building a
> telescope. We eventually found *Principles of Optics: Fourth Edition*
> by Born and Wolf \[3\], a fairly advanced book despite what the title
> suggests. We skimmed for information on telescopes and found
> information on focal lengths and lens sizes that we decided to use.
>
> To get a better understanding of what this book was telling us, we
> decided to look up information on optics and focal lengths/ratios. One
> website on focal ratios was very helpful with continuing our knowledge
> \[4\]. Once we learned all that we thought was necessary, we attempted
> to build a miniature telescope for our webcam.
>
> We searched for a lens holder at American Science and Surplus. We
> found a \$2.00 kaleidoscope which we purchased, tore apart, and kept
> the tubing as the telescopic barrel. Surprisingly, this cardboard tube
> was exactly what was needed to fit the lenses, but we still needed to
> figure out the best way of configuring the lenses (and which lenses to
> use) to get a clear image.
>
> We made several attempts to position the lenses to achieve the desired
> clarity and magnification; however, we finally concluded that we could
> not achieve the required clarity with the resources available to us.
>
> As a result, we abandoned our original location and chose instead a
> location mounted on the electrical panel just a few inches from the
> meter. The pictures from this location proved to be much more
> satisfactory.

C.  Security

    1.  The webcam needed to be secured to a strong support to prevent
        theft. We used a securing mechanism obtained from Keith Coiley.
        The lockdown mechanism was superglued to the back of the webcam
        and the metal cord now runs through a lifting lug on the current
        panel.

    2.  A Nessus Scan must be done to the webcam to check for any
        potential ways a hacker could take over the device. Joe
        Klemencic reviewed the scan report. The only problem found was
        with the webcam accessible offsite was with the administrative
        username and password that protects the setup menu of the
        webcam. I didn't see how it could be so easy, so he showed me
        how to steal the username and password in under a minute with a
        common hacker program.

> We believe this problem can be avoided by only accessing the setup
> menu from onsite locations.

D.  How/Where we secured it

> 1\. After realizing the first location was too far away to get a clear
> image, we became determined to mount the webcam on the current meter.
> This approach would provide a close and clear video image, even at low
> quality settings. This is an advantage because we can have a faster
> video refreshing rate with less lag time at the low quality setting.
>
> We decided that Velcro would be the best way of mounting the webcam to
> the machine without disrupting it. We brought out a power strip and
> extension cord for the webcam power cord to plug into. Once the webcam
> was up and running we had to secure it to the current machine to deter
> theft. We used the same idea as before with the metal cord looping
> through a securing device mounted on the back of the webcam. Luckily
> we noticed there was a metal loop on top of the current machine, so we
> ran the metal cord through this loop and fastened it all together with
> a padlock and key. The key is currently being stored in FCC Room 144
> in a key cabinet, under supervision of Adam Lechowicz.

E. Open Issues

> 1\. We need to get an exemption from security personnel in order to
> put the webcam on the internet. However, we found out that we can't
> even put the webcam on the internet because it is wireless. This led
> to the need to link the webcam to the internet with a network cable.
>
> 2\. We started exploring what we would need in order to wire the
> webcam. Besides the actual network wire, we needed to get a new static
> IP address (instead of the current DHCP address) and apply for another
> network connection. Unfortunately, getting a new network registered
> node and receiving authorization to wire the webcam requires our
> waiting for each process to finish before another can begin.

**Results**

**Before**

![](media/image3.jpeg){width="5.960416666666666in"
height="3.926388888888889in"}

**After**![](media/image4.jpeg){width="5.9006944444444445in"
height="3.926388888888889in"}

**After---the view provided by the camera...**

![](media/image5.jpeg){width="5.982638888888889in"
height="4.486805555555556in"}

**Conclusion**

 

For now, the webcam is wireless and delivers what we need in regards to
constant monitoring of FCC total current; the unit is working and people
are already using the streaming video via its present web address \[7\]
as a means of monitoring the total current quickly and easily. The only
problems seem to be the lack of access to offsite computers and the
occasional hang-up due to the loss of wireless signal to the webcam.
With the change from a wireless webcam to a wired network webcam in the
near future, these problems will be resolved.

## Programming languages

 

At the beginning of the summer, I was introduced to Perl \[5\] and
Python \[6\] programming languages. I used Perl more than Python, and
even wrote a few programs in Perl. The programs are fairly simple, but
the process taught me a lot about Perl and programming in general.

**References**

 

\[1\] More detailed information about the Linksys WVC54G wireless webcam
can be found at:

> <http://www.linksys.com/servlet/Satellite?childpagename=US%2FLayout&packedargs=c%3DL_Product_C2%26cid%3D1115416829859&pagename=Linksys%2FCommon%2FVisitorWrapper>

\[2\] Information on American Science and Surplus stores found at:

<http://www.sciplus.com/>

\[3\] *Principles of Optics: Fourth Edition* by Born and Wolf

Pg. 239-242

\[4\] Information on focal ratios found at:

<http://www.twcac.org/Tutorials/focal_ratio.htm>

\[5\] Official website of Perl Programming Language:

<http://www.perl.org/>

\[6\] Official website of Python Programming Language:

<http://www.python.org/>

\[7\] The webcam at its current wireless address...:

<http://131.225.88.62/img/image.cgi?next_file=main_fs.htm>

**NOTE: PLEASE BE CONSERVATIVE IN USE AS ONLY FOUR**

**VIEWERS CAN BE OPERATING AT ANY TIME!**

## Acknowledgments

Special thanks to Dr. David Ritchie and a whole host of people whose
names I don't even know for hiring me. Thanks to Joe Klemencic for his
help on security issues. Thanks to Mark Thomas and Keith Coiley for
setting me up in their office for the first week and for showing me
around Fermilab. Thanks to Jack MacNerland for setting me up with an
email account at Fermilab and giving us permission to mount the webcam
where we thought it was necessary. Thanks to Donna Lamore for informing
us about exemptions and how we could be eligible for them. Thanks to
Ryan Rivera for getting me out of a few computer freezes and pointing me
in the right direction.

Special thanks to Adam Lechowicz for giving me a tour of the areas I
would be working in and informing me of office policies. Special thanks
to Sirius Ben-Judah, my fellow summer student, for constant help
throughout the process. Special thanks to Keith Coiley for ordering the
webcam.