I'm somewhat of a sweet tooth, so I've been contemplating on getting some sort of mechanical timer lock on the door to my cupboard. The idea is simply that after closing the door of the cupboard with all my treats in, it shouldn't open for a given amount of time. Preferably in the time span of an hour or so.

I imagine maybe some sort of trickling sand which would unlock the door somehow, which is reset when I finally get to open the door again. But I'm open for all ideas as long as the door stays shut for at least an hour.

Update: My question differs from this question, due to their focus on the more psychological aspect of stopping access, and furthermore I want delayed access for a time period after I accessed it, whilst that question only want access for a given time. That is very different approaches to how/when to have access, and requires different solutions.

  • 1
    The best I could find on Instructables.com is an arduino-controlled box instructables.com/Time-Delay-Lock-Box Jan 13, 2023 at 10:41
  • 1
    My first thought was of a DIY Arduino type construction. I suggest that you convert your comment to an answer to garnish at least one up-vote. Don't get wet or eat after midnight.
    – fred_dot_u
    Jan 13, 2023 at 14:34
  • When I was stopping smoking, making the tobacco inaccessible only made the craving worse. In your case, you might find you help yourself to several treats to last through the next hour. What worked was to keep the tobacco with me, and keep putting off the next smoke, like, "just leave if 5 minutes", or "it will be more enjoyable if I wait a bit" etc. Jan 13, 2023 at 16:16
  • 1
    If you are in an office with other people, rig up a switch that illuminates a big sign every time you open the door. Would there be an embarrassment factor from "holroy is snacking again!" ? Jan 14, 2023 at 17:50

1 Answer 1


I couldn't resist...

The project here: instructables.com/Time-Delay-Lock-Box seemed very over engineered; steel box with arduino controller etc. But I thought I could use the basic principles, namely that the timer and lock should be on the inside of the box/cupboard to prevent tampering.

So I came up with a see-saw mechanism attached to the inside of the cupboard door. One end has a bolt that locates into a slot in the cupboard frame, the other has your trickling sand which acts as a weight to keep the bolt in place.


As the sand trickles out, the weight is reduced and the bolt falls out of its slot. Then the door can be opened.


Of course it will be more complicated than this, the end of the see-saw will describe an arc as it falls but the bolt will want to move in a straight, vertical line. You could get around this by constructing your own, curved bolt and slot arrangement.

Also, when you are resetting the timer, the door will be open but the bolt will want to move upwards, you'll probably need a pin that goes through the door and holds the bolt down. Once you've closed the door you can remove the pin which will allow the bolt to move upwards and locate in its slot.

Lego technic anyone?

  • 1
    simple and elegant. many variations are possible including a port in the top in which to pour the sand and perhaps even a port in the bottom for easier collection. Also well suited to 3D printing. This puts my wife-controlled fingerprint candy cabinet locks to shame.
    – fred_dot_u
    Jan 13, 2023 at 18:25
  • You're on the right path, but this more like a sketch rather than an actual solution. It could be worked upon thought, but the main thing I'm concerned about is how to get a reliable timer setup. Schematically it'll most likely be something like this, but...
    – holroy
    Jan 14, 2023 at 17:43
  • It would have to be 100% reliable. If the mechanism jams, you'll have to wait for someone to bring the master key. Jan 14, 2023 at 17:48
  • 1
    @holroy A sketch is exactly what it is :) The actual mechanism would probably have to be adjusted & fettled in place to make it work. Also, you'd have to run tests to find the exact amount of sand to use (and how big a hole to make in the timer) to get a one hour locking period. I was tempted to build a prototype but time is precious and there's a limit to what I'll do for an upvote :) :) :) Jan 15, 2023 at 17:13
  • @WeatherVane master key/chainsaw Jan 15, 2023 at 17:14

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.