|
HagbardCeline
Student-Teacher-Student-Teacher



Registered: 05/10/03
Posts: 10,026
Loc: Overjoyed, at the bottom ...
Last seen: 17 days, 20 hours
|
Could I use an Arduino or similar to construct a time locking safe?
#26758052 - 06/19/20 05:34 PM (3 years, 7 months ago) |
|
|
I've tried ordering one of these time locking safes to help control any bad habits and had to cancel because it was 10 days late or so and dozens of attempts to communicate were ignored. But it was the only one that would lock for time frames over 7-10 days that the rest will so I am contemplating making my own.
Does anyone have any advice or ideas on how to go about this?
-------------------- I keep it real because I think it is important that a highly esteemed individual such as myself keep it real lest they experience the dreaded spontaneous non-existance of no longer keeping it real. - Hagbard Celine
|
singlet_oxygen
Stranger
Registered: 05/10/20
Posts: 32
Last seen: 3 years, 6 months
|
Re: Could I use an Arduino or similar to construct a time locking safe? [Re: HagbardCeline]
#26759229 - 06/20/20 06:43 AM (3 years, 7 months ago) |
|
|
Skip the arduino, I'd suggest a ESP8266 type board running micropython. Like this.
As:
- If you're having to ask I suspect this will be one of your first porjects? If so (micro)python or Lua will be easier than bastardized C++ Arduino uses.
- Hardware will be the hardest bit, with an arduino you will need an interface (LCD/7seg to display time, a RTC(real time clock) to manage your clock, and a button matrix to program the time delay). With the ESP you can do this via a wifi webpage, ESPs tend to have built in RTCs
- It's far faster
- It's cheaper
You will need a method of locking the device, you will want a solonoid for this, something like this. When there is no power a metal bar sticks out, so if mounted inside a draw it'd catch the top and stop you pulling out the drawer. One powered the metal bar is pulled down so you could move the drawer.
You will need a relay (which can switch a heavy inductive load like a solonoid), something like this. Using a "opto-isolated" board, this way your microcontroller switches on an LED only, using this to control an internal board. The board then uses the 12V to trigger the relay which delivers 12V to the solonoid. The solonoid turning off will send a huge voltage spike backwards which would easily destroy your ESP if it was controlling it directly.
You will need a power supply unit (PSU) that could provide enough voltage and current to pull the relay and solonoid(12V), but also regulated 5V for your microcontroller. This type of thing.
You use a 12V wall power supply to supply that PSU, it provides 5V to your ESP, 12V to the solonoid via the relay. The relay itself will be powered too via 12V. This will plug into your PSU.
The ESP is connected to the input of the relay, the relay controls the solonoid.
The theory would be the ESP runs the code which monitors a clock (can pull time data from your WiFi and be interacted with over the wifi).
You set a time via the webui and the ESP locks out. Once the unlock time passes you can click unlock on the webui and the solonoid opens briefly.
The wiring will be easy, the webui will be trickier.
-------------------- 1O2
Edited by singlet_oxygen (06/20/20 06:59 AM)
|
HagbardCeline
Student-Teacher-Student-Teacher



Registered: 05/10/03
Posts: 10,026
Loc: Overjoyed, at the bottom ...
Last seen: 17 days, 20 hours
|
Re: Could I use an Arduino or similar to construct a time locking safe? [Re: singlet_oxygen]
#26759995 - 06/20/20 02:22 PM (3 years, 7 months ago) |
|
|
Yes it will be my first project with one of these but I'm sure I can figure it out.
That was great info, thank you!
-------------------- I keep it real because I think it is important that a highly esteemed individual such as myself keep it real lest they experience the dreaded spontaneous non-existance of no longer keeping it real. - Hagbard Celine
|
PrimeMulch
Extreme Sheep Herder



Registered: 03/21/19
Posts: 52
Loc: Lithuania
Last seen: 1 year, 25 days
|
Re: Could I use an Arduino or similar to construct a time locking safe? [Re: HagbardCeline]
#26891262 - 08/21/20 08:20 AM (3 years, 5 months ago) |
|
|
Put it in a bucket of ice in the freezer. I am spit balling.
https://forum.boundanna.net/board/viewtopic.php?f=12&t=11709&p=84121&hilit=arduino+safe#p84121
They might be able to point you in the right direction. Not that I would know anything about it! >.>
Edited by PrimeMulch (08/21/20 08:38 AM)
|
Brian Jones
Club 27



Registered: 12/18/12
Posts: 12,340
Loc: attending Snake Church
Last seen: 1 day, 4 hours
|
Re: Could I use an Arduino or similar to construct a time locking safe? [Re: PrimeMulch] 1
#26891444 - 08/21/20 10:13 AM (3 years, 5 months ago) |
|
|
I like your ingenuity, but hot water and a hammer and I would be back to my bad habits in a few minutes.
-------------------- "The Rolling Stones will break up over Brian Jones' dead body" John Lennon I don't want no commies in my car. No Christians either. The worst thing about corruption is that it works so well,
|
|