Introduction: PasswordKeeper on Aruino Pro Micro or Why Keep It Simple When Elaborate Way Exists!

Picture of PasswordKeeper on Aruino Pro Micro or Why Keep It Simple When Elaborate Way Exists!

It seems, that the main problem with microcontrollers for fan of electronics (especially beginners) is to find out where to apply them :) Nowaday electronics, especially digital one, is more and more looks like a black magic. Only 80-Lvl wisards are able to do something there with tiny components. That is a reason why Arduino boards become very popular. They encapsulate black magic and some smoke ;) into board with human-manageable pins.

This post I want to devote to a fairly simple project, named PasswordKeeper, on the base of Aruino Pro Micro board. This board hosted ATmega32U4 chip.

Step 1: The Idea

Picture of The Idea

For a long time I wanted to make something simpe and useful with some controller. And then a colleague of mine threw an interesting idea - he was too lazy to key-in the login and password into his computer every day. So he took tiny DigiSpark (ATTiny85) board and created a device, which sends login+password to a computer when button clicked. Here is this contraption.

Step 2: Idea and Wiring

Picture of Idea and Wiring

The excellent idea - I thought. Why not to borrow it and apply some crazy creativity to it.

Rebuilding the Arduino project and reloading it into the board every time when password changes - "It is not the droids you are looking for" [wave] . It's too straightforward. We would take much more tangled route!

The contraption should show how it works. But only three standard on-board LEDs - it is way too little for this purpose. Let raise LED number to 4099! So a small OLED 128X32 display module was added to the project. I couldn't think up where to squeese it for quite a while. And it fit perfectly into this project. A couple more buttons - and all is ready to go!

There were not enough space in ATTiny85 chip for the project - adding of display pulled for graphic library + fonts. So all this stuff just didn't fit into DigiSpark memory. Quick search come with a suitable platform: Arduino Pro Micro.

The main idea of the project is that ATmega32U4 by default pretends to be HID device - USB keyboard and USB COM port. Drivers for these devices are already pre-installed in the most of operating system - and nothing else needed to be set up.

The PasswordKeeper, brought to your attention, is a chindogu which imitates clicking of buttons on the keyboard. These cliks can transfer a login and a password to a computer. Even ubiquitous Ctrl-Alt-Del can be send by click of 1 button instead of 3. Or any other key sequence by your flavor.

The form factor of the selected modules is very compact, but neverless, easy to tangle with. It is possible with the minimum efforts to assemble the small and rather useful device. The wiring just could not be simpler.

Step 3: Cooking

Picture of Cooking

Contraption Ingredients:

1) Aruino Pro Micro - 1 piece

2) OLED display 128x32 - 1 piece

3) Buttons - 2 piece (or any other type - by flawor).

4) DuPont connectors - 7 pieces (or some wire for soldering it up all together - by flavor).

Put it all into small food container and shake it thoroughly. According to probability theory items interconnects temselves right way eventually.

Oh, wait! It is not cooking-related article! My apologises.

You'd better connect it all together manually - according to wiring diagram and save yourself a couple eons of shaking.

So prototype for sketch debugging \ testing is ready.

Step 4: Constructing a Case

Picture of Constructing a Case

The sketch seems to be working. But it is unconvenient to use device in this form. So a little work in Sketchup provides us with a small casing.

Upd: An idea about the case.

You may take any suitable small transparent plastic box.

Or take thin transparent plastic from some packaging. Bend it according to device geometry. Put electronics inside and fill all free space with transparent silicon. It should give you relatifully nice looking device.

Step 5: 3D Prining

Picture of 3D Prining

Threw it into the nearest 3D printer.

Step 6: Case Is Ready

Picture of Case Is Ready

And as usual, haste is necessary when catching fleas.

The first version of the casing is a bit small and the board doesn't fit!

Akela missed to left some gaps. So drawing is corrected and reprinted.

Second pass was better - the board fits perfectly.

Step 7: Trying Out Case

Picture of Trying Out Case

Put board inside, press on it and with a characteristic crunch it locked into the place.

Trying on buttons - they fits too.

Step 8: Soldering. Wires.

Picture of Soldering. Wires.

By the way, I have been looking for a long time for a good prototyping wire.

As a result, I now use 30AWG wire in my projects. You may see them on the photo. It is wrapping wire.

Few peoples now remembers what it is for.

But it fits perfectly for on-board soldering too. Colored wires good for tidying up usual mess by assigning distinct colors to wire functions. The wire is thin. Insulation withstands the temperature of the soldering iron well. Typical PVC insulation melts during the soldering immediately. This one become softened, but holds its shape and allows occasional touch of a soldering iron tip without melting to the core.

