Introduction: Password Protected Sketchbook
Learn how to create your own password protected sketchbook as you can see it working in this video :
Step 1: List of Materials
First the book itself,i personally bought a PaperBlanks, best ones i found after several hours of searching. I used the Grand format unlined Nocturnel with clasps.
Some of them have clasps which is a good start for the locking system, although my locking system is pretty useless in its current state...
The locking system made by Aaron Ravensdale is far better !
But here, i'm gonna explain my shitty one ;)
Electronic parts you'll need in order to create your own book :
- Arduino Pro mini 3.3V : https://www.sparkfun.com/products/11114 OR Trinket Pro 3V from Adafruit : https://www.adafruit.com/product/2010
- Lipo charger (for battery charging) : https://www.sparkfun.com/products/10217
- Piezo (for sound and knock sensing) : https://www.sparkfun.com/products/10293
- 3mm LED + holder : http://www.adafruit.com/products/778 + https://www.adafruit.com/products/2175
- SoftPot 10cm (for the piano) : https://www.adafruit.com/products/178
- 1 micro stepper motor : http://ebay.eu/1rSJxPD
- 2 Reed switches : https://www.sparkfun.com/products/8642
- 2 strong earth magnets (4x2mm) : http://ebay.to/1BeDhTQ
- One resistor between 220Ω and 1KΩ (best is to find a local retailer for just this..) : https://www.sparkfun.com/products/8377
- 8 diodes : https://www.adafruit.com/products/755
- 1 polymer Lithium Ion 3.7V Battery : https://www.adafruit.com/products/1578
- Wires : https://www.adafruit.com/products/1970 or a big pack https://www.adafruit.com/products/1311
- 1 double sided PCB board like this : http://ebay.eu/1HlHM0L
- 1 FTDI basic breakout : https://www.sparkfun.com/products/9873
- 1 right angle headers : https://www.adafruit.com/products/1540
- 1 Mini USB cable
- [optional] Heat shrink : https://www.adafruit.com/products/344
Tools you will/might need :
- glue gun : to fix components inside the cover
- cutter : to cut the cover
- soldering iron : https://www.adafruit.com/products/180
- Solder spool : https://www.adafruit.com/products/734
- [optional] A small driller with sanding discs like this one : http://amzn.to/1BeDOVG (would make cover digging way easier)
- [optional] A multimeter to check if connections are ok : https://www.adafruit.com/products/71
Wood wheels :
Wheels are made out of 3mm MDF.
They are cut with a lasercut machine. You can find and use ones in fablabs, check online if there are around your place ! You will need at least a 280x150mm board. But you will most likely find 600x300mm or 1200x600mm boards. It's not costly don't worry.
Make sure to get at least a 3mm thick board ! You'll have to put the 2mm thick magnets inside it so it bas to be bigger !
All in all, this should cost your around $150-200.
Quite expensive for such a useless thing, I know :D
Step 2: Digging the Cover
Not much miracle possible at this point..
Place the components as you wish or the same as me (see pictures), draw their shape with a pencil and do the same for the wires. Then, grab a cutter, and cut on your lines. You can go for about 2.5mm deep. Then rip off the cover ! The cover is actually made of a carstock glued on a ... sort of thick amalgam. You can dig this amalgam to remove it, stop when you reach the cover, it will be brighter than the amalgam.
This is where a driller with sand discs is usefull, it's WAY faster and easier to digg the cover with it and stop at the right spot without damaging the cover. But you can do it by hand too.
Before cutting, just be carefull about the reed switches positioning ! Place them according to the location you want to put the wheels to ! They have to match the location of the two holes at the top. Grab a ruler to make things clean, or make a hole through the cover with a small point (the wheels will hide them no worries).
Once you complete digging, try to put the components and check if they match the holes correctly. If not, digg a bit more until they do !
Cut a100x65mm hole on the cover where you want the "piano" notes. It's not necessary to have the piano visible but it helps hitting the right notes. But you can keep the cover and draw marks by hand or whatever if you prefer. Just make sure they match the SoftPot's zones !
Finally, digg a ~4-5mm large hole for the LED (light) indicator.
Step 3: Soldering
This is where things get nasty if you never did it before, and cool if you like electronics.
Sadly, i didn't make any pictures during the soldering so i can't give you a step by step of it but i put a schematic of the global circuit (i hope i made no mistake..) and some closeup pictures of the "critical" parts (but the motor).
The most complicated thing to solder is the stepper motor. It's REALLY small and doesn't match the PCB holes perfectly.
The "easier" way to solder wires to it is to first solder it on a small part of PCB board so it has durable connections.
If you have no tool to cut the PCB board easily, start by cutting out a small square out of it with at least 4 CLEAN holes. Digg it with a cutter as much as possible then break it by hand.
Cut small chunks of solder and put them above the holes you want to solder the motor's pins to. Try to put the motor over it, if you have a way to fix it, do it. Then, melt the solder with your soldering iron and pray for it to work properly. Repeat this for the four connections.
If you succeed doing this, you won ! You now just have to solder wires at the opposite part of the PCB board.
Once done, check if connections are OK with a multimeter. Two pins at the top should be connected, same for the two pins at the bottom.
If not, try to add some solder to "fill the holes".
Once soldering is ok, you can put some glue with a glue gun to make sure the solders won't move too much when manipulating the motor with your hands. (you wouldn't want to solder that again, trust me :D)
The other big soldering part is all the diodes. I took a chunk of PCB board and put them on it. Can't really give a step by step (and again, i made no picture sorry..), just try to follow the schematics. The grey side of the diode should be where the arrow is pointing in the schematics. (BE CAREFUL TO PUT THEM THE RIGHT WAY!!)
Step 4: Soldering Headers and Connecting FTDI Board
In order to program the Arduino from the computer we need to plug the FTDI Basic Breackout board to it.
But we do not want to put it inside the cover as it would take place for nothing and this board is made to be used for multiple projects. We need simple connections and that is what the right angle headers are used for !
Cut 6 pins out of the bar with a pair of scissors.
Solder the smallest pins to the side of the arduino as shown in the image.
You will now be able to plug the FTDI board to the Arduino. To know in which side plug them, watch for the DTR pin on the FTDI board, it should go the the GND pin of the arduino (not the BLK).
Problem is, the FTDI breakout pins ordering isn't the same as the Arduino. It would have been to simple you know ;).
The GND and CTS pins have to be switched. You can go the hard way by unsoldering things on the FTDI board, and switching the headers with some cables, but i wouldn't suggest that, you have much more chances to destroy it than anything.
I personally use female/male jumpers to make the link and.simply switch the two necessary wires.
Note : If you're using a Trinket Pro from adafruit, i don't know if the problem is the same.
Step 5: Programing the Arduino
You have first to download ans install the Arduino editor from here :
Once done, download the code from here for the last version:
Or grab the ZIP at the bottom for possibly outdated one (not much risk don't worry).
Unzip it anywhere on a folder named "LockedBook". Double click the file LockedBook.ino, this should open the Arduino editor. You will see the code and be able to edit it if you're curious/adventurer or if you know how it works.
Plug the Arduino to your computer with the USB cable plugged to the FTDI board (itself pluged to the Arduino).
In the Arduino editor, on the menu "Tools", go into "Card type" and select the line "Arduino pro or Pro mini 3.3V 8MHz w/ ATmega 328". If you're using a Trinket pro from Adafruit it will be a bit more complicated, a full tutorial is available here.
Check in "Tools" -> "Serial port" if a line is selected (something like "PORT[x]").
If everything's ok, click on the little arrow pointing to the right at the top left of the editor, this should compile the code and upload it to the Arduino.
If the compilation/upload worked with no troubles well, first, you're lucky, and second, you should ear a "bip bip" letting you know that the code works.
If there was a problem, that will be too hard for me to help here. Check on google you should find the solution quickly, if not, try asking in the comments or post a message in the Arduino forums.
Step 6: Cutting Charger
The charger contains a connector that is too big and won't fit inside the cover.
Just cut it out as shown on the image above. (I did that with my driller and a small circular saw tool)
Then, cut the battery's connector with scisors, remove a bit of plastic where you cut the wire and solder them on the two holes of the charger.
Put the red wire on the "+" hole and the black one on the "-" hole.
Place it on the cover so the USB port will be accessible to be able to charge the battery without having to open the book. Not that it's complicated to open it with my shitty system but still, it's better :)
Step 7: Gluing Parts
Once you're sure everything works fine, you can glue everything inside the cover so it won't move.
Grab a glue gun and put glue...well..not everywhere but almost :)
DO NOT glue the SoftPot sensor with this ! Put a bit of "regular" glue inside the cover, and stick the sensor to it (gray side visible from the cover's hole!).
But, before gluing, you should create the "note splitters" (black stripes) on it. I used black tape to do that. Put 5 small chunks regulary spaced, then i'd suggest to put a band of transparent tape over the whole thing so the black chunks won't move when using the piano (i didn't think about that when doing it sadly..).
Then you can glue it to the book.
As this will have to be pressed, you should add/glue some layers of thick paper under it to prevent it from detach when playing notes. I personally added something like 4 layers of paper + the "Paperblanks" part cut before. It's thicker than the actual cover but this way i'm sure it will hold in place.
The Piezo should not be glued neither ! Or i wouldn't suggest that.. Use a bit of tape instead ! Just press it hard so it's really pressed again the cover. It has to be really pressed to the cover to sound louder.
Step 8: Making the Wheels
No miracle for this, you'll need to rent a laser cutter for an hour in a fablab or make it done by any laser cutting company.
The files can be found on Thingiverse (or at the bottom) :
Generally you'll need the PDF file but the illustrator (AI) file is here in case you would customize things.
The laser cutting machine is just a kind of printer. Basically you'll need to print the PDF file from a computer (like you would print any document) but instead of sending it to a classic printer, you'll send it to the machine. You'll also have to do some settings to tell the machine that the red lines have to be cut and the black areas to be engraved.
Once you have your wheels, make 4x2 holes under the symbol of your choice under the big wheel and glue a magnet inside it.
Do the same under one of the four small wheels that have symbols on it.
Put everything in place and fix it to the book. I personally used some small nails (see second image) pushed from the inner of the cover. You just need to shoot at the right place !
But be aware that MDF can be easily cracked when nailed... i took the risk, luckily it seems ok !
Step 9: About the "locking" System
As you can see, the motor locking is realy bad.. and useless.
I kind of gave up to it and just put a small wood stick (cut from the MDF board, it's in the PDF) on the motor's shaft after drilling a small hole into it. It's ugly, it's not locking anything, but.. still better than nothing i guess ^^.
I then taped the motor to the cover so it doesn't move too much.
In the end, i must be honnest, it's not locking anything, you can pull it up with a finger with no force, and the motor don't always turn well. These things are quite a nightmare to make turn !
I didn't want to have a huge servo motor on top of the book so i went for this micro stepper but i regret it a bit now. I also wanted something that couldn't be opened by hand but miserably failed at it haha. If anyone have an idea on how to do that, i'll marry him/her right away !
We have a be nice policy.
Please be positive and constructive.