Advice on creating a safe monitor

Hi all! I'm new to Arduino, but not new to embedded systems development. For the past 22 years I've been a corporate software engineer then a manager of software engineers. Before that, going back around 30 years, I was an embedded systems engineer that developed custom firmware in C, assembler, and ladder. I've dabbled in electronics as a hobby all my life, and my passion has always been the low-level stuff, but my formal education and training and most of my career has been on the corporate software development side. Anyway, I say all that just to establish my bonafides on the development side...

As to Arduino and modern turnkey microcontrollers, I'm a newbie. I've got a project idea in mind and wanted to run it by some of you experts to hopefully get some guidance.

There exists devices, like this one, designed to monitor safes that report up to a remote server on a regular basis with things like door openings, temperature, humidity, motion, vibration, internet connection, etc. You can then set thresholds on the server to generate alerts via SMS or email.

While $200 isn't extraordinarily expensive, especially compared to the cost of the safe and its contents, I thought this would be a fun project to replicate and possibly improve upon with a microcontroller and some sensors. So it's not so much about saving money (although that's probably possible not counting my time), it's more of an excuse to tinker around and build something customized.

So, with that in mind, I'm looking at something like an Arduino and/or ESP8266 that can connect to my WiFi network and report its status via a REST interface to a remote server. If it hasn't reported in within a set interval, then the server can generate an alert that the internet is down/cut, in addition to alerts when any of the sensor thresholds are reached.

I'm considering the following as far as inputs/sensors go:

  • Temperature
  • Humidity
  • Door opening (from photocell or IR motion detector, or both)
  • Vibration (both high frequency, such as someone drilling the safe, and low frequency pounding/banging)
  • Motion (like sliding or tipping the safe)
  • Water level
  • Support for external Wifi antenna (inside a safe isn't the most wifi friendly atmosphere)
  • Support for powering up/down a 12v LED light strip on door open/close.

And ultimately all packaged in a neat plastic box. The safe has a power outlet so power is available, although running it on battery (or battery backup) would be preferable in case power is cut. And before you ask, no this isn't the only security system around the safe. It's more of a hidden backup system that can also alert on things other than burglary attempts.

I'm up for coding the logic on the controller to monitor the inputs and report to the remote server, which I'll also code. I'm thinking I'd like the remote server to also act as a configuration panel, so it can push a configuration back down to the device for adjusting things like thresholds.

What I'm not sure of is which microcontroller approach to take. This seems overkill for a full blown computer like a Raspberry Pi, which I'd also have to keep cool. I was thinking an UNO 3 but after discovering the ESP8266 it seems I could actually run the logic there and have wifi to boot... but it's short on inputs. And is it even possible to wire up an external antenna jack on the ESP8266?

So, that's my long-winded intro and appeal for guidance, or to just tell me I'm crazy and buy the $200 device that's made for this. But where's the fun in that? :slight_smile:

Thanks for any advice!

David

ESP8266-07 variant has an external antenna. I have used an ESP with a standalone Mega 328 for a weather station (quite similar to what you want). The 328 is used , as a peripheral of the ESP, to interface with the sensors and I use a software serial connection to the ESP to send the data to the ESP and the ESP runs a server. I recommend that you get an Uno and some of the sensors that you will use. Break the project into small parts, write sketches for each piece and add the pieces together as you develop experience.

Any excuse to play is a good excuse!

Welcome to the forum. Thanks for letting us know your experience, it helps to know what experience you have.

Arduino has many sensors available that can do what you want. It depends on your ability how to put it together.

You could use Uno for development then use a minimalist version using the processor on your own board for the real thing.

You forgot the simplest sensor for door opening....a switch :slight_smile:

Weedpharma

groundfungus:
ESP8266-07 variant has an external antenna. I have used an ESP with a standalone Mega 328 for a weather station (quite similar to what you want). The 328 is used , as a peripheral of the ESP, to interface with the sensors and I use a software serial connection to the ESP to send the data to the ESP and the ESP runs a server. I recommend that you get an Uno and some of the sensors that you will use. Break the project into small parts, write sketches for each piece and add the pieces together as you develop experience.

Ah, thanks for the heads-up on the -07 variant. I also like the idea of using a micro as a slave to the ESP for managing sensors, instead of the other way 'round.

weedpharma:
Any excuse to play is a good excuse!

Welcome to the forum. Thanks for letting us know your experience, it helps to know what experience you have.

Arduino has many sensors available that can do what you want. It depends on your ability how to put it together.

You could use Uno for development then use a minimalist version using the processor on your own board for the real thing.

You forgot the simplest sensor for door opening....a switch :slight_smile:

Weedpharma

Thanks, yeah it seemed clear that Arduino was more than up for the task.

I did consider a simple door switch and haven't ruled it out. I am trying to avoid mounting anything to the inside of the safe, or to have to run too many wires. I'd prefer a mostly self-contained portable solution that could just pick up and be transferred to another safe or cabinet or whatever. Water level sensing will require some external sensor, unless I can waterproof everything but the sensor and just toss the whole thing in the floor.

Veteran68:
<...>
I'm considering the following as far as inputs/sensors go:

  • Temperature
  • Humidity
  • Door opening (from photocell or IR motion detector, or both)
  • Vibration (both high frequency, such as someone drilling the safe, and low frequency pounding/banging)
  • Motion (like sliding or tipping the safe)
  • Water level
  • Support for external Wifi antenna (inside a safe isn't the most wifi friendly atmosphere)
  • Support for powering up/down a 12v LED light strip on door open/close.

Veteran68:
Ah, thanks for the heads-up on the -07 variant. I also like the idea of using a micro as a slave to the ESP for managing sensors, instead of the other way 'round.

@David,

You're into the "cart before the horse" trap...
Take your list of needs and identify the sensor(s) that fit the need. You need to extend the list to include Voltage and interface Protocol.

Depending on your sensor selections, you may find that the ESP8266 pinout I/O is adequate:
ESP8266 Pinout

Extra thought needs to be given to any sensors that are 5V only... But this is no different than using an 8-bit 5V Arduino and the ESP8266 in tandum.

My personal belief is that the ESP8266 is completely adequate for your project. I have a few projects here that show the ESP8266 diversity:
http://www.hackster.io/rayburne/projects

Ray