EEVblog #1374 - DIY Trezor Crypto Hardware Wallet - Part 1 - Page 1
Forum section: electronics / general

author: EEVblog
author_rank: Unknown
timestamp: February 11, 2021, 01:06:36 pm
content: How easy is it to take the open source Trezor Model T crypto hardware wallet files and manufacture your own? Or to modify or improve the design?The Trezor is open source hardware, so Dave checks out the Github and looks at the hardware files available and imports into Eagle and KiCAD. Where to from here?OSHW Logo generator:https://maciek134.github.io/oshw-logo-gen/

author: HKJ
author_rank: Super Contributor
timestamp: February 11, 2021, 05:44:05 pm
content: Why not ask Chris Gammell about importing Eagle into KiCad, he has just done a video about it.

author: x1ddos
author_rank: Newbie
timestamp: February 11, 2021, 08:28:14 pm
content: Nice. Shameless plug: I work on BitBox2, a successor BitBox01, now with a screen and touch/scroller sensors.Schematics and BOM are here but they are in just PDF files:https://github.com/digitalbitbox/bitbox02-firmware/tree/master/doc. I'm currently converting our Altium sources into KiCad with a plan to then publish everything including gerbers.Curious what you think.Alex.

author: thinkfat
author_rank: Unknown
timestamp: February 11, 2021, 08:49:08 pm
content: Quote from: HKJ on February 11, 2021, 05:44:05 pmWell I just tried it with a fairly recent compile of KiCAD 5.99. It's still far from usable. Issues are mainly the silk screen (locations and size of labels) and the footprint conversion. In converted footprints, sometimes the silk layer is imported into the soldermask layer. So you have exposed copper where the silk screen should have been and no openings for pads. Effectively unusable unless you spend the time fixing those issues manually.

author: Unixon
author_rank: Frequent Contributor
timestamp: February 11, 2021, 09:03:59 pm
content: Dave, you can have multilayer board in free version of Eagle and even generate your Gerbers!Eagle's CAM Processor complains about layer configuration but produces correct output files.The policy about 3rd party files is something along the lines of that a loaded file is not a subjest for editing restrictions.Fun fact: one can add additional layers to a standard 2-layer board and use them with little effort for power planes even in restricted freeware mode.1) Open XML board file in text editor and declare new layers by copying and editing layer definition lines;2) Open edited board file in Eagle, add a top/bottom polygon and then change layer that this polygon belongs to (you can do this multiple times back and forth);Editing these layers is still prohibited, so it is not possible to put regular traces there, but one can have complex polygons correctly connected to vias and TH pads

author: Unixon
author_rank: Frequent Contributor
timestamp: February 11, 2021, 09:15:48 pm
content: p.s. These dotted polygons are unrouted polygons, you can run Ratsnest on them to fix this.CAM Processor presets for 4 and 8 layer board are attached.Example: 4-layer board (piece of .brd file header)Code:<layer number="1" name="Top" color="4" fill="1" visible="yes" active="yes"/><layer number="2" name="Layer2" color="5" fill="1" visible="no" active="yes"/><layer number="3" name="Layer3" color="3" fill="1" visible="no" active="yes"/><layer number="16" name="Bottom" color="1" fill="1" visible="yes" active="yes"/>Example: 8-layer board (piece of .brd file header)Code:<layer number="1" name="Top" color="4" fill="1" visible="yes" active="yes"/><layer number="2" name="Layer2" color="5" fill="1" visible="yes" active="yes"/><layer number="3" name="Layer3" color="3" fill="1" visible="yes" active="yes"/><layer number="4" name="Layer4" color="6" fill="1" visible="yes" active="yes"/><layer number="5" name="Layer5" color="7" fill="1" visible="yes" active="yes"/><layer number="6" name="Layer6" color="15" fill="1" visible="yes" active="yes"/><layer number="7" name="Layer7" color="9" fill="1" visible="yes" active="yes"/><layer number="16" name="Bottom" color="1" fill="1" visible="yes" active="yes"/>Well, you get the idea... XML is your friend.

author: Unixon
author_rank: Frequent Contributor
timestamp: February 11, 2021, 09:49:52 pm
content: Watch out for drill files! This board uses both TH vias (.0116 file extension) and blind vias (.0102 file extension).

