Useless Box With Power Latch

by makerobotics in Circuits > Gadgets

364 Views, 2 Favorites, 0 Comments

Useless Box With Power Latch

Uselessbox
IMG_20210515_144928.jpg

My intention was to create a useless box as I found it cool.

Most of the useless boxes have a kind of main button. Sometimes also the battery needs to be removed to save the power. This was just a no go and I created my own box with a very simple power latch to turn off the power supply after some seconds as the box is not used. It is possible just by pressing the button, to reactivate the box again.

My description will only focus on the power latch, as many other people described much nicer boxes than me.

Supplies

As usual for this kind of project, we need a box, a button and a servo.
To control all, I use an Wemos D1 mini (ESP 8266) and a relay module.

The Hardware

UselessBox_Steckplatine.png
UselessBox_Schaltplan.png
IMG_20210515_144948.jpg
IMG_20210515_144955.jpg
IMG_20210515_145011.jpg
IMG_20210515_145026.jpg

I use a 9V battery as power supply. This voltage is later regulated (7805) to a 5V voltage used by all the components (ESP8266, relay, servo).

The idea behind the power latch is to use a relay to keep the main 9V available for the desired time. As soon as no further actuation is expected (15 sec for me), the relay is opened and the main supply is off. No power consumption is needed from that point.

If the user presses the button, the 9V are connected to the rest of the board. The CPU boots and turns on the relay to provide power by a second line, even if the button is unpressed by the box (see schematic).
To sum it up, there are 2 buttons in parallel for the supply chain (main user button and relay). A voltage divider is used to read the voltage on the button even if it is 9V.

Yes, all of this is not very power efficient... but it is soo simple !! And no current leakage possible.

The Software

I used a state machine to control the useless box. It makes the software very flexible to add any new reaction on the pressed button.

In the loop, the main state machine waits in standby. If the button is pressed, the scenario is selected and then run.

Currently, there are 4 scenario defined. I just run them in a loop. Each scenario is built as different steps (wait, go to button, move to a position, ...)

You can see the code here:

https://github.com/makerobotics/uselessbox