Step 9: PwKeeper Is Ready

Picture of PwKeeper Is Ready

So putting it all together gives us a small token that connects to a computer and allows you to manage and use

quite a large number of logins and passwords.

Step 10: PwKeeperPc - Easy Data Editing in Token

Picture of PwKeeperPc - Easy Data Editing in Token

The number of logins is limited by the amount of on-board EEPROM memory (1024 bytes) and the length of passwords.

EEPROM memory keeps a number of records.

Each records contains comment field and up to 8 text fields.

Two of text fields named the Name and the Password - just for management conveniece.

The display allows you to select the desired login showing you comment fields.

It also allows you to edit the data in the token. Data may be edited with only two buttons. I squeesed some kind of Editor into the token. But, honestly, you should be a masochist to use it.

Therefore, to simplify passwords management I had to write a special program for the PC (by the way - do not foget to switch token into USB mode when you use this program).

Upd: For *nix peoples I added serial TTY console in PwKeeper v1.4 firmware. This console is activated from device menu. Connect to it with any suitable terminal program - and you may edit data in PwKeeper with several VI-like commands. Console is possible to use on Windows platform too. Just press Ctrl-Shift-M from Arduino IDE and you are there (do not forget activate TTY on PwKeeper before). But PwKeeperPc is much more convenient, I think.

Step 11: PwKeeper Is Running!

Picture of PwKeeper Is Running!

The token contains very sensitive data so some efforts should be put into security.

The main password to unlock the token exists.

It is empty by default, but as you set it in the token, you should enter it each time after power-on.

The main password is a user-defined sequence of single and double clicks of up and down buttons.

Step 12: Flow of Thoughts

Theoretically, it is possible to encrypt the data in EEPROM with some cryptographic algorithm - some space still left in flash.But these efforts would not be seen from outside - so I did not bother.

The token in its normal state is not visible to computer. To put it in the USB edit mode you should physically do it by pressing buttons on it. Likewise, to send a password you should physically press an UP button. So malicious hacker would not steal your passwords from the token. He would caught them on a USB port when you send them from token ;)

The result of this project is a contraption where I store passwords for my bank accounts and forums. Also my parents found it useful for logging into web mail and several other sites.

Especially for my colleague I programmed all remaining inputs of board as quick access buttons. Up to 12 buttons may be connected from remaining input pins to ground. By clicking on one of these buttons you jumps on the corresponding login (if it exists). So you only have to press the UP button to send it. Or hold a shortcut button a bit longer.

Step 13: Inspection-1

Picture of Inspection-1

Before going public PwKeeper has undergo meticulous inspection.

Step 14: Inspection-2

Picture of Inspection-2

The Head Of Inspection had just been woken up and is not in the mood.

But he frowns neverless- why clearly unfinished device is offered to public.

My words, that he needs to verify the quality of product and it is difficult to do with case closed, were just ignored by him.

Newerless (after bribing with sausage) he issued the certificate of approval.

Step 15: Conclusion

Picture of Conclusion

I invite all who wish to recreate this remarkable device.

It will allow you to lose all your passwords in an entirely new way!

Everyone can lose the shred of paper. Honestly, who would be impressed by it?

But make a special device, put all you password into it and lose it ot its password - this should raise some brows!

I know, I know, there are a lot of software password wallets exists in the world, but we are for hard way! KISS (Keep It Simple Stupid!) not for us! Remeber?

Besides, main passwords for these wallets should be entered too. And most of them are unable to send Ctrl-Alt-Del or other combination for logging you in. And even if they could - it's like hanging a key on a nail near to the lock.

All approved by The Head Of Inspections files for this project can be downloaded from here.
There are samples of config data too.

Comments

ravijag (author)2017-05-19

Nice 'ible and nice pet too :)

will try this sometime now that i have ordered the display.

stratos13pao made it! (author)2017-01-14

Well as i said i made it!! i have to say its great! thanks for the instructable, one thing id like to ask is how i can revert an arduino in the old state so i can program it again with arduino ide. Cause i used one as a prototype and a second one for the project and now i cant program the one i used for prototyping.

DenWg (author)stratos13pao2017-01-15

Congratulation!

And thanks for photo!

There is nothing special was made in code.

Just follow the same procedure - before loading scetch from IDE do manual reset.

I have not understand the reason (and a bit too lazy to investigate), but I have same behavior from my boards.