author: thinkfat
author_rank: Unknown
timestamp: February 11, 2021, 09:55:57 pm
content: This is how the PCB looks like after spending about 1 hour worth of fixing the footprints and adding some 3D goodness.PS: after another hour or so, you're down to 20 DRC violations that you need to look into and about 1000 warnings about silkscreen overlaps that you can ignore for a while. The original PCB doesn't seem to have any reference designators on the silkscreen, so you'd do the same and disable them. Also, KiCAD by default warns about silkscreen overlapping pads, which Eagle (or the PCB designer who did the Trezor) seems to be OK with.

author: EEVblog
author_rank: Unknown
timestamp: February 12, 2021, 03:13:06 am
content: Quote from: Unixon on February 11, 2021, 09:49:52 pmWTF, why would blind vias be needed on this?

author: unknown_h
author_rank: Contributor
timestamp: February 12, 2021, 06:19:35 am
content: I managed to load the files in too eagle cad (seem to now be part of fusion 360) and I keep looking at silk screen and wondering why it goes off the board? Also the reference designation seem to show up but they are all the wrong size some overlapping and some straight going over pads. I was able to generate some sort of parts lists but it still makes almost no sense with C_0603$REFLOW and some of the other thing dave mentioned,I have attached it bellow. I have also had a go at generating the Gerber files but I have almost no I idea what I am doing (2nd year electronics student), however I would more than happy to upload them if people want them.

author: Unixon
author_rank: Frequent Contributor
timestamp: February 12, 2021, 06:50:59 am
content: Quote from: EEVblog on February 12, 2021, 03:13:06 amI don't know, but you can see ' extent="1-2" ' parameter in .brd file for some vias which determines a blind via while all other have ' extent="1-16" ' which determines through hole via.This board is weird, it has 16 layers declared, but 3 of them used, 2nd internal layer is empty, there's not even a power polygon in there.Top and bottom layers are signal+power, 2nd layer is signal, 3rd is empty.

author: riyadh144
author_rank: Unknown
timestamp: February 12, 2021, 07:08:26 am
content: Blind vias on this, why god why?

author: riyadh144
author_rank: Unknown
timestamp: February 12, 2021, 07:21:17 am
content: I tried importing it into kicad 5.99, the edge cuts are fine, after refilling nothing is not connected, the problem is those micro vias, which I honestly dones't understand the need for. I think it might be easier to relay out at least the traces.I will be doing that now.

author: Unixon
author_rank: Frequent Contributor
timestamp: February 12, 2021, 07:29:22 am
content: OK, I fixed blind vias, had to replace extent for all blind vias and move 3 of them slightly to fix overlapping with bottom signal traces.Now it's semi-standard 3of4-layer board and it looks like it passes DRC.

author: Unixon
author_rank: Frequent Contributor
timestamp: February 12, 2021, 07:33:45 am
content: Attached fixed Eagle files.

author: riyadh144
author_rank: Unknown
timestamp: February 12, 2021, 07:34:31 am
content: You have done a great job,

author: riyadh144
author_rank: Unknown
timestamp: February 12, 2021, 07:41:12 am
content: Importing into kicad gives me a huge amount of errors, the vias aren't connected on other layers it is complaining.I really want to start this project all over. It might be worth it to reroute it. Also I hate their layout it sucks

author: thinkfat
author_rank: Unknown
timestamp: February 12, 2021, 07:46:17 am
content: Indeed, the designer allowed himself a pretty expensive luxury for convenience sake. Blind vias with 0.2mm drills, that puts you outside of cheap manufacturing. Pretty sure the whole board could have been done with 0.3/0.6 vias, it's not that densely populated. They could have reduced the track width in exchange for board area, they're doing 8/8, going down to 6/6 would have saved some space and still be what e.g. JLCPCB can manufacture. There's just two areas where routing will get a little fiddly, one is the USB-C receptacle where things are quite tight, the other place is the display connector on the bottom right of the top side.

author: thinkfat
author_rank: Unknown
timestamp: February 12, 2021, 07:56:46 am
content: Quote from: riyadh144 on February 12, 2021, 07:41:12 amI'll put my KiCAD project on my github in a while. I'm down to about 4 DRC violations and a ton of silkscreen warnings that I excluded. Didn't fix the blind via thing yet. You're welcome to start from that.

