Close

The dial and code is working!

A project log for A Rotary Dial, Stepper Actuated Safe w USSR Nixies

When you enter the correct code on the rotary dial a box will open and you can hide your stuff, with nixie dial feedback!

isaxiSax 04/09/2018 at 06:390 Comments

As Borat would have said, Great Success!


Firstly I had some trouble with decoding the signal from the rotary dial. It triggered the interrupt function (ISR) in the code in weird ways. The principle behind the rotary dial is that you wind a spring up when you turn the wheel and when you release the spring pulls the dial back. On the way back there is a breaker inside the mechanism that makes a connection everytime you pass a digit. So for example an 8 would be a squarewave-package with 8 falling edges (starting and ending in HIGH, in my case 5v).


As you can see on the picture here the bounce was clear when showed on the scope:


It was solved with a software debouncer.

I then was able to read the digits and write code for dialing a code.
There is still a lot of improvements needed in software for special cases and so on but this is the first time I can enter a code and make the box open.

The sequence below goes like this:
- Log any digit entered
- If there has been 4 digits entered, check if those 4 is the correct code
- if yes, open the box
- then leave the box open until you push the "edject" button
- close the box
- reset the code



Discussions