Sometime they do normal load from IDE - switch to 1200, then to 115200 and load by command from ide. And sometimes I should use manual reset before pressing on LOAD button.

Generally speaking, it would be good to set fuzes in board that would block further loading and reading from controller. It would raise data security in token .

stratos13pao (author)DenWg2017-02-18

i really cant find a way to program the arduino i used with the pswkeeper software, i have no problem programing other pro micros with ide, but it doesn't work for the board i used to prototype with. i cant dont know how to change the upload rate... how do you do that? is there anything else i could try? i have tried both in bootloader mode or the other one many times.

DenWg (author)stratos13pao2017-02-18

Hi!

I tried to experiment with brand-new-out-of-the-packet board.

Here are my result:

1) COM port number sometimes jumps like fleas on the dog.

As I said earlier, there are 2 com port associated with this board.

- first you see always (or at least 10+ sec after plugin). Its name "Arduino Leonardo (COMxx)"

- second you may see right after board reset and no later then 10 sec after reset. Its name "Arduino Leonardo bootloader (COMyy)". COMxx !=COMyy.

Then it changes to "Arduino Leonardo (COMxx)".

2) For loading to board "Arduino Leonardo bootloader (COMyy)" port should be connected with loader. It's done by sending RESET signal to board. It may be done 2 ways:

- Aruino IDE built-in mode for this board is to send 1200 baud packet to "Arduino Leonardo (COMxx)" port. This should tell the bootloader to go to load mode and switch to "Arduino Leonardo bootloader (COMyy)" port.

- Do manual RESET with connecting RST with GND

If you use COM port for communication (like PwKeepers does), it 'steals' port from bootloader. As a result - bootloader do not see reser signal.

3) Here are the sequence, which allows you to load to board, if IDE can't do it as it should:

- Check _current_ port number and set it in IDE . You may have done it just minute ago, but OS knows better about its port than you :)

- See, that you have no active RS console (Ctrl-Shift-M) in another process.

- connect GND to RST.

- start building sketch.

- just as you see "PORTS {} / {} => {}" strings on the screen remove GND-RST connection. Download should pass.

stratos13pao (author)DenWg2017-02-19

i belive that i already did all that , but i tried it again and it worked! thank you very much for your long and detailed answer :-)

DenWg (author)stratos13pao2017-02-19

You are welcome.

Its seems, that I frowned on board and it get scared - and even distanse does not calmed it ;)

DenWg (author)DenWg2017-02-18

You may use standart BLINK sketch for testing. Just replase 13 pin with 17 for this board - and you see blinks.

D6equj5 (author)2017-01-26

I've got the 30awg wiring sorted and all packed away neatly in my 3d printed enclosure ... the pc app though NEVER can send the correct password - always fails mismatch no matter what I do - even for a blank password.

Also struggling with the menu system but hey, I'll get there.

DenWg (author)D6equj52017-01-26

Hi!

1) You may use TTY mode + (Ctrl-Shift-M) from Arduino IDE.

Then use unix VI-like commands, which described in P3 of rtf file.

2) PwKeeperPC

- When main password is empty there is no "Password?" screen on token.

You may fully earse data in token with DeviceMenu->Clr->Yes command.

Then start PwKeeperPc (Password should show all zeroes) and try Read.

Reading should pass.

Then you may set password, edit data, etc...

Then press Write - warning and red button should appear.

When you press Overwrite new password should be set.

D6equj5 (author)DenWg2017-01-28

Thank you, all is now working well. one thing though, where in your program (in which variable) do we put the character codes to set the sequence of sending? Does it matter if it is in login, password, v1, v2 or v3?

In one instance where I didn't fill every variable in an entry, I noticed the device puts that entry across and parts of the next entry in the database of logins thereby mixing the two.

This could be useful although I can yet see how.

I may make another with a couple more buttons - I'll have to modify the case however I can experiment with my 3D printer and keep it as small as possible.

DenWg (author)D6equj52017-01-28

Hi!

There is no difference between login, password, v1 ... v6 variables.

Only the order of sending: V1, V2,Login,V3,Password,V4,V5,V6.

Also you may modify Login and password directly in token - but it is very complicated.

There are *.skp files in project - you may load them to sketchup, edit and then generate stl.

If you create some nice case with several buttons - please put a link on them here. Or send them to me and I put them in PwKeeper project on github.

Mixing entries sounds like a bug.

Is it happens in PwKeeperPc or they mix when you load data into token?

When you save\load data to file is all ok there?