author: riyadh144
author_rank: Unknown
timestamp: February 12, 2021, 08:00:52 am
content: Oh wow that display connector is killing me, that isn't within JLCPCBs capabilities. And yes the USB C, there is a trace that I am 100% confident cannot fit with JLC's capabilities, I would certainly change a few components to make them more easily manufacturable, the board isn't that small and there isn't that many components.

author: Unixon
author_rank: Frequent Contributor
timestamp: February 12, 2021, 12:18:45 pm
content: Considering the display connector ... it's almost OK, but pads must be little bit thinner to allow 0.2mm clearance.USB C is OK, nothing special, 0.3mm pads with 0.2mm clearance.

author: Rdx
author_rank: Contributor
timestamp: February 12, 2021, 04:31:14 pm
content: Being a mechanical engineer I feel like mentioning that the data 3D for the case also seems to be only given as STEP format - not the actual CAD data.It is more like having only a PDF file vs the actual native data that you can edit.Another one to take off of their OSHW logo

author: thinkfat
author_rank: Unknown
timestamp: February 12, 2021, 04:58:06 pm
content: https://github.com/thinkfat/trezor-model-t-kicadv6

author: riyadh144
author_rank: Unknown
timestamp: February 12, 2021, 05:27:20 pm
content: I don't know these dimensions aren't manufactured easily with something like JLCPCB. We could go with cheaper and better suited components, especially that we only need USB 2.0That is my favorite connector for that.https://lcsc.com/product-detail/USB-Connectors_XKB-Enterprise-U262-161N-4BVC11_C319148.htmlAlso the clearances on that display connector is very small and not manufacturable with the usual scumbags.The components are places way too close together and their orientations suck in my opinion, they could have spaced them out and made their locations more appropriate, they have the space why not use it.

author: Unixon
author_rank: Frequent Contributor
timestamp: February 12, 2021, 07:34:33 pm
content: Quote from: riyadh144 on February 12, 2021, 05:27:20 pmHere's your good clearance connectorp.s. It's easy to extract components from an Eagle project into a library. Just create an empty library and copy over (in text editor) corresponding library sections from .sch and .brd files. I believe once there was even a script to do this in one click.

author: ignilux
author_rank: Unknown
timestamp: February 13, 2021, 04:06:30 am
content: I tried to post this in a comment on the follow-up video, but apparently Google has decided that links to Github should be banned. Thanks, asshats...The hardware docs for the Trezor Model T are in a separate repo, foundhere. Hardware.md had some interesting stuff including an image of the schematic and a text-only BOM.

author: thinkfat
author_rank: Unknown
timestamp: February 13, 2021, 10:55:58 am
content: Quote from: thinkfat on February 12, 2021, 04:58:06 pmUpdate: got rid of all blind and micro-vias. PCB may need another pass to make sure the display data lines have all unbroken reference planes. The PCB now fits into JLCPCPs 4-layer process constraints, with one exception: The USB-C receptacle will be problematic due to their hole-hole and hole-copper constraints. It will be necessary to select a different part.EDIT: they actually don't have a real ground reference for any signals. The display signals are routed both on the ground and the VCC-2 power plane. That could be resolved by moving some jumper traces to the bottom layer and all the remaining display and touchscreen traces to the 3rd layer. That gets you a nice ground plane at the cost of breaking the VCC-2 plane, which then needs to be patched up on the bottom layer. That might not be a big problem if there's enough decoupling.

author: EEVblog
author_rank: Unknown
timestamp: February 13, 2021, 11:19:35 pm
content: Quote from: thinkfat on February 13, 2021, 10:55:58 amFor a product like this that won't be a problem.

author: unknown_h
author_rank: Contributor
timestamp: February 14, 2021, 06:35:43 am
content: Has any one been able to figure out what screen they are using? I have looked at all the available documents, googled all the available serial codes and product codes. I also had a look at the site that supplied the screens used with dev board but have found nothing close to the tenzor supplied tear down images.

