Author Topic: Build Guide/Log: Handwired Preonic Style Keyboard with in-switch LEDs  (Read 24084 times)

0 Members and 1 Guest are viewing this topic.

Offline Kitchener

  • Thread Starter
  • Posts: 4
Hi! Hello!
I'm new around here, I mostly just lurk but I finally felt like I had something worth sharing so here it comes:
My guide to how I built a handwired Preonic-style keyboard with handwired in-switch LEDs.


Intro and disclaimers:
"Hey, maybe I can save a penny by sourcing all the parts myself and ditching those fancy PCBs?"
I'm sure it's possible, but my build both cost about as much as a DIY Kit and it took forever to finish.
But, and this is a big one, it was oh so very rewarding.
I've built a couple PCB boards but my three handwired builds were by far more fun and not much harder.
-I did the handwired Preonic twice, this is a guide for the "Handwired Preonic 2.0 - Preonic Harder".
In the end it came down to building the keyboard I wanted: Metal, Wood, Sturdy.

While I'll do my best to answer any questions, I really don't know what I'm doing.
I'm just copying what I've seen other people doing. Monkey see; monkey do.
But I wanted to try and make the complete guide I wish I had when I built my first board, so here goes.

I highly recommend looking up matt3o's guides (google it), he know what he's doing and they're propely good sources for learning:
https://deskthority.net/workshop-f7/building-a-custom-keyboard-from-the-ground-up-t5761.html



Planning:
I wanted the bezel to be as thin as possible while still supporting middle layers/walls.
-I still have the files if anyone wants them.


