2

I'm a complete newbie in anything related to electronics, software or hardware; yet with a couple of friends we're going ahead with an interesting project related to automation through wireless devices: more or less IoT but involving electric locks.

The case scenario: there's a room without any power outlets. It has a regular door. We want to be able to open this door through the internet, with a lock that lies inside the room, on the other side of the door; all this, given we:

  • Can't make any modifications to the door's structure.

  • Can't drill or make holes or whatever so as to get a power cable to the inside of the room.

  • But we can glue certain pieces behind the door, this is, inside the room that hasn't any power outlets.

We've planned, so far, to use an Arduino Uno; enhance it with WiFi features (i.e. a module or shield) so as to bypass the limitation of not being able to connect an ethernet cable; and glue a solenoid or lock to the inside of the doors, so that it acts as a second lock that can only be unlocked through the internet, accessed via Arduino.

Our ideal scenario would be opening this door remotely, from our home, even if this door is a hundred blocks away. If someone wants to get in, they should ask for our permission, as we don't control the built-in handle, but we do control a latch fixed on the inside.

All this setup should be powered with a long-lasting battery: we can't plug anything, and we can't risk getting our batteries depleted fast, because we'll never be able to open the door once again. We need these batteries to last long enough so as to be able to change them in a prudent time window; a back-up battery system should also work well.

Standard solenoid locks are 12v. Arduino powers 5v devices, not 12v ones, as far as my understanding goes.

We should open this door only 5 times a day. That's it; the remaining time in between, the whole device setup can well stay 'dormant', in low-energy consumption mode, only to 'wake up' when we give the order: "Arduino, please tell the solenoid to open".

We haven't specified which battery we would use; ideally, the most cost-efficient option. If it lasts 3 months and costs, say, 20 dollars -- well, we would love that.

I've done this really inaccurate, schematic drawing to illustrate our idea and research. I know there's many details missing but I wanted to prove our point:

enter image description here

(The Arduino should be positioned on the wall and not on the door! My bad.)

I hope I'm clear enough up to now.

The questions, then, are:

