Plywood Jewelry Holder

The Project

I created a three part youtube video series on how I made a Jewelry Holder for my wife’s Christmas present out of plywood.   It’s mainly designed to hang necklaces from, but also has storage for bracelets, earring, rings, anything really.  It’s designed to hang on the wall, like a picture frame.

The Videos



Project Files

I posted an Autcad Drawing on

Lessons Learned

There are a few things that I would do different on the next project.

  • I was originally planning on drilling the hooks in place, but I found it awkward and impossible in some places to drill the pilot holes in place. So I ended up removing the dividing strips to install the hooks.  Not a huge deal, but there was some potential for damaging the enamel coating I had already sprayed.
  • Also, the dividing strips are tall enough that I really should’ve attached them at the miters. Because they are not attached together, the miters have some visible gaps.

Worlds Most Useless Machine Rebuild

The Original Build

Back in 2009 I build my first copy of a “worlds most useless machine” from a video I found on, it is no longer posted, which was a copy of the real original by Claude Shannon called the ultimate machine.   The original box was built quickly over the course of one weekend and worked for a few weeks.  However the electronic circuit had a few flaws due to me trying to save costs.  I was trying to power the servo’s and the electronics from the same batteries which caused some problems and ended up frying my microelectronic.   3 years later and I decided to revive the box and make some improvements to both the electronics and the operation of the box.  With the original box most people were skeptical when I handed it to them and told them to turn it On, they always wanted to open the lid first.  So I decided to add a lock to the box, so they can’t open it.  The only thing they can do is turn on the switch, which adds to the suspense.   It really is fun to watch people see the box for the first time.

Building the Box

The base box used in the prototype was a cheap wooden box purchased from Michael Craft Stores.  I replaced the lid with a small piece of 1/2″ plywood that I cut to make the two halves.  The side with the switch is nailed on while the flap side was attached with the boxes original hinges moved to the side.  The servo mounts and battery holder are made out of craft balsa wood.

Schematic and Design

Basic Logic Flow:

  1. User Turns On Power
  2. MicroController Powers On
  3. MicroController Turns on Solid State Relay that Latches on the Power Switch.  The Microcontroller Turns on a second Solid State Relay which controls power to the servos.
  4. MicroController Opens the Lock
  5. MicroController Opens the Lid
  6. MicroController Moves the Arm Out
  7. Once the MicroController Detectes the switch has been turned off it then Moves the Arm In
  8. MicroController Closes the Lid
  9. MicroController Closes the Lock
  10. The MicroController then turns off both solid state relays which kills the power to itself and the servos.

Circuit Components:

Control Power, Circuit and Switch

The Microcontroller and switch and powered from a 9V (B1) battery.  Power flows from the battery through the switch to the input of a 7805 (U1) 5V voltage regulator.  The 7805 supplies the 5V that are required to drive the MicroController and Solid State Relays (Opto Isolators).   Once the switch has been turned on and the MicroController has received power a solid state relay (U2) is turned on to Latch on the power switch, effectively shorting out the switch to keep power on even if the switch is turned off.   A Diode (D1) keeps power from flowing back from the solid state relay to the output of the switch.  The Diode is needed so that the microcontroler can read the state of the switch, without it it would always have voltage potential because of the Latched Power.   The State of the Switch which is 9V is also feed to a NPN Transistor (Q1).  The transistor acts as a simple switch to switch a 5V source on and off so the MicroController can safely read the state.

Servo Power

The Hobby Servo’s are powered from a 4 AA batteries (B2) supplying 6V’s.  The Micocontroller can turn the 6V power on and off using a Solid State Relay (Opto Isolator) (U4).  The power is controlled via a relay so that no power is drained off the batteries from the Servo Control Circuits when the box is off.

Hobby Servos

The Arm Servo (SRV3) and the Lid Servo (SRV2) are HiTec models HS-311 while the lock servo (SRV1) is a smaller HiTec HS-50, both purchased from  Hobby Servos are a fraily inexpensive way to add control to your MicroController projects.  They can easily be controlled via remote control or through a MicroController.   Pololu Robotics & Electronics has a good article about the details of how the control signal works, I recommend reading it.


The MicroController (U3) I used for this project was a PicMicro 16F648A that I had in my parts supply.  Its a little overpowered for this project, but still cheap enough to be used.  The microcontroller sends the control signals to the hobby servos, Ability to control one status LED (D3), reads the input of the switch through Q1 and controls both Solid State Relays.

Full Shematic


Soldering Up

I considered designing and ordering a Printed Circuit Board for this project but ended up using a prototype board from RadioShack because I didn’t want to wait for the shipping time.

Microcontroller and Programming

I programmed the MicroController using MeLabs PicBasicPro Language and Compiler.  I tried to document the code so that it can be easily read by someone with some MicroController Experience.  The source code is licensed MIT, so feel free to copy it and modify it to make it your own.

[Full Source Code]

Understanding Flask-Login Tokens Tutorial

When I was trying to implement Flask-Login into my first Flask application i had difficulty understanding from the flask-login docs how to implement the Authorization Tokens required to use the Remember Me feature. I found another flask plugin package called Flask-Security, which I used to base the below example off of. This example extends the basic example that the Flask-Login Documentation gives and adds support for the get_auth_token and the token_loader methods.

What is what?

  • Flask is a microframework for Python based on Werkzeug, Jinja 2 and good intentions.  Simply Flask is a lightweight framework used for serving dynamic web pages (applications) on the internet.  More importantly Flask is Fun.  This example uses Flask version 0.9.
  • Flask-Login is a Python module which helps add user session management for Flask.  This example uses Flask-Login version 0.1.3.
  • itsdangerous is a Python module which helps securely sign cookies in this example.  This example uses itsdangerous version 0.17.

Flask-Login Alternative Tokens

In order to implement Flask-Login alternative tokens, which are recommended by Flask-Login you need to implement two methods, get_auth_token in your User Class and token_loader callback method.


In our user class we need to implement a get_auth_token method which will return a secure token string which will be stored in a cookie on the users computer.  The cookie will be used when a user returns to the your site.  Flask-Login will load the token and ask us to decode and return a User class with the token_loader function.  Because the token is stored on the users computer we need to make it secure.  We will use itsdangerous to do that for us.  We will combine the username and hashed password into a list then pass that to itsdangerous to encrypt using our flask secret_key.

We store the password hash so that if a user is logged in on multiple computers/browsers and changes their password, it will invalidate the cookie token.


The token_loader callback needs to take the token string passed to it and decode it.  We also use this method to enforce the expiration date of the token as explained in the code below.  Because we stored both the username and password hash in the token, once we decode it we need to check and that the username and password match.


  • Its important to note that the Flask Session Cookie and the Flask-Login Cookie are vulnerable to attack.  Although the cookies are encrypted and relatively safe from attack a user who is sniffing network traffic can easily copy the cookies and impersonate the user.  The only way to prevent this kind of attack is to use secure sockets (https) when sending back and forth the cookies.  This example does not cover that scope.
  • This example does use a password salt and hash to store the users passwords.   It is important to never store a users plain text password, that way if your system is ever compromised someone can still not access users data even with the stored password hash.  Wikipedia,

 Complete Working Example