Guest post: Monitoring Remote Locations #DIY – by Jeff Pitts

Posted By on June 6, 2017

AAEAAQAAAAAAAA0BAAAAJDA2OWEwY2RiLTRhZDEtNDcwZi04MjdlLTI4ZDA1NDA0YTM2Yw

One of the fun areas of IT that has been growing in recent years is the “maker community” of products for do-it-yourselfers. These devices range from the Raspberry Pi, Pi Zero, Photon, Arduino, etc. The movement is bringing electronics to those of us that have that tinkerer mindset, but it also extends the opportunity to try out new ideas before going full-fledged into rolling out devices that solve a problem.

For many of us in the pharmacy industry, the loss of an HVAC unit in the summer or winter, can be a costly event, and those of us in rural communities often have issues with a loss of power in the middle of the night. My IT department oversees 30 locations throughout West Virginia, Ohio, and Kentucky, some of which that are in “power-challenged” areas. Our furthest stores are an hour and a half drive from the corporate office and a circuit failure could be a power failure or maybe a circuit that is truly down. If the circuit is down, we want to have our telecom carrier on-site as soon as the door opens so we can minimize the amount of data that is sent over cellular backup circuits; but if it’s truly a power failure, we don’t want to pay for the carrier to show up and it not be their issue.

We experienced an HVAC failure at a store that almost cost us the entire pharmacy inventory last year and that event started us looking at potential solutions beyond the refrigerator and freezer monitoring we were already doing as required by law. Because Josh Coburn, my network admin, and I both enjoy tinkering with electronics including the Raspberry Pi, we discussed how we could use a single board computer device to monitor for power failures. Each design we looked at required a purchase a UPS to connect to the Pi in order know when the power died which would ultimately bump the cost of the low-cost device installation an additional $70-100, per store.

Near the end of last year I ran across the Photon from Particle.io, which is a smaller, low cost Wi-Fi enabled Arduino-like microprocessor. I ordered one and started playing with it, then bought one for Josh as a Christmas present. Within a few weeks we started talking about how we might be able to use the Photon instead of the Raspberry Pi. While Josh was researching the Photon, he discovered that Particle.io also made a Power Shield for the Photon, which provided the backup power source that would trigger a power failure alert and solved our need for a separate UPS unit for each installation. We realized that if we added the DHT-22 sensor, we could collect temperature and humidity, and could tackle the whole problem with one device for about $55 for per store which allows us to know if a circuit down alert was due to a power failure or is truly a bad circuit.

Josh has built a prototype of the device with the DHT-22 temperature and humidity sensor, so we can monitor the humidity inside the pharmacy areas of the stores.

AAEAAQAAAAAAAAoUAAAAJDY4M2VhMjU2LTMxMzMtNGE2OC05OGEwLWEyNDQ1NmNmYWZhMQ

The completed schematic, shown below, shows just the temperature sensor.

AAEAAQAAAAAAAAuqAAAAJGI0YjU2ZmQ2LTEwODItNDA5OC1hNjRkLTVlZjczYjVjYThmMA

The next step was to build a Node.js server with a MongoDB backend to poll the devices and collect the data for each store, giving us the ability to store and track each location over time. The current data feed that we receive looks like the following, it also includes the WiFi signal strength (rssi) and the state of charge on the battery (soc):

code

The Node application polls each site every hour, records the data to MongoDB, and will send an alert if the values get too far out of range.

Could it replace the services we purchase for refrigerator and freezer monitoring required by the FDA and Boards of Pharmacies? Possibly, but I prefer to have that legal requirement covered by a company that specializes in those services, certifies the accuracy of the sensors, and provides the documentation for audits. For now, this is a quick and inexpensive solution for monitoring the temperature and power in each store.

    LINK


Jeff A. Pitts is the Director of IT at Fruth Pharmacy

Comments

Desultory - des-uhl-tawr-ee, -tohr-ee

  1. lacking in consistency, constancy, or visible order, disconnected; fitful: desultory conversation.
  2. digressing from or unconnected with the main subject; random: a desultory remark.
My Desultory Blog