I've done some research, and I've seen that Arduino can be enhanced so that it consumes the minimum possible energy so as to remain 'aware', but not in full-power mode, which in our case would be unnecessary.

  1. So, can we make Arduino super efficient in terms of power consumption, even if we attach WiFi functions, which, as far as I'm concerned, really takes on battery life? So that we can make Arduino run for months before replacing the battery?

  2. Arduino can send only 5v; but the solenoid powers on 12v; then, getting a second battery to power our solenoid sounds straightforward, except that as far as my knowledge goes, this battery should last next to nothing (maybe I'm wrong here). And we want it to last for months -- if not, our door will remain sealed forever! Can I make the solenoid dependant on the Arduino, so that it's part of the "almost-no-battery-consumption" scheme, and battery lasts, as I would really like, some months? We would be talking of only one battery to power the whole set-up, instead of two that I guess that we'll need.

I'm a newbie, but can't Arduino power 12v through a relay or a transistor? Can't post links.

To clarify: Getting two batteries for our complete setup (one for the Arduino, one for the solenoid), if these two batteries both last, is not a problem; but it would be catastrophic to make a battery last long enough while the other depletes in 48 hours. The solenoid needs to get electricity a modest 5 times a day; that's why I believe we can make it super efficient.

With our friends, we've so far programmed Arduino to open a solenoid from the Internet. The solenoid we've used was 220v because we had it in stock; it won't be what we need for our project. It was just a trial. On top of this, the Arduino has no WiFi module, just an Ethernet shield.

prototype

There's a remaining problem to solve, which is: what would happen if the Arduino fails? The door would be sealed 'forever'. We'll tackle that issue afterwards.

TL;DR: we'd love to open a lock via WiFi: the lock and Arduino should run solely on batteries that last more than 48 hours: a couple of months would be ideal! Can we work this out?

Thank you very much for your help, opinions, and time. I hope my question is up to the standards.

6
  • 2
    How to change the batteries when they go flat: Turn the handle and push. Then glue everything back on again.
    – Majenko
    Commented Aug 15, 2016 at 21:11
  • 2
    "we can't risk getting our batteries depleted fast, because we'll never be able to open the door once again." It should go without saying that this is overall a very bad idea... entirely apart from the comparatively high power consumption of wifi. Commented Aug 16, 2016 at 1:26
  • Its a shame that noone likes your question, since you have obviously put some work into asking it. However, you've asked a very general question (or actually several distinct questions) relating to a system design which isn't really thought through. Each of the following ought to be addressed individually: Comms-physical, comms-protocol, power consumption, battery capacity/technology, mechanical security, encryption, failsafe, EMC, fire/electrical safety. Some of these you can maybe answer, and for an educational project they may not matter. As presented, your project has many possible flaws. Commented Aug 16, 2016 at 7:55
  • What kind of lock do you have? Mine for example has a knob to lock/unlock the door. I could simply add a small motor to the knob to unlock it using an Arduino while still being able to use a regular key (in case of low battery or no internet connection ).
    – Gerben
    Commented Aug 16, 2016 at 13:24
  • 1
    Wifi uses s lot of power (relatively). You could make the Arduino only connect to wifi every minute or so to check some web api, but in your case that would probably be unacceptable (having to wait up to a minute for the lock to open). You could have a wifi base station on a location that does have wall power, an use a different wireless module, or wire to connect to the Arduino on the door.
    – Gerben
    Commented Aug 16, 2016 at 13:28

3 Answers 3

1

[I'm coming in late but since this question got reposted, here goes:]

If this not to be just a Proof of Concept, but to be actually installed, you really have to address the several points of failure (Arduino, Arduino power, solenoid, solenoid power) that could lock you out of the room forever ("ever" being the time needed to fetch and apply destructive tools :).

Assuming it's a POC, here are a few more ideas:

  1. You need 12v for the solenoid. You can take your 5v from the same source using an efficient regulator. Advantage: one fewer point of failure (power source), and the Arduino could monitor the 12v source and send an alert if/when it starts to sag (which would only be useful if there's some head-room between its charged voltage and the minimum needed to drive the solenoid).
  2. If you use Bluetooth LE on the Arduino instead of WiFi, but place another Arduino outside the door, somewhere with power (locked into the wall, the ceiling, or an adjacent room), the outer Arduino with "unlimited" power could talk BTLE to the inside Arduino. Advantage: Lower power consumption by the inside Arduino (unless step 1. makes it unnecessary). Disadvantage: More equipment (second Arduino); more complex system has additional ways to fail, though not necessarily to lock you out; possible additional point of vulnerability to intrusion.
  3. Is that a steel door? If not, an inductive charging coil on the inside of it might let you temporarily apply an inductive charger from outside to provide power - or charge a small battery or even a capacitor - enough to unlock the door. Advantage: One less point of failure (loss of 12v). Disadvantage: More equipment; applicability depends on door material and thickness.
-1

This is not the place to answer all the questions and design options that you have, but, to give you a starting point, you need to look at very low power arduino-compatible boards.

My suggestion is to use an ESP8266 module which can be programmed as an Arduino (have a look at here). The module is quite low power, and it may run for some days with AA batteries. You can use a 12V power source for both the module and the solenoid (you need a voltage regulator). The solenoid will only be activated when needed, so the rest of the time it won't consume any power.

The whole project is not a simple one. I would definitely suggest you to go step by step.

Good luck.

-1

As far as the 12V motor is concerned, you can construct a decent H-bridge to shift polarity. I am assuming you are using a linear actuator or servo. Use a mechanical relay with 2 channels. Wire GND to NO1 and NO2, VCC (12V) to NC1 and NC2, and pull VOUT to motor from COM1 and COM2 - IIRC - and in your code track state of when each channel is on or off... It will short out if both relay channels are ON simultaneously, so that must not be possible.

Mechanical relays are slower to switch than transistors (can haul 230VAC/30VDC/10A with no voltage drop), but if you want a transistor H-bridge use the rather old TIP120 NPN Darlington (0.6-0.7V voltage drop per transistor), or MOSFETs. At least the TIP120s require heatsinking for >=0.5A, but can drive 5-6A upto 60V, which is plenty.

As far as the wifi bit goes, I don't have enough experience. I would use a GET request to a web server/page and read what state the lock should be in at short intervals... no more than 5 seconds. A simple '1' or '0' in a text file will do. To output state, heartbeat (is the Arduino OK right now, or is something wrong?) and other stuff from the Arduino, use POST requests. You should use a simple database for this... PostgreSQL is my favourite, but you may want something simpler.

If you need precise timekeeping for events like open at 9.00 am, use a DS3231. Be careful to conserve SRAM, the Uno has only 2KB. There are guides on arduino.cc to help you with that (PROGMEM for immutable variables and the F macro for static strings). This is a good method, hope it helps.

1
  • And if you are making a lock, glue is not your friend. I'm going to assume you know that.
    – user400344
    Commented Aug 17, 2016 at 12:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.