Hand Hygiene

November 20, 2009

Thinking about purchasing rechargeable batteries

Filed under: Uncategorized — monicaseverson @ 7:22 pm

Currently, because the pucks are being tested with AAA non-rechargeable batteries, and the “hockey pucks” use energy very quickly, AAA rechargeable batteries seemed like an alternative to the non-rechargeables we have been using.

The batteries we have been purchasing from the machine shop are about $15.00 for 48.  Online through Amazon, it looks like AAA batteries mostly sell in 4-pack units.  Eneloop and Energizer batteries both run at about 12.00 for a package of four, which looks like 138.24 for the same 48 batteries, making them 9.216 times more expensive.

The only thing to consider is the cost of time for rechargeable batteries versus regular batteries.  For the rechargeable batteries, considering we would need about 60 just to instrument a unit of 30 pucks, we would need to solder a few battery cases together so that we can charge a great number of batteries at the same time using the recharger that we already have in the lab.

Gerber Files

Filed under: Uncategorized — gthomas @ 5:23 am

We’re using Eagle to generate gerber files for our PCB’s.  The gerber files contain all the graphics, solder mask, copper fill and hole information. 

When we send the boards to the PCB printer (such as PCBExpress) we can save money by arranging the boards to fill up the available space at a particular price point.  One way to do this is to print muliple copies of the board side by side.  We can do that by panelizing the designs to fit the desired space.  I found a discussion in which several people offered suggestions about the best way to do thatGerbMerge is a promising program for panelizing gerber files. gerbv looks particularly promising as a gerber viewer.

We should set these utilities up in the lab.

November 19, 2009

First Puck Experiments

Filed under: Uncategorized — gthomas @ 12:29 am

Today Monica and Derick ran the first successful experiment (after two earlier attempts in yesterday and today) with 3 pucks in the MICU.  The pucks broadcast a radio message each time one of the 3 selected manual soap dispensers was pressed or released.  They also broadcast a heartbeat signal every 2 seconds.  I parsed out the 88 press events and calculated the interarrival times, which are plotted for each dispenser in the graph below.  The average inter-press time (lambda) was 400, 500 and 1167 seconds.  The overlaid curves are exponential, which seems to be a good fit.

The data, when put all together, also has an exponential distribution with lambda = 597 seconds, as expected.

There was some interest in potential double-presses and what interval might be useful for the motes to separate double presses.  Below is a sorted list of all the presses with inter-press times below 10 s.  There are 10 less than 1 second and 3 between 1 and 5 seconds.  There’s a gap between 3 and 5 seconds, which might be a convenient separation point for an empirical definition of the difference between a double press and two separate presses.  However, if the data are truly exponential, there might not be a practical separation point, as the distribution itself would not be identifiable as bi-modal, as two exponential distributions can be combined into another exponential distribution.

0.268
0.310
0.321
0.322
0.325
0.350
0.379
0.399
0.477
0.625
1.525
2.432
3.171
5.119
5.373
6.634
8.914
9.919

November 17, 2009

Quick Puck Experiments

Filed under: Uncategorized — Tags: , — monicaseverson @ 12:15 pm

How to set up the motes for PuckToRadio program:

Program Motes
Program Puck:

In the “Puck to Radio ” directory:

make telosb install, 93

(93 is the puck number)

Program Basestation:

In the “BaseStation” directory:

make -f Makefile.channel26 telosb install

Start an experiment:
start command one:

in separate window, command two:

output should look like this:

to clean up data:

after cleaning data, should look like this:

Some common errors:

Always ensure that the VMWare is recognizing the hardware. Can double check this with the “motelist” command.

Always ensure that all of the software is looking for signals/producing signals on the same channel.

An error occoured:

NAKE received (wrong password?)
make: *** [program] Error 1
and
Are you downloading to RAM into an old device that requires the patch?

November 12, 2009

Working with the HandHygiene Motes

Filed under: Uncategorized — gthomas @ 7:39 pm

One set of source code is complied with different flags to generate the three different flavors of executables:  1) Anchor, 2) Pager and 3) HandCleaner.

If you need to recompile the executable (to change the radio channel or power level, for example), go to the HandHyg/SourceCode/mote directory and type one of the following three lines:

make -f Makefile.handcleaner telosb
make -f Makefile.pager telosb
make -f Makefile.anchor telosb

All three of these create an executable in the build/telosb directory.  You need to move the six files that are generated to the appropriate storage place.  To do this, type (if you made the handcleaner version):

