RandomKey
Pictures:http://anykey0x.de/
Status
Started: September 21 2013
Status: Active
Goal: experiment with Eagle and making pcb's and ending with an awesome thingy.
Who: Ardillo
Description
Thanks to the guys of puscii. I found out that there is/was an event at Ordina Nieuwegein and thanks of that I found the open source project of Tim Becker.
AnyKey0x.de
Tim designed the AnyKey0x.de which is a small development board. As an enthousiast of small-and-capable-of-a-lot hardware I really wanted one, and with me a couple others.
Since Tim made his project completely open source, I would like to thank Tim for sharing such an awesome project. All the kudo's (or base) belong to you.
RandomKey
The only change I made for now is just the text on the board, but it would be nice if we made some major changes to it. That depends a little on the enthusiasm we get from it. So at the moment it's just a fork of the original with no enhancements what so ever.
Building
Skills
Before doing this I needed to refresh my skills with Eagle. I used a simple howto guide on the sparfun website.
SMD-Soldering
Eagle: Schematics
Eagle: PCB Layout
In the end you'll have a fully (Sparkfun modified) Eagle setup and the knowledge to make a Serial to USB converter, because it's the training object of the tutorial.
PCB
Get the board printed by a company like smart-prototyping.com and search for the needed hardware. It is actually better to look for the parts first, but we'll see.
Zarya from hackerspace Bitlair pointed me to some PCB fabhouses. I pasted their URL's in the reference.
For this prototype I'm going to use smart-prototyping.com, but they need 10 gerber files instead of the normal 7.
Which can be found on their website.
All Files: no offset, no mirror,no rotate, no upside down Use EXCELLON .TXT (Drill & Holes) Use Gerber_RS274X: .GML (Outline) .GTP (Solder Paste Top) .GBP (Solder Paste Bottom) .GTS (Solder Mask Top) .GBS (Solder Mask Bottom) .GTO (Silk Screen Top) .GBO (Silk Screen Bottom) .GTL (Top layer) .GBL (Bottom Layer)
Because the normal CAM processor only generates 7 of 10 Gerber files, I made a special .cam file which can be downloaded here. This will generate the asked 10 Gerber files.
No guarantee, I'll let you know when the boards arrive. (boards arrived they look good, but will they work?)
Check Gerber Files
You can check the files with a free viewer downloadable here. This tool is Windows only :( I ran it in an Win7 VM, works fine.
Soldering
Last week all the parts arrived and it was time to tinker around. It scared me at first how small all the components are, and believe me.. during soldering I cursed a lot.
I needed a very fine tip because all the parts are very close to each other. At the time of writing I tried five of the ten boards. My results are getting better and I'm getting better in place all the parts and maintain my patience. During the soldering I experienced some contacts coming loose after reheating. But hey, what do you expect for $8.18 of production costs?
For the soldering results look below in the picture section.
Some tips for the soldering are :
- Have a lot of patience
- Google on SMD soldering
- Study those datasheets (especially for the crystal and the LED)
- Have more patience
- Apply solder gently especially at the two buttons, their top is easily short circuited to a pin.
- Did I mention patience already?
Connecting
After soldering all the parts with flux it's time to test it.
When connecting it to a laptop with linux installed I got this message:
[ 2830.328923] usb 3-1.2: new full-speed USB device number 6 using ehci-pci [ 2830.423541] usb 3-1.2: New USB device found, idVendor=04cc, idProduct=0003 [ 2830.423550] usb 3-1.2: New USB device strings: Mfr=4, Product=32, SerialNumber=72 [ 2830.423554] usb 3-1.2: Product: NXP LPC13XX IFLASH [ 2830.423557] usb 3-1.2: Manufacturer: NXP Semicond [ 2830.423560] usb 3-1.2: SerialNumber: ISP000000000 [ 2830.445158] usb-storage 3-1.2:1.0: USB Mass Storage device detected [ 2830.445295] scsi6 : usb-storage 3-1.2:1.0 [ 2830.445396] usbcore: registered new interface driver usb-storage
In a file browser it showed itself as a mass storage device as well with only one file named: firmware.bin
First install some firmware and place the board into upload mode.
Check out this on how it's done.
Projects
Now it's time to start some projects with the RandomKey and maybe change it in the nearby future to a hardware customized RandomKey, who knows.
..more to come..
Costs
We did some calculation, what are the total costs of the project so far, and what would one RandomKey cost. Especially the last one is interesting when deciding to make a workshop SMD soldering with this project.
Costs of parts
Some parts are bought at the farnell webshop others at RSonline. This was done because farnell sells resistors and capacitors only by big amounts. We don't need 500 resistors for this project. Buying parts in small amounts is more expensive for each part but in the end it was almost €50 cheaper than buying the parts in big amounts. So maybe for the future, when we decide to make 500 handmade RandomKeys, this will be a solution ;)
NOTE: for every part I ordered a bit more then necessary parts we need, so we have some spare parts if some noob lets the magic smoke escape.
part | url | amount | total price |
---|---|---|---|
Printing PCB (10x package) + shipping | Smart Prototyping | 10 | €18.18 incl. taxes + shipping |
(Farnell) C&K components KMR241G - pushbutton | C&K components KMR241G - pushbutton | 25 | €13,50 |
(Farnell) Abracon - ABM8G - 12MHz Crystal | Abracon - ABM8G - 12MHz Crystal | 12 | €15,00 |
(Farnell) FCI micro USB B, receptacle, SMT, RA, 5WAY | FCI micro USB B, receptacle, SMT, RA, 5WAY | 12 | €6,00 |
(RSonline) MCU 32-Bit ARM Cortex M3 - LPC1343FBD48 | MCU 32-Bit ARM Cortex M3 - LPC1343FBD48 | 12 | €39,60 |
(RSonline) OSRAM LED 0603 blue | OSRAM LED 0603 blue | 20 | €2,76 |
(RSonline) Schottky Diode 3-Pin SOT-23 - BAT54C | Schottky Diode 3-Pin SOT-23 - BAT54C | 20 | €2,80 |
(RSonline) MOSFET 3-Pin SOT-23 - BSS84 | MOSFET 3-Pin SOT-23 - BSS84 | 20 | €3,30 |
(RSonline) MCP1801T 5-Pin SOT-23 | MCP1801T 5-Pin SOT-23 | 20 | €6,60 |
(RSonline) Capacitor 0603 100nF | Capacitor 0603 100nF | 50 | €3,75 |
(RSonline) Capacitor 0603 1uF | Capacitor 0603 1uF | 50 | €3,50 |
(RSonline) Capacitor 0603 18pF | Capacitor 0603 18pF | 50 | €1,45 |
(RSonline) Resistor 0603 33 Ohm | Resistor 0603 33 Ohm | 50 | €1,05 |
(RSonline) Resistor 0603 100 Ohm | Resistor 0603 100 Ohm | 50 | €1,40 |
(RSonline) Resistor 0603 1.5k Ohm | Resistor 0603 1.5k Ohm | 50 | €1,05 |
(RSonline) Resistor 0603 10k Ohm | Resistor 0603 10k Ohm | 50 | €1,05 |
crazy Dutch taxes (21%) | €21,59 | ||
Total incl. spares | €142,58 |
Costs of one RandomKey
Like I said above we calculated some spare parts incase you fry them, but it's a little odd to pay for spare parts when you don't use them. So if somebody wants a kit, what would be the cost of that. Without soldering mistakes that is.
part | amount | each | total |
---|---|---|---|
RandomKey PCB | 1 | €1,82 | €1,82 incl. taxes |
C&K components KMR241G - pushbutton | 2 | €0,54 | €1,08 |
Abracon - ABM8G - 12MHz Crystal | 1 | €1,25 | €1,25 |
FCI micro USB B, receptacle, SMT, RA, 5WAY | 1 | €0,50 | €0,50 |
MCU 32-Bit ARM Cortex M3 - LPC1343FBD48 | 1 | €3,30 | €3,30 |
OSRAM LED 0603 blue | 1 | €0,138 | €0,138 |
Schottky Diode 3-Pin SOT-23 - BAT54C | 1 | €0,14 | €0,14 |
MOSFET 3-Pin SOT-23 - BSS84 | 1 | €0,165 | €0,165 |
MCP1801T 5-Pin SOT-23 | 1 | €0,33 | €0,33 |
Capacitor 0603 100nF | 2 | €0,075 | €0,15 |
Capacitor 0603 1uF | 2 | €0,07 | €0,14 |
Capacitor 0603 18pF | 2 | €0,029 | €0,058 |
Resistor 0603 33 Ohm | 2 | €0,021 | €0,042 |
Resistor 0603 100 Ohm | 1 | €0,028 | €0,028 |
Resistor 0603 1.5k Ohm | 2 | €0,021 | €0,042 |
Resistor 0603 10k Ohm | 3 | €0,021 | €0,063 |
again taxes (21%) | €1.56 | ||
donation to RandomData (not-members) | $ | $$$$$ | €5,00 |
total | €15,88 |
Reference
AnyKey0x.de -- the one and only original
AnyKey0x.de Github -- all the files including sdk
Post @knutsel.org -- making cheap PCB's
MakePCB.com -- for making PCB's off course
iTead -- if <10, cheap one
Smart Prototyping -- cheapest one by far
Software
EAGLE PCB Software -- Eagle PCB designer
viewplot -- Free viewer of gerber files (last check before sending it to fabhouse)
Used Suppliers
Smart Prototyping -- cheapest one by far
farnell -- Electronic components
RSonline -- Electronic components
Lessons learned
Thanx to the founding father of the AnyKey I found out that I used the wrong crystal. That's what happens when tinkering all night long without club mate ;)
After a replacement of the crystal the first working RandomKey is a fact. As a lesson for upcoming experiments I placed the errors the board gave with the wrong crystal below.
[ 3741.416593] usb 1-1.2: new full-speed USB device number 16 using ehci-pci [ 3741.488489] usb 1-1.2: device descriptor read/64, error -32 [ 3741.664652] usb 1-1.2: device descriptor read/64, error -32 [ 3741.840743] usb 1-1.2: new full-speed USB device number 17 using ehci-pci [ 3741.912740] usb 1-1.2: device descriptor read/64, error -32 [ 3742.088809] usb 1-1.2: device descriptor read/64, error -32 [ 3742.264867] usb 1-1.2: new full-speed USB device number 18 using ehci-pci [ 3742.672665] usb 1-1.2: device not accepting address 18, error -32 [ 3742.744778] usb 1-1.2: new full-speed USB device number 19 using ehci-pci [ 3743.152777] usb 1-1.2: device not accepting address 19, error -32 [ 3743.152884] hub 1-1:1.0: unable to enumerate USB device on port 2 [ 3744.109290] usb 1-1.2: new full-speed USB device number 20 using ehci-pci [ 3746.025685] usb 1-1.2: new full-speed USB device number 21 using ehci-pci [ 3746.097705] usb 1-1.2: device descriptor read/64, error -32 [ 3747.306144] usb 1-1.2: new full-speed USB device number 22 using ehci-pci [ 3747.377979] usb 1-1.2: device descriptor read/64, error -32 [ 3752.813858] evbug: Event. Dev: input22, Type: 4, Code: 4, Value: 458834 [ 3752.813862] evbug: Event. Dev: input22, Type: 1, Code: 103, Value: 1 [ 3752.813863] evbug: Event. Dev: input22, Type: 0, Code: 0, Value: 0 [ 3752.957897] evbug: Event. Dev: input22, Type: 4, Code: 4, Value: 458834 [ 3752.957900] evbug: Event. Dev: input22, Type: 1, Code: 103, Value: 0 [ 3752.957900] evbug: Event. Dev: input22, Type: 0, Code: 0, Value: 0
Pictures
Error creating thumbnail: Unable to save thumbnail to destinationError creating thumbnail: Unable to save thumbnail to destinationError creating thumbnail: Unable to save thumbnail to destinationError creating thumbnail: Unable to save thumbnail to destination
Error creating thumbnail: Unable to save thumbnail to destinationError creating thumbnail: Unable to save thumbnail to destinationError creating thumbnail: Unable to save thumbnail to destinationError creating thumbnail: Unable to save thumbnail to destination
Error creating thumbnail: Unable to save thumbnail to destination
Movies