author: thinkfat
author_rank: Unknown
timestamp: February 14, 2021, 12:25:47 pm
content: I'm pretty sure the screen and touchscreen assembles were custom made for the Trezor. You won't find the screen on the free market, but you'll likely find something in the same dimensions and with the same controller.I see no point in having the pcbs duplicated either, for exactly that reason. The Eagle or KiCad projects are much more valuable.

author: thinkfat
author_rank: Unknown
timestamp: February 14, 2021, 01:03:35 pm
content: That's what I came up with. Might not be necessary, but EMI-wise it's likely better than the original. Got rid of some vias, too.

author: aabbcc
author_rank: Regular Contributor
timestamp: February 24, 2021, 04:00:16 pm
content: Quote from: thinkfat on February 14, 2021, 01:03:35 pmAwesome, great work! I was looking at buying a hardware wallet but id much rather build my own if anyone manages to find a compatible screen with the same dimensions.

author: Arek_R
author_rank: Regular Contributor
timestamp: March 15, 2021, 11:33:11 pm
content: Quote from: unkown_h on February 14, 2021, 06:35:43 amIn one of the github repos there are those pictures, might be a bit of a hint on where to get the screen: <see attachments>Though ideally we want to find some off the shelf assembly anyone can buy from ebay or ali that has a capacitive touch screen.

author: Arek_R
author_rank: Regular Contributor
timestamp: March 15, 2021, 11:38:49 pm
content: Another thing I would suggest to swap this USB-C socket into easier to solder type with 2.0 interface and so no hidden pins, only 12 pins, I'm sure trezor doesn't use 3.0 interface because there is not much data to transfer.I use this one in my projects: Mfr no: 918-418K2023S40001 LCSC no: C167321 it's also cheap and has through hole mechanical pins that should make it strong.If you want EAGLE footprint there should be one made by adafruit for their USB-C breakout board.

author: unknown_h
author_rank: Contributor
timestamp: April 12, 2021, 05:54:40 am
content: Hi, I have had a look at your repo, but I am bit stuck. Is it ready for manufacturer? Is all I need to do, generate the Gerber files and send them off to a manufacture?Thanks for you time.

author: thinkfat
author_rank: Unknown
timestamp: April 12, 2021, 01:56:51 pm
content: What are you talking about?

author: Pra5een
author_rank: Newbie
timestamp: June 21, 2021, 07:53:50 am
content: What is the product number for the touch screen and touch sensor.

author: Pra5een
author_rank: Newbie
timestamp: June 21, 2021, 07:56:19 am
content: What is the serial no. For touch screen as i could not find any source to buy.Anyone help???

author: suzhiming
author_rank: Contributor
timestamp: June 21, 2021, 01:19:27 pm
content: good

author: unknown_h
author_rank: Contributor
timestamp: August 05, 2021, 08:13:08 am
content: As previously mentioned no-one can actually find the display and it's assumed that is a custom one. However you look at the info you can find the accepted display driver and touch sheet driver.Hope that helps.

author: DIY-HWW
author_rank: Newbie
timestamp: September 02, 2023, 05:59:09 am
content: Apologies for resurrecting this thread.I've actually built my own hardware using a Trezor One:Now, I've been exploring the Trezor T. In the video, it's mentioned that one of the main goals was to create a version with a larger screen. I've done some research, but it seems quite challenging to find a screen larger than the 1.54-inch one that the Trezor uses.However, I've stumbled upon something interesting—a project based on the Trezor T called the Onekey Touch. Essentially, it's a Trezor T with a larger screen. In the OneKey repository athttps://github.com/OneKeyHQ, you can see they've forked the Trezor monorepo and modified the code to fit their device. The Onekey Touch connects directly to the Trezor suite.The only downside is that there's no hardware information available—no PCBs, no schematics.EDIT: Sorry, yes, the PCBs are in the repository:https://github.com/OneKeyHQ/firmware/tree/bixin_dev/docs/pcb

author: DIY-HWW
author_rank: Newbie
timestamp: September 02, 2023, 11:20:15 am
content: it seems the PCB of the onekey touch. Obviously more complicated than the Trezor, even though it is a Trezor T, they have added many functions to it, what do you think?Since the information is not abundant as in the Trezor, I think a project like this is difficult without having a unit.