cp ./build/telosb/* ../../Executables/HandCleaner/

That will copy the six files to the appropriate storage directory.

To load the executable onto the mote, go to the HandHyg directory and type:

./freshprog HandCleaner 91

That will load whatever executable is in the Executables/HandCleaner subdirectory onto the mote and designate the mote as number 91.

You’ll need to have one Pager number 1 to act as the driver for the other motes.

Behaviors:
You can tell the pagers are being loaded with a program because the small green LED near the USB flashes whenever it receives information and the small red LED flashes when it sends information.  When it is being programmed both lights flash very rapidly.

All of the motes start with the red light on.  This means that it is not time synched.  Generally, the motes don’t start operating until they are synched.  They can synch from another synched mote, but obviously, until one is starts the synching process, they’re stuck.  Pager 1 will show the initiative to start the synching.  When a mote is synched it turns off its red LED.

Thereafter, when a mote receives a message it turns on the green LED.

Pager:
Immediately after it is programmed, the pager is inactive.  To activate it, you need to push the user button once.  It will then “glow” which means that all three of the LEDs on the side turn on, then cycle off red->green->blue three or four times.

The pagers periodically send a communication (a “beacon”) announcing their presence.  When they do this, they flash their red LED for one second.  Typically the other motes hear the message and flash their green LED.

Handcleaner:
When you press the button on the puck (not the user button) the blue LED comes on and a message announcing the press is sent 1/8th of a second later.  The blue light stays on until it hears a message from one of the other motes or BUTTON_REFRESH time passes.  Regardless of when the blue light turns off, the button has an inactive period of about 8 seconds after the last press (I think — this needs to be figured out a little better).

To listen to the messages generated by the motes, you need to load basestation onto a mote and connect it to the USB.  You can load basestation by going to the tinyos/apps/BaseStation directory.  Then type

make telosb install
(Actually, I used “make -f Makefile.channel25 telosb install” because that makefile was modified to specify that we wanted to use channel 25)

You should see the red and green LEDs flash as the software is loaded on the mote.  Then it just looks idle. It is listening to radio broadcasts and waiting to transmit them to the USB port.

To get a program to listen to the USB messages, use the copy of SerialListen (called sf) saved in the HandHyg/SourceCode directory.  To run the program, type:

./sf 9001 /dev/ttyUSB0 115200

The 9001 is the port that serial listen sets up for other programs to connect to it.  /dev/ttyUSB0 is the device location of the mote.  For the particular value on your platform, check “motelist”  The last number is the baud rate — 115200 is what the mote expects.  Leave this program running in its own window.  You won’t see any activity until you connect to the port with another program.

Now you can connect to the stream of messages read by the BaseStation with one or more other programs running in other windows.  A very handy one is the spy program modified by Chris Hlady.  Go to the HandHyg/SourceCode/IAtsynch directory.  Type:

./T2spy-Hlady -t

It should say “log opened successfully”  The window running sf should now say “clients 1, read 0, wrote 0″  Chris’ program parses the binary messages received by the BaseStation, which overhears all the radio traffic among the motes.  It outputs the time (in seconds since some arbitrary point), whether the message is a communication or a relay overheard from some other mote, and some other stuff (to be figured out later).  You can leave this running in a window.  The program is also logging all this information, which can be parsed later to see what happened (including when pucks were pressed, for example).

Finally, if you want to see the raw messages, you can type in its own window (assuming that you are in the HandHyg/SourceCode/pc directory):

./sflisten localhost 9001

This program gives you the binary output of all the messages that BaseStation is receiving.

At some point we’ll have to provide the details for how to save and restore from the flash, but for now, here’s the notes I saved from our meeting with Chris.

To save the data to the flash, go to the source code for the motes
in HandHyg/Source
in Makefile Pager, Anchor and allow the data to go to flash

in the root directory run getdata.  This is a script.  The parameter
specifies the file, so that “getdata 1″ saves the

Parts Lists for the Pucks and Pagers

Filed under: Uncategorized — gthomas @ 12:38 pm

Puck Parts List
Pager Parts List

Monica’s Experimental Design

Filed under: Uncategorized — gthomas @ 12:35 pm

On google docs

November 10, 2009

Raw notes from Chris’s visit to explain how hospital software works

Filed under: Uncategorized — gthomas @ 5:20 pm

Set a mote to be a pager with ID 10
mote-software-dump/HandHyg
./freshprog Pager 10
./freshprog Pager 11
./freshprog Pager 1 // This is the driver
./freshprog HandCleaner 40

Go to ./SourceCode/pc
./sf 9001 /dev/tty 115200

Then go to ../IAtsync
./t2spy -Hlady

To save the data to the flash, go to the source code for the motes
in HandHyg/Source
in Makefile Pager, Anchor and allow the data to go to flash

in the root directory run getdata.  This is a script.  The parameter
specifies the file, so that “getdata 1″ saves the

November 5, 2009

Pricing for Mote Components

Filed under: Uncategorized — michaelireland @ 7:14 pm

Priced out the parts for the motes through digikey.

Powered by WordPress