Could you try to edit data with TTY and commands and see if bug reprodused there?

D6equj5 (author)DenWg2017-01-28

Hi, these are two images of the pwdkeeper entry and the same entry outputted into a spreadsheet - you can see the spurious 1957

I shall try clearing the device several times, downloading pwdkeeper.exe again, and hard reset of the Arduino micro and will let you know the results tomorrow.

stratos13pao (author)2016-12-27

very nice project, im trying to recreate it but im having some trouble, i can upload with the load_hex.cmd, and i can save Pwkeeper.pwk files with the app.

but i cant use the read/write buttons in the app, they give error messages

my arduino is on COM13 when in normal mode and COM12 in bootloader mode

i think the upload of the hex file goes well cause i get 0/0 and a dot blinking in the lcd

when i try to write it goes through COM port 13 and COM port 1 and then it shows Operation failed! The semaphore timeout period has expired. or not found some times.

does the PwKeeper.ino.hex contain the passwords and how can i create one with my passwords from the Pwkeep.pwk file or with any other way from the app?
would love to get some help so i can make this work, again this poject idea congrats on making it and sharing it.

DenWg (author)stratos13pao2016-12-27

Hi!

Congratulation for you for succsessful recreation of project!

It's seems that all works like it should - blinking dot confirms it.

For using PwKeeperPC you should enter "Device Menu" on PwKeeper token.

You need to do:

1) On PwKeeper token do LongPress on down button - it enters "Device Menu".

2) Select "USB" item

3) Start PwKeeperPC and you may read and write to token

4) Also you may select "TTY" item. Start Arduino communication console (Ctrl-M) and communicate with token in unix-style - from console string.

Console commands described in chapter 3 of PwKeeper_en.rtf.

Default password is empty.

Beware - if you forget you main password - there are no way to restore it!

You may reset it - but it also clears all your data inside token!

Like I wrote - it's a new way to lost all you login data ;)

D6equj5 made it! (author)DenWg2017-01-22

Thank you - your patience and details have proved very helpful - the password keeper is now made and working .... although as you can see from the image, I need to source finer wire with which to make the connections so it will all fit in the case. I printed in rugged flexible 3d filament to give it a better feel in my pocket and so it is more resistant to knocks from other keys etc.

Hopefully my inexperienced questions and your detailed answers will be of help to others who may find difficulties with this.

Thanks again

D6

DenWg (author)D6equj52017-01-22

I have made a review of these wires on another site:

http://mysku.ru/blog/aliexpress/46746.html

You may read it with translator or just look for fotos.

I made a hard test - the wires were bent on 90 degree and only then soldered. See how PVC from twisted wire melts down and this wire keeps its shape.

DenWg made it! (author)D6equj52017-01-22

You are welcome!

I am very happy that people use my project.

I strongly advise you and all who tinkered with MC to buy this wire:

https://ru.aliexpress.com/item/IMC-Hot-PCB-Solder-...

It is very convenient - cheap, thin, insulation is hard to melt occasionaly and at the same time is easy to remove for soldering. It is PTFE not usual PVC, if I am not mistaken. I was looking for a long time for good prototyping wire - and at last found something usable. Look for AWG30 on aliexpress for other colors.

DenWg (author)DenWg2016-12-28

* (Ctrl-Shift-M) from Arduino IDE.

stratos13pao (author)DenWg2016-12-28

thanks for the reply, i got it to WORK!!! will probably 3dprint the case soon, will post pictures when done, again thanks for the great project.

D6equj5 (author)2017-01-20

Usually I am not so ignorant - how do I load the hex program onto the device? am I missing something?

DenWg (author)D6equj52017-01-20

Hi!

There are brief instructions in load_hex.cmd, I just repeat magic sequence here ;).

One more note:

If path to AVRDUDE.EXE contains spaces - path _MUST_BE_FRAMED_ with " symbols!

1) Check pathes to AVRDUDE.EXE and avrdude.conf in command below. Correct it according to your system. Do not forget ""!

2) Open DeviceManager window. Open COM and LPT node.

3) On Arduino Leonardo connect RST pin to GND 2 times with interval of 1 sec between tries.

4) In COM and LPT node new COM port should appear on ~8 sec. Replace COM16 in command below with your port.

5) Connect RST pin to GND 2 times with interval of 1 sec between tries and immediately run LOAD_HEX.CMD.

6) Download to board should pass.

D6equj5 made it! (author)DenWg2017-01-21

Thank you - your detail pointed me to a problem with my path to avr...