Sourcing parts:
Case:
  • Ordered plates from https://www.chinalasercuttingservice.com/
    Paid $141,53 for top and bottom plates for Planck, Preonic, Nyquist and Let's Split, plus middle layers for Nyquist and Let's Split.
    Plus $41,94 for shipping.
    1.5mm thick 304 Brushed Stainless steel, nice and heavy.
    Quality was fine, some scratches, some rough corners, but overall suficient for keyboards.
  • Bamboo middle layers created in Autocad (http://builder.swillkb.com can make these for you as well), ordered from Ponoko.
    They cost $22,5 to make plus about $40-42 to ship.

Switches:


MCU:

Remaining parts sourced from eBay and Aliexpress:
  • Solid Core Hookup Wire, 22AWG (Don't use stranded wire, you will drive yourself insane)
  • 1N4148 Diodes (one per switch)
  • USB Mini-to-Micro adapter
  • 1x TIP42CC 100V 6A 65W Transistor
  • 2x3x4mm LEDs, white diffused (one per switch)
  • 470ohm Resistors (one per LED plus 1 for Transistor/Teensy)
  • Brass Spacers/Standoffs
  • Screws
  • Rubber Sheets for the Teensys, inside plate bottom, and for feet.

Tools used:
  • Cheap-ass Soldering Iron (No need for temperature control or whatever, just use a cheap iron with a fine tin and you'll be fine, mine's 100 Watt)
  • Wire Stripper (get one of those "automatic" ones that pull of the wire as well; a good stripper is esential to ease the build process)
  • Helping Hands (Great for holding the Teensys in place during soldering)
  • Screwdriver.


Assembly:
General solder tip:
Put a small drop of solder on the tip of the iron before soldering each connection, this helps heat spread much faster and you lessen the risk of melting your switches.
Heat the parts a little before applying solder, this helps the solder flow evenly over the connectors.
Try to apply the solder so that it is "drawn" over the connection and towards the soldering iron where possible.
A good solder joint is smooth and shiny.
Cold solder joints are lumpy and wrinkly, break easily and poor connections.
Don't blow the solder to cool it, just let it cool on it's own.
This guide is great: https://geekhack.org/index.php?topic=66861.0 thanks berserkfan/Gutzy!

General hookup tip:
If you want your handwired build to be able to take a hit; make sure you've got mechanically strong connections.
"Glueing" stuff together with solder is fine, it's pretty strong.
But if you make sure to loop and crimp the wires around your connectors, you'll have a keyboard that can fall out of a plane.
It take absolutely ****ing forever though, but it's worth it.
This guide taught me how: https://geekhack.org/index.php?topic=87689.0 thanks cribbit!

Okay, let's go!

First fit the switches and see that they're fitted nice and tight.
Since there's no PCB holding the switches in place, I recommend glueing the switches in place if they feel a little loose.
Hot glue is useless on metal, I tried it first but it neither stuck to the switches or the plate so I had to tear it of, useless ****.
I had to use some sort of pain-in-the-ass epoxy tac, it was messy and made it a little harder to route the wires nice and tidy but it's strong.
189737-0

Now use a ruler or something else and bend all the diodes evenly, this makes your build clean and tidy (which you'll really need if you're thinking of stuffing LEDs in there as well).
189739-1


Do the rows first.

Fit the diodes to the switches.
While you could just "glue" the diodes to the connectors with a bit of solder, I wanted strong mechanical connections throughout my build.
So I made small loops a fitting distance from each side of the diodes, and then put the loop around the connectors on the switches.
189741-2
-make sure the loop at the black end of the diode is perpendicular to the switch since you will tread the hook-up wire through it later.
The pictures make a better illustration than my words.
Just leave the ends on the diodes, you'll need them to tighten the loops and it's better to cut stuff like that off when the build is done.
I don't know it you need to fit all the diodes a certain direction, but I made sure to fit them with the black band facing away from the switch.
Solder the diodes to the switches.
189743-3
189745-4

Connect each row of diodes with some hook-up wire.
I recommend measuring and stripping the wires so that only the wire is only bare where they connect with the diodes, this is to prevent shorts.
189747-5
Now carefully and patiently tread the wire through the other loop of each diode, it's a pain in the ass but the tough mechanical connection is worth it.
189749-6
189751-7
Solder the diodes to the wire.
You should now have five rows of connected diodes.
189753-8

Do the columns next.

Now you need to run hookup wire from the other, naked connectors on each switch on each row.
Measure out he wire and strip the wire only where you intend to solder.
189755-9
Again we want solid connections so loop the wire around each connector.
-this is a pain in the ass no matter how you do it, I made the loops first and then fitted the wire to the switches.
Solder the wire to the switches.
You should now have twelve columns of connected switches.
189757-10

LED time!
Do note that I don't really know what I'm doing. I'm just following instructions and improvising, so don't ask me any technical questions!
It can be hard to fit wires for both the swithces and the LEDs, so planning is essential.
I've made a simple sketch to illustrate how I fitted them, the epoxy tac made it especially challenging since I couldn't fit wires against the plate.
189759-11
How you do this is up to you, I'm sure there are better ways than how I did it.
I used this Reddit post as help: https://www.reddit.com/r/MechanicalKeyboards/comments/6kwl9b/photos_1_month_and_a_teensy_later/
-Big thanks to mr./ms./whatever Undercookedrice for answering my messages, good dude/dudette/whatever.

Fit an LED in each switch, make sure to fit them all the same way with cathodes one way and anodes the other.
189761-12
Bend the legs of the LEDs once they're through the switches to secure them in place for soldering.

Now fit a resistor to each cathode.
Again, loop them in place (strong mechanical connections, remember?)
189763-13
Solder the resistors to each cathode.
189765-14

Now you need to run hookup wire between each resistor at the end of each cathode, so that each cathode on each row is connected.
Strip this wire the same as before; strip only where you intend to solder.
Loop it!
Solder the wire to the resistors.
Now you should have five rows of connected cathodes.
I made a huge mistake the first time I did this.
First Anecdote of Woe:
I connected the resistors together, end-to-end, so the power flowed through one resistor before going to the next and so on.
This meant that only one or two LEDs on each row lit up.
-It also made me light up with white hot rage, but enough about me.
189767-15
189769-16


Run hookup wire between each row of anodes.
Strip the wire only where you intend to solder.
Loop it.
Solder it.

Now you need to connect each row of cathodes with one piece of hookup wire and each row of anodes with it's own piece of hookup wire.
Let's call them chains:
A chain of cathodes and a chain of anodes, this will help later.

I'd love to post a photo for the completed chains here but it's such a mess that I have to direct you to my sketch instead.

We'll get back to the Transistor when we do the Teensy.


Hooking up the Teensy:
This can get fiddly, I recommend using a set of Helping Hands or alternatively putting the Teensy between some horizontally stacked books to hold it in place while soldering.
-a magnifying glass is also great for those with dim work lights and weak eyes (like yours truly).

Run a piece of hookup wire from each row and each column to it's own hole (pin) on the Teensy.
Don't use the 5V (VCC) or GND pins, we need those for the LEDs, also leave one PWM pin for the LEDs (check the sketch)
I used B7, D0-D7 plus E0, E1 and C0 for the columns.
And B0-B4 for the rows.
LEDs used GND, 5V and B6.
-in theory the PWN pins should make it possible to regulate the brightness of the LEDs but I couldn't get it to work.
Here's my work sketch with pin names and numbers listed:
189771-17

Make a note of what row/column goes to what pin (take a picture) as you'll need to specify this in QMK later.

Put the end of each wire through a pin on the Teensy and solder in place with the tiniest amount of solder.
Make sure there's no solder connection between the pins.
Also try not to poke the soldering iron into any of the components of the Teensy.
If you're not doing LEDs, finish up the Teensy by putting some rubber sheeting on the back, to isolate it from the wires above.

I've placed my Teensy in the middle of the keyboard and am using a USB adapter to connect it with the outside world, so to speak.
Simply because I wanted the case to be completely sealed.
Since the finished backlit Preonic is a mess, here's an image taken of my first handwired Preonic without LEDs, just to show the wiring of a standard handwired build:
189773-18

Second Anecdote of Woe:
Be on the lookout for fake Teensys.
The easiest way to determine if you've bought a fake Teensy is to look at the LED.
Authentic Teensys are red.
Check this before building.
Mine are blue.
I checked mine after building.
****.
They still work though, the only problem was that Teensy Loader would not recognize my fakes in Mac OS; I had to use Windows instead.
But I could potentially have been forced to desolder the Teensy.


Hooking LEDs to the Teensy:
The TIP42CC Transistor schematics list the legs like this from left to right:
1: Base
2: Collector
3: Emitter
What I've done it connect the Base (1) to the B6 (PWM) pin on the Teensy.
(I put a resistor in between to reduce the brightness of the LEDs).
Then I connected the Collector (2) to the chain of cathodes.
Then I connected the Emitter (3) to the VCC (5V) pin.
Finally I connected the chain of anodes to the GND pin.
189775-19

Then put some rubber between the Transistor and the wiring.

I'm sure I've ****ed this up somewhere along the line because I can't change the brightness if the LEDs.
You're supposed to be able to change the brightness with QMK by connecting the LEDs to a PWM pin on your MCU but it doesn't work for me.
-yes, I've ticked all the boxes in QMK, so I'm pretty confident this is a hardware problem.
What I did to reduce the brightness of the LEDs was to put a resistor between the VCC pin and the Emitter leg of the Transistor.
If you like super bright LEDs, just connect the Emitter directly to the VCC pin.


Finishing up:
Make sure all the rows and columns are connected to the Teensy.
-same for the LEDs if using.
If any of your soldering joints or wires appear to be a little too close to each other or any other metal; put some rubber between them.
As you can see, my build is a mess of wires, joints and rubber insulation, but it work!
189777-20
All finished, 5am on a workday, kill me:
189779-21
If you're (Oh my god I can't believe I let that typo sit there and stink for eight months, I might die of shame) bottom plate is metal, it is a good idea to put rubber on it as well.
Don't close the case yet, you need to be able to reach the reset button on the Teensy.
However, if you put a reset key on your keyboard, you only need to use the physical reset button for the first setup.
After programming, close up the case and put some feet on the case.
I used some 3mm rubber sheeting as feet.
189781-22



Programming:
Download the latest QMK build from https://github.com/qmk/qmk_firmware.
Set up your build environment according to: https://docs.qmk.fm/getting_started_build_tools.html
Get the Teensy loader from here: https://www.pjrc.com/teensy/loader.html
I'm really no programmer, so you're better of just reading up yourself. It's really simple once you've tried and failed a few times.
If you need help, as Jack Humbert and the rest of the QMK gurus over at: https://www.reddit.com/r/olkb/ (They're super friendly and super helpful, just be nice)


Soon you'll be typing on your very own homemade, sturdy as brick ****-house, keyboard.
Let me tell you, when you boot it up for the first time and it works: very, very satisfying.


Here are some showy offy fancy pants stupid photos to finish up the post:

LEDs working mothafackas:
189783-23189785-24189787-25

The Handwired Family, Planck in the backround:
189789-26

Here it is today with PMK Quartz keycaps:
189791-27

Porny shots:
Funny thing, the Preonic matches my Topcon Survey equipment pretty well!
189793-28189795-29

Shoes and keyboards are a thing, right, am I doing this right?
189797-30


Thanks for reading!
« Last Edit: Thu, 29 November 2018, 05:21:26 by Kitchener »

Offline OldIsNew

  • Posts: 145
Re: Build Guide/Log: Handwired Preonic Style Keyboard with in-switch LEDs
« Reply #1 on: Mon, 26 February 2018, 08:54:10 »
Nice work! Thanks for the detailed write-up!

Offline Kitchener

  • Thread Starter
  • Posts: 4
Re: Build Guide/Log: Handwired Preonic Style Keyboard with in-switch LEDs
« Reply #2 on: Mon, 26 February 2018, 09:03:59 »
Thanks!

This was a learning experience for me with the LEDs.
I'm sure there are better ways but this is how I got this particular build working  :))

Offline donut_sauce

  • Posts: 390
Re: Build Guide/Log: Handwired Preonic Style Keyboard with in-switch LEDs
« Reply #3 on: Mon, 26 February 2018, 09:53:31 »
this is awesome! thanks for sharing.

 what did you use to secure the teensy to the board as well as the adapter?

Offline Kitchener

  • Thread Starter
  • Posts: 4
Re: Build Guide/Log: Handwired Preonic Style Keyboard with in-switch LEDs
« Reply #4 on: Mon, 26 February 2018, 10:12:34 »
this is awesome! thanks for sharing.

 what did you use to secure the teensy to the board as well as the adapter?

Nothing!

Thank you for pointing this out because I forgot to mention it in the post.
I think this is definitely the weakest link in the entire build.

The wires and the USB-adapter hold it pretty well in place and the case is so tight that it almost squeezes the Teensy between the bottom and the switches.

Actually I had a slight problem with the reset button on the Teensy getting depressed while inside the case, so I tore the button off (desoldered).
As you can see in the last image before I shut the case.

But really, if you use thick solid core wire and run the hookups between the rows/columns and the Teensy pretty tight, I think the Teensy will be plenty secure.
« Last Edit: Mon, 26 February 2018, 10:15:45 by Kitchener »

Offline aglassoflemonade

  • Posts: 1
Re: Build Guide/Log: Handwired Preonic Style Keyboard with in-switch LEDs
« Reply #5 on: Mon, 26 February 2018, 13:15:03 »
Sweet build! Really cool to see LEDs in this.

Also for anyone wondering what wire strippers to get, these work great.

Offline a-c

  • Posts: 196
  • Location: USA
Re: Build Guide/Log: Handwired Preonic Style Keyboard with in-switch LEDs
« Reply #6 on: Mon, 26 February 2018, 15:13:58 »
All Teensy on Aliexpress are fake. There are no distributors in China.

There is only 1 legitimate seller on eBay, they are on this list:

https://forum.pjrc.com/threads/23601-Official-Distributors

Offline Kitchener

  • Thread Starter
  • Posts: 4
Re: Build Guide/Log: Handwired Preonic Style Keyboard with in-switch LEDs
« Reply #7 on: Tue, 27 February 2018, 00:59:22 »
Sweet build! Really cool to see LEDs in this.

Also for anyone wondering what wire strippers to get, these work great.

Thanks!
Yeah the LEDs are pretty much the only reason I posted this.
I also handwired the Planck seen in the background, it’s identical to the Preonic apart from the LEDs.
I took loads of pictures during the build but there are already quite a few build guides out there for handwired builds without LEDs so I’ve not bothered posting a build log for it.

Those strippers look great!
Mine is a super cheap one I found from a Chinese seller on eBay.
It works fine, but could be better.

All Teensy on Aliexpress are fake. There are no distributors in China.

There is only 1 legitimate seller on eBay, they are on this list:

https://forum.pjrc.com/threads/23601-Official-Distributors

Thanks for the link!

Get the real deal, folks.
If only to support the developers.

Offline callmeraymon

  • Posts: 1
Re: Build Guide/Log: Handwired Preonic Style Keyboard with in-switch LEDs
« Reply #8 on: Fri, 15 January 2021, 19:56:08 »
Hi! Hello!
I'm new around here, I mostly just lurk but I finally felt like I had something worth sharing so here it comes:
My guide to how I built a handwired Preonic-style keyboard with handwired in-switch LEDs.


Intro and disclaimers:
"Hey, maybe I can save a penny by sourcing all the parts myself and ditching those fancy PCBs?"
I'm sure it's possible, but my build both cost about as much as a DIY Kit and it took forever to finish.
But, and this is a big one, it was oh so very rewarding.
I've built a couple PCB boards but my three handwired builds were by far more fun and not much harder.
-I did the handwired Preonic twice, this is a guide for the "Handwired Preonic 2.0 - Preonic Harder".
In the end it came down to building the keyboard I wanted: Metal, Wood, Sturdy.

While I'll do my best to answer any questions, I really don't know what I'm doing.
I'm just copying what I've seen other people doing. Monkey see; monkey do.
But I wanted to try and make the complete guide I wish I had when I built my first board, so here goes.

I highly recommend looking up matt3o's guides (google it), he know what he's doing and they're propely good sources for learning:
https://deskthority.net/workshop-f7/building-a-custom-keyboard-from-the-ground-up-t5761.html



Planning:
I wanted the bezel to be as thin as possible while still supporting middle layers/walls.
-I still have the files if anyone wants them.


Sourcing parts:
Case:
  • Ordered plates from https://www.chinalasercuttingservice.com/
    Paid $141,53 for top and bottom plates for Planck, Preonic, Nyquist and Let's Split, plus middle layers for Nyquist and Let's Split.
    Plus $41,94 for shipping.
    1.5mm thick 304 Brushed Stainless steel, nice and heavy.
    Quality was fine, some scratches, some rough corners, but overall suficient for keyboards.
  • Bamboo middle layers created in Autocad (http://builder.swillkb.com can make these for you as well), ordered from Ponoko.
    They cost $22,5 to make plus about $40-42 to ship.

Switches:


MCU:

Remaining parts sourced from eBay and Aliexpress:
  • Solid Core Hookup Wire, 22AWG (Don't use stranded wire, you will drive yourself insane)
  • 1N4148 Diodes (one per switch)
  • USB Mini-to-Micro adapter
  • 1x TIP42CC 100V 6A 65W Transistor
  • 2x3x4mm LEDs, white diffused (one per switch)
  • 470ohm Resistors (one per LED plus 1 for Transistor/Teensy)
  • Brass Spacers/Standoffs
  • Screws
  • Rubber Sheets for the Teensys, inside plate bottom, and for feet.

Tools used:
  • Cheap-ass Soldering Iron (No need for temperature control or whatever, just use a cheap iron with a fine tin and you'll be fine, mine's 100 Watt)
  • Wire Stripper (get one of those "automatic" ones that pull of the wire as well; a good stripper is esential to ease the build process)
  • Helping Hands (Great for holding the Teensys in place during soldering)
  • Screwdriver.


Assembly:
General solder tip:
Put a small drop of solder on the tip of the iron before soldering each connection, this helps heat spread much faster and you lessen the risk of melting your switches.
Heat the parts a little before applying solder, this helps the solder flow evenly over the connectors.
Try to apply the solder so that it is "drawn" over the connection and towards the soldering iron where possible.
A good solder joint is smooth and shiny.
Cold solder joints are lumpy and wrinkly, break easily and poor connections.
Don't blow the solder to cool it, just let it cool on it's own.
This guide is great: https://geekhack.org/index.php?topic=66861.0 thanks berserkfan/Gutzy!

General hookup tip:
If you want your handwired build to be able to take a hit; make sure you've got mechanically strong connections.
"Glueing" stuff together with solder is fine, it's pretty strong.
But if you make sure to loop and crimp the wires around your connectors, you'll have a keyboard that can fall out of a plane.
It take absolutely ****ing forever though, but it's worth it.
This guide taught me how: https://geekhack.org/index.php?topic=87689.0 thanks cribbit!

Okay, let's go!

First fit the switches and see that they're fitted nice and tight.
Since there's no PCB holding the switches in place, I recommend glueing the switches in place if they feel a little loose.
Hot glue is useless on metal, I tried it first but it neither stuck to the switches or the plate so I had to tear it of, useless ****.
I had to use some sort of pain-in-the-ass epoxy tac, it was messy and made it a little harder to route the wires nice and tidy but it's strong.
(Attachment Link)

Now use a ruler or something else and bend all the diodes evenly, this makes your build clean and tidy (which you'll really need if you're thinking of stuffing LEDs in there as well).
(Attachment Link)


Do the rows first.

Fit the diodes to the switches.
While you could just "glue" the diodes to the connectors with a bit of solder, I wanted strong mechanical connections throughout my build.
So I made small loops a fitting distance from each side of the diodes, and then put the loop around the connectors on the switches.
(Attachment Link)
-make sure the loop at the black end of the diode is perpendicular to the switch since you will tread the hook-up wire through it later.
The pictures make a better illustration than my words.
Just leave the ends on the diodes, you'll need them to tighten the loops and it's better to cut stuff like that off when the build is done.
I don't know it you need to fit all the diodes a certain direction, but I made sure to fit them with the black band facing away from the switch.
Solder the diodes to the switches.
(Attachment Link)
(Attachment Link)

Connect each row of diodes with some hook-up wire.
I recommend measuring and stripping the wires so that only the wire is only bare where they connect with the diodes, this is to prevent shorts.
(Attachment Link)
Now carefully and patiently tread the wire through the other loop of each diode, it's a pain in the ass but the tough mechanical connection is worth it.
(Attachment Link)
(Attachment Link)
Solder the diodes to the wire.
You should now have five rows of connected diodes.
(Attachment Link)

Do the columns next.

Now you need to run hookup wire from the other, naked connectors on each switch on each row.
Measure out he wire and strip the wire only where you intend to solder.
(Attachment Link)
Again we want solid connections so loop the wire around each connector.
-this is a pain in the ass no matter how you do it, I made the loops first and then fitted the wire to the switches.
Solder the wire to the switches.
You should now have twelve columns of connected switches.
(Attachment Link)

LED time!
Do note that I don't really know what I'm doing. I'm just following instructions and improvising, so don't ask me any technical questions!
It can be hard to fit wires for both the swithces and the LEDs, so planning is essential.
I've made a simple sketch to illustrate how I fitted them, the epoxy tac made it especially challenging since I couldn't fit wires against the plate.
(Attachment Link)
How you do this is up to you, I'm sure there are better ways than how I did it.
I used this Reddit post as help: https://www.reddit.com/r/MechanicalKeyboards/comments/6kwl9b/photos_1_month_and_a_teensy_later/
-Big thanks to mr./ms./whatever Undercookedrice for answering my messages, good dude/dudette/whatever.

Fit an LED in each switch, make sure to fit them all the same way with cathodes one way and anodes the other.
(Attachment Link)
Bend the legs of the LEDs once they're through the switches to secure them in place for soldering.

Now fit a resistor to each cathode.
Again, loop them in place (strong mechanical connections, remember?)
(Attachment Link)
Solder the resistors to each cathode.
(Attachment Link)

Now you need to run hookup wire between each resistor at the end of each cathode, so that each cathode on each row is connected.
Strip this wire the same as before; strip only where you intend to solder.
Loop it!
Solder the wire to the resistors.
Now you should have five rows of connected cathodes.
I made a huge mistake the first time I did this.
First Anecdote of Woe:
I connected the resistors together, end-to-end, so the power flowed through one resistor before going to the next and so on.
This meant that only one or two LEDs on each row lit up.
-It also made me light up with white hot rage, but enough about me.
(Attachment Link)
(Attachment Link)


Run hookup wire between each row of anodes.
Strip the wire only where you intend to solder.
Loop it.
Solder it.

Now you need to connect each row of cathodes with one piece of hookup wire and each row of anodes with it's own piece of hookup wire.
Let's call them chains:
A chain of cathodes and a chain of anodes, this will help later.

I'd love to post a photo for the completed chains here but it's such a mess that I have to direct you to my sketch instead.

We'll get back to the Transistor when we do the Teensy.


Hooking up the Teensy:
This can get fiddly, I recommend using a set of Helping Hands or alternatively putting the Teensy between some horizontally stacked books to hold it in place while soldering.
-a magnifying glass is also great for those with dim work lights and weak eyes (like yours truly).

Run a piece of hookup wire from each row and each column to it's own hole (pin) on the Teensy.
Don't use the 5V (VCC) or GND pins, we need those for the LEDs, also leave one PWM pin for the LEDs (check the sketch)
I used B7, D0-D7 plus E0, E1 and C0 for the columns.
And B0-B4 for the rows.
LEDs used GND, 5V and B6.
-in theory the PWN pins should make it possible to regulate the brightness of the LEDs but I couldn't get it to work.
Here's my work sketch with pin names and numbers listed:
(Attachment Link)

Make a note of what row/column goes to what pin (take a picture) as you'll need to specify this in QMK later.

Put the end of each wire through a pin on the Teensy and solder in place with the tiniest amount of solder.
Make sure there's no solder connection between the pins.
Also try not to poke the soldering iron into any of the components of the Teensy.
If you're not doing LEDs, finish up the Teensy by putting some rubber sheeting on the back, to isolate it from the wires above.

I've placed my Teensy in the middle of the keyboard and am using a USB adapter to connect it with the outside world, so to speak.
Simply because I wanted the case to be completely sealed.
Since the finished backlit Preonic is a mess, here's an image taken of my first handwired Preonic without LEDs, just to show the wiring of a standard handwired build:
(Attachment Link)

Second Anecdote of Woe:
Be on the lookout for fake Teensys.
The easiest way to determine if you've bought a fake Teensy is to look at the LED.
Authentic Teensys are red.
Check this before building.
Mine are blue.
I checked mine after building.
****.
They still work though, the only problem was that Teensy Loader would not recognize my fakes in Mac OS; I had to use Windows instead.
But I could potentially have been forced to desolder the Teensy.


Hooking LEDs to the Teensy:
The TIP42CC Transistor schematics list the legs like this from left to right:
1: Base
2: Collector
3: Emitter
What I've done it connect the Base (1) to the B6 (PWM) pin on the Teensy.
(I put a resistor in between to reduce the brightness of the LEDs).
Then I connected the Collector (2) to the chain of cathodes.
Then I connected the Emitter (3) to the VCC (5V) pin.
Finally I connected the chain of anodes to the GND pin.
(Attachment Link)

Then put some rubber between the Transistor and the wiring.

I'm sure I've ****ed this up somewhere along the line because I can't change the brightness if the LEDs.
You're supposed to be able to change the brightness with QMK by connecting the LEDs to a PWM pin on your MCU but it doesn't work for me.
-yes, I've ticked all the boxes in QMK, so I'm pretty confident this is a hardware problem.
What I did to reduce the brightness of the LEDs was to put a resistor between the VCC pin and the Emitter leg of the Transistor.
If you like super bright LEDs, just connect the Emitter directly to the VCC pin.


Finishing up:
Make sure all the rows and columns are connected to the Teensy.
-same for the LEDs if using.
If any of your soldering joints or wires appear to be a little too close to each other or any other metal; put some rubber between them.
As you can see, my build is a mess of wires, joints and rubber insulation, but it work!
(Attachment Link)
All finished, 5am on a workday, kill me:
(Attachment Link)
If you're (Oh my god I can't believe I let that typo sit there and stink for eight months, I might die of shame) bottom plate is metal, it is a good idea to put rubber on it as well.
Don't close the case yet, you need to be able to reach the reset button on the Teensy.
However, if you put a reset key on your keyboard, you only need to use the physical reset button for the first setup.
After programming, close up the case and put some feet on the case.
I used some 3mm rubber sheeting as feet.
(Attachment Link)



Programming:
Download the latest QMK build from https://github.com/qmk/qmk_firmware.
Set up your build environment according to: https://docs.qmk.fm/getting_started_build_tools.html
Get the Teensy loader from here: https://www.pjrc.com/teensy/loader.html
I'm really no programmer, so you're better of just reading up yourself. It's really simple once you've tried and failed a few times.
If you need help, as Jack Humbert and the rest of the QMK gurus over at: https://www.reddit.com/r/olkb/ (They're super friendly and super helpful, just be nice)


Soon you'll be typing on your very own homemade, sturdy as brick ****-house, keyboard.
Let me tell you, when you boot it up for the first time and it works: very, very satisfying.


Here are some showy offy fancy pants stupid photos to finish up the post:

LEDs working mothafackas:
(Attachment Link) (Attachment Link) (Attachment Link)

The Handwired Family, Planck in the backround:
(Attachment Link)

Here it is today with PMK Quartz keycaps:
(Attachment Link)

Porny shots:
Funny thing, the Preonic matches my Topcon Survey equipment pretty well!
(Attachment Link) (Attachment Link)

Shoes and keyboards are a thing, right, am I doing this right?
(Attachment Link)


Thanks for reading!

I registered just to say thank you

Offline lax2003

  • Posts: 1
is the transistor needed if you dont want to have dimmable lights?