SparkFun Forums 

Where electronics enthusiasts find answers.

For the discussion of Arduino related topics.
By Emergencydpt
#117095
I have a need for a device that measures compliance with hand gel use and communicates through our existing wifi network.

I have a feature set in mind and I need help with deciding what to purchase in order to make the prototype.

This project should be self powered. It should fit in a box small enough and light enough that double stick tape could be used to fasten it to a hand gel station.

When someone walks past the station, a motion detector picks up that event and tallies the number.

Then the device listens for 10 seconds for a signal from an accelerometer sensitive enough to detect if the gel station has been used. If the gel station is used in 10 seconds (programable value) that number is tallied in a second register.

If the acceleration is not detected in 10 seconds, a buzzer sounds along with an LED enunciator blink and this is tallied in a third register.

Unit resets.

Register 1: Potential gel users
Register 2: gel users
Register 3: didn't use gel

The buzzer and LED blinking behavior can be modified in the following ways:
1. Data collection mode: buzzer and LED are inactive, unit only collects data.
2. Normal Mode: Buzzer and LED are active and influence behavior (hopefully).
3. Patient Room Mode: Day/night cycle for buzzer. Off during night time hours, LED functions normally.


The data is uploaded once every 24 hours by wifi to a networked computer, hopefully to a spreadsheet program or to its own web page. The behavior of the buzzer and LED can be changed remotely to one of the three modes above.

This device should be able to work in conjunction with up to several hundred other devices at a time to give data as a whole, in subsets by area installed, and individually. I would like to build from 2 to five at first.


Sounds easy right?

I may be in over my head. So if anyone wants to bid on this project, I'll consider that also.

Thanks,
-Spencer
By qema
#117173
You could simplify your project a bit by using a Force Sensor on the handle http://www.sparkfun.com/products/8685 put a Rotary Potentiometer http://www.sparkfun.com/products/9288 on the hinge of a handle to detect the rotation. Both use the ADC on the AVR (ADC tutorials are fairly easy to find).

You could also use an 2 Xbee wireless modules http://www.sparkfun.com/products/8664 to send data from the dispenser to the computer and a Xbee explorer http://www.sparkfun.com/products/8687 in order to hook up the other xbee to a computer. Xbee is much simpler then any wifi unit and great for simple wireless tasks. Xbee for Arduino tutorials are fairly easy to find (just google it)

Cheers Q.
By Emergencydpt
#117180
Thank you for your reply. Does the system you describe for sensing the use of the dispenser have benefit besides the simplicity of set up? Installation would go from using a piece of double stick tape to mount the box and walking away to mounting the box then mounting the sensors also... I was thinking a self contained unit would be more robust but it's possible I'm missing something. Why is the pressure sensor better than an accelerometer? Calibration perhaps? I can foresee problems with the wide range of use styles...some people pound the lever, some gently push it. However it always makes a noise. Maybe a microphone that just pics up the tap of the handle returning to it's start position?

The xybee would not communicate with the existing wifi network, correct? So I would be setting up another network using these devices. I would have to research their use in patient care areas related to radio emissions. I would rather skip that and leverage the existing framework even at the expense of increased complexity on the front end.

There seems to be a few low power wifi cards available that would make battery life better also.

Maybe a development kit from one of the manufacturers would be a sharper tool. However they are pretty expensive. Thinking thinking.
By qema
#117183
The quick answer is that these devices are fairly simple to setup in your Arduino. And the best to keep things simple at first, if the simplest method fails figure out what you can replace and/or add in order to make things work.

An accelerometer is a great sensor, but its not as simple, tried tested or true as a push button.
By Emergencydpt
#117185
Thank you for your input. I will carefully consider your advice.
User avatar
By leon_heller
#117187
I would put a switch or pressure sensor under the gel dispenser.
By Emergencydpt
#117271
You favor the pressure sensor because it is simpler? I'll have to explore this issue. It can't hurt to start with the simpler sensor in the interest of KISS.

I'm going with the mega board. I guess my last question before I hit the pay pal button is, do you think this is the right system to start with? Does it have enough power? Judging by the nature of some of the more complex project here, it would seem fine.
User avatar
By leon_heller
#117274
It's the simplest and most reliable way to check that it's been used, I think.

I used to work for Irisys and designed their first people counter:

http://www.irisys.co.uk/

Those would be ideal for detecting people entering after using (or not using) the dispenser. It's a very accurate system. It could also check use on exit.
User avatar
By sean.w
#117909
Just a thought, you could eliminate the need for force sensors, accelerometers and the like if you upgraded your soap dispensers to the automatic motion sensor type. You could then direct an analog signal from the soap pumping servo to your arduino to tally soap usage. These can be picked up pretty reasonably.
http://www.samsclub.com/sams/shop/produ ... 96104#desc
By Emergencydpt
#117913
Sean,
thank you for your reply. However simply counting the number of times the device is used does not address the issue of how many people didn't use it...the more important figure.

On another note, do you think the 3.3v arduino would be the better selection for a battery powered device?
By Emergencydpt
#117936
leon_heller wrote:It's the simplest and most reliable way to check that it's been used, I think.

I used to work for Irisys and designed their first people counter:

http://www.irisys.co.uk/

Those would be ideal for detecting people entering after using (or not using) the dispenser. It's a very accurate system. It could also check use on exit.
Great device, I agree. For this application though? Is it battery operated? When the gel pack is replaced, will it withstand the opening and closing of the container it's stuck to or would you place it somewhere else?
User avatar
By sean.w
#118021
simply counting the number of times the device is used does not address the issue of how many people didn't use it...the more important figure.
Agreed, you would still need a micro-controller (arduino) and motion sensor to count total passerby. This count minus soap usage count equals non-compliance count. My comment about the motion sensor dispenser would only simplify the soap usage count. Sorry for any misunderstanding.

As for 3.3v or 5v, either could work with battery packs. One important consideration in this regard may be the power requirements of any sensors, etc. in your setup.
By Emergencydpt
#118023
Thank you Sean. I appreciate your input. The idea of simplifying the design with an off the shelf dispenser is a good one. However we already have about a thousand dispensers. My eventual goal is to slap a device on every one. Though testing out the concept using one or two costco units would help to validate the idea, I think the effort to retrofit would in the end be less valuable. I'll have to build the stick on box sooner or later.

It looks the wifly board is also 3.3v so I should be good on that at least.