However now I get this screen [see uploaded image] this screen then stalls like, forever whilst one of the red led's on the arduino blinks every now and again. I do have a heavy cold just now so my brain is rather foggy however I'd really appreciate you again giving me a pointer ...

Thanks

Delightful Stuctable.

D6equj5 (author)D6equj52017-01-21

Just to confirm - the arduino shows as com10 and so I've edited the hex file for this and the com port speeds are the same. Also the screen on the pwrdkeeper device is blank.

DenWg (author)D6equj52017-01-21

You see COM10 _always_?

Or it appears _only_ after reset and then ~10sec changes to another port?

It is 'volatile' port that you shold specify in command string. It is loader port.

Port, that you see most of the time, is not for sketch loading - its for communication with MC.

D6equj5 (author)DenWg2017-01-21

When MY pwkeeper is plugged into the usb port on the pc - the port shown in Device manager is port 14 and then changes to port 13.

I have edited the cmd file from you to be com13

Now when I double click the cmd file it just flashes my screen. I then run the pwdkeeper exe file and try to WRITE and I get an error saying semaphore timed out expired.

I have double checked connections and all seems ok - do you think my micro arduino is at fault?

DenWg (author)D6equj52017-01-22

No, I think all is OK with your board. It's loading of HEX into this board that is a bit tricky.

- You should set COM14 in load_hex.cmd. !!! Not COM13 !!!

As I wrote earlier - you shold specify 'disappearing' COM port.

- Then do hardware reset (or just plug board to PC)

- And immediately start load_hex.cmd - while COM14 still visible in Device manager.

- When load completes, you should see blinking dot on the screen and text: 0\0. Then see discussion with stratos13pao a bit down - how to use PwKeeperPC.

AvielV (author)2016-11-28

This seems a lot like a kickstarter campaign: https://www.kickstarter.com/projects/limpkin/moolt...
Although this has far less features compared to the Mooltipass Mini, it's a lot cheaper, so cool beans. I might make one for the heck of it. :)

DenWg (author)AvielV2016-11-29

Yes, it has similar (but extended) functionality. They offer nice completed device.

I offer fairly simple DIY project for peoples with golden hands :).

My target was to offer peoples to make something simple, unusual and relatefully useful by themselves from easy accessible and manageable parts.

I think, the most complicated part of my project - is a case.

AvielV (author)DenWg2016-11-29

I agree. :) Also I've felt that once you consider a handheld device which manages your passwords, the idea just sounds more and more useful and desirable. I was reluctant to shell out a sum such as the kickstarter was requesting, so seeing this instructable got me excited.

PrathameshK5 (author)2016-11-24

Hello.

I wanted to learn about this arduino code. How can I get the .ino code ? Is there any method to get it from the .hex file?

Thank you

II

DenWg (author)PrathameshK52016-11-24

Hi!

Right now project still in development phase - so code is not available.

Maybe later I will add it to GitHub files.

Disassemble HEX is possible - but have no sence. Algorithm is not compex one. It is much simpler to write similar realisation then disassemble.

pharojim (author)2016-11-21

Super idea. I am building one to use at work where we can't fiddle with software.

Just slip this into the USB and I can save 40 or 50 keystrokes for every invoice.

Kind of like external function keys. Thank you.

DenWg (author)pharojim2016-11-21

You are welcome!

If you have any suggestion for functionality - I would be glad to hear it.

Do not forget - you may add 12 more quick access buttons. And assign arbitrary sequences to them.

ипожарский (author)2016-11-17

мне кажется или я это видел на MySku?

Не кажется :)

Я решил весь мир осчастливить\поразвлечь.

.nitro (author)DenWg2016-11-18

Давай производство налаживай :)

;) люблю тут полазить почитать....рукастые в основном люди тут

RyanP80 (author)2016-11-17

Love it !. Especially the inspections department lulz

wtito (author)2016-11-17

Its' a great idea, i will work on it, but not this year, busy doing something with lights house and my PI 3.

seawarrior181 (author)2016-11-17

Nice job! Your sense of humour is appreciated!

ValerieMonroe (author)2016-11-17

you have a seriously quirky sense of humor! Much appreciated, thanks!

s3tw0l4 (author)2016-11-16

not a bad idea, thanks

sumondigi (author)2016-11-15

what the cat it is (btw)?

DenWg (author)sumondigi2016-11-15

It's Oriental breed.

tomatoskins (author)2016-11-15

What a great idea! Thanks for sharing and welcome to the community!

About This Instructable

29,785views

210favorites

License:

Add instructable to: