Password Generator

by jhoffnun in Circuits > Microcontrollers

377 Views, 3 Favorites, 0 Comments

Password Generator

PWgenerator2.png

I wanted to generate 16 character passwords without using a computer, and thought I could do this by using an independent circuit which generated random noise. Lucky me, I found a great circuit I could modify for this use in an old Make magazine (“Really, Really Random Number Generator”). I then could convert the analog noise to digital output, and finally to an LCD to read the result. This required the use of a microcontoller and driver circuitry (acknowledgment to Myke Predko) for the LCD. A simple button push generates a UNIQUE password each time it is pressed!

The Circuit

Circuit.png

I changed the random number generator circuit from the Make magazine article (see that article for how random noise is generated) by using a 74HC595 shift register instead of the 74HC164, and replaced the 2 light emitting diodes used to visualize random number weighting with 2 analog meters which make the determination easier to appreciate. The shift register is responsible for accepting the serial flow of random highs and lows, and outputs 8 bits at one time (parallel output) to the microcontoller, perfect to define one character of the password. The micro then sends the character to the LCD, repeating this process 16 times until the full password is displayed.

Downloads

The Code

The microcontoller (PIC 16F88)

  • controls the flow of the random highs and lows into the shift register,
  • converts each 8 bit output to an ASCII character (and then rejects or accepts it based on whether it it keyboard type-able),
  • sends accepted results to the LCD until 16 characters have been sent.


Downloads

Operation

Simple! Turn on, and a new password appears; just press the new password button for another. Adjusting the precision potentiometer controls the relative percentage of random highs and lows (weighting) fed to the shift register; when both meters show the same reading, the maximum number of different characters can be used for the passwords. The project also allows adjusting LCD contrast, and has a PIC reset button.