geekhack

geekhack Projects => Making Stuff Together! => Topic started by: litster on Mon, 30 January 2012, 04:18:29

Title: Building Phantom Hardware and Firmware Mods
Post by: litster on Mon, 30 January 2012, 04:18:29
If you are new to soldering, here is something that might help, available in many different languages:  http://mightyohm.com/blog/2011/04/soldering-is-easy-comic-book/ (http://mightyohm.com/blog/2011/04/soldering-is-easy-comic-book/)

This is a dedicated thread for Phantom soldering discussion and firmware discussion, a repository of all Phantom related files and information, one stop shop for all your Phantom technical needs.  This page should be open for editing so everyone can update this page with latest information. 

Please use the discussion section for continuous discussions, ask questions, and provide help to others if you can.

Original Phantom Group Buy Order thread (http://geekhack.org/index.php?topic=23572.0)

Phantom soldering instruction wiki (http://deskthority.net/wiki/Phantom_Instruction)

Phantom Firmware from PrinsValium (http://geekhack.org/index.php?topic=26742.msg640096#msg640096)

How to change LED brightness in firmware (http://geekhack.org/index.php?topic=26742.msg640384#msg640384)

Phantom PCB:
[attach=1]

Phantom Features:

Kits include the following:
 1 PCB (includes 2 white LEDs and2 resistors)
 1 Plate
 1 Teensy (includes 1 40-pin pin header)
 100 switches
 100 diodes
 4 2x stabilizers for ANSI or 3 2x stabilizers for ISO or 0 for PH7BIT
 1 7x or 1 6.25x stabilizer set for spacebar or 0 for PH7BIT
 

Interesting locations on PCB to watch out for:
[ATTACH=CONFIG]39094[/ATTACH]

Here is a video that demostrates how to make a costar stabilizer bar by hand.  You need a Du-Bro E/Z Bender (0-90 degrees and Z bend). Wire need to be 3/64 inch music wire that you can find at hobby shops. I found the ones I use at Hobby Town USA. It is called K&S Precision Metals Stock # 502 0.047 Music Wire (1.19mm).



Schematic:
[ATTACH=CONFIG]39096[/ATTACH]

Removing switches without desoldering:

Future Firmware Feature List:
Title: Building Phantom Hardware and Firmware Mods
Post by: RiGS on Mon, 30 January 2012, 04:20:24
Could you take a picture of that area of the plate we discussed?
Title: Building Phantom Hardware and Firmware Mods
Post by: litster on Mon, 30 January 2012, 04:20:59
Oh right, I will do that tomorrow.  Sorry about that.
Title: Building Phantom Hardware and Firmware Mods
Post by: RiGS on Mon, 30 January 2012, 04:27:51
Thanks.

Is it possible to use the Aikon instead of the Teensy?
Title: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Mon, 30 January 2012, 08:07:22
The board is designed around the footprint and pin count of the teensy.  The Aikon should be capable of controlling the matrix, making it pretty and fit in a case is another matter entirely.
Title: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Mon, 30 January 2012, 08:55:06
One nit pick... The firmware is BIOS compatible as it is. One of my friends says it sometimes doesn't some "online" quickly enough to be able to hit F2 or Del or whatever to access the BIOS. There is a _delay_ms(2000) (originally from the pjrc code) when initiating. This delay could probably be shortened, I'm not entirely sure why it is needed.
Title: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Mon, 30 January 2012, 08:59:16
The delay is needed to wait for initialization of the host end of the USB protocol because power is applied immediately on power-on and the host end  needs to boot its firmware.  2 seconds is on the very large side, I'd expect 500ms to be sufficient in 99% of systems.  If you cascade several hubs between the KB and system then 2 seconds may be needed, but then you won't be hitting the BIOS in that case anyway.
Title: Building Phantom Hardware and Firmware Mods
Post by: litster on Mon, 30 January 2012, 11:21:10
Quote from: PrinsValium;503128
One nit pick... The firmware is BIOS compatible as it is. One of my friends says it sometimes doesn't some "online" quickly enough to be able to hit F2 or Del or whatever to access the BIOS. There is a _delay_ms(2000) (originally from the pjrc code) when initiating. This delay could probably be shortened, I'm not entirely sure why it is needed.

Sorry, my mistake.  While copy and pasting that chunk of text, formatting was lost, and when I reformatted the lines, I added an CR to split that line.  I think the correct description should be NKRO over USB while maintaining BIOS boot compatibility.  I think there is a Teensy firmware version from Soarer that has NKRO but without BIOS boot compatibility, but he later said that it is possible to do both in the same firmware, he just had done it yet.

I updated the firmware feature list.
Title: Building Phantom Hardware and Firmware Mods
Post by: mkawa on Mon, 30 January 2012, 12:39:45
can we have some kind of precise specifications here? ie, schematic, pcb design file, etc. etc.?

eta: a-ha, i see the plates! thanks! now for mounting hole and board dimensions?
Title: Building Phantom Hardware and Firmware Mods
Post by: litster on Mon, 30 January 2012, 23:30:02
Here you go RiGS.

(http://geekhack.org/attachment.php?attachmentid=39090&d=1327987605)

(http://geekhack.org/attachment.php?attachmentid=39089&d=1327987604)
Title: Building Phantom Hardware and Firmware Mods
Post by: Tarkoon on Tue, 31 January 2012, 01:59:35
Ähm, if I look at your pictures and remember the discussion about "normal" vs. vintage Cherry MX switches...
The two switches at the lower end of your picture are from the same source???
Their Cherry logos look different!
Title: Building Phantom Hardware and Firmware Mods
Post by: litster on Tue, 31 January 2012, 02:21:53
All my switches came from very old Wyse and Cherry POS keyboards.  The switch bottoms came from old Wyse plate-mounted switches.  The stems and springs came from an old Cherry POS keyboard with browns.  Since I have mixed all the parts together, I don't remember if the switch tops were from the Wyse blacks, or Cherry POS browns.  But they are all pretty old.  The feel of the Phantom is different than my Filco browns, in a very good way IMO.  I love typing on the Phantom now.  I don't know if it is the switches, the aluminum plate, the PCB, or a combination of all.
Title: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Tue, 31 January 2012, 02:22:59
Here is the schematic too, if you want to add that to the main wiki post, litster.
[ATTACH=CONFIG]39092[/ATTACH]
Title: Building Phantom Hardware and Firmware Mods
Post by: litster on Tue, 31 January 2012, 02:31:59
Quote from: PrinsValium;504011
Here is the schematic too, if you want to add that to the main wiki post, litster.

Added to the wiki post.  Thanks.
Title: Building Phantom Hardware and Firmware Mods
Post by: RiGS on Tue, 31 January 2012, 03:11:38
Thanks for the picture. Honestly I think the idea of that plate design is pure genius, yet I'm not sure if I prefer it over the regular one.

You can certainly open those switches without soldering, but desoldering a whole board takes less than half hour when you have a little experience with the soldering iron, and even if you don't have any experience at all, it is still very basic skill that worth learning.

My concern is that design could potentially further increase the wobble of the upper switch case(Koreans even developed special stickers to minimize and reduce this effect). You can easily verify this by putting a keycap on a single switch and shake the top of the keycap.
Also one could accidentally open the switches while removing the keycaps, and those little gaps could trap a lot of dirt, dust and hair.

The switches could be cleaned, lubed and modded prior assembly. If you use a good lubricant like the RO-59, you are probably good for life, and you don't need to open those switches anymore.
Title: Building Phantom Hardware and Firmware Mods
Post by: RiGS on Tue, 31 January 2012, 03:22:00
Quote from: litster;504009
All my switches came from very old Wyse and Cherry POS keyboards.  The switch bottoms came from old Wyse plate-mounted switches.  The stems and springs came from an old Cherry POS keyboard with browns.  Since I have mixed all the parts together, I don't remember if the switch tops were from the Wyse blacks, or Cherry POS browns.  But they are all pretty old.  The feel of the Phantom is different than my Filco browns, in a very good way IMO.  I love typing on the Phantom now.  I don't know if it is the switches, the aluminum plate, the PCB, or a combination of all.


Judging by that new Cherry logo, the switch tops are from the Cherry POS. The WYSE has an older logo.
Title: Building Phantom Hardware and Firmware Mods
Post by: litster on Tue, 31 January 2012, 09:54:55
I think the plate design is awesome.  I was amazed again when I just popped open the switch top with 2 tiny screw drivers in a few seconds to take the picture.  I am using Cherry keycaps on it now, so they are not tight as Filco keycaps.  I have switched keycaps a few times already and no switch tops popped off when I pulled keycaps off.  From reading DragonBro's post on a Chinese forum, he mentioned the stckers from Korea is for covering the open gaps around the switch so no dust and crap can fall into the switch or let the lube dry out.  But maybe there are different stickers for different effects. Or the stickers can do what you said as well.

I will give the switches a shake test.  From using it the last couple of weeks, I haven't felt any shakiness with the keys and switches.

Also, you can't just keep soldering and desoldering over and over again if you keep modding your switches.  You can, but you will soon damage the PCB.  With the phantom plate, you can do it without desoldering and soldering, and you don't even need to open up the case.  And you don't need the tools and skills to solder and desolder to swap switches.
Title: Building Phantom Hardware and Firmware Mods
Post by: kaiserreich on Tue, 31 January 2012, 12:04:09
Do you think it is possible for us to get some Group buy for vinyl stickers?
Title: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Tue, 31 January 2012, 12:05:01
Vinyl stickers for what?
Title: Building Phantom Hardware and Firmware Mods
Post by: RiGS on Tue, 31 January 2012, 12:55:35
I have those stickers, and they don't cover those open gaps around the switches, but indeed they can help keeping the dust outside of the switches. Maybe I can ask a local company to replicate my stickers and organize a group buy.

Like I said the stickers are designed to fill up the space between the lower and upper switch case in order to reduce the play and minimize the switch wobble. If you remove the keycap next to the switch you want test for wiggle, you will notice that the upper switch case is having a tendency to move.
I suspect the Phantom plate design is prone to emphasize this little issue even more. I don't try to bash it. All I'm saying that while it is very convinient, but it definitely has its down sides.

Quote
Also, you can't just keep soldering and desoldering over and over again if you keep modding your switches. You can, but you will soon damage the PCB. With the phantom plate, you can do it without desoldering and soldering, and you don't even need to open up the case. And you don't need the tools and skills to solder and desolder to swap switches.

No disrespect, but in case of the FR4 PCB it is very unlikely that you will ever damage it. The switches could be cleaned, lubed and modded prior assembly, and there is no need to open them after that. Also I don't think that a $10 soldering iron and a wick are such a big investments. After all this is geekhack.
Title: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Tue, 31 January 2012, 12:59:28
Quote from: RiGS;504366
Like I said the stickers are designed to fill up the space between the lower and upper switch case in order to reduce the play and minimize the switch wobble. If you remove the keycap next to the switch you want test for wiggle, you will notice that the upper switch case is having a tendency to move.

I can see it wobble on my Filco, compared to the massive stem/keycap wobble I'd be hard pressed to notice it when typing.
Title: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Tue, 31 January 2012, 13:01:17
Quote from: kaiserreich;504282
Do you think it is possible for us to get some Group buy for vinyl stickers?

Quote from: alaricljs;504285
Vinyl stickers for what?

So presuming that you are talking about the cherry switch stickers, vinyl is the wrong choice.  The real deal I believe are made of paper, possibly some fiber reinforced stuff but definitely not vinyl.  Vinyl is far too easily deformed for that to work.
Title: Building Phantom Hardware and Firmware Mods
Post by: RiGS on Tue, 31 January 2012, 13:01:51
It is not as major as lubing, but it is definitely there. Btw my vintage blacks do not wobble nearly as much as my recent cherries.
Title: Building Phantom Hardware and Firmware Mods
Post by: litster on Tue, 31 January 2012, 19:51:05
I see what you mean, RiGS.  I suspect that the cut out isn't too big of a problem since the switch top isn't resting on the area where the extra cutout is.  But I could see it could be less structually stable by a little bit.  Hard to say.  If I have time I will take close up HD movie of shaking a switch on phantom and on a Filco to see if there is any difference.  Wish I still have the high speed 600fps Casio camera to take super slow mo movie of the switch while shaking it.  That would be cool.
Title: Building Phantom Hardware and Firmware Mods
Post by: kaiserreich on Tue, 31 January 2012, 20:44:24
Quote from: litster;504802
I see what you mean, RiGS.  I suspect that the cut out isn't too big of a problem since the switch top isn't resting on the area where the extra cutout is.  But I could see it could be less structually stable by a little bit.  Hard to say.  If I have time I will take close up HD movie of shaking a switch on phantom and on a Filco to see if there is any difference.  Wish I still have the high speed 600fps Casio camera to take super slow mo movie of the switch while shaking it.  That would be cool.

Kinda getting more hardcore than the koreans :cheer2:
Title: Building Phantom Hardware and Firmware Mods
Post by: litster on Wed, 01 February 2012, 00:36:12
Anybody has any idea where I can find a USB cable that is similar to the original Filco cable where there is cable gland that hooks to the case?  I haven't been able to find anything like that.
Title: Building Phantom Hardware and Firmware Mods
Post by: RiGS on Wed, 01 February 2012, 03:02:18
Indeed, that would be cool.
Title: Building Phantom Hardware and Firmware Mods
Post by: hazeluff on Wed, 01 February 2012, 06:28:17
Quote from: litster;505006
Anybody has any idea where I can find a USB cable that is similar to the original Filco cable where there is cable gland that hooks to the case?  I haven't been able to find anything like that.

I have a spare from my Choc Mini since I did a detachable cable mod. But I'm not sure If I'd part with it.

Can you find just USB cables with the connector without the gland? Because I think you can add glands yourself.
Title: Building Phantom Hardware and Firmware Mods
Post by: litster on Wed, 01 February 2012, 10:34:39
Hehe, I also haven't been able to find a gland that I could pass through a USB cable that already has connectors soldered on both ends.  I found some picture on the 'net previously that looks like a gland that you could pop onto a cable without removing connectors on the ends, but I haven't found a shop that actually sells them.
Title: Building Phantom Hardware and Firmware Mods
Post by: mtl on Wed, 01 February 2012, 12:04:02
Does anyone know of a good color anodizing service based in the US? Was thinking of coloring the plates.
Title: Building Phantom Hardware and Firmware Mods
Post by: tsangan on Wed, 01 February 2012, 13:05:04
http://www.amazon.com/Tamiya-HG-Angled-Tweezers-TAM74047/dp/B000J46WZY/ref=lh_ni_t

that any good to pluck out the top of the switch?
Title: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Wed, 01 February 2012, 13:07:18
Those look overly fine-pointed and dainty.  A set of micro screwdrivers would give you a couple good straight blade screwdrivers to pry the latch fingers and pop the top off.

Something along the lines of these (http://www.amazon.com/TEKTON-2987-Precision-Screwdriver-16-Piece/dp/B000NPZ3J0/ref=sr_1_7?ie=UTF8&qid=1328123273&sr=8-7)
Title: Building Phantom Hardware and Firmware Mods
Post by: tsangan on Wed, 01 February 2012, 13:13:12
Awesome, I picked up a set of those already today but I watched squarebox's video and his tweezers looks like it was really useful, I guess I'll try out just the micro screwdrivers first

[video=youtube;bLBXxzmuA_Q]http://www.youtube.com/watch?v=bLBXxzmuA_Q[/video]
Title: Building Phantom Hardware and Firmware Mods
Post by: digitalleftovers on Wed, 01 February 2012, 13:33:26
I like the tweezers idea for the sake of using one hand.
Title: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Wed, 01 February 2012, 13:53:10
Those in the video are a lot more blunt than the ones you linked... here (http://www3.towerhobbies.com/cgi-bin/wti0001p?&I=LXBUWH&P=7)  is the Tamiya model I would suggest, although they might even be too blunt.  There's tons of different tweezers tho.  Something more blunt than what you linked, perhaps less blunt than mine :)
Title: Building Phantom Hardware and Firmware Mods
Post by: tsangan on Wed, 01 February 2012, 14:01:43
Quote from: alaricljs;505447
Those in the video are a lot more blunt than the ones you linked... here (http://www3.towerhobbies.com/cgi-bin/wti0001p?&I=LXBUWH&P=7)  is the Tamiya model I would suggest, although they might even be too blunt.  There's tons of different tweezers tho.  Something more blunt than what you linked, perhaps less blunt than mine :)

That should be good then, thanks for the link!

The tips look kind of wide in the picture, wonder if it will slide into the holes in the switch
Title: Building Phantom Hardware and Firmware Mods
Post by: digitalleftovers on Wed, 01 February 2012, 16:57:02
This electronics/micro-controller stuff is all quite new to me.  I've done a little soldering practice now, but really wanted to dive into the controller programming and circuit testing before I get into my keyboard project.  pjrc (the company that makes the teensy) offers some starter kits.  It turns out that they are based in Sherwood, which is just outside of Portland, OR (where I am).  So my order was effectively next day!

Teensy's are SMALL!  Going to hook it up tonight and start playing with it.  I've got a breadboard and some components too.
Title: Building Phantom Hardware and Firmware Mods
Post by: litster on Wed, 01 February 2012, 23:11:10
Quote from: RiGS;505072
Indeed, that would be cool.

You guys are making me pulling out all the stops... 

I give you... 1080p goodness!  (well, you have to manually switch to 1080p :-))

Keep in mind that the browns on the Phantom are at least 15 years old, while the Filco is less than a year old.

Filco:


Phantom:

EDIT:
Yes, I had to sack a perfectly good blank yellow PBT keycap to shoot these videos.  LOL!

EDIT:
Fixed youtube links after forum migration
Title: Building Phantom Hardware and Firmware Mods
Post by: mkawa on Wed, 01 February 2012, 23:31:54
local machine shops are probably the way to go afaik. krylon ok too i'm guessing (unless tolerances too tight?)
Title: Building Phantom Hardware and Firmware Mods
Post by: Sojik on Wed, 01 February 2012, 23:38:34
I'm thinking about making a case out of fiberglass. I don't own a Filco and it's much cheaper for me to make my own case (free actually since I'm an automotive painter with free supplies). I've worked with fiberglass on automotive paint repair before so I think I have what it takes. I'll probably fabricate the case out of clay or foam or something and then make a mold. Anyone else done something like this? I wonder how hard carbon fiber would be to work with, on second thought. There are so many car modification blogs and forums with DIY instructions for making custom carbon fiber parts...

If someone has a Filco case who would like to take on a project like this too, don't throw away your mold if you make one. :)
Title: Building Phantom Hardware and Firmware Mods
Post by: mkawa on Thu, 02 February 2012, 00:07:30
are we still debating wobblilililiity? seriously guys, it's a keyboard.

question for litster: how did you get usb out on your plexi cases? did you do a small l-style cable from the teensy?
Title: Building Phantom Hardware and Firmware Mods
Post by: litster on Thu, 02 February 2012, 00:15:22
Quote from: mkawa;506079
are we still debating wobblilililiity? seriously guys, it's a keyboard.

question for litster: how did you get usb out on your plexi cases? did you do a small l-style cable from the teensy?

I don't think we are debating.  We just want to know what really is going on under the keycaps.  It is all for good fun.  It was the first time I shot videos with my 100mm macro lens on my 5D Mark II.  That was pretty fun.

What is an I-style cable?  I am just using a regular USB to mini USB cable.  One of the lower layers has a cut out that fits the Filco keyboard's USB cable's gland.  I am still looking for glands that can be popped onto and existing USB cable or a USB cable with a built-in gland.
Title: Building Phantom Hardware and Firmware Mods
Post by: mkawa on Thu, 02 February 2012, 00:26:05
i went off searching for the thing i was talking about, but alas it was stupid; what i mean is "really tiny usb mini-mini extension cable whose female end terminates at the case edge"

i'm not sure what a cable gland is, but damned if it doesn't sound sexy
Title: Building Phantom Hardware and Firmware Mods
Post by: litster on Thu, 02 February 2012, 00:39:02
I was going to say something smart ass, went to wikipedia.org to look for gland, and burst out laughing when I read the first paragraph http://en.wikipedia.org/wiki/Gland:

Quote
A gland is an organ in an animal's body that synthesizes a substance for release of substances such as hormones or breast milk, often into the bloodstream (endocrine gland) or into cavities inside the body or its outer surface (exocrine gland).

I just learned about cable glands last week or so from the Phantom group buy thread.  There are a couple pictures there.
Title: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Thu, 02 February 2012, 00:54:17
Quote from: Sojik;506044
I'm thinking about making a case out of fiberglass. I don't own a Filco and it's much cheaper for me to make my own case (free actually since I'm an automotive painter with free supplies). I've worked with fiberglass on automotive paint repair before so I think I have what it takes. I'll probably fabricate the case out of clay or foam or something and then make a mold. Anyone else done something like this? I wonder how hard carbon fiber would be to work with, on second thought. There are so many car modification blogs and forums with DIY instructions for making custom carbon fiber parts...

If someone has a Filco case who would like to take on a project like this too, don't throw away your mold if you make one. :)


You could buy a PLU for 1/3-1/2 the cost of a Filco that would probably be your best bet.
Title: Building Phantom Hardware and Firmware Mods
Post by: Sojik on Thu, 02 February 2012, 02:12:06
Quote from: TheProfosist;506125
You could buy a PLU for 1/3-1/2 the cost of a Filco that would probably be your best bet.

Really? The only ones I saw on eBay when I looked were about the price I found the Filco TKLs ($100ish).
Title: Building Phantom Hardware and Firmware Mods
Post by: litster on Thu, 02 February 2012, 02:15:37
You can get a PLU for pretty good price from qtan.  I think TheProfosist bought 3 from qtan and qtan told him that he would give others similar pricing.  You get switches from a PLU as well, you just have to desolder them off of the PCB.
Title: Building Phantom Hardware and Firmware Mods
Post by: mkawa on Thu, 02 February 2012, 02:20:34
soo... any chance of getting the dimensions for case design anytime soon?
Title: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Thu, 02 February 2012, 02:34:26
Quote from: litster;506159
You can get a PLU for pretty good price from qtan.  I think TheProfosist bought 3 from qtan and qtan told him that he would give others similar pricing.  You get switches from a PLU as well, you just have to desolder them off of the PCB.
Yea the price was $68 before shipping. Was a white one with blues pm or post in his forum for a quote for the case color and switch type that you want.
Title: Building Phantom Hardware and Firmware Mods
Post by: RiGS on Thu, 02 February 2012, 02:35:28
Quote from: litster;505991
You guys are making me pulling out all the stops...  

I give you... 1080p goodness!  (well, you have to manually switch to 1080p :-))

Keep in mind that the browns on the Phantom are at least 15 years old, while the Filco is less than a year old.

Filco:
[video=youtube;BNMmwvvwZso]http://www.youtube.com/watch?v=BNMmwvvwZso[/video]

Phantom:
[video=youtube;vH4OvhTzid4]http://www.youtube.com/watch?v=vH4OvhTzid4[/video]

EDIT:
Yes, I had to sack a perfectly good blank yellow PBT keycap to shoot these videos.  LOL!


Haha. Amazing video, it seems the plate doesn't affect the wobblility. Now I want a Phantom as well.
Title: Building Phantom Hardware and Firmware Mods
Post by: litster on Thu, 02 February 2012, 02:47:43
Quote from: RiGS;506170
Haha. Amazing video, it seems the plate doesn't affect the wobblility. Now I want a Phantom as well.

Yes!  It is all worth it if RiGS is ordering a Phantom  because of my videos!  Wait, the group buy is closed.  Looks like 7bit is still tinkering his scripts, send in your order now.

Did you watch the video in 1080p?  I am so proud of the quality!  The original video clips were 60 to 70MB each in size, for just 9 and 13 seconds.

Oh, and never saw my fingers that big on screen!
Title: Building Phantom Hardware and Firmware Mods
Post by: RiGS on Thu, 02 February 2012, 03:06:26
Yeah, I watched the second one in 1080p. The quality speaks for itself.
I'm still debating between the layout. The 1.5x size modifiers look better than the 1.25 size modifiers, but those keys tend to be sticky. At least the TAB key sticks when I don't hit it perfectly at the center.
Title: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Thu, 02 February 2012, 08:02:38
What switch type RiGS?  My browns don't have any issue with being hit way off-center, including capslock which is larger.
Title: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Thu, 02 February 2012, 08:08:31
Quote from: Sojik;506044
I wonder how hard carbon fiber would be to work with, on second thought. There are so many car modification blogs and forums with DIY instructions for making custom carbon fiber parts...


If you get the carbon fiber as cloth then it's nearly identical to working with fiberglass.  What you think of as the carbon-fiber look is purely a cosmetic layer.  Carbon fiber structures are made with uni-directional carbon fibers that are laid in an alternating pattern according to the structural requirements of the item being crafted.  For a standard flat panel this would usually include layers at 90° and 45° to the first layer.
Title: Building Phantom Hardware and Firmware Mods
Post by: hazeluff on Thu, 02 February 2012, 10:38:41
Quote from: Sojik;506044
I'm thinking about making a case out of fiberglass. I don't own a Filco and it's much cheaper for me to make my own case (free actually since I'm an automotive painter with free supplies). I've worked with fiberglass on automotive paint repair before so I think I have what it takes. I'll probably fabricate the case out of clay or foam or something and then make a mold. Anyone else done something like this? I wonder how hard carbon fiber would be to work with, on second thought. There are so many car modification blogs and forums with DIY instructions for making custom carbon fiber parts...

If someone has a Filco case who would like to take on a project like this too, don't throw away your mold if you make one. :)

Robotics club here at my uni makes everything out of their makerbot. >< They just print parts they need. Too bad Keyboard case is too big for it.
Title: Building Phantom Hardware and Firmware Mods
Post by: Sojik on Thu, 02 February 2012, 13:36:30
Quote from: alaricljs;506292
If you get the carbon fiber as cloth then it's nearly identical to working with fiberglass.  What you think of as the carbon-fiber look is purely a cosmetic layer.  Carbon fiber structures are made with uni-directional carbon fibers that are laid in an alternating pattern according to the structural requirements of the item being crafted.  For a standard flat panel this would usually include layers at 90° and 45° to the first layer.

Is that so? I thought they just clearcoated or laminated the carbonfiber.
Title: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Thu, 02 February 2012, 13:41:51
Woven CF takes up too much space making it so that more epoxy is present in any given volume than if you lay it out with unidirectional carbon and alternate the direction of the fiber.  Epoxy isn't the strength so you want the least amount of epoxy in something structural.  If you need something to be lightweight but strength is not a major requirement you still want to limit the epoxy since this is the heavy part.

Laminated is the process I just described, so... err, yeah.  For carbon fiber bicycle frames the woven CF is oven applied after the structure is assembled, it's mostly cosmetic to the point that some bikes are available without the woven look.

If you are lucky enough to have a simple shape you can also use a press to eliminate epoxy and air holes.  

This goes out the window if all you care about is looks.  Then you just use woven CF and however much epoxy you need because typically epoxy is cheaper than CF.
Title: Building Phantom Hardware and Firmware Mods
Post by: mkawa on Thu, 02 February 2012, 15:19:03
Quote from: hazeluff;506392
Robotics club here at my uni makes everything out of their makerbot. >< They just print parts they need. Too bad Keyboard case is too big for it.
can it do walls thin enough for keys?
Title: Building Phantom Hardware and Firmware Mods
Post by: lootbag on Sun, 12 February 2012, 08:55:19
Quote from: mkawa;506161
soo... any chance of getting the dimensions for case design anytime soon?


I would like this as well!
I do not own a Filco tenkeyless so I cannot take measurements myself.
Title: Building Phantom Hardware and Firmware Mods
Post by: RiGS on Sun, 12 February 2012, 12:34:02
Quote from: alaricljs;504374
So presuming that you are talking about the cherry switch stickers, vinyl is the wrong choice.  The real deal I believe are made of paper, possibly some fiber reinforced stuff but definitely not vinyl.  Vinyl is far too easily deformed for that to work.

The stickers work so well you wouldn't believe it.
Title: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Sun, 12 February 2012, 12:46:52
Quote from: RiGS;512548
The stickers work so well you wouldn't believe it.

But they're not vinyl, are they?  The ones I've seen pictured certainly don't look vinyl.
Title: Building Phantom Hardware and Firmware Mods
Post by: RiGS on Sun, 12 February 2012, 13:00:02
These are made of vinyl.
Title: Building Phantom Hardware and Firmware Mods
Post by: RiGS on Sun, 12 February 2012, 13:07:29
In fact other materials wouldn't work so well, because of the way how Koreans designed these stickers. It has to be flexible to nicely cover the area around the hole intended for the diode/led, and to protect the switch from the dust.
Title: Building Phantom Hardware and Firmware Mods
Post by: RiGS on Sun, 12 February 2012, 13:22:27
I will show my sheet to a local company to replicate it, and I will organize a group buy.
Title: Building Phantom Hardware and Firmware Mods
Post by: mkawa on Sun, 12 February 2012, 14:35:30
awesome, rigs!
Title: Building Phantom Hardware and Firmware Mods
Post by: RiGS on Sun, 12 February 2012, 15:00:37
Quote from: harrison;512634
actually, i'm curious now what impact this is going to have with being able to get the housing open from the top only, once these are plate mounted.
img1
however, sixty's stickers above are different than the ones seen below:
img2

Nope, those are the same.
The stickers interfere with opening the switches.
Title: Building Phantom Hardware and Firmware Mods
Post by: RiGS on Sun, 12 February 2012, 17:44:15
Indeed, those are different. I got mine from sixty, but these are the newer ones with the cutouts.
I think it is still possible to open the switches, but a different approach is needed. I will test it out.
Title: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Sun, 12 February 2012, 20:51:36
I plan to build this thing once so i would be interested in them.
Title: Building Phantom Hardware and Firmware Mods
Post by: litster on Sun, 26 February 2012, 19:42:55
Soarer updated his XT/AT to USB Teensy firmware.  http://geekhack.org/showwiki.php?title=Island:17458&p=527414&viewfull=1#post527414

Posting it here:

Quote from: Soarer;527414
Ok, so what's new is all the stuff outlined in this post (http://geekhack.org/showwiki.php?title=Island:17458&p=466081&viewfull=1#post466081).

You can now define a bunch of settings in a text file, compile it, and upload it to the converter. There's a few example config files in the tools zip.

The tools are Windows only, but should be very easy to build for Linux and Mac.

You probably want to get all three zip files anyway - there's list of HID codes in the src archive which might come in handy.

The converter now outputs the HID codes that come from the first (fixed) stage of translation to the debug output (hid_listen), preceded by + or -. This should help a bit if you're not sure which code you need to remap for a key.

I've removed previously hard-coded settings. They are now in the legacy.sc config file. If you want the v0.997 converter to act exactly like v0.996:

  • Flash the Teensy with the hex file
  • Open a command line prompt in the tools folder, and type these commands:
  • scas legacy.sc legacy.scb
  • scwr legacy.scb


There's two versions of the hex file for each Teensy. The _temp versions will reset all settings each time they boot up. Hopefully they won't be needed, but if I've screwed up, or writing the config to the Teensy is interrupted, they can be used to clean things up.


Quote from: Soarer;466081
General Status Update...

  • EEPROM handling in Converter - done.
  • Utilities to read/write EEPROM - done (for Windows).
  • Settings binary format - done.
  • Settings handling in Converter - done (but not fully tested).
  • Simple compiler to turn Settings text file into Settings binary file - todo.


What are the Settings then?!

  • Remaps
  • Macros
  • Layers
  • Selects


Remaps
Are not whole translation tables! As a silly example, if you wanted to swap the '1' key with the '2' key, you might write:
1=2
2=1
(with some additional bumph around that to define a block).

Macros
Can trigger for any single key with any of the standard modifiers.
Separate macros can be defined on make and break (although, on make only is the most useful and reliable).
Macros are sequences of comands which can currently be: key events, modifier manipulation, and delays.

Layers
Up to 8 keys can be defined to act as a 'Fn' key to access further layers.
Any key can be used in this way - the keys are defined using the remap mechanism, so remapping a key to, say, 'FN1' defines it.
A layer is defined as any combination of those keys - so theoretically up to 256 layers! However, since each layer takes up a fair bit of memory, roughly 3 is the max on a Teensy 2.0, and maybe 25 on a Teensy++.
Each remap block is tagged with the layer it applies to (if not the base layer).

Selects
Up to 7 keys can be defined to toggle configurations of settings.
As with layers, these can be defined as remaps (to SELECT1 etc). But they can also be put in a macro, so that you can define a combination of keys to select a configuration.
All of the blocks for remaps, macros and layers can be tagged with a Select ID (1 to 7). But it is not required. In fact, base settings would usually not be marked as a Select.
Triggering a Select toggles that group of settings, but leaves the others alone.

So, basically... enough Settings to shoot yourselves in the foot with! :-)

Back to the todo - does anyone have experience with Boost::Spirit?
It looks interesting for the compiler part...
Title: Building Phantom Hardware and Firmware Mods
Post by: mkawa on Mon, 27 February 2012, 08:20:54
is this the source the current phantom firmware is based on?
Title: Building Phantom Hardware and Firmware Mods
Post by: litster on Mon, 27 February 2012, 10:58:05
No, it is not.  Posting it here in case someone is interested in porting it over for Phantom.
Title: Building Phantom Hardware and Firmware Mods
Post by: mkawa on Mon, 27 February 2012, 12:54:53
i can start hacking around if someone can answer my question about simulavr in the firmware modding thread in profosist's subforum

eta: it's basically, how do i runned simulavr for atmega32 on linux!?
Title: Building Phantom Hardware and Firmware Mods
Post by: litster on Thu, 01 March 2012, 19:48:35
http://geekhack.org/showwiki.php?title=Island:17458&viewfull=1&page=31&do=comments#post530048

From Soarer.  If you are able to help porting the code over to work on Phantom, please let Soarer know.

Quote from: litster;529611
This new update sounds very awesome.  We need someone to help port it over to use on Phantom  :-)


Quote from: Soarer;530048
Currently got about a dozen items on my to-do list, and making this sort of thing possible, somehow, is quite high on the list. I really can't say at the moment how quickly I'll be able get to it though.
Title: Building Phantom Hardware and Firmware Mods
Post by: agor on Wed, 07 March 2012, 07:50:05
Is there a detailed pcb picture with measurements available for people designing their own case?
Title: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Wed, 07 March 2012, 08:50:10
Quote from: agor;537680
Is there a detailed pcb picture with measurements available for people designing their own case?
I will get this done within the next couple of days. I am pretty busy, but I should be able to squeeze it in. It shouldn't take too long...
Title: Building Phantom Hardware and Firmware Mods
Post by: agor on Wed, 07 March 2012, 09:42:42
Don't stress yourself, this is very much appreciated, thank you!
Title: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Wed, 07 March 2012, 13:57:09
Quote from: agor;537762
Don't stress yourself, this is very much appreciated, thank you!
There are CAD drawings for all the mounting plate in a zip file in the wiki article. They should in fact be more interesting than the PCB itself, but I will make a drawing of it as well.
Title: Building Phantom Hardware and Firmware Mods
Post by: mkawa on Wed, 07 March 2012, 14:02:16
imo it's not a big issue atm since we're more than a month out from board delivery. there's no way i'm going to pay for any prototypes before i have boards anyway.
Title: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Wed, 07 March 2012, 19:26:44
Ok, done, the four large holes and the smaller one in the center between the function and alpha section are for mounting purposes. All the other holes are center holes for switch locations.
Title: Building Phantom Hardware and Firmware Mods
Post by: mkawa on Thu, 08 March 2012, 01:36:00
can you export in a 2d format? tiff maybe?
Title: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Thu, 08 March 2012, 01:46:41
That, to my understanding, is the 2D format of the industry. Just install qcad and be happy with it =) You wouldn't be able to extract any measurements from a tiff anyhow...
Title: Building Phantom Hardware and Firmware Mods
Post by: mkawa on Thu, 08 March 2012, 02:02:46
windows? UGH

you can absolutely extract measurements from a tiff (or eps) by the way. graphic design would be pretty much impossible if you couldn't
Title: Building Phantom Hardware and Firmware Mods
Post by: litster on Thu, 08 March 2012, 02:17:55
QCAD runs on Linux, Mac, and Windows.  And of course the Windows is the best version of all three!  LOL!
Title: Building Phantom Hardware and Firmware Mods
Post by: mkawa on Thu, 08 March 2012, 02:46:20
windows isn't even the best version of windows

that would be BEOS SIR, the only TRULY FRENCH OS

eta: yay, measurements. thanks folks

am i right in thinking that the 5 large holes are free to be used for pcb mounting? (ie nothing else needs to go through there?)
Title: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Thu, 08 March 2012, 06:40:12
Quote from: mkawa;538833
am i right in thinking that the 5 large holes are free to be used for pcb mounting? (ie nothing else needs to go through there?)

That is correct. The four large holes as well as the smaller centered one between the function and number row. All other holes will be covered by switches. (Some may be free depending on chosen layout.)
Title: Building Phantom Hardware and Firmware Mods
Post by: Sojik on Sat, 10 March 2012, 22:45:13
Blank 1.5 modifiers are really hard to find. I wonder if I can modify my 7bit plate for 12 1.25 keys. I was counting on GB4 to get blanks but they were removed so I'm sort of screwed.

I like the idea of all the extra keys on the bottom row but 1.5 keys seem to be pretty rare.
Title: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Sat, 10 March 2012, 23:34:59
Quote from: Sojik;541958
Blank 1.5 modifiers are really hard to find. I wonder if I can modify my 7bit plate for 12 1.25 keys. I was counting on GB4 to get blanks but they were removed so I'm sort of screwed.

I like the idea of all the extra keys on the bottom row but 1.5 keys seem to be pretty rare.

Have you seen bmy layout it uses 1.25 and 1.75 instead. there are small 0.125 gaps on the ends of the row though not that it bothers me.
Title: Building Phantom Hardware and Firmware Mods
Post by: mkawa on Mon, 12 March 2012, 20:12:17
SP claims to have PBT 1.5x modifiers in stock right now...
Title: Building Phantom Hardware and Firmware Mods
Post by: litster on Fri, 16 March 2012, 19:08:44
If you are new to soldering, here is something that might help, available in many different languages:  http://mightyohm.com/blog/2011/04/soldering-is-easy-comic-book/

Added this to the wiki as well.
Title: Building Phantom Hardware and Firmware Mods
Post by: Sojik on Mon, 19 March 2012, 15:51:10
Quote from: TheProfosist;541980
Have you seen bmy layout it uses 1.25 and 1.75 instead. there are small 0.125 gaps on the ends of the row though not that it bothers me.

Yes I have. Clever solution. I found PBT blanks from SP that I think I'm going to be happy with though.

Quote from: mkawa;543947
SP claims to have PBT 1.5x modifiers in stock right now...

Thanks. I just ordered them.
Title: Building Phantom Hardware and Firmware Mods
Post by: litster on Sat, 31 March 2012, 20:25:36
Been making more 7x costar stabilizer bars today.  So I figured I would make a video to show you all how to make one yourself if you need to.  I can make one in about 5 minutes now. 


Edit: Fixed youtube link after forum migration
Title: Building Phantom Hardware and Firmware Mods
Post by: litster on Sat, 31 March 2012, 22:12:34
Yes, I could mount the bender to a board, but it wouldn't be as portable as it is now.  I can bend stabilizers in my office, by the dining table, wherever around the house.  If I bolt it down, I am going to be stuck in the garage when I make stabilizer bars.  The wire is not that hard so it is fairly easy to bend without bolting the bender down.

Also, the few times in the video when the bender was moved out of sight, it is because I needed to bring it up so I can eye ball the wire's angle, make sure it is either flat for the 90-degree bends or at the correct angle for the Z bends.
Title: Building Phantom Hardware and Firmware Mods
Post by: litster on Sat, 31 March 2012, 22:49:11
Quote from: harrison;563051
yeah, i get that with the quantity you need to do, you'll be doing them in all your spare time.  that being said, i'm not suggesting you bolt it to your desk, but rather a small piece of board, which you could then clamp to any flat surface, being dinning room table, desk, etc.  i've done this with a lot of my mountable tools,  where i don't want them permanently fixed.

Ah, I see what you mean.  Good idea.  Now I need to go find a free scrap board from home depot :-).  I should still be able to bring my head down to eye ball the wire.
Title: Building Phantom Hardware and Firmware Mods
Post by: captain on Tue, 03 April 2012, 22:13:14
Has anyone considered making the Phantom a bluetooth keyboard?  I wonder if it would be possible to add a BlueSMIRF HID and a battery compartment....
Title: Building Phantom Hardware and Firmware Mods
Post by: litster on Tue, 03 April 2012, 22:19:49
Not in this thread.  This is for building Phantom.  The Phantom we are building here uses Teensy.

Good idea though.  Will need bluetooth to connect to all the new tablets that are coming out this year.
Title: Building Phantom Hardware and Firmware Mods
Post by: jdcarpe on Wed, 30 May 2012, 11:22:28
What is the plate material type and thickness?
Title: Building Phantom Hardware and Firmware Mods
Post by: litster on Wed, 30 May 2012, 13:34:47
aluminum and 1/16" thick.  A little filing may be required for Costar stabilizers.  Just a little bit.
Title: Building Phantom Hardware and Firmware Mods
Post by: jdcarpe on Wed, 30 May 2012, 14:41:20
Quote from: litster;604024
aluminum and 1/16" thick.  A little filing may be required for Costar stabilizers.  Just a little bit.

Thank you for the info, litster.
Title: Building Phantom Hardware and Firmware Mods
Post by: litster on Sat, 16 June 2012, 00:46:50
We are getting close to get parts sorted and packed.  Any effort going into revving the current Teensy firmware?  I see there is some firmware action with the Ergo Dox project.  I lot of that could benefit Phantom's firmware as well, right?
Title: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Sun, 24 June 2012, 05:02:41
Quote from: litster;614565
We are getting close to get parts sorted and packed.  Any effort going into revving the current Teensy firmware?  I see there is some firmware action with the Ergo Dox project.  I lot of that could benefit Phantom's firmware as well, right?

I would love to see some action with the firware go on. I know verylittle of whats needed to code the teensy but have a layout designed for my phantom already which could end up being problematic.
Title: Building Phantom Hardware and Firmware Mods
Post by: dirge on Sun, 24 June 2012, 05:44:58
I wasn't keeping up much with the firmware, but the prototypes work fine, so in its current state it's good enough to use, yes?
Title: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Sun, 24 June 2012, 06:43:20
Quote from: dirge;620797
I wasn't keeping up much with the firmware, but the prototypes work fine, so in its current state it's good enough to use, yes?

Yes, it works. It really should get an actual de-bounce algorithm though. At the moment there is a simple _delay_ms(5) between each scan of the matrix... I was scanning though the code for the ErgoDox and there they only do that delay if there has been a change. That is only a small improvement though.

Layers are not implemented at the moment I think.. But they are possible to get in a simple manner by defining which keys are modifiers, and when it is time to send key codes there are several different vectors of key codes to chose from depending on which modifier keys are pressed.

It should be possible to use the code for the ErgoDox. I think the guy writing it has actually intended his project to be for any Teensy keyboard. It looked pretty general to me. That is not the approach I would have picked myself, I like small compact hacks =) Making things general usually grows beyond what is manageable to me... There are surely more competent programmers than me hanging around here, and I was hoping putting a phantom in their hands would make them contribute with code =D
Title: Building Phantom Hardware and Firmware Mods
Post by: mkawa on Sun, 24 June 2012, 08:34:30
once i get my kit build (and a bit more free time, unfortunately), i can hack what needs to be hacked into the firmware.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: mkawa on Thu, 09 August 2012, 14:33:00
yes, there are no metal cases available at the moment.

why: IT'S REALLY EXPENSIVE TO DESIGN AND MANUFACTURE A METAL CASE

it's a problem we can solve, but it will take time. i have several much simpler ideas, i think it's worth prototyping at least one them. see the rev.2 thread for details
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: captain on Fri, 10 August 2012, 15:48:46
Firmware should be:
Code: [Select]

last_char = nil
start_time = Time.now

loop

    next_char = gets.chomp

    if next_char == last_char && ((Time.now - start_time).to_f < 0.1)
        break
    else
        start_time = Time.now
        last_char = next_char
        return next_char
    end
end



Sorry about the uncompilable code, and failure to write is as a proper method, but you get the idea.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Fri, 10 August 2012, 18:12:20
Firmware should be:
Sorry about the uncompilable code, and failure to write is as a proper method, but you get the idea.

I like your SP color sample necklace =D But I am too tired to try to figure out what that code is supposed to do at the moment. Looks like a lot of c gibberish to me =P If we are talking about de-bouncing still, then I fixed that by using a timer and a very simple algorithm. I also uploaded the code to github (https://github.com/BathroomEpiphanies/Teensy-Keyboard). All this while GH was down I suspect..
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: captain on Fri, 10 August 2012, 18:53:38
Thanks.  :-)

Simpler statement of my point: compare the last keystroke to the current one.  If they are different, pass the current one on to the USB system.  If they are the same, check for timing, and if they are more than X ms apart, pass along the current character, if less than X ms, toss the second one and continue listening.

e.g.: I can type disparate characters MUCH faster than I can repeatedly type the same character--because subsequent keys can already be heading down as the previous ones are still rising back up.  I can only get about 10-12 max. of the SAME character by repeatedly tapping, so that's just around 90ms per repeated character.  Anything faster than, say, half, or 2/3, of that, would HAVE to be a bounce, so the controller should toss it out.

This is all theoretical.  I haven't seen how the current system works, but we do have some insanely fast typists, so we probably do NOT want to ignore keystrokes just because they are coming really fast.  ;-)
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Fri, 10 August 2012, 19:04:51
I measured the scan rate with an oscilloscope, when no keys were pressed. And I got ~2kHz, but then the controller were doing nothing else. I doubt it will drop enough to be noticeable though =D The one number that may need to be tweaked is the duration for the release bounce. I sometimes get double taps when not intended. But that might also just be me getting alzheimer or something =P I think the current time is slightly below 5ms.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: captain on Fri, 10 August 2012, 19:15:12
What about when a key is held down?  I forgot about this, but we certainly want holding a key down to send user-definable auto-key-repeats! 
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Fri, 10 August 2012, 19:35:33
Repeating is usually handled by the OS, and I think that is a good thing.

The way the algorithm works at the moment is like this.

As soon as a key goes from not registering to registering it is considered pressed, and sent to the OS.

When a key goes from registering to not registering it has a byte that is set to 0x80. There is a byte for every key, and to make things simple a timer interrupt shifts all bytes to the right one step every ~<1ms. When one of these bytes changes from 0x01 to 0x00 the key is considered to have been released, and is reported to the OS.

If the key registers again during a scan before the byte reaches 0x00 the release is aborted.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: captain on Fri, 10 August 2012, 20:52:42
Sounds good.  Could you give us the link to the github repository for all of this, please?  I don't see it in the OP.  In fact, the only think I see in the OP is a dead link to a message from the old BBS.  Will the same firmware work on all Phantom layouts? 
Thanks!
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Fri, 10 August 2012, 21:26:57
Everything you need is here (http://deskthority.net/wiki/Phantom_Instruction).
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: captain on Fri, 10 August 2012, 21:28:53
DeskThority!  Of course!  Sorry I'm too clueless sometimes.  Thanks!  :-)

PS: I just realized who I was communicating with.  Why did you change your name?  Did Vespa dump you and you lost your schwartz?  ;-)


PS: Here is a working model of the code, with a bunch of crap printed to the screen so you can see what's happening.  Type a letter, followed by Enter.  Do this twice quickly (within a half second of typing the first letter) and see how the debouncer detects the duplicated keypress.  Do this quickly with different letters, and see how the debouncer doesn't trap a "bounce":

http://pastie.org/4453227
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Sat, 11 August 2012, 01:18:15
What language is that even?

I linked to the github page above but that may have been a bit secluded https://github.com/BathroomEpiphanies/Teensy-Keyboard

I made the code more general, moving model specific functions out of the main file. Pins, layout, AVR chip, CPU speed, and so on is defined in the make file. I will remove the "Phantom-Firmware" repository. Right away may be just as well =)
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Sat, 11 August 2012, 01:27:47
PS: I just realized who I was communicating with.  Why did you change your name?  Did Vespa dump you and you lost your schwartz?  ;-)

Valium never had any schwarz... =P That name started out as an internal joke. I didn't really ever like it that much, but had no better ideas. I don't mind the drug reference much my self, but I don't want anyone else to be offended. That Valium character is pretty unlikable to start with. And it wasn't very original. My real name has gotten tighter linked to my online identities as well. So I wanted something better =) I have this pretend organisation "Bathroom Epiphanies" that I brand my creative work with, so that's where bpiphany comes from.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Tranquilite on Sat, 11 August 2012, 01:55:11
I've placed all the Diodes in my phantom, downloaded the current code from bpiphany's github, compiled the hex file using WinAVR, and programmed it to my teensy, but all I get is a USB hub with one unused port and an unknown device...

Can anybody tell me what I'm doing wrong? Is the current code from the git repository supposed to compile without making any changes? Does anybody have a known working compiled hex? I cant find any compiled ones because the attachments didn't get restored. I want to make sure everything is soldered correctly before continuing, but i dont even know where to start debugging.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Sat, 11 August 2012, 02:03:29
First make sure this is the repository you are using https://github.com/BathroomEpiphanies/Teensy-Keyboard
I just deleted the old one so that won't be there anymore =D

You will need to change a few lines in the makefile.

Comment out the current "iso" board that it is compiling for (that is one of my own projects. And un-comment the phantom stuff,  before you make the thing.

Like this:
Code: [Select]
BOARD = phantom
MCU = atmega32u4
F_CPU = 16000000

#BOARD = iso
#MCU = at90usb1286
#F_CPU = 16000000

# BOARD = symmetric
# MCU = at90usb1286
# F_CPU = 16000000

# BOARD = pontus
# MCU = at90usb1286
# F_CPU = 16000000

Then you run 'make', and you should end up with a usable hex file.

Edit: Actually always run 'make clean' first... I thought I had included that but I haven't yet.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Tranquilite on Sat, 11 August 2012, 02:05:59
Ooh, that was a fast response. I'll do that right now.

EDIT: Ok, things appear to be working just fine now, thanks!
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Sat, 11 August 2012, 08:07:44
any way we could get the code compiled already the source is nice if you know what to do with it but when you dont it doesnt help much. wasnt their a working basic firmware file as one point

After I load into WinAVR I continually get Error: invalid command name ".tearoff1"
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Sat, 11 August 2012, 08:51:32
I can compile hex files, but then you wont see how I log your keystrokes and mail them to myself =D

Seriously, there should be compiled hex files in the repository. But the current ANSI with winkeys layout is the only one I know to work for sure.

Ok, so I went ahead and added the hex file. I don't know if that is actually downloadable from the http or if you need to use git...
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Sat, 11 August 2012, 20:06:08
I can compile hex files, but then you wont see how I log your keystrokes and mail them to myself =D

Seriously, there should be compiled hex files in the repository. But the current ANSI with winkeys layout is the only one I know to work for sure.

Ok, so I went ahead and added the hex file. I don't know if that is actually downloadable from the http or if you need to use git...
worked perfectly now i just need to get all my switches on and finish everything up. After that im going to have to find someone that can program a layer in  for my layout.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Sat, 11 August 2012, 22:13:25
FYI - For those wanting to go with the ANSI +Winkeys HEX that bp uploaded to git and don't know how, you can do this:

Click here (https://github.com/BathroomEpiphanies/Teensy-Keyboard).  (it's the git page)
Click the PHANTOM_ANSI_WIN.hex file
Right Click the "RAW" button and save as.

Save it and load it to your teensy.  I just AKT'd a PCB w/ only diodes and the teensy mounted:  100% success.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Tranquilite on Sun, 12 August 2012, 16:15:32
Just for the fun of it, I decided to compile Hasu's tmk keyboard firmware (specifically the macway build) and program it to my phantom. Surprisingly, more than half the switches sent keystrokes (though the not the right keystrokes). With some work, I think this firmware could be made to work with the phantom. This would probablty be the easier way to get media keys and function layers, because Hasu's firmware already has these features implemented. Unfortunately I'm not very good at programming, so hopefully someone else can do this.
Title: Re: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Sun, 12 August 2012, 17:38:06
Just for the fun of it, I decided to compile Hasu's tmk keyboard firmware (specifically the macway build) and program it to my phantom. Surprisingly, more than half the switches sent keystrokes (though the not the right keystrokes). With some work, I think this firmware could be made to work with the phantom. This would probablty be the easier way to get media keys and function layers, because Hasu's firmware already has these features implemented. Unfortunately I'm not very good at programming, so hopefully someone else can do this.
though about that previously as well as the firware worked for the dox. And has all the features i need.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Mon, 13 August 2012, 06:36:09
Finished my build now I just need some firmware that fits my layout as well what the caps say is not what the keyboard does.



(http://img.photobucket.com/albums/v519/TheProfosist/GeekHack/Phantom_Template_v14.png)

(http://img.photobucket.com/albums/v519/TheProfosist/GeekHack/Phantom_Template_v13colorideaTEMP4.png)

(http://img.photobucket.com/albums/v519/TheProfosist/GeekHack/7bitCustom3LayerDefaultWASDTEMP4.png)

(http://img.photobucket.com/albums/v519/TheProfosist/GeekHack/7bitCustom3Layer1WASDTEMP4.png)
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: riffautae on Mon, 13 August 2012, 12:51:34
I played with the tmk firmware back when this all first started: https://github.com/riffautae/tmk_keyboard (https://github.com/riffautae/tmk_keyboard)
I wrote the code to map the LED's and keys proper.
I couldn't get anything to run though, I expect this was my build environment. When I get my board I will play with it more.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: captain on Mon, 13 August 2012, 16:32:13
What language is that even?

I linked to the github page above but that may have been a bit secluded https://github.com/BathroomEpiphanies/Teensy-Keyboard

I made the code more general, moving model specific functions out of the main file. Pins, layout, AVR chip, CPU speed, and so on is defined in the make file. I will remove the "Phantom-Firmware" repository. Right away may be just as well =)

That's Ruby!  I never liked C, or any of its derivatives.

Thanks for the github link!  At least now I have a clue what we are talking about here.  :-)

I totally get the name change.  Good choice.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: litster on Mon, 13 August 2012, 16:40:42
Ruby?!  How do you get Ruby to run on Teensy?

/sarcasm
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Tranquilite on Tue, 14 August 2012, 01:32:41
I played with the tmk firmware back when this all first started: https://github.com/riffautae/tmk_keyboard (https://github.com/riffautae/tmk_keyboard)
I wrote the code to map the LED's and keys proper.
I couldn't get anything to run though, I expect this was my build environment. When I get my board I will play with it more.

I hope you get your board soon, because I built your firmware and tested it, and all I got was three blinks of the LEDs. None of the keys did anything which was less than I got by building the macway source.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: mkawa on Tue, 14 August 2012, 08:30:14
can someone start building a list of things (preferably on the wiki?) that we need done to the phantom firmware? my parts are in LA with reaper, but i do have a number of teensies and if nothing else, finally have a test execution environment..
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Tue, 14 August 2012, 08:46:25
I'm in the midst of figuring out how to modify the LED brightness, have to build a build VM first.  Also, would be nice to have one of each layout available already built.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: agor on Tue, 14 August 2012, 10:51:36
Got everything set up and waiting. Just needs to arrive in germany now :(
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: litster on Tue, 14 August 2012, 11:38:36
These two hex files are from the original source code from prins.  They work.
[attachurl=1]
[attachurl=2]

This one is from a recent github source.  For PHANSI.

[attachurl=3]
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: litster on Tue, 14 August 2012, 11:56:35
can someone start building a list of things (preferably on the wiki?) that we need done to the phantom firmware? my parts are in LA with reaper, but i do have a number of teensies and if nothing else, finally have a test execution environment..

I have a future firmware feature list on the OP of this thread.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: agor on Tue, 14 August 2012, 13:19:19
Is there any information to read about usb keyboard development?

e: besides the info on pjrc, obviously
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Tue, 14 August 2012, 17:16:57
I'm in the midst of figuring out how to modify the LED brightness, have to build a build VM first.  Also, would be nice to have one of each layout available already built.

The LED brightness control is located in phantom.c (at the moment at least). OCR1B/C can be set to a  value between 0 and 255. I think both 0 and 255 are ok, but there may be some exception for those. In fact I think 0 isn't completely turned off in fast PWM mode. But it is only the on brightness that is controlled by these registers.
Code: [Select]
/* LEDs are on output compare pins OC1B OC1C
   This activates fast PWM mode on them.
   Prescaler 256 and 8-bit counter results in
   16000000/256/256 = 244 Hz blink frequency.
   LED_A: Caps Lock
   LED_B: Scroll Lock */
/* Output on PWM pins are turned off when the timer
   reaches the value in the output compare register,
   and are turned on when it reaches TOP (=255). */
void setup_leds(void) {
  TCCR1A |= // Timer control register 1A
    (1<<WGM10) | // Fast PWM 8-bit
    (1<<COM1B1)| // Clear OC1B on match, set at TOP
    (1<<COM1C1); // Clear OC1C on match, set at TOP
  TCCR1B |= // Timer control register 1B
    (1<<WGM12) | // Fast PWM 8-bit
    (1<<CS12); // Prescaler 256
  OCR1B = 250; // Output compare register 1B
  OCR1C = 250; // Output compare register 1C
  // LEDs: LED_A -> PORTB6, LED_B -> PORTB7
  DDRB &= 0x3F;
  PORTB &= 0x3F;
}
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Tue, 14 August 2012, 20:07:25
I had figured that much, but without building it a few times and seeing the brightness change to prove me right I didn't want to just claim I had the answer.  Thanks :)
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Tranquilite on Wed, 15 August 2012, 01:39:38
My LED's are so bright, that the only setting that doesn't burn holes in my eyes is 1. I probably should have used stronger resistors than the 100 ohm ones I have in there, but they were the only ones I had on me at the time.

can someone start building a list of things (preferably on the wiki?) that we need done to the phantom firmware?

The only things I think we need are media keys and programmable layers, along with whatever other crazy features we can dream up.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Wed, 15 August 2012, 02:07:33
My LED's are so bright, that the only setting that doesn't burn holes in my eyes is 1. I probably should have used stronger resistors than the 100 ohm ones I have in there, but they were the only ones I had on me at the time.

can someone start building a list of things (preferably on the wiki?) that we need done to the phantom firmware?

The only things I think we need are media keys and programmable layers, along with whatever other crazy features we can dream up.

I think I actually figured out that the timer used for the PWMing is a 16 bit one. And only 8 are used at the moment. It should be possible to use more bits and get a bunch more intensity settings. There is some datasheet pages to plow through, but I am sort of getting the hang of that.with a 1 and 16 bits you should get 1/65536th instead of 1/256th of the full brightness =D That is 1/256th of what you have at the moment.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: harrison on Wed, 15 August 2012, 07:58:06
My LED's are so bright, that the only setting that doesn't burn holes in my eyes is 1. I probably should have used stronger resistors than the 100 ohm ones I have in there, but they were the only ones I had on me at the time.

can someone start building a list of things (preferably on the wiki?) that we need done to the phantom firmware?

The only things I think we need are media keys and programmable layers, along with whatever other crazy features we can dream up.

i've got a number of different options for LEDs, and my concern is also that the resistor that I use might be either too strong to not strong enough by the time i've got key caps installed.  My plan (assuming clearance isn't an issue) is to actually position them on the back of the PCB so that I can replace them without having to remove the plate to get  at them.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Wed, 15 August 2012, 17:07:46
Would anybody be able to at least modify the default firmware to work for a 7bit layout, preferably one that matches my default layer?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: litster on Wed, 15 August 2012, 17:59:43
since your layout is unique to you, you maybe better off doing this yourself.  It is fairly simple.  Install the C compiler (http://www.pjrc.com/teensy/gcc.html) and teensy loader (http://www.pjrc.com/teensy/loader.html).  Then get the source code (https://github.com/BathroomEpiphanies/Teensy-Keyboard). 

In phantom.c, there is this table:

Code: [Select]
const uint8_t is_modifier[NKEY] = {
  true,            true,            false,           false,           false,           false,  // COL  0
  true,            false,           false,           false,           false,           false,  // COL  1
  true,            false,           false,           false,           false,           false,  // COL  2
  NA,              false,           false,           false,           false,           false,  // COL  3
  NA,              false,           false,           false,           false,           false,  // COL  4
  NA,              false,           false,           false,           false,           false,  // COL  5
  NA,              false,           false,           false,           false,           false,  // COL  6
  false,           false,           false,           false,           false,           false,  // COL  7
  NA,              false,           false,           false,           false,           false,  // COL  8
  NA,              false,           false,           false,           false,           false,  // COL  9
  true,            false,           false,           false,           false,           false,  // COL 10
  true,            false,           false,           false,           false,           false,  // COL 11
  false,           NA,              false,           false,           NA,              false,  // COL 12
  true,            true,            false,           false,           false,           false,  // COL 13

  false,           NA,              NA,              false,           false,           false,  // COL 14
  false,           false,           NA,              false,           false,           false,  // COL 15
  false,           NA,              NA,              false,           false,           false,  // COL 16
};

const uint8_t layout[NKEY] = {
//ROW 0            ROW 1            ROW 2            ROW 3            ROW 4
  KEY_LEFT_CTRL,   KEY_LEFT_SHIFT,  KEY_CAPS_LOCK,   KEY_TAB,         KEY_1,              KEY_ESC,        // COL  0
  KEY_LEFT_GUI,    KEY_PIPE,        KEY_A,           KEY_Q,           KEY_2,              KEY_TILDE,      // COL  1
  KEY_LEFT_ALT,    KEY_Z,           KEY_S,           KEY_W,           KEY_3,              KEY_F1,         // COL  2
  NA,              KEY_X,           KEY_D,           KEY_E,           KEY_4,              KEY_F2,         // COL  3
  NA,              KEY_C,           KEY_F,           KEY_R,           KEY_5,              KEY_F3,         // COL  4
  NA,              KEY_V,           KEY_G,           KEY_T,           KEY_6,              KEY_F4,         // COL  5
  NA,              KEY_B,           KEY_H,           KEY_Y,           KEY_7,              KEY_F5,         // COL  6
  KEY_SPACE,       KEY_N,           KEY_J,           KEY_U,           KEY_8,              KEY_F6,         // COL  7
  NA,              KEY_M,           KEY_K,           KEY_I,           KEY_9,              KEY_F7,         // COL  8
  NA,              KEY_COMMA,       KEY_L,           KEY_O,           KEY_0,              KEY_F8,         // COL  9
  KEY_RIGHT_ALT,   KEY_PERIOD,      KEY_SEMICOLON,   KEY_P,           KEY_MINUS,          KEY_F9,         // COL 10
  KEY_RIGHT_GUI,   KEY_SLASH,       KEY_QUOTE,       KEY_LEFT_BRACE,  KEY_EQUAL,          KEY_F10,        // COL 11
  KEY_APPLICATION, NA,              KEY_BACKSLASH,   KEY_RIGHT_BRACE, NA,                 KEY_F11,        // COL 12
  KEY_RIGHT_CTRL,  KEY_RIGHT_SHIFT, KEY_ENTER,       KEY_BACKSLASH,   KEY_BACKSPACE,      KEY_F12,        // COL 13

  KEY_LEFT,        NA,              NA,              KEY_DELETE,      KEY_INSERT,         KEY_PRINTSCREEN,// COL 14
  KEY_DOWN,        KEY_UP,          NA,              KEY_END,         KEY_HOME,           KEY_SCROLL_LOCK,// COL 15
  KEY_RIGHT,       NA,              NA,              KEY_PAGE_DOWN,   KEY_PAGE_UP,        KEY_PAUSE,      // COL 16
};

Change it to what you want, and then build the .hex file.  Upload it to your teensy.  Rinse and repeat.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Fri, 17 August 2012, 01:08:23
What the best way to find what row and column the switch is in as i believe some of the additional function row keys are actyally in the row of the spacebar, though i may be wrong


Also can anyone think of a simple way if throwing an if/then in when a switch is pressed to check if another switch is held down and if so to do a different function, should be a simple dirty way of getting a layer in there in a way...
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Fri, 17 August 2012, 02:13:53
The row and column number of each switch is written on the PCB.

The value at position col*6+row in the array "pressed" is 1 if that key is pressed and 0 otherwise. Remember that rows and columns are zero-indexed.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Fri, 17 August 2012, 15:56:32
The value at position col*6+row in the array "pressed" is 1 if that key is pressed and 0 otherwise. Remember that rows and columns are zero-indexed.
ok so what would be needed the would probably be an if/then, another variable, and another array. Though I am mostly lost as to how to make it work and havnt even found the part you talked about yet. I know very little about programming though it seems enough to be dangerous.


my idea:

after checking if the key is pressed you would have to check is specifically one of the "Fn" keys is pressed if so grab from a the "Fn array" if not grab from the "standard array"
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Mon, 20 August 2012, 11:32:51
Just figured I'd throw this up.  It doesn't do anything but look nifty so far.  The intent is to have it output the is_modifier and layout arrays to be copy pasta'd into the phantom.c file.

[attach=1]

Title: Re: Building Phantom Hardware and Firmware Mods
Post by: litster on Mon, 20 August 2012, 12:05:34
alaricljs, this pretty sweet!
Title: Re: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Mon, 20 August 2012, 14:41:54
alaricljs, this pretty sweet!
agreed now if even one layer was made to work you could add that in as well.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: litster on Mon, 20 August 2012, 15:22:52
I think some of these features would be good to have next:

•reset with key combos without opening up the case to push the reset button on Teensy for easy flashing
•re-program keymaps without loading new firmware like AIKON.
•multiple layers
•NKRO over USB while maintaining BIOS boot compatibility
•media keys
•programmable macros

ic07 has been building teensy firmware for ergo Dox.  Wonder if he could help, or someone takes his code and port it over for Phantom.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: agor on Mon, 20 August 2012, 15:34:41
ic07 has been building teensy firmware for ergo Dox.  Wonder if he could help, or someone takes his code and port it over for Phantom.

Where can I find this code?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: jdcarpe on Mon, 20 August 2012, 15:41:30
litster, can you re-post the drawing file attachments for the Phantom plates? Or am I missing them somewhere? There was a .zip file with the drawings of all the plates. Also, I thought bpiphany (formerly PrinsValium) had posted the KiCAD files for the PCB...
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: litster on Mon, 20 August 2012, 15:44:59
Where can I find this code?

on here: https://github.com/benblazak/ergodox-firmware (via http://ergodox.org/Firmware.aspx)
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: litster on Mon, 20 August 2012, 15:47:22
One difference is that Phantom uses all Teensy pins, while ergoDox doesn't, as it has few keys, therefore fewer rows and columns are needed.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Tranquilite on Mon, 20 August 2012, 18:44:15
So I've got basic function layer support working with one other layer that is active only when the function key is held down. This is only useful if you have a locking cherry switch installed, so I'm working on expanding this to something more useful.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Mon, 20 August 2012, 18:53:00
So I've got basic function layer support working with one other layer that is active only when the function key is held down. This is only useful if you have a locking cherry switch installed, so I'm working on expanding this to something more useful.
Thats fine for me as I have a HHKB esk layer. Also I think even Hazu's firmware that was used for the DOX was only able to do that also toggling layers without a locking switch wasnt possible
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Tranquilite on Mon, 20 August 2012, 23:37:38
Ok, so I've implemented toggle-able function layers now. I currently have 7 layers implemented (it should be fairly easy to add more) by pressing FN + 0-6, unfortunately, the way I programmed it lets you only map one function key.

I haven't really ever contributed anything source-wise before, so I'll just post my source here, and hopefully it shouldn't be too hard to get it incorporated into the main repository.  I'm pretty sure the only files I modified were phantom.c, phantom.h, and teensy_keyboard.c.

Some notes:
Everything that needs to be configured is located in phantom.c. The function key, as well as the keys needed to change layers are referenced by switch position (E.g. SW4_9 is switch where '0)' usually is). Mapping the layers is the same as previously, except that there is a layout array for each layer. Currently all of the layouts are the same ansiwin layout.

Umm. Enjoy! (Now somebody get media keys working :P)

EDIT: Also, if you want to have hold-function-key-to-switch-to-other-layer functionality, you can uncomment the other send() function in teensy_keyboard.c.

EDIT2: I've also found another problem with my function code. All layers use the same is_modifier array, so any key that is a modifier must remain a modifier (no switching caps_lock and control via layers). I'll see if I can find a graceful way of dealing with this.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Tue, 21 August 2012, 04:20:59
And my phantom is finally alive thanks to Tranquilite. It is definitely going to take some getting used to especially with the split up spacebars but i think it will come in time probably making me want a second one for myself so one can stay at home and one can come with me.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: CanadaRox on Sat, 25 August 2012, 17:34:09
Is there any special technique for installing Costar stabilizers?  The white hook part barely fits between the black arms when they aren't installed.  When I put them in the mounting plate they squeeze together too much and the key can't even move.  I've tried removing them and putting them back in a few times hoping it hadn't seated right but its always the same.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Sat, 25 August 2012, 19:09:17
Use a micro straight blade screw driver and gently press the black plastic piece toward the plate edge so that it engages properly.  You may or may not hear a click as it seats itself.  The tolerance is very tight.

Oh yeah, by gently I mean as hard as you can with confidence that if you slip you won't destroy it or cut your hand open.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: litster on Sat, 25 August 2012, 22:40:08
The red areas need to be fully seated onto the plate.  Follow alaricljs's suggestion.
[attach=2]

Also, the stabilizer clips are made of plastic, so the width could vary.  You can see the difference between these two in the picture below:
[attach=1]

Besides making sure the clips are seated perfectly, you can also gently bend the clip with your figures to make the gap wider.  I did that to a few of mine and the wide keys don't stick any more.

There is one more trick up my sleeves if you still can't get it to work.  But that is a tiny bit extreme :-)
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Mon, 27 August 2012, 04:09:27
Has anyone been able to program media and mouse keys? I really need them for my layout as it feels incomplete as it is now.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: WhiteFireDragon on Mon, 27 August 2012, 13:06:40
Are you guys interested in an aluminum metal case? If someone can provide the CAD file for something that fits or an exact duplicate of the current stock filco case, I might be able to get a friend of mine to make it. He works at a CNC machine shop.

I wish I knew how to draw it up on autoCAD.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Mon, 27 August 2012, 14:59:58
Are you guys interested in an aluminum metal case? If someone can provide the CAD file for something that fits or an exact duplicate of the current stock filco case, I might be able to get a friend of mine to make it. He works at a CNC machine shop.

I wish I knew how to draw it up on autoCAD.
Im good im just using a PLU-87 case for mine.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Wed, 29 August 2012, 05:34:47
New Phantom layout finalized and template for WASD made by hazeluff


(http://img.photobucket.com/albums/v519/TheProfosist/GeekHack/7bitCustom4LayerDefaultWASDTEMP1.png)

(http://img.photobucket.com/albums/v519/TheProfosist/GeekHack/7bitCustom4Layer1WASDTEMP1.png)

(http://img.photobucket.com/albums/v519/TheProfosist/GeekHack/Phantom_v2.png)



Also just sent out to get a quote for the matching plate


(http://img.photobucket.com/albums/v519/TheProfosist/GeekHack/profosist.png)
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Wed, 29 August 2012, 05:39:58
Are you guys interested in an aluminum metal case? If someone can provide the CAD file for something that fits or an exact duplicate of the current stock filco case, I might be able to get a friend of mine to make it. He works at a CNC machine shop.

I wish I knew how to draw it up on autoCAD.

Give me dimensions and I can finalize one.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: telepete on Fri, 31 August 2012, 23:27:11
For you cats thinking about doing a case, my Phantom is naked and my wallet doesn't have the 350 hit points necessary for that MKC one. I'm in.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: WhiteFireDragon on Sat, 01 September 2012, 01:58:32
Are you guys interested in an aluminum metal case? If someone can provide the CAD file for something that fits or an exact duplicate of the current stock filco case, I might be able to get a friend of mine to make it. He works at a CNC machine shop.

I wish I knew how to draw it up on autoCAD.
Give me dimensions and I can finalize one.
I'm gonna order a digital caliper to get accurate measurements. Right now I only have a standard ruler :(. Any recommended micro calipers? Are the $10 ones on ebay any good?

For you cats thinking about doing a case, my Phantom is naked and my wallet doesn't have the 350 hit points necessary for that MKC one. I'm in.
Not even sure the $350 MKC case fits the phantom boards and plates.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Sat, 01 September 2012, 03:56:00
I'm gonna order a digital caliper to get accurate measurements. Right now I only have a standard ruler :(. Any recommended micro calipers? Are the $10 ones on ebay any good?
The differences between the cheap digital calipers and the expensive ones are that the expensive ones are absolute and don't break. It may measure a bit more accurately but even cheap ones measure two decimal points in mm fairly accurately, well, accurately enough for us anyway.

With non-digital calipers, I'd say the difference between a cheap and an expensive one is less noticeable. They don't break. The $10 ones on ebay will probably do fine. I just checked, there are even $1.50 ones, lol.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Sat, 01 September 2012, 04:21:36
Are you guys interested in an aluminum metal case? If someone can provide the CAD file for something that fits or an exact duplicate of the current stock filco case, I might be able to get a friend of mine to make it. He works at a CNC machine shop.

I wish I knew how to draw it up on autoCAD.
Give me dimensions and I can finalize one.
I'm gonna order a digital caliper to get accurate measurements. Right now I only have a standard ruler :(. Any recommended micro calipers? Are the $10 ones on ebay any good?

For you cats thinking about doing a case, my Phantom is naked and my wallet doesn't have the 350 hit points necessary for that MKC one. I'm in.
Not even sure the $350 MKC case fits the phantom boards and plates.

There has been CAD files for both the Phantom plates and PCB around. I don't know if that was before the crash, but I could remedy that =) Not exactly the same as Filco case measurements. So you may still want to take those anyway.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Sat, 01 September 2012, 14:19:06
For you cats thinking about doing a case, my Phantom is naked and my wallet doesn't have the 350 hit points necessary for that MKC one. I'm in.
if you need a cheap case just pick up a PLU-87 its a direct knockoff of a Filco.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: CanadaRox on Wed, 05 September 2012, 19:36:14
Use a micro straight blade screw driver and gently press the black plastic piece toward the plate edge so that it engages properly.  You may or may not hear a click as it seats itself.  The tolerance is very tight.

Oh yeah, by gently I mean as hard as you can with confidence that if you slip you won't destroy it or cut your hand open.
I managed to actually get the key installed, but I can't seem to avoid a fair amount of friction.  I can feel a little bit of resistance when lowering the key but it still gets stuck coming up if you don't release it very quickly.  With the switch removed the keycap moves freely with just the stabilizers but if I put the stem in the cap it causes a noticeable amount of friction on the stabilizers.

Are you guys interested in an aluminum metal case? If someone can provide the CAD file for something that fits or an exact duplicate of the current stock filco case, I might be able to get a friend of mine to make it. He works at a CNC machine shop.

I wish I knew how to draw it up on autoCAD.
I'd love to have an aluminum case but it really comes down to how much it is.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Wed, 05 September 2012, 20:36:52
BTW - For anyone that wants an easy way to remap their Phantom, I built this (http://geekhack.org/index.php?topic=35322.0).
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: litster on Wed, 05 September 2012, 22:08:02
Firmware modders, please keep the firmware compatible with alaricljs's tool.  If you need to change the mapping, please let alaricljs know so matching changes can be coordinated. 
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Tranquilite on Fri, 07 September 2012, 19:00:08
Ok, so I forked the main phantom firmware, and have it available here (https://github.com/Tranquilite0/Teensy-Keyboard). I'm new to using GIT, so I hope things are working just fine.

Since my last update, I've changed the firmware so that it no longer needs the is_modifier array (instead I changed the layout array to a 16bit integer array, and I set an extra bit on the modifiers so that I can do a bitwise comparison to determine if a key should be a modifier or not). I've also made it so that you can configure which function the LEDs are assigned in too, so you can now have your LEDs track num-lock, caps-lock, scroll-lock, compose or kana (though I have no idea what compose and kana are for).

As for comparability with alaricljs' tool, the only differences are that there are multiple layout arrays (named layout0 through layout6) which are now uint16_t instead of uint8_t, and there are no is_modifier arrays. Aside from that, I have kept the layout size and structure the same.

EDIT: I made some more changes, you can now use KEY_TEENSY_RESET in your layouts to jump to the teensy bootloader as if you had pressed the switch on the teensy. I'm sure this will be helpful for those who have their phantom in a case and don't want to open it up just to reprogram it. Also, I made it easier to switch between function key types (hold to change versus combination to change) and all you need to do is change the defined FUNCTION_TYPE in phantom.h.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Sat, 08 September 2012, 06:01:34
I never really liked the is_modifier solution. It is a bit silly to have a huge array like that for the very few modifiers, although it is very time efficient... Merging it with layout is at least a bit tidier. I'm not too fond of the mess it introduces in other places, or the need for 16-bit operations. My experience with pointers is that they usually lead you to a dark, cold hole in the ground... But would it be possible to do something like this without getting yourself hurt too bad?
Code: [Select]
const uint16_t kbmap[NKEY] = {is_modifier[0]character[0], is_modifier[1]character[1], ...};
const uint8_t is_modifier[] = (uint8_t[])kbmap;
const uint8_t layout[] = (uint8_t[])kbmap + 1;
[...]
for(col = 0, key = 0; col < NCOL; col++) {
  for(row = 0; row < NROW; row++, key+=2) {
    [...]
  }
}

Or there may just be some assembler instructions to operate on the different parts of the 16-bit variables I suppose..
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Tranquilite on Sat, 08 September 2012, 16:38:59
Personally I find that pointers are extremely useful as long as you understand how they work and since arrays are just pointers to the first element of the array, I make it pretty easy to switch between layout arrays by creating a pointer that holds the address of the current layout array.

As for your suggestion for making layouts, I see that you are suggesting putting putting the contents of a layout array as well as the contents of an is_modifer array into a single kbmap array. I suppose it would work, but it seems a bit more complicated than the method that I implemented where each 16bit value in the layout is treated like two one byte values with the first byte specifies if it is a modifier or a regular key, and the second byte specifies what kind of modifier/key it is.

For example:
A = 0x00 04
Left Alt = 0x01 04

When my code looks at these values, it first blanks out the second byte via a bitwise and ( & 0xFF00) and then checks to see what type of key has been pressed:

A  becomes 0x00 00 == 0x00 00, so it knows that it is a regular key and stuffs 0x00 04 into the queue to be sent via usb_send()

Left alt becomes 0x01 00 == 0x01 00, so it knows that it is a modifier, so it blanks out the first byte with another bitwise and (0x01 04 & 0x00FF = 00 04)  and stuffs it into mod_keys.

While this seems kind of complicated, bitwise comparisons are very efficient as the compiler can usually deduce that only a few bits need to be flipped and checked. Additionally, this will be really useful for media keys and mouse keys (if somebody ever gets around to implementing them), as you can use the first byte to specify those as well.

The other benefit is that this is completely transparent to the user, as the layout[] array still looks exactly the same as it did previously (aside from being filled with 16bit integers instead of 8bit integers), and the only thing that has changed in the code are the definitions in usb_keyboard.h and the way that the program checks for modifiers.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Sat, 08 September 2012, 16:55:51
I'm totally following your 16-bit values to define keys. That was smart =) Only the modifier definitions in the usb_keyboard.h file need to explicitly have the "is_modifier byte". The zero byte for all other keys is added automatically.

I may have been a bit shady in my explanation. I wanted to use your 16-bit key definitions in an array of 16-bit values. But with some pointer magic create two new 8-bit arrays. One that points to the most significant byte of the 16-bit array. Every other element in this array is a is_modifier boolean. The second 8-bit array points to the least significant bit of the first element in the 16-bit array, so that every other entry in this array is a character. (This of course is depends on if the MSB is first or last...) It is perhaps a bit of a dirty trick. But it allows for all 8-bit operations later on, and the check if a key is a modifier is a bit clearer. I don't think the average user needs to get bogged down in how that part of the firmware works. Setting up their own layers probably is plenty enough.

I agree, I love pointers screwing my mind up =D It is very useful to have full control, but that only happens once you actually know what you are doing...
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Tranquilite on Sat, 08 September 2012, 17:40:26
Oh ok, I understand what you want to do now, and I am pretty sure it would work too although you may have to typecast the 16bit integer pointer into an 8bit integer pointer in order to accomplish this. The thing I am confused about now is why we would want to do this. Doing all 8 bit operations later would be nice I guess, but you either need to make one 16 array work like two 8bit arrays (by incrementing by two each time), or go through the effort to make a bunch of new 8bit arrays. Though if we do this, we wouldn't want to treat the is_modifer array as a boolean because eventually I would like to have bytes to define media and mouse keys (though somebody else is going to have to figure out the USB HID enumeration for those, because I still don't understand how that works). I've also already defined 0xFFFF as the KEY_TEENSY_RESET to cause the teensy to jump to the bootloader without needing to press the button on the teensy.

I suppose my concern is that while this would make the modifier checks clearer, it would just make some other part of the code more complicated. I'll look into implementing it though and see which way I like more.

The problem with programming is not always finding a way to implement something, but rather finding the best way to implement it.

EDIT: One a side note, if anybody here has a better understanding of USB HID implementation, this document here (http://www.ece.rochester.edu/~parihar/pres/Report_MultiMedia-KB.pdf) seems to outline a pretty good way to implement media keys.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Sat, 08 September 2012, 17:50:00
I tried to make up some c code in my earlier post with type casts and incrementing a memory address. I'm not quite familiar with those operations, I just know that adding a number to a pointer can be a bit confusing..

These lines just became a mess I think, and a bunch of extra 16-bit operations. But if you want to be able to use the most significant byte to indicate other things  like mouse or media keys, or whatever, I see how it can be hard to get around them.
Code: [Select]
if((layout[key] & 0x0100) == 0x0100)
  mod_keys |= (layout[key] & 0x00FF);
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Tranquilite on Sat, 08 September 2012, 18:00:54
Oh yeah, I forgot about that comparison. Right now it is only checking if the first bit of the first byte is set, and would obviously malfunction if I implemented something other than modifiers and regular keys. This can by fixed by changing the code to:

Code: [Select]
if((layout[key] & 0xFF00) == 0x0100)
  mod_keys |= (layout[key] & 0x00FF);

EDIT:Ok, so I made a couple functions that should work like the arrays that you were trying to create, but I haven't tested them yet so I am not sure if they will actually work.

Code: [Select]
uint8_t layout_value(uint8_t index){ //Just make sure that there are never more than 128 keys!
//create new layout pointer, type cast it to 8 bit pointer
uint8_t *layout_val = (uint8_t*) layout;
//index now needs to be twice as big plus one
index *= 2;
index++;
return layout_val[index];
}

uint8_t layout_type(uint8_t index){ // Just make sure that there are never more than 128 keys!
//create new layout pointer, type cast it to 8 bit pointer
uint8_t *layout_val = (uint8_t*) layout;
//index now needs to be twice as big
index *= 2;
return layout_val[index];
}

I suppose you could do this without creating a function for it by just making sure that your index is twice as big (and shifted by one if you want the 2nd byte).
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Sat, 08 September 2012, 18:59:04
Almost there =) What I want is to shift the layout_value pointer one byte. That way you can access both layout_type and layout_value with the same index variable. No incrementing every time you are accessing the value. The only funk is that you need to increment the index variable by 2 to advance one position. The 16-bit layout array is actually unused in the code. It is only there as a helper to facilitate tidier layout descriptions.

Code: [Select]
uint16_t layout[NKEY] = {layout_type[0]layout_value[0], layout_type[1]layout_value[1], ...};
uint8_t *layout_type = (uint8_t *)kbmap;
uint8_t *layout_value = (uint8_t *)kbmap + 1;
...
for(int row=0; row<NROW; row++, index+=2)
  if(layout_type[index] == interesting)
    do_something_with(index_value[index])
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Wed, 12 September 2012, 16:36:21
Got my custom plates from the laser cutter today and their really nice and fit the switches perfectly.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Wed, 12 September 2012, 16:37:11
What about the stabilizers?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Wed, 12 September 2012, 16:44:50
What about the stabilizers?
i guess i dont know what your asking about. I only have one key that needs stabilizers and that the spacebar I just picked some costar ones up from WASD.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Wed, 12 September 2012, 17:56:06
fit the switches perfectly

^^ What about the stabilizer(s)  fitting?   Costar have really tight tolerances.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Wed, 12 September 2012, 18:02:54
fit the switches perfectly

^^ What about the stabilizer(s)  fitting?   Costar have really tight tolerances.
They fit in... I have yet to test with an actual spacebar though. I can once i get home if you want.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Wed, 12 September 2012, 19:06:35
fit the switches perfectly

^^ What about the stabilizer(s)  fitting?   Costar have really tight tolerances.
They fit in... I have yet to test with an actual spacebar though. I can once i get home if you want.
Their a touch tight and provide too much friction. With the spacebar on conventionally it wouldnt return up if you hit it in the middle if you hit it elsewhere there was about a 70% chance you would get it to return. Now it you put the spacebar on backwards which is the way i prefer it it actually works like 90% on the time. I think I may put a stoner spring in the spacebar and lube up the stabilizers and their clips and se it that makes a difference.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: litster on Wed, 12 September 2012, 20:22:03
are you using 6.25x spacebar?
Title: Re: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Wed, 12 September 2012, 22:03:03
are you using 6.25x spacebar?
yep
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Wed, 12 September 2012, 23:57:34
Also I swapped the spring out with a clear spring and at least backwards the spacebar is working 100% and is even snappy.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Fri, 14 September 2012, 10:40:24
Why are there no pics posted of people building these? I ordered diodes three weeks ago from ebay but haven't gotten them yet, so I soldered the teensy for now. I have sort of gathered parts on the side because I missed the original GB.

Here is proof that one can do it with a $5 soldering iron and a way too large tip. Don't mind the solder flux.
http://imgur.com/a/sfXSS

I can't wait for my diodes to arrive.

Edit: Thanks to a certain someone who generously gave up his Phantom to me.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: litster on Fri, 14 September 2012, 12:45:23
damorgue, you may want to make sure the teeny solder points are flush with the PCB.  Switches around they may not sit perfectly if the solder blob are above the PCB plane.  If you have switches on hand, try testing by putting switches in those switch positions around the teensy legs to make sure the switch sit flat on the PCB.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Fri, 14 September 2012, 12:54:12
Since I posted that, I received diodes as well as a flat side cutter(!). I used it to adjust them. I tried to check if the switch was flush before adjusting them and couldn't notice any leaning, but better safe than sorry.

Edit: I didn't know they were this cheap and of that high quality. I bought:
http://www.ebay.com/itm/ws/eBayISAPI.dll?ViewItem&item=190709158731&ssPageName=ADME:L:OU:GB:3160
It ships from Europe and not Asia which meant it arrived really fast and I am so amazed at how well it works. I began to search for one after I saw someone mention theirs in a thread: I forgot who it was though.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Fri, 14 September 2012, 13:03:40
Flat side cutters are o so helpful.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Fri, 14 September 2012, 15:21:40
My PCB is missing a hole, is that common for all the boards? I don't think those holes ares even necessary anymore to open the switches without desoldering. Lower left of the F11 key?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: litster on Fri, 14 September 2012, 15:26:17
Can you post a picture of the missing hole?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Fri, 14 September 2012, 15:42:49
http://i.imgur.com/NubN7.jpg
Lower left of F11. It does not have coating, but there is no hole. Are all PCBs like that?

Edit: I took the picture against a white surface in direct light to make it more noticeable. My desk is almost the same color as the PCB.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: litster on Fri, 14 September 2012, 16:04:00
I will have to check when I get home.  If you are talking about the yellow dot, yeah, you don't need it any more.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Fri, 14 September 2012, 17:31:02
That does look a bit odd...
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Fri, 14 September 2012, 17:32:30
I would have guessed that they were all identical since the holes aren't drilled manually.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Fri, 14 September 2012, 18:12:13
Well, as I said and litster confirmed, it is no issue´, but the question remains: Is it the only one, and have someone gotten one where they have missed a more critical hole? It seems weird to me that a proces which ought to be CNC could even yield such a deficiency.

I have a couple of thoughts I would like to have confirmed:
A) So far, no one as implemented the mx lock switch in the firmware, correct?
B) The LEDs are connected in parallel with their counterparts under the caps. Both of them could thus be used, 4 LEDs in total, correct?
C) Are the resistors located before or after the junction where the LEDs go parallel? I am assuming that they are located within the split and both will have to be used if one wants both Caps lock LEDs to light up, on resistor for each LED. I am planning to connect both and use a small switch to select which one I want to use.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Fri, 14 September 2012, 18:56:35
You've got one of a kind, congratulations =D I don't know if they may perhaps miss a hole if the drill bit breaks or something like that. Or if the machine doesn't pick it up as it should.

A) Locking switches shouldn't need any special routines. As long as they are pressed, they are.. pressed. Well actually it may be wise to assure that they don't fall off the 6KRO i guess..
B) The LED under the caps lock has it's own resistor, as does usual Filco Caps Lock LED. The two Scroll Lock LEDs share the same resistor.
C) See B.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Findecanor on Fri, 14 September 2012, 19:10:16
A) So far, no one as implemented the mx lock switch in the firmware, correct?
I don't know about the Phantom firmware, but I know that Hasu did some kind of emulation of a locking Caps Lock in his ADB-to-USB protocol converter code. Because the mode is controlled by the USB host and not the keyboard and the controller can not make a switch lock or unlock, emulation was not perfect.
BTW, let me know if you need an extra MX Lock switch.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Fri, 14 September 2012, 19:10:59
Yay, one of a kind. I am a unique little snowflake, just like everybody else.

A) Locking switches shouldn't need any special routines. As long as they are pressed, they are.. pressed. Well actually it may be wise to assure
I meant as in more advanced use, like toggling caps lock. Yes, I realize that there will be a problem when it is out of sync if one were to press caps lock on another keyboard for instance.

Anyway, thanks for your answers, I won't have to check the traces of the LEDs now. Just to confirm before I start breaking stuff, does it look something like this?
http://i.imgur.com/TkuBo.png
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Findecanor on Fri, 14 September 2012, 19:21:42
From ADB to USB keyboard converter for Teensy (http://geekhack.org/index.php?topic=14290.0):
I tried the "Locking Caps Lock"(0x82) instead of Caps Lock(0x39) in Windows and it failed to handle the key.
I suppose the only solution is to send two packets for each change in state of the caps lock - one with the key down, and then one with the key up a millisecond or so later.

That appears to be how the Belkin adapter handles it.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Fri, 14 September 2012, 19:40:47
Well, I guess it is either a complicated solution like that or you have to deal with the possibility of desync between caps lock state and actual switch toggle state.

YAY! It is alive and running now btw
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Tranquilite on Fri, 14 September 2012, 23:01:04
It wouldn't be too hard to write function that checks top see if the caps lock switch is down, and if it is down it can make sure that capslock is always on. I wrote a similar function that would make it so that numlock is always on when my secondary function layer is active so that I can use the keypad without needing to worry about whether my numlock is on.

I could implement a caps lock for locking switches if anybody wants, but I wont bother if there is no demand.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Sat, 15 September 2012, 04:30:10
Anyway, thanks for your answers, I won't have to check the traces of the LEDs now. Just to confirm before I start breaking stuff, does it look something like this?
http://i.imgur.com/TkuBo.png

Like this actually, but that is only because there are two LED positions under the CapsLock
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Sat, 15 September 2012, 05:16:16
Thanks Bpiphany

It wouldn't be too hard to write function that checks top see if the caps lock switch is down, and if it is down it can make sure that capslock is always on. I wrote a similar function that would make it so that numlock is always on when my secondary function layer is active so that I can use the keypad without needing to worry about whether my numlock is on.

I could implement a caps lock for locking switches if anybody wants, but I wont bother if there is no demand.

I would appreciate it at least. Do you happen to know how insert works? It is sort of a toggle button, but it differs from the other lock keys and I don't think the keyboard gets any information from the OS regarding its current state. I was sort of thinking about having a mx lock switch on insert as well as all the lock keys, but I think that the insert key would be a hassle.

Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Tranquilite on Sun, 16 September 2012, 02:21:18
Insert is just a regular key like any other, and any toggleability is done outside of the firmware by the OS or software.

I'm thinking it would be going overboard to put mx lock switches on all of the lock keys seeing as how the firmware already does a good job of tracking two locks with LEDs. Also, I find that mx lock switches are a bit less dependable because they don't always lock when you press them.

EDIT: I have now added locking num/caps/scroll lock switches. Just use KEY_LOCK_CAPS/NUM/SCROLL in your layouts.
I also changed a few 16bit integers back to 8bit integers because I realized they didn't need to be 16bits.
As usual, my fork of the phantom firmware can be found here (https://github.com/Tranquilite0/Teensy-Keyboard).
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Sun, 16 September 2012, 08:34:09
I get some weird behavior. Note that I haven't soldered the switches yet, and I am guessing that the rapid key presses might be what is causing them. Below is what the keyboard outputs in notepad. First J was pressed, then H and then G. Note that some other characters sneak in and even caps lock at one point. I did press enter manually when I changed letter to test. The line break in H and G are fake however. I am assuming that it is something in the debouncing which causes this, but I am a bit worried that it will be present if one were to press a switch very fast as well, since it happens so often in this test.

Code: [Select]
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJFJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJFJJJJJJJJJ

HHHHHHHHHSHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
HHHHHHHHHHHHHH

ÖGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGKGGGGGGGGGGGGGGGGGGGG
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Sun, 16 September 2012, 08:37:49
I had this behavior as well when testing the firmware for the replacement controller. I was using a board without switches, shorting the pads out with a pair of tweezers. When I got my new tenkeyless, switches in place, it was completely gone. And no-one else with a Phantom has reported these kind of issues...
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: dirge on Sun, 16 September 2012, 09:22:21


also anyone got an iso hex file?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Findecanor on Sun, 16 September 2012, 16:07:37
I found out that you can't open mounted switches that have a stabiliser, because the holes are different than for other switches. I fixed this by filing down two tabs. This mod does not seem to have any effects on Costar-style stabilisers, but I dunno about Cherry-style stabilisers. In the picture below, I have filed down the tab on the left side but not the one on the right.

I also found out that spacing between key groups on the Phantom is the same as on a Key Tronic KT-800 or KT-1000. This means that you could rebuild a case from one of them. However, there is a lot of space around all the keys, meaning that it would not look good. The left and right edges of the Phantom plate would be visible..
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Sun, 16 September 2012, 16:18:29
also anyone got an iso hex file?

I have been reworking the firmware quite a bit. One change is that the mapping is located in a file of it's own. So there will be ISO ANSI ANSIWIN and ISOWIN files when I update the github repository. I can probably squeeze that in tonight after work, before I go to bed...
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: longweight on Sun, 16 September 2012, 17:16:04
Man I wish that I bought one of these :( missed out!
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Sun, 16 September 2012, 17:20:33
Man I wish that I bought one of these :( missed out!
I have 2 7bit Custom plates and 2 sets of keycaps that match my layout but no PCBs, sorry.
Title: Re: Re: Building Phantom Hardware and Firmware Mods
Post by: longweight on Sun, 16 September 2012, 17:26:54
Man I wish that I bought one of these :( missed out!
I have 2 7bit Custom plates and 2 sets of keycaps that match my layout but no PCBs, sorry.

Ah that is a shame! Do you think that I stand much chance? Ideally after ANSI with Win key.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Sun, 16 September 2012, 17:36:15
Man I wish that I bought one of these :( missed out!
I have 2 7bit Custom plates and 2 sets of keycaps that match my layout but no PCBs, sorry.

Ah that is a shame! Do you think that I stand much chance? Ideally after ANSI with Win key.
I dont think there are any extra PCBs floating around I think that lootbag was selling his coimpleted Phantom in the classifieds though. Its a 7bit custom... if yo want ansi win yo ushould probably have to sink like an additional $50 in to get a new plate then desolder and resolder the thing, which wouldnt be the most cost effective. If your going that far you might want to consider getting like I got that allows a standard spacebar and an ansi win 1st row but you still can have a full number pad. A example of my layout after a plate change is below:

(http://img.photobucket.com/albums/v519/TheProfosist/GeekHack/7bitCustom4LayerDefaultWASDTEMP2.png)

(http://img.photobucket.com/albums/v519/TheProfosist/GeekHack/7bitCustom4Layer1WASDTEMP2.png)
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Sun, 16 September 2012, 21:44:10
Ah that is a shame! Do you think that I stand much chance? Ideally after ANSI with Win key.

If all you are looking for is a standard layout ANSI w/ winkey then pick up a Filco TKL and get in on bpiphany's replacement controller.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Sun, 16 September 2012, 22:14:48
Ah that is a shame! Do you think that I stand much chance? Ideally after ANSI with Win key.

If all you are looking for is a standard layout ANSI w/ winkey then pick up a Filco TKL and get in on bpiphany's replacement controller.
Totally forgot about that even though im building 3 of those.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Mon, 17 September 2012, 03:42:59
also anyone got an iso hex file?

I have been reworking the firmware quite a bit. One change is that the mapping is located in a file of it's own. So there will be ISO ANSI ANSIWIN and ISOWIN files when I update the github repository. I can probably squeeze that in tonight after work, before I go to bed...

Here is the new git repository for all my keyboard projects https://github.com/BathroomEpiphanies/AVR-Keyboard
There are pre-compiled hex-files for the Phantoms. I'm pretty sure the ISO and ANSI layouts should actually be the exact same =) The winkeyless ISO/ANSI layouts as well. But I have no Phantom to try them on.. So I hope they still work at all... I think they do, the other firmwares still work.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Mon, 17 September 2012, 04:53:21
A guide to compile might make it easier so that you don't have to make the hexes with every update, and it allows for people to mess around with theirs easier. I am used to a big green run/compile button or a ./configure somewhere.

I was lucky to get it to work, and I still don't know if I am doing it right or not.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Mon, 17 September 2012, 06:25:54
I don't even have any idea on how to do it other than in a *nix environment =D But I could probably add some comments to the Makefile.. I'm not very skilled with c or make myself. It is mostly trial and error to get stuff to work on my end as well =P
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Mon, 17 September 2012, 06:28:02
Yeah, I might try it on my other box. WinAVR confuses me.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Mon, 17 September 2012, 06:45:00
If I knew how to work with make I would like to have a syntax something like
Code: [Select]
make phantom isoAt the moment you need to edit the Makefile to set the parameters according to what you need. And simply run
Code: [Select]
makeor rather
Code: [Select]
make clean; makejust to be sure there are no intermediate files from an earlier compile messing things up. Changing the microcontroller requires a clean for sure.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Mon, 17 September 2012, 09:50:02
With make there is no way to specify an option to a target (that I am aware of).  make phantom iso is the same as make phantom ; make iso.  What you would need is something along the lines of these targets:  phiso, phansi, ph7bit, and then additional for variance between winkeys.  I am several thousand miles from my book on make but I may be able to find something useful online.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Tranquilite on Mon, 17 September 2012, 14:22:11
Here is a basic guide to compiling the firmware in a Windows environment:

1) Download and install WinAVR (http://winavr.sourceforge.net/download.html). I'm pretty sure all of the default settings are fine.
2) Download the phantom firmware (either use git, or just download the zip from the repository website) and extract the source somewhere.
3) Open a command window and change directory to the place where you just extracted the source. (Windows 7 users can shift+right click and select "Open Command Window Here")
4) Type "make" or "make clean" followed by "make".
5) Program the resulting hex file onto your teensy.

It's as simple as that! However you are also going to want to open the makefile with a text editor that supports unix-style linebreaks, such as wordpad (not notepad), and change the appropriate settings such as board and layout.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Mon, 17 September 2012, 15:05:16
notepad++ should work also right?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Mon, 17 September 2012, 15:07:21
WinAVR has one built in too.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Tranquilite on Mon, 17 September 2012, 17:02:25
As long as you can see the linebreaks properly, then it will be fine, even if your word processor spits out windows style line breaks.

Personally I've just been using Programmer's Notepad that came with WinAVR.
Title: Re: Re: Building Phantom Hardware and Firmware Mods
Post by: jdcarpe on Mon, 17 September 2012, 17:15:36
notepad++ should work also right?

EDLIN. Still works.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: hasu on Mon, 17 September 2012, 20:55:16
If I knew how to work with make I would like to have a syntax something like
Code: [Select]
make phantom isoAt the moment you need to edit the Makefile to set the parameters according to what you need.

Try this to override the variable. I think this may work in this case.
Code: [Select]
make phantom LAYOUT=iso
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Mon, 17 September 2012, 21:32:54
Yeah, passing ENV vars works in unix... dunno if that works in windows.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: hasu on Mon, 17 September 2012, 21:37:34
It is not ENV actually.

If you want to give make a ENV var do this, right?
Code: [Select]
LAYOUT=iso make phantomThis won't override variable LAYOUT defined in Makefile.

Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Mon, 17 September 2012, 22:14:41
Damn I wish I had my book handy.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Findecanor on Tue, 18 September 2012, 16:05:28
Although there is no plate for it, the Phantom PCB supports two 1u keys between 1.5u right Alt and right Control keys, as on a Topre Realforce or iOne Scorpius.
I modified one of my PHISO plates to have this arrangement. Here it is laid on top of an unmodified PHISO plate. The Space Bar's switch hole does not need to be changed if I use Cherry 6u space bars because the position is the same as for 7u space bars.

[attach=1]
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Tranquilite on Thu, 20 September 2012, 03:32:20
The command that make clean is supposed to execute doesn't work in the latest phantom build. It looks like the windows find command does not have the same options.
Code: [Select]
C:\AVR-Keyboard>make clean

Cleaning everything:
find . -maxdepth 1 -regextype posix-awk -regex \
                "(.*\.hex|.*\.eep|.*\.cof|.*\.elf|.*\.map|.*\.sym|.*\.lss|.*\.o|
.*\.lst|.*\.s|.*\.d|.*\.i)" \
                -exec rm {} +
find: invalid predicate `-regextype'
make: *** [clean] Error 1
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Thu, 20 September 2012, 03:50:51
Please just stop using that awful operating system =P
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Icarium on Thu, 20 September 2012, 05:09:32
Windows has a find command? O_o
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Tranquilite on Thu, 20 September 2012, 12:17:39
Umm, actually, I don't think windows naturally has a find command. My install does though. I wonder which program I installed added that command...
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: delgo on Sun, 30 September 2012, 11:54:42
Im so frustrated with my lack of programming skills atm! could someone please share a working 7bit layout hex that I can try out, willing to pay as it is now...
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Sun, 30 September 2012, 11:56:43
Since the 7bit layout is very personalized, you should post a layout from the gui and someone could compile it for you.  If I get back to my desk before anyone else does it I will do it.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: delgo on Sun, 30 September 2012, 13:05:36
Well I provided the file here for compiling, I would however prefer to learn to do it myself but I guess that is a future project. For now I need to test my board out!

Again I am very thankful to the one willing to compile this hex for me.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: litster on Sun, 30 September 2012, 15:30:52
try this

[attach=1]
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: delgo on Sun, 30 September 2012, 17:24:34
Sadly didnt work either as I sent in PM, could be my soldering though despite looking fine :S

Should be someone here with a confirmed working 7bit layout hex that I could just try?
the teensy loader program says something about 10% in the bottom right corner, could that mean something?

Thanks for all help anyways, appreciate it!
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Half-Saint on Mon, 01 October 2012, 14:44:12
http://pjrc.com/teensy/loader_vista.html

Quote
When the file is opened, the filename and percentage usage of the Teensy's memory are shown.

When you load a .HEX, you have to reboot Teensy through Windows GUI. Read the instructions in the link above.

Cheers
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Mon, 01 October 2012, 14:50:44
I have 2 different 7bit hex files if your interested, they are of course customized for my layout. Send me a pm if your interested.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Hzza on Sat, 06 October 2012, 05:29:53
Is anyone else using the ansi/iso hex having problems getting the # key to work on an ISO layout board? I can't figure out if it's a firware issue or I soldered a diode the wrong way around...I already tested the switch which is fine and the rest of the board works ok, but I get no response from the # key.

edit - Nevermind, its a duff diode  >:D.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: hazeluff on Sat, 06 October 2012, 09:42:18
Got my board all built and firmware running. mmmm
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: litster on Sat, 06 October 2012, 10:30:36
That is fast!  Found anything wrong with my phantom wiki page?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Sat, 06 October 2012, 16:35:15
Is anyone else using the ansi/iso hex having problems getting the # key to work on an ISO layout board? I can't figure out if it's a firware issue or I soldered a diode the wrong way around...I already tested the switch which is fine and the rest of the board works ok, but I get no response from the # key.

edit - Nevermind, its a duff diode  >:D.
i had that on one of my keys as well was a pain to swap
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Hzza on Sat, 06 October 2012, 16:40:27
It wasn't that bad to be honest, I managed to cut the diode in half which made it a whole lot easier to desolder. Then all it took was a bit of wick and some patience, I was thinking I would have to desolder the whole board at one point though...
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Sat, 06 October 2012, 16:45:18
It wasn't that bad to be honest, I managed to cut the diode in half which made it a whole lot easier to desolder. Then all it took was a bit of wick and some patience, I was thinking I would have to desolder the whole board at one point though...
thought the same myself but decided to just solder it on the back since there was enough clearance.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: litster on Sat, 06 October 2012, 17:58:42
I just desoldered all the through-hole diodes from my Ergodox and then soldered SMD diodes back on.  It took me maybe an hour to desolder all the diodes.  I use a Edsyn Soldapullt Silverstat.  It sucks good!  Rarely I need to desolder a hole twice.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Sat, 06 October 2012, 18:04:17
I just desoldered all the through-hole diodes from my Ergodox and then soldered SMD diodes back on.  It took me maybe an hour to desolder all the diodes.  I use a Edsyn Soldapullt Silverstat.  It sucks good!  Rarely I need to desolder a hole twice.
I use the same desolder! its probably the best manual one you can get.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: MMB on Wed, 10 October 2012, 23:38:51
Quick question: Was the phantom made to also be compatible with cherry stabilizers? I haven't gotten in and really checked it out, but wanted to see.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Wed, 10 October 2012, 23:45:43
Yes can use both Cherry and Costar
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: MMB on Thu, 11 October 2012, 00:20:37
Hmmm... I didn't see the holes on the pcb for the cherry stabs. Maybe I need to look closer T_T
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Thu, 11 October 2012, 02:34:44
Plate mount Cherry stabilizers.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: MMB on Thu, 11 October 2012, 10:12:36
Plate mount Cherry stabilizers.

Damn.... that's one thing I have zero stock of. Know of any place that might carry those?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Thu, 11 October 2012, 10:16:57
Mouser carries 2x.  No one carries 6.25x for space bars, I don't see anyone stocking plate mount 7x either.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: MMB on Thu, 11 October 2012, 10:20:05
Ahhh alrighty, thanks.

Not phantom related; Is there a spacebar stabilizer wire that doesn't have a bend in the middle of it? The distance between the plate and pcb on the kmini doesn't allow for it. It just keeps getting stuck.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Thu, 11 October 2012, 10:23:06
Cherry's are straight, Costar have the jog to fit around the switch housing.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Tranquilite on Fri, 19 October 2012, 02:19:12
Ok, so I updated my fork (https://github.com/Tranquilite0/Teensy-Keyboard) of the phantom firmware to fix a bug where keys could get stuck when changing layers. I still haven't got around to porting my changes tobpiphany's cleaned up and updated AVR-keyboard source.

Speaking of said source, I found out a bit more about that find command when running "make clean". While windows does have its own built in find command, it has a completely different syntax than Linux/Unix's find command. However, WinAVR actually adds its own find command which is almost exactly like the linux/unix one, but without as many options.

Anyway, here's the -help on the winAVR's find.exe, hopefully you can change the find command to be compatible with windows so that we don't have to manually clean up when we want to rebuild the firmware:

Code: [Select]
Usage: find [path...] [expression]
default path is the current directory; default expression is -print
expression may consist of:
operators (decreasing precedence; -and is implicit where no others are given):
      ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2
      EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2
options (always true): -daystart -depth -follow --help
      -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev
tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N
      -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME
      -ilname PATTERN -iname PATTERN -inum N -ipath PATTERN -iregex PATTERN
      -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE
      -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN
      -size N[bckw] -true -type [bcdpfls] -uid N -used N -user NAME
      -xtype [bcdpfls]
actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT
      -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls

As you can see, there is no parameter '-regextype'.

EDIT: Oh hey, post #100
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: gezech on Fri, 26 October 2012, 06:06:41
Hi everyone,
first post on GH, after reading for a few weeks now  :)
I'm a bit confused, is it still possible to order this awesome piece of ... keyboard?
'Cause the order page over at deskthority looks like it.
As a programmer/sysadmin i'm particularly interested in 7bit layout.
Thanks for your patience
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Fri, 26 October 2012, 08:02:00
Nope, only hope is people letting theirs go and the slim possibility of left overs at some point in the unexplained future.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: SmallFry on Fri, 26 October 2012, 15:55:14
Can we get the PCB files?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: WhiteFireDragon on Fri, 26 October 2012, 19:45:27
You'll have to ask bpiphany or litster if they're willing to make it public.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Tranquilite on Fri, 23 November 2012, 04:13:01
Just bumping this thread to say that I got hasu's TMK_Keyboard firmware working on for Phantoms, and the source is now available on hasu's git here (https://github.com/tmk/tmk_keyboard).

What this means is that you get programmable layers, media keys, mouse keys, and NKRO over usb.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Fri, 23 November 2012, 07:41:49
Just bumping this thread to say that I got hasu's TMK_Keyboard firmware working on for Phantoms, and the source is now available on hasu's git here (https://github.com/tmk/tmk_keyboard).

What this means is that you get programmable layers, media keys, mouse keys, and NKRO over usb.

Nice, was it easy? Care to write a guide for the laze folks like me? Does it have a GUI to remap keys or is it in text table?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Fri, 23 November 2012, 09:12:03
It's in a text table with an extremely readable layout, the only difficulty is in knowing what macros to use for the keycode you want.

Here's a link to the phantom map file (https://github.com/tmk/tmk_keyboard/blob/master/keyboard/phantom/keymap.c).
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Fri, 23 November 2012, 22:26:15
It's in a text table with an extremely readable layout, the only difficulty is in knowing what macros to use for the keycode you want.

Here's a link to the phantom map file (https://github.com/tmk/tmk_keyboard/blob/master/keyboard/phantom/keymap.c).

So the available keys are listed in keycode.h? The KC_ is added to the script, and I am supposed to truncate it since the script will add it for me, right?
So I just enter MUTE in the table in order for it to be interpreted as KC_MUTE and I avoid the KC_ part entirely?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Fri, 23 November 2012, 22:28:10
Yeah, drop the KC_ off the code you want to use, there's shorter macro codes at the top of the keycode.h that reference longer ones later in the file if you need a better handle on what code you're looking at.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Fri, 23 November 2012, 22:38:17
I am a little bit lost as to where the non-ansi keys enter into the columns and rows. The key to the right of the left shift in ISO has what column and row?

Wouldn't it be better to have one layout with all the keys(solder points), and the ones which aren't used  you can leave blank or with whatever since those pins will never be shorted without a switch?

Edit: Also the one by the ISO enter. The one above ANSI enter will not be used in ISO I suppose. If I remember correctly, the traces for that key are used for the switch next to the ISO enter instead and then that place in the array is supposed to be used to map to that key?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Fri, 23 November 2012, 22:42:56
It doesn't look as tho the phantom file is set up for anything beyond ansi.  Let me look at some PCB pics.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Fri, 23 November 2012, 22:52:57
Right of left shift is K1B, Left of the ISO enter is K2M.  Use NO (KC_NO) for any spot you don't want to assign.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Fri, 23 November 2012, 22:56:06
OK, so the one I have a problem with is the one by the left shift.
Edit: Thx

Are there any togglable FN keys implemented?
Judging by the code, I take it it checks if a FN key is pressed, and then goes to the key map with a certain index depending on that and fetches the value in column x and row y. That would make it an active-while-holding type FN-key, correct?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Fri, 23 November 2012, 23:01:46
There's 3 ways.  The first Fn array assigned which layer map goes with which Fn key.  The 2nd Fn array can assign a normal keycode to the Fn key so that if you tap the key it sends that keycode, but if you hold it, it switches the layer temporarily.  Then there is the double shift command, which is presently only set up for layers 0-4.  Hold dbl-shoft and press one of those digits and the layer stays assigned until changed again.


edit:  O btw, Phantom's layout is currently only 2 layers, 0 and 1.  Just duplicate the 'KEYMAP(\' thru ...'RGHT),' block to add more layers.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Fri, 23 November 2012, 23:05:30
Fancy

I suppose I could just remove K3N (ANSI key above enter) entirely from the map instead of using KC_NO on that one as well?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Fri, 23 November 2012, 23:08:22
If you remove it from the keymap macro you need to replace KC_##K3N w/ KC_NO in the 2nd half of the macro.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Fri, 23 November 2012, 23:16:47
Yeah, opposite of what I did when I added the key to the left of enter and right of shift.
http://i.imgur.com/MdvRd.png

Then I remove and add those places in the key map tables further down where they are assigned their values, so that the rows aren't shifted one place to the left/right.

Correct or did I mess it up?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: litster on Sat, 24 November 2012, 02:51:31
alaricljs, is your phantom layout mapping tool working with the new firmware  source code yet?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Sat, 24 November 2012, 06:49:24
I got it to work now, media keys and all. Pretty sweet firmware. FN layers as well too.

I will definitely be going with this one.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: litster on Sat, 24 November 2012, 11:19:22
I got it to work now, media keys and all. Pretty sweet firmware. FN layers as well too.

I will definitely be going with this one.

wiki please!
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Sat, 24 November 2012, 11:25:40
Since I was able to do it, it is pretty foolproof and straight forward. alaricljs would be better suited to write it anyway.

Edit: I had a small issue with the previous firmware when I pressed a key, say j. It would randomly insert another character or activate caps lock like this:
Code: [Select]
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJFJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJFJJJJJJJJJ
I can't recreate these problems with this firmware, so I believe those were resolved as well.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: litster on Thu, 29 November 2012, 20:54:51
If you like your Phantom, please go to the links below to vote for Phantom for these Deskthority Awards:

 Vote Phantom for best keyboard company or Brand (http://deskthority.net/deskthority-awards-2012-f34/best-keyboard-company-or-brand-2012-t4463.html)

Vote Phantom for The Deskthority Award (http://deskthority.net/deskthority-awards-2012-f34/the-deskthority-award-2012-t4460.html)

Vote Phantom for Best Space-Saving Compact Keyboard (http://deskthority.net/deskthority-awards-2012-f34/best-space-saving-compact-keyboard-2012-t4459.html)


Title: Re: Building Phantom Hardware and Firmware Mods
Post by: mtl on Sun, 16 December 2012, 20:30:56
I got it to work now, media keys and all. Pretty sweet firmware. FN layers as well too.

I will definitely be going with this one.
Which project do you build to make the Phantom firmware?  Is it ps2_usb?  Can you post your Makefile, please?

Edit: Nevermind.. Think I figured it out:
Code: [Select]
$ cd tmk_keyboard/keyboard/phantom
$ make -f Makefile.pjrc
Flashed the resulting phantom_pjrc.hex and it worked! :-D
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Mon, 17 December 2012, 15:38:45
It seems I am too slow. It is the best firmware I have tried so far on the Phantom.

This guy seems to have some interesting features in his software though: http://deskthority.net/workshop-f7/g80-18xx-controller-replacement-t4534.html
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: mtl on Wed, 19 December 2012, 22:42:42
I wanted to post a couple of issues I had with the Phantom, not to complain but hopefully to find out if there's something I did wrong, or if they are real problems, maybe they will get fixed for the new Phantom group buys going on.  Maybe these are already known..

Note that I'm using the PHANSI plate with Costar stabilizers.

1. It seems impossible to open the key switches that use short stabilizers (shifts, backspace, enter) without removing the whole switch from the board. Actually the problem that happened to me was, I couldn't close them, as I assembled the PCB/plate sandwich using just switch bottoms, then added the springs, stems, and tops afterward.

2. None of my space bars fit! I knew when I ordered the Phantom that I would need the 7" space bar from Round 4, but thought (perhaps wrongly) in the mean time I could use a shorter space bar.  The plate has a third stabilizer mount point, seemingly to support shorter space bars. But the shorter wire bends in the wrong place to get around the switch. Also, none of my shorter space bars fit the third mount point, so I can't use an un-stabilized space bar anyway. Is there somewhere to get a space bar that fits before Round 4 ships (2014?)?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Wed, 19 December 2012, 22:49:42
1) absolutely true, users had to mod the plate post-production to get that working.

2) If you have a 7x layout, you must have a 7x spacebar and the appropriate stabilizers.  I don't recall what they funky stabilizer placement is on the 7x plate, I think it's a Cherry specific one.


Buy a Creme Cheese 7x from Tsangan here:  http://geekhack.org/index.php?topic=37894.0
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: korne on Thu, 20 December 2012, 02:40:48
I will need 1or2  7x Coastar Stab, i wached the video of litster but i don't have the tools for doing this as perfect as he does.

So the question is, how i can get those 7x stab?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Thu, 20 December 2012, 03:27:12
1. That was on purpose, the stabilizer cutouts are really close to the switch cutout, and I didn't want to remove too much material.

2. The extra stabilizer mount point is for some funky 7.00X spacebars that looks like that with non-symmetric stems. http://deskthority.net/wiki/Space_bar#7_units_.28133mm_wide.2C_3_mounts.2C_57mm_and_42.8mm_apart.29 Just like  6.25X spacebars with off-center switch stem are supported http://deskthority.net/wiki/Space_bar#6.25_units_.28118mm_wide.2C_3_mounts.2C_no_center_mount.29
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: mtl on Thu, 20 December 2012, 06:26:18
Buy a Creme Cheese 7x from Tsangan here:  http://geekhack.org/index.php?topic=37894.0
Thank you!

2. The extra stabilizer mount point is for some funky 7.00X spacebars that looks like that with non-symmetric stems. http://deskthority.net/wiki/Space_bar#7_units_.28133mm_wide.2C_3_mounts.2C_57mm_and_42.8mm_apart.29 Just like  6.25X spacebars with off-center switch stem are supported http://deskthority.net/wiki/Space_bar#6.25_units_.28118mm_wide.2C_3_mounts.2C_no_center_mount.29
Wow.. I didn't realize space bars were so varied and complex! Thank you for the links. :)

I also forgot to mention:

3. I had to take a hacksaw to 4/10 stabilizer clips because they fit too tight around the sliders (saw this issue on the wiki). 3/4 are still a little scratchy when I press the key, but at least they're not sticking. I'm not sure how much more plastic I can file away without overly weakening the clip. I've also tried jamming the handle of some pliers into the clip to try and widen the opening, though it didn't seem to help (maybe I need to be more forceful.. just didn't want to break the clips). I don't know what the solution would be here. Buy extra clips to find the smaller variety? Manufacture the plate with wider clip mount points (at the risk of making some clips too loose)?

Again, don't take these as complaints.. just constructive feedback. The Phantom is a high quality kit and was thoroughly enjoyable to build despite these issues. :)
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Glod on Tue, 25 December 2012, 02:05:00
Would this be the appropriate place to ask questions about the Phantom R2 (currently in PCB Group Buy)?

Are there any keyboards other than PLU i can harvest a case from? (and in the process harvest other stuff like switches, etc). Like many i would like a custom case but i need something in absence of a custom case.

I understand there is the assembly/parts GB being put together right now, and i will probably be signing up, but i'm curious because i am willing to do some of this stuff myself.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Tue, 25 December 2012, 02:18:29
The other option is a Filco as thats what the Phantom PCB is designed to fit in but a PLU is a MUCH cheaper option.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Glod on Tue, 25 December 2012, 02:21:38
does that mean any custom case for the Filco TKL will fit the phantom? For example the Vortex Aluminum case at mechnicalkeyboards, will that fit?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Tue, 25 December 2012, 02:38:46
does that mean any custom case for the Filco TKL will fit the phantom? For example the Vortex Aluminum case at mechnicalkeyboards, will that fit?
nope because that requires the bent plate of a filco to work the plates made for the phantom are completely flat. Also i dont believe the MKC case fits either though i dont remember why.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Glod on Tue, 25 December 2012, 02:47:55
Thanks, I guess I'll have to be patient when it comes to a cool case.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: fruktstund on Tue, 25 December 2012, 17:40:10
Um, do you have to push the Teensy button to start the loader, or is there another way? I did push it before, and I'm writing this on my Phantom, but I can't load new firmware onto it because the Teensy application only tells me to "Press Button To Activate". :D
Title: Building Phantom Hardware and Firmware Mods
Post by: Batmann on Tue, 25 December 2012, 17:53:42
Any chance we can design a bent plate to add cases choice for the phantom?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Tue, 25 December 2012, 18:48:19
Um, do you have to push the Teensy button to start the loader, or is there another way? I did push it before, and I'm writing this on my Phantom, but I can't load new firmware onto it because the Teensy application only tells me to "Press Button To Activate". :D
do you have the driver for the ATMega32u4?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: WhiteFireDragon on Tue, 25 December 2012, 19:25:00
Any chance we can design a bent plate to add cases choice for the phantom?

The only thing the small 90degree bend at the front and back does it make it compatible with vortex case. No other case requires this bend. Having two bends like this for each case might add significant costs.
Title: Building Phantom Hardware and Firmware Mods
Post by: Batmann on Wed, 26 December 2012, 03:08:18
Ok got it, thx WFD, I'll see if I can mod the plate when I get one
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: fruktstund on Wed, 26 December 2012, 16:29:58
Um, do you have to push the Teensy button to start the loader, or is there another way? I did push it before, and I'm writing this on my Phantom, but I can't load new firmware onto it because the Teensy application only tells me to "Press Button To Activate". :D
do you have the driver for the ATMega32u4?
Pretty sure I do, otherwise the keyboard wouldn't be working, or am I thinking crazy now?

Anyway, I don't think what I was asking for should work, but I realized the Jump to Bootloader thing is what I'm looking for. In bpiphany's firmware it was as easy as pressing both shifts at the same time, but since I'm using hasu's (and Tranquilite's?) awesome firmware, the keybinding is something different if there's one. Would anyone happen to know this binding? :>
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Wed, 26 December 2012, 16:35:51
With hasu's there are a number of commands possible and in the stock build they are initiated with both shifts and an additional key depending on what you need to do.  To start the bootloader, it's dbl-shift+Pause
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: fruktstund on Wed, 26 December 2012, 17:16:16
Ah, thank you very much! Now I'm a happy man.

I guess there are only two more things regarding this firmware I'm wondering about; is it possible to make the LEDs brighter, and does the mouse stuff in the firmware work? I could mention I'm using Windows for the time being.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Tranquilite on Thu, 27 December 2012, 01:57:16
To make the LEDs brighter? Most folks want to make them dimmer because they chose LED/resister combos that were really bright. I don't think there are any options in the firmware to make them brighter, but assuming you are using hasu's firmware, make sure that these lines in matrix.c are this way, and haven't been lowered:
Code: [Select]
  OCR1B = 250; // Output compare register 1B
  OCR1C = 250; // Output compare register 1C
To tell you the truth, I have no idea if the PWM LED brightness code is even working properly in this firmware...

No matter, assuming you have those right, then your only option is to change the change the  LED/resistor combo on the board by either putting in lower-ohm resistors, or brighter LEDs. This requires soldering, and I have no idea if the plate gets in the way.

As for mousekeys, once again assuming you are using hasu's firmware, just uncomment
Code: [Select]
#MOUSEKEY_ENABLE = yes # Mouse keys in your makefile. You will also need to place mousekeys-specific codes in your keymap.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: fruktstund on Sun, 30 December 2012, 08:14:41
Well, actually, I think the LEDs are too dim with hasu's firmware, but the ones not seated at the caps lock and scroll lock switches are too bright instead with bpiphany's firmware. Pretty sure I prefer them brighter though, since it looks better with windowed keycaps.
Yeah, checked both of those lines, and they are set to 250. I did check this before too, and this is what has me perplexed. Can't find anything else regarding the brightness of the LEDs.

Uncommented that line, and at first it wasn't working, but when I tried to disable the extrakeys (EXTRAKEY_ENABLE) and that didn't work I noticed something was wrong. Did a clean make and it solved everything. Thanks!
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: hasu on Sun, 30 December 2012, 09:06:08
I don't know about PWM and phantom hardware very much, though this patch may cure your LED problem.
Where can I find phantom schematic?

Code: [Select]
diff --git a/keyboard/phantom/led.c b/keyboard/phantom/led.c
index 3523cb7..109004b 100644
--- a/keyboard/phantom/led.c
+++ b/keyboard/phantom/led.c
@@ -23,12 +23,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 void led_set(uint8_t usb_led)
 {
     if (!(usb_led & (1<<USB_LED_CAPS_LOCK)))
-        PORTB &= ~(1<<6);
+        DDRB &= ~(1<<6);
     else
-        PORTB |= (1<<6);
+        DDRB |= (1<<6);

     if (!(usb_led & (1<<USB_LED_SCROLL_LOCK)))
-        PORTB &= ~(1<<7);
+        DDRB &= ~(1<<7);
     else
-        PORTB |= (1<<7);
+        DDRB |= (1<<7);
 }
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Glod on Thu, 03 January 2013, 14:02:30
is there photos floating around anywhere that gives a close up of the teensy soldered flat/flush with the switch side of the PCB (without a plate and switches on yet) and the distance between the teensy and the pcb on the opposite side?

i know it will be a while before i have to do this myself but i'm really really curious how this looks.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Thu, 03 January 2013, 14:38:11
Not sure what you meant... here's the official build doc:  http://deskthority.net/wiki/Phantom_Instruction

Sounds like you want the teensy between the plate and PCB.  It won't fit.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Glod on Thu, 03 January 2013, 15:23:48
i think you misunderstood, i know where the teensy goes, ive read the instructions on DT wiki

i want to see close up pictures of the teensy soldered in on both sides of the board

basically these steps

Quote
12.  Insert Teensy with pins on to PCB. Push Teensy as far in as possible without forcing it, without bending the pins, and make sure Teensy circuit board is not touching Phantom PCB. While the legs are sticking though the Phantom PCB, cut the pins flush to the Phantom PCB. This must be done in this way so the pins don't interfere with switches at these locations: F3, F4, 4, 5.

13. Once the Teensy pins are cut flush to the Phantom PCB, solder the Teensy on to the PCB. Make sure the solder is not sticking out of the PCB when cooled. The solder joints must be flat. FLAT!

"The solder joints must be flat. FLAT!" <- is what i am most interested in
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Thu, 03 January 2013, 15:27:35
I had some pics posted elsewhere.

http://i.imgur.com/TeuTc.jpg
http://i.imgur.com/rX0wI.jpg

Edit: Here is a better pic of it. I had to modify it a bit as the solder spots where a tad bit too high in this pic: http://i.imgur.com/95MBNh.jpg
Make them not stick out from the PCB. Flat (flush) side cutters were a great help.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Thu, 03 January 2013, 15:33:16
That last pic of damorgue's has 2 spots that are pretty much perfect... To the right of U1 and under the 1 of U1.

Also, this:
i want to see close up pictures of the teensy soldered in on both sides of the board

Reads as: 'Pictures of the teensy soldered to the top of the PCB and soldered to the bottom of the PCB' as far as my education takes me. 
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Glod on Thu, 03 January 2013, 15:35:08
I had some pics posted elsewhere.

http://i.imgur.com/TeuTc.jpg
http://i.imgur.com/rX0wI.jpg

Edit: Here is a better pic of it. I had to modify it a bit as the solder spots where a tad bit too high in this pic: http://i.imgur.com/95MBNh.jpg
Make them not stick out from the PCB. Flat (flush) side cutters were a great help.

That last pic of damorgue's has 2 spots that are pretty much perfect... To the right of U1 and under the 1 of U1.

Thanks Guys, this is exactly what i needed to know/see
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Thu, 03 January 2013, 15:36:14
After you have cut the teensy's legs to the right lengths, the only way you can muck it up is when you pull the solder iron away which can create these little pointy extrusions.

I ended up cutting them away (as well as removing a bit of excess solder from some) with a flush side cutter. Cutting after soldering isn't very professional, but meh.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Thu, 03 January 2013, 15:37:25
A good way to avoid Hershey kisses is to slide the iron off across the PCB in stead of lifting.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: esoomenona on Thu, 03 January 2013, 15:39:58
i want to see close up pictures of the teensy soldered in on both sides of the board

Reads as: 'Pictures of the teensy soldered to the top of the PCB and soldered to the bottom of the PCB' as far as my education takes me. 
I agree. Better wording: I'd like to see pictures of the top and bottom of how the PCB should look after the teensy is soldered on.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Thu, 03 January 2013, 15:59:13
i want to see close up pictures of the teensy soldered in on both sides of the board

Reads as: 'Pictures of the teensy soldered to the top of the PCB and soldered to the bottom of the PCB' as far as my education takes me. 
I agree. Better wording: I'd like to see pictures of the top and bottom of how the PCB should look after the teensy is soldered on.
do yo uguys want me to build one of the extras that IO have around and take pics? i am how ever missing a plate...
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Glod on Thu, 03 January 2013, 16:06:23
do yo uguys want me to build one of the extras that IO have around and take pics? i am how ever missing a plate...

your pics seem to always be excellent and highly instructional  :D

Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Thu, 03 January 2013, 16:09:55
do yo uguys want me to build one of the extras that IO have around and take pics? i am how ever missing a plate...

your pics seem to always be excellent and highly instructional  :D


thanks I build one of mine right away once i get a plate (which will probably be with the ones with my GB)
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: jdcarpe on Thu, 03 January 2013, 21:43:15
I should have taken pics of mine with the stupid spacers left on there. You know, to show you what NOT to do. The solder joints on top of the PCB looked AWESOME, but I don't think the PCB would have fit in the case with the Teensy so far from being flush with the board.

Then I could have taken photos of my shoddy desoldering job and the traces I wrecked after going to the Teensy legs with diagonal cutters. But that would just be cruel. I was frustrated that day.

However, I am now really well versed in exactly what NOT to do when assembling a Phantom. Sometimes you just gotta learn the hard way. That was kind of an expensive way to learn something, though. Luckily, bavman was willing to do the R2 GB after we got permission.

Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Thu, 03 January 2013, 21:45:52
well mine fit in PLU cases fine with the spacers on....its better if their on too.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Glod on Thu, 03 January 2013, 23:45:41
I should have taken pics of mine with the stupid spacers left on there. You know, to show you what NOT to do. The solder joints on top of the PCB looked AWESOME, but I don't think the PCB would have fit in the case with the Teensy so far from being flush with the board.

Then I could have taken photos of my shoddy desoldering job and the traces I wrecked after going to the Teensy legs with diagonal cutters. But that would just be cruel. I was frustrated that day.

However, I am now really well versed in exactly what NOT to do when assembling a Phantom. Sometimes you just gotta learn the hard way. That was kind of an expensive way to learn something, though. Luckily, bavman was willing to do the R2 GB after we got permission.

i would have loved to see the photos of the mistakes  :-X

i plan on building 2 of these, 1 for me and 1 for somebody else; hopefully ill get 1 out of 2 right   :)
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: fruktstund on Fri, 11 January 2013, 13:02:29
I don't know about PWM and phantom hardware very much, though this patch may cure your LED problem.
Where can I find phantom schematic?
Thank you very much, it worked! :)

I have no idea about the Phantom schematic though. I can't recall seeing it around, publicly available, but bpiphany could probably help you out on this.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Fri, 11 January 2013, 14:19:12
There really isn't much to see, and I don't think the schematic have been uploaded anywhere.

The LEDs are connected to B6 (CapsLock) and B7 (ScrollLock) on the Teensy.

The rows are on B0 through B5 and the columns on the remaining pins =)
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: hasu on Fri, 11 January 2013, 19:27:41
frukstund, great. I pushed this fix into github now.

bpiphany, I wanted to know just whether anode or cathode is connected on that port.  Cathode, right?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Fri, 11 January 2013, 23:00:13
Ah no, I am not a backwards electronics guy... and besides ground planes are around everywhere. The anode of the LEDs are hooked up to the controller, and the resistors are between the controller and the LEDs.

[attachimg=1]
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: hasu on Sat, 12 January 2013, 02:22:23
Got it. Thanks.
It made clear why old code didn't work properly.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Leslieann on Sun, 13 January 2013, 16:13:35
The only thing the small 90degree bend at the front and back does it make it compatible with vortex case. No other case requires this bend. Having two bends like this for each case might add significant costs.

It also adds significant rigidity to the plate, the need however is still questionable.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Acetrak on Sun, 03 February 2013, 16:12:20
Can anyone confirm that with the right plate built, is it possible to have a 1.5/1/1.5/6/1.5/1/1/1.5 bottom row?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: TheProfosist on Sun, 03 February 2013, 19:12:24
Can anyone confirm that with the right plate built, is it possible to have a 1.5/1/1.5/6/1.5/1/1/1.5 bottom row?
bpiphany confirmed that once i dont know in which thread exactly though
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Acetrak on Mon, 04 February 2013, 08:30:51
I was trying to draft up a custom plate but the spacing has me slightly confused and I wasn't sure if this was a possible option :eek:
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Findecanor on Wed, 06 February 2013, 18:27:24
Can anyone confirm that with the right plate built, is it possible to have a 1.5/1/1.5/6/1.5/1/1/1.5 bottom row?
Yes. I have modified a PHISO plate to have this layout for the bottom row. There are positions on the circuit board for the right Alt and Windows keys. The position of the space bar switch is the same for 7-unit and 6-unit space bars, as long as you use a space bar from a winkeyful Cherry G80-1800, G80-11800 or G80-11900.
I don't think that a space bar that is not from Cherry would work.

From my earlier post (http://geekhack.org/index.php?topic=26742.msg665412#msg665412):
(http://geekhack.org/index.php?action=dlattach;topic=26742.0;attach=4417;image)
For this picture, I had placed my modified plate on top of a unmodified one to make it easier to see what I had cut away.
To make the mod, I used first a small hacksaw (careful!), then a small file and last needle files for the fine work.
This plate was made of aluminium. I figure this would not be as easy to do on a steel plate, though ...

A long time ago, bpiphany posted the qcad files for the plates and I modified the plate in qcad first before I dared modify it in real life. If you want to, I could clean it up and post it.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Acetrak on Wed, 06 February 2013, 18:58:07
Yes that would be pretty cool! I think I just need the measurements or the location of the bottom right cluster, even just their location in relation to the alpha keys would do ;D
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: laden3 on Thu, 21 February 2013, 02:26:33
Can someone help me with the programming?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: hasu on Thu, 21 February 2013, 05:11:38
Hi, laden3. You PM'd me. So I'm posting here.

I'm not sure how I can help you. Anyway you should read README at first.
https://github.com/tmk/tmk_keyboard

What did you do so far and what is actually your problem?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: laden3 on Thu, 21 February 2013, 05:27:40
I am trying to create a HEX file with my own layout.

At first I was stuck at the 2. of building firmware. Somehow I managed to make progression after reading this http://geekhack.org/index.php?topic=26742.msg664507#msg664507

However, the makefile thing is confusing and I made a bunch of stuffs including a HEX file in the tmk_keyboard-master>keyboard>phantom folder by typing make -f makefile.pjrc following the instructions in the link above.

Right now, I am not sure how I should proceed with the keymap.c, config.h, led.c, makefile.lufa, makefile.pjrc, and the matrix.c in the  tmk_keyboard-master>keyboard>phantom folder.
Can I just replace the desired keys with keycodes in the keymap in keymap.c and proceed to create the HEX file like what I did before?

Thanks in advance@!@!@!
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: hasu on Thu, 21 February 2013, 06:39:02
Yes. After you do 'make' you'll get phantom_pjrc.hex file and many other unknown pedantic files. But don't worry, you need only its hex file. I don't also know about those files at all except for hex :)

To tweak keymap you need to just edit keymap.c then do 'make -f Makefile.pjrc clean' and 'make -f Makefile.pjrc' to get new hex file.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: laden3 on Thu, 21 February 2013, 06:57:44
First of all, I can't create the HEX file with some errors...

I left the config.h, Makefile.lufa, Makefile,pjrc, and matrix.c untouched.

I am trying to use a default layer with volume up, volume down, mute, mouse button 1, 2, and 3 and a macro (alt+F4) and the numlock will replace the 3X5 with a keypad. I am using 1.5X modifier too. I tried to mimic the last lines in the HHKB example in hasu's git.

This is my keymap.c, pretty sure something is wrong as I get lots of errors when I tried make -f makefile.pjrc
Code: [Select]
/*
Copyright 2011 Jun Wako <wakojun@gmail.com>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

/*
 * Keymap for Phantom controller
 */
#include <stdint.h>
#include <stdbool.h>
#include <avr/pgmspace.h>
#include "keycode.h"
#include "print.h"
#include "debug.h"
#include "util.h"
#include "keymap.h"


// Convert physical keyboard layout to matrix array.
// This is a macro to define keymap easily in keyboard layout form.
#define KEYMAP( \
    K5A, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N,           K5O, K5P, K5Q, \
    K5B, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4N,      K4O, K4P, K4Q, \
    K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N,      K3O, K3P, K3Q, \
    K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2N,           K2O, K2P, K2Q, \
    K1A,      K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1N,           K1O, K1P, K1Q, \
    K0A, K0B, K0C,           K0H,                     K0K, K0L, K0M, K0N,      K0O, K0P, K0Q  \
) { \
/*             A         B         C         D         E         F         G         H         I         J         K         L          M        N          O         P         Q    */  \
/* 0 */   { KC_##K0A, KC_##K0B, KC_##K0C, KC_NO   , KC_NO   , KC_NO   , KC_NO   , KC_##K0H, KC_NO   , KC_NO   , KC_##K0K, KC_##K0L, KC_##K0M, KC_##K0N, KC_##K0O, KC_##K0P, KC_##K0Q}, \
/* 1 */   { KC_##K1A, KC_NO   , KC_##K1C, KC_##K1D, KC_##K1E, KC_##K1F, KC_##K1G, KC_##K1H, KC_##K1I, KC_##K1J, KC_##K1K, KC_##K1L, KC_NO   , KC_##K1N, KC_##K1O, KC_##K1P, KC_##K1Q}, \
/* 2 */   { KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, KC_##K2E, KC_##K2F, KC_##K2G, KC_##K2H, KC_##K2I, KC_##K2J, KC_##K2K, KC_##K2L, KC_NO   , KC_##K2N, KC_##K2O, KC_##K2P, KC_##K2Q}, \
/* 3 */   { KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_##K3F, KC_##K3G, KC_##K3H, KC_##K3I, KC_##K3J, KC_##K3K, KC_##K3L, KC_##K3M, KC_##K3N, KC_##K3O, KC_##K3P, KC_##K3Q}, \
/* 4 */   { KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E, KC_##K4F, KC_##K4G, KC_##K4H, KC_##K4I, KC_##K4J, KC_##K4K, KC_##K4L, KC_NO   , KC_##K4N, KC_##K4O, KC_##K4P, KC_##K4Q}, \
/* 5 */   { KC_##K5A, KC_##K5B, KC_##K5C, KC_##K5D, KC_##K5E, KC_##K5F, KC_##K5G, KC_##K5H, KC_##K5I, KC_##K5J, KC_##K5K, KC_##K5L, KC_##K5M, KC_##K5N, KC_##K5O, KC_##K5P, KC_##K5Q}, \
}

#define KEYCODE(layer, row, col) (pgm_read_byte(&keymaps[(layer)][(row)][(col)]))


// Assign Fn key(0-7) to a layer to which switch with the Fn key pressed.
static const uint8_t PROGMEM fn_layer[] = {
    0,              // Fn0
    1,              // Fn1
    2,              // Fn2
    3,              // Fn3
    4,              // Fn4
    5,              // Fn5
    6,              // Fn6
    7               // Fn7
};

// Assign Fn key(0-7) to a keycode sent when release Fn key without use of the layer.
// See layer.c for details.
static const uint8_t PROGMEM fn_keycode[] = {
    KC_NO,          // Fn0
    KC_NO,          // Fn1
    KC_NO,          // Fn2
    KC_NO,          // Fn3
    KC_NO,          // Fn4
    KC_NO,          // Fn5
    KC_NO,          // Fn6
    KC_NO           // Fn7
};

/*
 * Phantom keyboard layout with winkeys and 7bit style editing block. I am
 * Not in the mood to implement full 7-bit keymap.
 *
 *
 * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.
 * |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
 * `---'   `---------------' `---------------' `---------------' `-----------'
 * ,-----------------------------------------------------------. ,-----------.
 * |~  |  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backsp | |Ins|Hom|PgU|
 * |-----------------------------------------------------------| |-----------|
 * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \| |Del|End|PgD|
 * |-----------------------------------------------------------| |---|---|---|
 * |Caps  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return  | |???|???|???|
 * |-----------------------------------------------------------| |---|---|---|
 * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Shift     | |???|Up |???|
 * |-----------------------------------------------------------| |-----------|
 * |Ctl|Gui|Alt|          Space                |Alt|Gui|App|Ctl| |Lef|Dow|Rig|
 * `-----------------------------------------------------------' `-----------'
 */


static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Layer 0: Default Layer
 *
 * ANSI:
 *
 * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.
 * |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|Nlk|Mac|
 * `---'   `---------------' `---------------' `---------------' `-----------'
 * ,-----------------------------------------------------------. ,-----------.
 * |~  |  1|  2|  3|  4|  5|  6|  7|  8|  9|  -|  =|V+ |Backsp | |Cap|Hom|PgU|
 * |-----------------------------------------------------------| |-----------|
 * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \| |Del|End|PgD|
 * |-----------------------------------------------------------| |-----------|
 * |Btn1  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return  | |Bt2|Mut|VlU|
 * |-----------------------------------------------------------| |-----------|
 * |Shft    |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Caps      | |Bt3|Up |VlD|
 * |-----------------------------------------------------------| |-----------|
 * |Ctl|Gui|Alt|          Space                |???|Alt|App|Ctl| |Lef|Dow|Rig|
 * `-----------------------------------------------------------' `-----------'
 */

  KEYMAP(\
    ESC,  F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9, F10,  F11,  F12,       PSCR, SLCK, MACRO( MD(LALT), D(F4), END ), \
    GRV,   1,   2,   3,   4,   5,   6,   7,   8,   9,   0, MINS,  EQL, BSPC,  CAPS, HOME, PGUP, \
    TAB,   Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P, LBRC, RBRC, BSLS,  DEL,  END, PGDN, \
    BTN1,   A,   S,   D,   F,   G,   H,   J,   K,   L, SCLN, QUOT,       ENT,    BTN2,    MUTE,    VOLUP, \
    LSFT,       Z,   X,   C,   V,   B,   N,   M, COMM, DOT, SLSH,      CAPS,    BTN3,   UP,    VOLDOWN, \
    LCTL, LGUI, LALT,             SPC,                0, RALT, APP, RCTL, LEFT, DOWN, RGHT),


/*  Layer 1: Numlock mode (Numlock)
 * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.
 * |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|Nlk|Mac|
 * `---'   `---------------' `---------------' `---------------' `-----------'
 * ,-----------------------------------------------------------. ,-----------.
 * |~  |  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backsp | |  /|  *|  -|
 * |-----------------------------------------------------------| |-----------|
 * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \| |P_7|P_8|P_9|
 * |-----------------------------------------------------------| |---|---|---|
 * |Btn1  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return  | |P_4|P_5|P_6|
 * |-----------------------------------------------------------| |---|---|---|
 * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Shift     | |P_1|P_2|P_3|
 * |-----------------------------------------------------------| |-----------|
 * |Ctl|Gui|Alt|          Space                |???|Alt|App|Ctl| |P_0|Pdt|Pls|
 * `-----------------------------------------------------------' `-----------'
 */

 KEYMAP(\
    ESC,  F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9, F10,  F11,  F12,       PSCR, NLCK,  MACRO( MD(LALT), D(F4), END ), \
    GRV,   1,   2,   3,   4,   5,   6,   7,   8,   9,   0, MINS,  EQL, BSPC,  PSLS, PAST, PMNS, \
    TAB,   Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P, LBRC, RBRC, BSLS,  P7,  P8, P9, \
    BTN1,   A,   S,   D,   F,   G,   H,   J,   K,   L, SCLN, QUOT,       ENT,    P4,    P5,    P6, \
    LSFT,       Z,   X,   C,   V,   B,   N,   M, COMM,  DOT, SLSH,      RSFT,   P1,   P2,    P3, \
    LCTL, LGUI, LALT,             SPC,                0, RALT, APP, RCTL, P0, PDOT, PPLS),


};

static const unit16_t PROGMEM fn_actions[] = {
ACTION_LAYER_DEFAULT,        // FN0
ACTION_LAYER_SET_TOGGLE(1)   // NLCK
};


uint8_t keymap_get_keycode(uint8_t layer, uint8_t row, uint8_t col)
{
    return KEYCODE(layer, row, col);
}

uint8_t keymap_fn_layer(uint8_t index)
{
    return pgm_read_byte(&fn_layer[index]);
}

uint8_t keymap_fn_keycode(uint8_t index)
{
    return pgm_read_byte(&fn_keycode[index]);
}


This is my led.c
Code: [Select]
*
Copyright 2012 Jun Wako <wakojun@gmail.com>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#include <avr/io.h>
#include "stdint.h"
#include "led.h"


void led_set(uint8_t usb_led)
{
    if (!(usb_led & (1<<USB_LED_CAPS_LOCK)))
        DDRB &= ~(1<<6);
    else
        DDRB |= (1<<6);

    if (!(usb_led & (1<<USB_LED_NUM_LOCK)))
        DDRB &= ~(1<<7);
    else
        DDRB |= (1<<7);
}

Title: Re: Building Phantom Hardware and Firmware Mods
Post by: laden3 on Thu, 21 February 2013, 07:33:28
Just realized that the macro action and function action are not fixed yet.

It seems like the mouse keys and the system & media keys only work under the Fn layer. Could this be fixed by replacing the default layer with FN1?

I am not familiar with programming and maybe I do not know what I was talking about...
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: hasu on Thu, 21 February 2013, 08:15:38
At this time Phantom uses legacy keymap. But to use  layer toggle  and key macro feature you need to move new keymap framework. I rewrote your keymap using new keymap framework. But I'm not sure if this works for you. This framework is still experimental unfortunately.

This new keymap framework will be replaced completely with another new framework before too long. So, you may not want to learn this tentative framework. You can stay with legacy keymap until newer framework becomes available.

I think there is no problem in led.c  but you use numlock key as layer toggle key, this means you don't have usual numlock key, so numlock LED may not be useful for you.

Code: [Select]
/*
Copyright 2011 Jun Wako <wakojun@gmail.com>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

/*
 * Keymap for Phantom controller
 */
#include <stdint.h>
#include <stdbool.h>
#include <avr/pgmspace.h>
#include "keycode.h"
#include "action.h"
#include "action_macro.h"
#include "print.h"
#include "debug.h"
#include "util.h"
#include "keymap.h"


// Convert physical keyboard layout to matrix array.
// This is a macro to define keymap easily in keyboard layout form.
#define KEYMAP( \
    K5A, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N,           K5O, K5P, K5Q, \
    K5B, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4N,      K4O, K4P, K4Q, \
    K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N,      K3O, K3P, K3Q, \
    K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2N,           K2O, K2P, K2Q, \
    K1A,      K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1N,           K1O, K1P, K1Q, \
    K0A, K0B, K0C,           K0H,                     K0K, K0L, K0M, K0N,      K0O, K0P, K0Q  \
) { \
/*             A         B         C         D         E         F         G         H         I         J         K         L          M        N          O         P         Q    */  \
/* 0 */   { KC_##K0A, KC_##K0B, KC_##K0C, KC_NO   , KC_NO   , KC_NO   , KC_NO   , KC_##K0H, KC_NO   , KC_NO   , KC_##K0K, KC_##K0L, KC_##K0M, KC_##K0N, KC_##K0O, KC_##K0P, KC_##K0Q}, \
/* 1 */   { KC_##K1A, KC_NO   , KC_##K1C, KC_##K1D, KC_##K1E, KC_##K1F, KC_##K1G, KC_##K1H, KC_##K1I, KC_##K1J, KC_##K1K, KC_##K1L, KC_NO   , KC_##K1N, KC_##K1O, KC_##K1P, KC_##K1Q}, \
/* 2 */   { KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, KC_##K2E, KC_##K2F, KC_##K2G, KC_##K2H, KC_##K2I, KC_##K2J, KC_##K2K, KC_##K2L, KC_NO   , KC_##K2N, KC_##K2O, KC_##K2P, KC_##K2Q}, \
/* 3 */   { KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_##K3F, KC_##K3G, KC_##K3H, KC_##K3I, KC_##K3J, KC_##K3K, KC_##K3L, KC_##K3M, KC_##K3N, KC_##K3O, KC_##K3P, KC_##K3Q}, \
/* 4 */   { KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E, KC_##K4F, KC_##K4G, KC_##K4H, KC_##K4I, KC_##K4J, KC_##K4K, KC_##K4L, KC_NO   , KC_##K4N, KC_##K4O, KC_##K4P, KC_##K4Q}, \
/* 5 */   { KC_##K5A, KC_##K5B, KC_##K5C, KC_##K5D, KC_##K5E, KC_##K5F, KC_##K5G, KC_##K5H, KC_##K5I, KC_##K5J, KC_##K5K, KC_##K5L, KC_##K5M, KC_##K5N, KC_##K5O, KC_##K5P, KC_##K5Q}, \
}


static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Layer 0: Default Layer
 *
 * ANSI:
 *
 * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.
 * |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|Nlk|Mac|
 * `---'   `---------------' `---------------' `---------------' `-----------'
 * ,-----------------------------------------------------------. ,-----------.
 * |~  |  1|  2|  3|  4|  5|  6|  7|  8|  9|  -|  =|V+ |Backsp | |Cap|Hom|PgU|
 * |-----------------------------------------------------------| |-----------|
 * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \| |Del|End|PgD|
 * |-----------------------------------------------------------| |-----------|
 * |Btn1  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return  | |Bt2|Mut|VlU|
 * |-----------------------------------------------------------| |-----------|
 * |Shft    |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Caps      | |Bt3|Up |VlD|
 * |-----------------------------------------------------------| |-----------|
 * |Ctl|Gui|Alt|          Space                |???|Alt|App|Ctl| |Lef|Dow|Rig|
 * `-----------------------------------------------------------' `-----------'
 */

  KEYMAP(\
    ESC,   F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9, F10, F11, F12,         PSCR, FN1, FN2, \
    GRV,    1,   2,   3,   4,   5,   6,   7,   8,   9,   0,MINS, EQL,BSPC,    CAPS,HOME,PGUP, \
    TAB,    Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,LBRC,RBRC,BSLS,     DEL, END,PGDN, \
    BTN1,   A,   S,   D,   F,   G,   H,   J,   K,   L,SCLN,QUOT,      ENT,    BTN2,MUTE,VOLU, \
    LSFT,        Z,   X,   C,   V,   B,   N,   M,COMM, DOT,SLSH,     CAPS,    BTN3,  UP,VOLD, \
    LCTL,LGUI,LALT,               SPC,                  NO,RALT, APP,RCTL,    LEFT,DOWN,RGHT),


/*  Layer 1: Numlock mode (Numlock)
 * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.
 * |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|Nlk|Mac|
 * `---'   `---------------' `---------------' `---------------' `-----------'
 * ,-----------------------------------------------------------. ,-----------.
 * |~  |  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backsp | |  /|  *|  -|
 * |-----------------------------------------------------------| |-----------|
 * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \| |P_7|P_8|P_9|
 * |-----------------------------------------------------------| |---|---|---|
 * |Btn1  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return  | |P_4|P_5|P_6|
 * |-----------------------------------------------------------| |---|---|---|
 * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Shift     | |P_1|P_2|P_3|
 * |-----------------------------------------------------------| |-----------|
 * |Ctl|Gui|Alt|          Space                |???|Alt|App|Ctl| |P_0|Pdt|Pls|
 * `-----------------------------------------------------------' `-----------'
 */

 KEYMAP(\
    ESC,   F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9, F10, F11, F12,         PSCR, FN0, FN2, \
    GRV,    1,   2,   3,   4,   5,   6,   7,   8,   9,   0,MINS, EQL,BSPC,    PSLS,PAST,PMNS, \
    TAB,    Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,LBRC,RBRC,BSLS,      P7,  P8,  P9, \
    BTN1,   A,   S,   D,   F,   G,   H,   J,   K,   L,SCLN,QUOT,      ENT,      P4,  P5,  P6, \
    LSFT,        Z,   X,   C,   V,   B,   N,   M,COMM, DOT,SLSH,     RSFT,      P1,  P2,  P3, \
    LCTL,LGUI,LALT,                SPC,                 NO,RALT, APP,RCTL,      P0,PDOT,PPLS),


};



/* id for user defined functions */
enum function_id {
    MACRO                   = 0xff
};

static const uint16_t PROGMEM fn_actions[] = {
    ACTION_LAYER_DEFAULT,        // FN0
    ACTION_LAYER_SET_TOGGLE(1),  // FN1 NLCK
    ACTION_FUNCTION(MACRO, 0),   // FN2
};


/*
 * Macro definition
 */
#define MACRO(...) ({ static prog_macro_t _m[] PROGMEM = { __VA_ARGS__ }; _m; })
#define MACRO_NONE  0
static const prog_macro_t *get_macro(uint8_t id, bool pressed)
{
    switch (id) {
        case 0:
            return (pressed ?
                    MACRO( MD(LALT), D(F4), END ) :
                    MACRO( U(F4), MU(LALT), END ) );
    }
    return MACRO_NONE;
}



/*
 * user defined action function
 */
void keymap_call_function(keyrecord_t *record, uint8_t id, uint8_t opt)
{
    keyevent_t event = record->event;
    uint8_t tap_count = record->tap_count;

    debug("action_call_function: ");
    if (event.pressed) debug("pressed"); else debug("released");
    debug(" id: "); debug_hex(id);
    debug(" tap_count: "); debug_dec(tap_count);
    debug("\n");

    switch (id) {
        case MACRO:
            action_macro_play(get_macro(opt, event.pressed));
            break;
    }
}



/* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key)
{
    return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
}

/* translates Fn index to action */
action_t keymap_fn_to_action(uint8_t keycode)
{
    action_t action;
    if (FN_INDEX(keycode) < sizeof(fn_actions) / sizeof(fn_actions[0])) {
        action.code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]);
    } else {
        action.code = ACTION_NO;
    }
    return action;
}

/* convert key to action */
action_t action_for_key(uint8_t layer, key_t key)
{
    uint8_t keycode = keymap_key_to_keycode(layer, key);
    switch (keycode) {
        case KC_FN0 ... KC_FN31:
            return keymap_fn_to_action(keycode);
        default:
            return keymap_keycode_to_action(keycode);
    }
}
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Findecanor on Thu, 21 February 2013, 18:24:57
Yes that would be pretty cool! I think I just need the measurements or the location of the bottom right cluster, even just their location in relation to the alpha keys would do ;D
Sorry for the late reply, but I have been in a mess the past few days. Actually, my old modified file wasn't clean enough, so I had to redo it. I assumed you wanted ANSI.
The right Alt is under . and the keys to the right of it are aligned with [ ] and \ .
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: jdcarpe on Thu, 21 February 2013, 19:16:29
Yes that would be pretty cool! I think I just need the measurements or the location of the bottom right cluster, even just their location in relation to the alpha keys would do ;D
Sorry for the late reply, but I have been in a mess the past few days. Actually, my old modified file wasn't clean enough, so I had to redo it. I assumed you wanted ANSI.
The right Alt is under . and the keys to the right of it are aligned with [ ] and \ .

Yay! I did it right, then. I tried to help Acetrak with this, and hoped for the best.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: laden3 on Fri, 22 February 2013, 03:35:00
hasu, for some reason, the entire row16 doesn't work for me and I really do not know how to troubleshoot that.

So, I use the AVR-keyboard firmware from here http://wiki.geekhack.org/index.php?title=AVR-Keyboard

Now the problem is, how do I create a normal layout with media functions that can be replaced by a numpad when num lock is pressed.
It seems like the using the keycodes designated for the numpad will produce keystrokes when num lock is deactivated.

How do I make the LED B light up when num lock is pressed instead on scroll lock (I plan to totally remove scroll lock).

Someone please help, thanks in advance@!@!@!
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: hasu on Fri, 22 February 2013, 11:22:49
hmm, weird. row 16? which keys actually?
They worked with my firmware before?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: laden3 on Fri, 22 February 2013, 15:52:38
They are the pause/break, page up, page down, and -> arrow key. Thanks.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: hasu on Sun, 24 February 2013, 09:34:39
Mebe, this patch will fix the problem.

Code: [Select]
diff --git a/common/keyboard.c b/common/keyboard.c
index e4bc3dc..432ea89 100644
--- a/common/keyboard.c
+++ b/common/keyboard.c
@@ -86,7 +86,7 @@ void keyboard_task(void)
                 if (matrix_change & ((matrix_row_t)1<<c)) {
                     action_exec((keyevent_t){
                         .key = (key_t){ .row = r, .col = c },
-                        .pressed = (matrix_row & (1<<c)),
+                        .pressed = (matrix_row & ((matrix_row_t)1<<c)),
                         .time = (timer_read() | 1) /* time should not be 0 */
                     });
                     // record a processed key
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Tranquilite on Mon, 25 February 2013, 00:08:24
I can confirm that the patch you posted fixes the non-working 16th column (or row, i cant remember which it would be). Those tricky bit-shifts...
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: hasu on Mon, 25 February 2013, 01:59:02
Thanks, I'll merge that patch later.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Melvang on Fri, 01 March 2013, 00:25:39
Hey guys love all the great work that has been done with this Phantom keyboard.

However, I want to change it and have a few questions.  First off based off reading a couple of the previous posts it sounds like I can't put media keys on the top layer.  I was hoping to put media keys in the insert cluster where insert and such are.  Am I reading this right? 

I finally figured out how to get to the keymap.c file and pulled it up in the winavr programmers notepad.  So if I want to change the layout all I have to is change what it says for the key on the layout and then in the matrix right below the layout correct?  Also what should I put for no key in the layout and in the matrix below?  What I want to do with that is move the "F" keys to the number keys as a function layer because I will be physically removing the switches from the board.

So this leads into my next question.  How do I specify the bottom key map to be my function layer and I would assume that any keys that are not changed in the Function layer would remain the same.  In the layout and the matrix lines would i just put FN in for the function key?  I am wanting to do the function as a momentary only and not a toggle.

I apologize in advance if these seem like newbie questions but this is the most in depth I have gone into electronics and programming stuff.  The extent of my hardware experience is remove and replace parts inside my computer, and writing a couple very simple programs for my TI-86 back in high school almost 15 years ago.  Any help in this matter would be appreciated.

Melvang
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: hasu on Fri, 01 March 2013, 05:52:40
You can put media keys on any layer.
I'm not sure about other questions. If you need more help you can post your keymap.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: alaricljs on Fri, 01 March 2013, 08:38:30
However, I want to change it and have a few questions.  First off based off reading a couple of the previous posts it sounds like I can't put media keys on the top layer.  I was hoping to put media keys in the insert cluster where insert and such are.  Am I reading this right?   As hasu mentioned, that should be no problem.

I finally figured out how to get to the keymap.c file and pulled it up in the winavr programmers notepad.  So if I want to change the layout all I have to is change what it says for the key on the layout and then in the matrix right below the layout correct?  The only place that counts is in the matrix, the comment block is just for reference.

Also what should I put for no key in the layout and in the matrix below?  NO  (literally that)

What I want to do with that is move the "F" keys to the number keys as a function layer because I will be physically removing the switches from the board.

So this leads into my next question.  How do I specify the bottom key map to be my function layer and I would assume that any keys that are not changed in the Function layer would remain the same.  In the layout and the matrix lines would i just put FN in for the function key?  As long as the fn_layer array is unchanged you use FN1 to get to layer 1.  Also place FN1 in the same location in both layers.  The new layer assignments are as listed, if you only want a few things to change, duplicate layer 0 to layer 1 then make your changes.

I am wanting to do the function as a momentary only and not a toggle.  That is how it works.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Melvang on Fri, 01 March 2013, 09:04:56
Alaricljs

Thanx for the info will get started on changing this stuff around and get it posted here so you guys can laugh at how bad I am probably about to screw this thing up.  Not really tweaking a whole lot just moving a couple things around


Edit: adding code for you guys to check it out for evaluation

Code: [Select]
Copyright 2011 Jun Wako <wakojun@gmail.com>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

/*
 * Keymap for Phantom controller
 */
#include <stdint.h>
#include <stdbool.h>
#include <avr/pgmspace.h>
#include "keycode.h"
#include "print.h"
#include "debug.h"
#include "util.h"
#include "keymap.h"


// Convert physical keyboard layout to matrix array.
// This is a macro to define keymap easily in keyboard layout form.
#define KEYMAP( \
    K5A, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N,           K5O, K5P, K5Q, \
    K5B, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4N,      K4O, K4P, K4Q, \
    K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N,      K3O, K3P, K3Q, \
    K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2N,           K2O, K2P, K2Q, \
    K1A,      K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1N,           K1O, K1P, K1Q, \
    K0A, K0B, K0C,           K0H,                     K0K, K0L, K0M, K0N,      K0O, K0P, K0Q  \
) { \
/*             A         B         C         D         E         F         G         H         I         J         K         L          M        N          O         P         Q    */  \
/* 0 */   { KC_##K0A, KC_##K0B, KC_##K0C, KC_NO   , KC_NO   , KC_NO   , KC_NO   , KC_##K0H, KC_NO   , KC_NO   , KC_##K0K, KC_##K0L, KC_##K0M, KC_##K0N, KC_##K0O, KC_##K0P, KC_##K0Q}, \
/* 1 */   { KC_##K1A, KC_NO   , KC_##K1C, KC_##K1D, KC_##K1E, KC_##K1F, KC_##K1G, KC_##K1H, KC_##K1I, KC_##K1J, KC_##K1K, KC_##K1L, KC_NO   , KC_##K1N, KC_##K1O, KC_##K1P, KC_##K1Q}, \
/* 2 */   { KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, KC_##K2E, KC_##K2F, KC_##K2G, KC_##K2H, KC_##K2I, KC_##K2J, KC_##K2K, KC_##K2L, KC_NO   , KC_##K2N, KC_##K2O, KC_##K2P, KC_##K2Q}, \
/* 3 */   { KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_##K3F, KC_##K3G, KC_##K3H, KC_##K3I, KC_##K3J, KC_##K3K, KC_##K3L, KC_##K3M, KC_##K3N, KC_##K3O, KC_##K3P, KC_##K3Q}, \
/* 4 */   { KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E, KC_##K4F, KC_##K4G, KC_##K4H, KC_##K4I, KC_##K4J, KC_##K4K, KC_##K4L, KC_NO   , KC_##K4N, KC_##K4O, KC_##K4P, KC_##K4Q}, \
/* 5 */   { KC_##K5A, KC_##K5B, KC_##K5C, KC_##K5D, KC_##K5E, KC_##K5F, KC_##K5G, KC_##K5H, KC_##K5I, KC_##K5J, KC_##K5K, KC_##K5L, KC_##K5M, KC_##K5N, KC_##K5O, KC_##K5P, KC_##K5Q}, \
}

#define KEYCODE(layer, row, col) (pgm_read_byte(&keymaps[(layer)][(row)][(col)]))


// Assign Fn key(0-7) to a layer to which switch with the Fn key pressed.
static const uint8_t PROGMEM fn_layer[] = {
    0,              // Fn0
    1,              // Fn1
    2,              // Fn2
    3,              // Fn3
    4,              // Fn4
    5,              // Fn5
    6,              // Fn6
    7               // Fn7
};

// Assign Fn key(0-7) to a keycode sent when release Fn key without use of the layer.
// See layer.c for details.
static const uint8_t PROGMEM fn_keycode[] = {
    KC_NO,          // Fn0
    KC_NO,          // Fn1
    KC_NO,          // Fn2
    KC_NO,          // Fn3
    KC_NO,          // Fn4
    KC_NO,          // Fn5
    KC_NO,          // Fn6
    KC_NO           // Fn7
};

/*
 * Phantom keyboard layout with winkeys and 7bit style editing block. I am
 * Not in the mood to implement full 7-bit keymap.
 *
 *
 * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.
 * |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
 * `---'   `---------------' `---------------' `---------------' `-----------'
 * ,-----------------------------------------------------------. ,-----------.
 * |~  |  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backsp | |Ins|Hom|PgU|
 * |-----------------------------------------------------------| |-----------|
 * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \| |Del|End|PgD|
 * |-----------------------------------------------------------| |---|---|---|
 * |Caps  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return  | |???|???|???|
 * |-----------------------------------------------------------| |---|---|---|
 * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Shift     | |???|Up |???|
 * |-----------------------------------------------------------| |-----------|
 * |Ctl|Gui|Alt|          Space                |Alt|Gui|App|Ctl| |Lef|Dow|Rig|
 * `-----------------------------------------------------------' `-----------'
 */


static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Layer 0: Default Layer
 *
 * ANSI:
 *
 * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.
 * |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
 * `---'   `---------------' `---------------' `---------------' `-----------'
 * ,-----------------------------------------------------------. ,-----------.
 * |~  |  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backsp | |Ins|Hom|PgU|
 * |-----------------------------------------------------------| |-----------|
 * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \| |Del|End|PgD|
 * |-----------------------------------------------------------| |---|---|---|
 * |Caps  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return  | |???|???|???|
 * |-----------------------------------------------------------| |---|---|---|
 * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Shift     | |???|Up |???|
 * |-----------------------------------------------------------| |-----------|
 * |Ctl|Gui|Alt|          Space                |Alt|Gui|App|Ctl| |Lef|Dow|Rig|
 * `-----------------------------------------------------------' `-----------'
 */

  KEYMAP(\
    ESC,  NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,   NO,   NO,         NO,   NO,   NO, \
    GRV,   1,   2,   3,   4,   5,   6,   7,   8,   9,   0, MINS,  EQL, BSPC,  INS, HOME, PGUP, \
    TAB,   Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P, LBRC, RBRC, BSLS,  DEL,  END, PGDN, \
    FN1,   A,   S,   D,   F,   G,   H,   J,   K,   L, SCLN, QUOT,       ENT,    0,    0,    0, \
    LSFT,       Z,   X,   C,   V,   B,   N,   M, COMM,  DOT, SLSH,      RSFT,   0,   UP,    0, \
    LCTL, LGUI, LALT,             SPC,                RALT, RGUI, APP, RCTL, LEFT, DOWN, RGHT),


/*  Layer 1: Function Layer
 *
 * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.
 * |Esc|   |   |   |   |   | |   |   |   |   | |   |   |   |   | |   |   |   |
 * `---'   `---------------' `---------------' `---------------' `-----------'
 * ,-----------------------------------------------------------. ,-----------.
 * |~  | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Backsp | |V- |Mut|V+ |
 * |-----------------------------------------------------------| |-----------|
 * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \| |Prv|Ply|Nxt|
 * |-----------------------------------------------------------| |-----------|
 * |FN1   |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return  | |???|???|???|
 * |-----------------------------------------------------------| |-----------|
 * |Shft    |  Z|  X|Clc|  V|  B|  N|  M|  ,|  .|  /|Caps      | |???|Up |???|
 * |-----------------------------------------------------------| |-----------|
 * |Ctl|Gui|Alt|          Space                |Alt|Gui|App|Ctl| |Lef|Dow|Rig|
 * `-----------------------------------------------------------' `-----------'
 */

 KEYMAP(\
    ESC,  NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,   NO,   NO,         NO,   NO,   NO, \
    GRV,  F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9, F10,  F10,  F11,  F12, VOLD, MUTE, VOLU, \
    TAB,   Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P, LBRC, RBRC, BSLS, MPRV, MPLY, MNXT, \
    FN1,   A,   S,   D,   F,   G,   H,   J,   K,   L, SCLN, QUOT,       ENT,    0,    0,    0, \
    LSFT,       Z,   X,CALC,   V,   B,   N,   M, COMM, DOT, SLSH,      CAPS,    0, PSCR,    0, \
    LCTL, LGUI, LALT,             SPC,                RALT, RGUI, APP, RCTL, LEFT, DOWN, RGHT),


};


uint8_t keymap_get_keycode(uint8_t layer, uint8_t row, uint8_t col)
{
    return KEYCODE(layer, row, col);
}

uint8_t keymap_fn_layer(uint8_t index)
{
    return pgm_read_byte(&fn_layer[index]);
}

uint8_t keymap_fn_keycode(uint8_t index)
{
    return pgm_read_byte(&fn_keycode[index]);
}
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Batmann on Sat, 18 May 2013, 10:42:06
Not sure this is the right place but I don't see where to ask for help,
So I received my Phantom PCB with diodes,
I soldered all the diodes and checked them with a multimeter -> all good, no diodes shorted and all of them are soldered correctly, - pin on the square pad.
I soldered the teensy and uploaded the ANSI win firmware from bpphany -> seems all right
Problem is I have non working keys.
I didn't solder any switch so I plugged the board and checked voltage for each switch and some of them are showing 0V (confirmed by a writing test in a notepad)

I have very few electronics knowledge so I might be missing something obvious or I might be testing things wrong so here is my question:

If you come accross a faulty switch what are the steps you use to try and fix it.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: gnubag on Sat, 18 May 2013, 14:15:09
Not sure this is the right place but I don't see where to ask for help,
So I received my Phantom PCB with diodes,
I soldered all the diodes and checked them with a multimeter -> all good, no diodes shorted and all of them are soldered correctly, - pin on the square pad.
I soldered the teensy and uploaded the ANSI win firmware from bpphany -> seems all right
Problem is I have non working keys.
I didn't solder any switch so I plugged the board and checked voltage for each switch and some of them are showing 0V (confirmed by a writing test in a notepad)

I have very few electronics knowledge so I might be missing something obvious or I might be testing things wrong so here is my question:

If you come accross a faulty switch what are the steps you use to try and fix it.

try aquakeytest and a diode leg to short the switches.
if you have soldered everything right and the keys are not working there is probably a problem with the firmware.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Batmann on Sat, 18 May 2013, 17:14:06
Ok so I tried aquakey and here is the result

(https://dl.dropboxusercontent.com/u/63153503/aquakey.png)

the right alt is now working (I forgot to solder the diode)

I resolder every diode on the faulty keys and same result.
I also reloaded the firmware and tried both win and winkeyless.
Problem is still here.
So now I guess it has something to do with the teensy.

Can the faulty keys pattern be linked to a specific teensy leg?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: gnubag on Sat, 18 May 2013, 17:47:26
Ok so I tried aquakey and here is the result

Show Image
(https://dl.dropboxusercontent.com/u/63153503/aquakey.png)


the right alt is now working (I forgot to solder the diode)

I resolder every diode on the faulty keys and same result.
I also reloaded the firmware and tried both win and winkeyless.
Problem is still here.
So now I guess it has something to do with the teensy.

Can the faulty keys pattern be linked to a specific teensy leg?

probably check the teensy, it looks like some columns are not registering.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Batmann on Sat, 18 May 2013, 18:17:47
Problem solved
I forgot to solder the inner pins on the teensy (the ones that are not presoldered on the chip)
Now I'm happy :D
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: SpAmRaY on Mon, 20 May 2013, 14:59:54
How difficult is it to wipe out the firmware and start over on a phantom?

Say I've got a board with 91 keys but the firmware is setup for 86 how easy/hard is it to fix it back to using 91 and add a second layer for the numpad area?

Title: Re: Building Phantom Hardware and Firmware Mods
Post by: SmallFry on Mon, 20 May 2013, 22:43:37
I can help you with that man. :D
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: SpAmRaY on Tue, 21 May 2013, 00:39:57
I can help you with that man. :D

i passed on that one board i was pm'ing you about but i will still need help eventually when i do get a phantom  :p
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Glod on Tue, 21 May 2013, 20:18:48
<delete me>
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: WhiteFireDragon on Thu, 23 May 2013, 23:47:44
I just posted my teensy in another thread so it reminded me to mention it here too since I know people are starting to get PCBs and plates:

When you build yours, solder the teensy as flush as you can to the PCB. Mine is touching the PCB, with only 1 layer of electrical tape between the PCB and teensy to insulate them. You'd want it as flush as possible because this could help clearance with future case designs. Also, the solder joint on the other side should be as flush as possible. If they stick up like typical solder joints, then switches won't be flush. Mine are literally flat.


[attach=1] [attach=2] [attach=3]
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Photekq on Mon, 27 May 2013, 13:49:16
I just posted my teensy in another thread so it reminded me to mention it here too since I know people are starting to get PCBs and plates:

When you build yours, solder the teensy as flush as you can to the PCB. Mine is touching the PCB, with only 1 layer of electrical tape between the PCB and teensy to insulate them. You'd want it as flush as possible because this could help clearance with future case designs. Also, the solder joint on the other side should be as flush as possible. If they stick up like typical solder joints, then switches won't be flush. Mine are literally flat.


(Attachment Link) (Attachment Link) (Attachment Link)
How do you achieve those flat solder joints? Mine always bulb up even if the through-hole pins don't stick out the hole.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Batmann on Mon, 27 May 2013, 14:15:49
to get mine completely flush, I put it in place without the insulation layer and pushed it all the way against the PCB. Then I cut the pins the "tighter" I could and when I put the insulation layer back, pins were completely flush so soldering didn't leave any "bubbles"
Hope that makes sense  :)
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: gimpster on Thu, 30 May 2013, 16:58:41
Yup, the pins have to be trimmed so they sit below the surface of the PCB and then when you solder, you just have to be very careful about how much solder you put into each hole.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Photekq on Thu, 30 May 2013, 17:00:32
Thanks ^^
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: The_Beast on Sat, 01 June 2013, 19:08:29
For absolute coding noobs (me in this case), is there a GUI programmer that supports layers and macros (say I want of the 1x bottom row keys to be copy, and the other be paste)? I don't think that alaricljs supported layers or macros


Also, after reading, it is possible to reprogram the teensy without pushing the button right?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Sat, 01 June 2013, 19:19:08
Also, after reading, it is possible to reprogram the teensy without pushing the button right?

If you already have a firmware running on the Teesny that supports jumping to the bootloader you can do this. You will need to push the button at least once to load one. After that you will only need to do it if you load a bad firmware (something that tends to happen at least when you write code yourself...).
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Rendom on Sat, 01 June 2013, 19:19:22
These two hex files are from the original source code from prins.  They work.
(Attachment Link)
(Attachment Link)

This one is from a recent github source.  For PHANSI.

(Attachment Link)

Are these the firmware codes/program for the Phantom to work?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: SpAmRaY on Sat, 01 June 2013, 19:50:22
For absolute coding noobs (me in this case), is there a GUI programmer that supports layers and macros (say I want of the 1x bottom row keys to be copy, and the other be paste)? I don't think that alaricljs supported layers or macros


Also, after reading, it is possible to reprogram the teensy without pushing the button right?

GUI programmer would be awesome!
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: SmallFry on Sat, 01 June 2013, 20:29:17
IMO, Hasu's code is *very* friendly to learn. I should make a YouTube video sometime.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Melvang on Sat, 01 June 2013, 20:51:31
please do so for us non coders that still want to build the firmware ourselves
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: gnubag on Sat, 01 June 2013, 23:30:42
it is pretty stright forward to be honest.
it takes like 5 min to figure it out, since you are just modifying it and not doing it all over.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Melvang on Mon, 03 June 2013, 00:09:42
Anyone know the exact dimensions for the phantom plate and PCB?  Need the numbers for a custom case I am building.  And I would assume that the PCB is pretty much centered on the plate when installed?

Melvang
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Fri, 07 June 2013, 08:33:58
Has there been any major changes to the firmware lately? I haven't been following it, and am just wondering if multi-stroke key presses or any sort of macro functionality has been implemented? Did any of the other firmwares than Hasu's ever get of the ground?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Rendom on Mon, 10 June 2013, 12:39:11
Can anyone teach me and run through with the coding, and firmware mods? I will be getting my Phantom assembled soon.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Fri, 14 June 2013, 13:46:20
Has there been any major changes to the firmware lately? I haven't been following it, and am just wondering if multi-stroke key presses or any sort of macro functionality has been implemented? Did any of the other firmwares than Hasu's ever get of the ground?

Not only that, but has any support for MX lock switches been added to the lock features such as caps lock?

I also believe I heard someone mention that support for media keys had been added, is that true?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: yeeeargh on Fri, 14 June 2013, 14:25:56
yep, media keys are available
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Fri, 14 June 2013, 14:27:53
and MX lock?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: jdcarpe on Fri, 14 June 2013, 15:05:56
and MX lock?

You can put an MX lock switch wherever you like. Just program it to be a shift key. The firmware just outputs the scan codes. It's your OS that would be confused if you had it programmed as caps lock. It would never register the key up event until you unlock the switch.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Fri, 14 June 2013, 15:08:34
That is the way I am currently running it. Shift doesn't do the same as caps lock though, and doesn't work even slightly for the other locks. I am taking this as still no.

Does anyone know what happened to the other firmwares?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: jdcarpe on Fri, 14 June 2013, 15:22:33
That is the way I am currently running it. Shift doesn't do the same as caps lock though, and doesn't work even slightly for the other locks. I am taking this as still no.

Does anyone know what happened to the other firmwares?

What you want, then, is a new HID keyboard driver for [windows, Mac, Linux] that treats caps/scroll/num as momentary and not lock. I don't think there is a scan code that exists for these for the firmware to output.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Fri, 14 June 2013, 15:31:46
There was a keyboard posted at DT which solved it quite nicely. Since data is sent back to the keyboard with the lock state of the operating system, the keyboard could override it if it didn't correspond to the state of the lock key. No software would have to run on the OS and it would be compatible with all. No need to mess around with scan codes. The keyboard just ensures that caps lock is turned on if the mx lock switch is activated, it is as simple as that.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Fri, 14 June 2013, 21:42:35
So apparently Hasu has added support for locking keys since I asked for it a while back. This is more of a public service announcement for those that don't yet know and because I am happy about it.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Sat, 15 June 2013, 10:41:49
I don't know about PWM and phantom hardware very much, though this patch may cure your LED problem.
Where can I find phantom schematic?

Code: [Select]
diff --git a/keyboard/phantom/led.c b/keyboard/phantom/led.c
index 3523cb7..109004b 100644
--- a/keyboard/phantom/led.c
+++ b/keyboard/phantom/led.c
@@ -23,12 +23,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 void led_set(uint8_t usb_led)
 {
     if (!(usb_led & (1<<USB_LED_CAPS_LOCK)))
-        PORTB &= ~(1<<6);
+        DDRB &= ~(1<<6);
     else
-        PORTB |= (1<<6);
+        DDRB |= (1<<6);

     if (!(usb_led & (1<<USB_LED_SCROLL_LOCK)))
-        PORTB &= ~(1<<7);
+        DDRB &= ~(1<<7);
     else
-        PORTB |= (1<<7);
+        DDRB |= (1<<7);
 }

Was this ever applied? The code is currently as quoted below and it causes the scroll lock to be very dim.
Replacing PORTB with DDRB works for me to fix it. I don't know or care why it works when I do so, but there is something fishy going on there.

Code: [Select]
#include <avr/io.h>
#include "led.h"


void led_set(uint8_t usb_led)
{
    if (usb_led & (1<<USB_LED_CAPS_LOCK))
    {
        // Output high.
        DDRB |= (1<<6);
        PORTB |= (1<<6);
    }
    else
    {
        // Output low.
        DDRB &= ~(1<<6);
        PORTB &= ~(1<<6);
    }

    if (usb_led & (1<<USB_LED_SCROLL_LOCK))
    {
        // Output high.
        DDRB &= ~(1<<7);
        PORTB |= (1<<7);
    }
    else
    {
        // Output low.
        DDRB &= ~(1<<7);
        PORTB &= ~(1<<7);
    }
}
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Wraul on Sat, 15 June 2013, 16:20:13
Was this ever applied? The code is currently as quoted below and it causes the scroll lock to be very dim.
Replacing PORTB with DDRB works for me to fix it. I don't know or care why it works when I do so, but there is something fishy going on there.

Hmm. You might have hit a bug there.
I'm not at home so I can't test this right now.

Does this give you the correct behavior?
Code: [Select]
#include <avr/io.h>
#include "led.h"


void led_set(uint8_t usb_led)
{
    if (usb_led & (1<<USB_LED_CAPS_LOCK))
    {
        // Output high.
        DDRB |= (1<<6);
        PORTB |= (1<<6);
    }
    else
    {
        // Output low.
        DDRB &= ~(1<<6);
        PORTB &= ~(1<<6);
    }

    if (usb_led & (1<<USB_LED_SCROLL_LOCK))
    {
        // Output high.
        DDRB |= (1<<7);
        PORTB |= (1<<7);
    }
    else
    {
        // Output low.
        DDRB &= ~(1<<7);
        PORTB &= ~(1<<7);
    }
}
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: agor on Mon, 17 June 2013, 16:50:25
Finally got around to tinker with my phantom a bit.
Soldered all necessary diodes and the teensy to the board and flashed firmware successfully (built tmk ones).

Problem I have: Windows does not seem to find a driver?
Also, after a reboot, the teensy led is flashing all the time. If I replug USB this stops
(http://i.imgur.com/QiD2fra.jpg)
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: agor on Tue, 18 June 2013, 10:37:13
Works fine with Linux though, but Windows is my main driver.
Also got another problem: it seems some keys are not working, most of them in the first row I think.

ESC, Tab, Caps, Shift, and Ctrl. Tilde works though. Black band of diode to the square. Also tested the solder joints of the diodes with Multimeter Diode Check from the backside and everything seemed fine :(
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Wraul on Tue, 18 June 2013, 10:46:12
Works fine with Linux though, but Windows is my main driver.
Also got another problem: it seems some keys are not working, most of them in the first row I think.

ESC, Tab, Caps, Shift, and Ctrl. Tilde works though. Black band of diode to the square. Also tested the solder joints of the diodes with Multimeter Diode Check from the backside and everything seemed fine :(

What layout are you using?
With the tmk firmware I have only tested the ANSI layout on actual hardware.

Btw. It worked for me in windows last time I tried.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: agor on Tue, 18 June 2013, 10:51:22
I'm using ISO Layout. If I select HID Keyboard driver manually it shows a different error "device could not boot" or sth like that.
Where can I measure to find out why the keys are not working?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Wraul on Tue, 18 June 2013, 11:07:25
I'm using ISO Layout. If I select HID Keyboard driver manually it shows a different error "device could not boot" or sth like that.
Where can I measure to find out why the keys are not working?

Just to make sure.
You did specify iso when building the firmware?
As instructed here https://github.com/tmk/tmk_keyboard/tree/master/keyboard/phantom#build
It defaults to ANSI, but that should only result in a few non working keys.

More exactly which keys are not working?

You can diagnose the firmware using hid_listen. You find hid_listen here http://www.pjrc.com/teensy/hid_listen.html
Available commands is listed here https://github.com/tmk/tmk_keyboard#magic-comannds

I don't know much about Windows, sorry.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: agor on Tue, 18 June 2013, 11:32:24
Firmware was built using: make -f Makefile.pjrc iso

Just debugged the keyboard matrix, it seems the whole column0 is not working, which for iso seems: Esc, 1, Tab, Caps, LShift, LCtrl

Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Wraul on Tue, 18 June 2013, 12:22:45
Firmware was built using: make -f Makefile.pjrc iso

Just debugged the keyboard matrix, it seems the whole column0 is not working, which for iso seems: Esc, 1, Tab, Caps, LShift, LCtrl



Check your connection on pin D5
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: agor on Tue, 18 June 2013, 13:19:29
Solder joint looks fine to me, but I'll address this after my vacation. I'll be back in 4 months, thanks for your help!
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Wraul on Tue, 18 June 2013, 14:08:12
Solder joint looks fine to me, but I'll address this after my vacation. I'll be back in 4 months, thanks for your help!

Sure. No problem.
Have a nice vacation.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: agor on Tue, 18 June 2013, 17:02:42
4 weeks I mean, my employer would kill me :-D
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Glod on Wed, 19 June 2013, 04:27:05
It is such a good feeling when you put something together and everything works. Building this phantom was rewarding

(http://farm4.staticflickr.com/3779/9082303672_fe3db47eeb.jpg) (http://www.flickr.com/photos/panicfx/9082303672/)
Untitled (http://www.flickr.com/photos/panicfx/9082303672/) by almightyglod (http://www.flickr.com/people/panicfx/), on Flickr

(http://farm6.staticflickr.com/5503/9080085663_e6a11ed9a4.jpg) (http://www.flickr.com/photos/panicfx/9080085663/)
Untitled (http://www.flickr.com/photos/panicfx/9080085663/) by almightyglod (http://www.flickr.com/people/panicfx/), on Flickr
(http://farm8.staticflickr.com/7345/9080148375_125375ec8d.jpg) (http://www.flickr.com/photos/panicfx/9080148375/)
Untitled (http://www.flickr.com/photos/panicfx/9080148375/) by almightyglod (http://www.flickr.com/people/panicfx/), on Flickr

(http://farm4.staticflickr.com/3742/9080087371_100310f513.jpg) (http://www.flickr.com/photos/panicfx/9080087371/)
Untitled (http://www.flickr.com/photos/panicfx/9080087371/) by almightyglod (http://www.flickr.com/people/panicfx/), on Flickr

Wfd plate

Oh and if your wondering what those black rubber gum drop shaped things are it is my little mod with sugru that allows me to use vortex aluminium case. I chose sugru because The material is for the most part hard but is also a little soft, it's not a rock when cured . When you put together the case and pcb everything is nice and tight and level. Without this mod the pcb is balancing in the case only on the teensy.

(http://farm8.staticflickr.com/7387/9082333438_7cafba3b47.jpg) (http://www.flickr.com/photos/panicfx/9082333438/)
Untitled (http://www.flickr.com/photos/panicfx/9082333438/) by almightyglod (http://www.flickr.com/people/panicfx/), on Flickr

Also worth noting to those looking at vortex case for phantom. you have to mod the case or the pcb like I did and you have to solder the teensy super close to pcb, I used electrical tape and then soldered as close as possible. Just a few mm of more space and the vortex case Will Not work..




Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Melvang on Wed, 19 June 2013, 08:45:24
could someone post a quick diagram on how to hard wire a phantom board to a teensy without the standard pcb so that the columns and rows line up with their respective pins on the teensy?  I have an idea for mine that won't allow the use of the pcb.  Also any suggestions where i could get a new teensy controller? 
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: jdcarpe on Wed, 19 June 2013, 08:50:14
could someone post a quick diagram on how to hard wire a phantom board to a teensy without the standard pcb so that the columns and rows line up with their respective pins on the teensy?  I have an idea for mine that won't allow the use of the pcb.  Also any suggestions where i could get a new teensy controller? 

You can buy a Teensy direct from PJRC at http://www.pjrc.com/teensy

I don't think it will work just wiring the matrix direct to the pins on the ATmega32U4, however. There are some other electrical components that would be missing.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Melvang on Wed, 19 June 2013, 08:52:04
I know i would need diodes just not sure which columns and rows line up with with pins on the teensy and that is a lot of lines to follow on the pcb without much room for error.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: WhiteFireDragon on Wed, 19 June 2013, 23:51:42
First one I built from this round 2 batch. It's pretty long, but there is a detailed index in the video description to jump around:




There are instructions on DT, but these are the key differences that I do:

Title: Re: Building Phantom Hardware and Firmware Mods
Post by: SpAmRaY on Wed, 19 June 2013, 23:55:01
First one I built from this round 2 batch. It's pretty long, but there is a detailed index in the video description to jump around:




There are instructions on DT, but these are the key differences that I do:

  • solder diodes on the opposite side of the switches, so they're facing down. This is so you can easily replace them if any happens rather than desoldering the whole board
  • solder the top side of one of the two legs so it holds diode in place, clip excess leads, then solder the bottom two legs. This holds them in place, so you don't have bent leads when soldering
  • make the teensy as flush as possible, as described here (http://geekhack.org/index.php?topic=26742.msg903513#msg903513), so it can be compatible with current and future cases.

I'm going to watch this tomorrow but just seeing all those different switches  :o !!
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Denonic on Fri, 21 June 2013, 08:06:47
I'm going to watch this tomorrow but just seeing all those different switches  :o !!

Haha awesome job WFD.  That's my switch selection and the reasons behind each are on my blog here if interested: link (http://techxamine.blogspot.com.au/2013/06/custom-gaming-mechanical-keyboard.html)

I wouldn't dare to do this with a non switchable plate top though.

Cheers again WFD!
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: remmeh on Mon, 24 June 2013, 18:03:39
Anyone happen to be using a USB KVM with a Phantom? I'm using an iogear one and it refuses to work through the KVM.

Think this is fixable through firmware somehow?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: kaiserreich on Tue, 25 June 2013, 05:48:46
Do I need to use linux to compile a custom layout firmware or is there an easier way under Windows?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Tue, 25 June 2013, 06:08:04
Do I need to use linux to compile a custom layout firmware or is there an easier way under Windows?

There surely is a way. It ain't gonna be easier though...

Edit: You were perhaps looking for a GUI or something. I'm not sure if someone built something like that. Compiling on the other hand is going to be easier on Linux any day.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Tue, 25 June 2013, 06:23:37
could someone post a quick diagram on how to hard wire a phantom board to a teensy without the standard pcb so that the columns and rows line up with their respective pins on the teensy?  I have an idea for mine that won't allow the use of the pcb.  Also any suggestions where i could get a new teensy controller? 

Schematics!

[attachimg=1]
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: remmeh on Tue, 25 June 2013, 08:21:47
Do I need to use linux to compile a custom layout firmware or is there an easier way under Windows?

There surely is a way. It ain't gonna be easier though...

Edit: You were perhaps looking for a GUI or something. I'm not sure if someone built something like that. Compiling on the other hand is going to be easier on Linux any day.

I installed cygwin + WinAVR and this allowed me to compile from the commandline.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Tranquilite on Tue, 25 June 2013, 16:37:34
I'm able to compile Hasu's code in windows from commandline with just WinAVR.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Melvang on Wed, 26 June 2013, 05:48:19
could someone post a quick diagram on how to hard wire a phantom board to a teensy without the standard pcb so that the columns and rows line up with their respective pins on the teensy?  I have an idea for mine that won't allow the use of the pcb.  Also any suggestions where i could get a new teensy controller? 

Schematics!

(Attachment Link)

Thanks a lot for this good sir.  Now to see if I can make heads and or tails out of it when i get my really custom plate made for mine.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: danielucf on Sat, 29 June 2013, 02:29:23
So I put everything together and not all my keys are working. I tried a couple different hex files but have not tried to compile my own yet. Does anyone have a link to a nice Ansi150 layout hex I can try just to be sure?

(http://i.imgur.com/58WLOtN.jpg)
This shows the keys that work. I had my ErgoDox work flawlessly the first time I plugged it in and flashed a firmware, and I just built a 38GT last night with zero issues with my diodes. Any ideas?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: The_Beast on Sat, 29 June 2013, 02:33:28
So I put everything together and not all my keys are working. I tried a couple different hex files but have not tried to compile my own yet. Does anyone have a link to a nice Ansi150 layout hex I can try just to be sure?

Show Image
(http://i.imgur.com/58WLOtN.jpg)

This shows the keys that work. I had my ErgoDox work flawlessly the first time I plugged it in and flashed a firmware, and I just built a 38GT last night with zero issues with my diodes. Any ideas?

Looks like a problem with some of the rows


Did you solder those 3 extra pins on the teensy?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: danielucf on Sat, 29 June 2013, 02:41:18
Did you solder those 3 extra pins on the teensy?

Nope....  :(

Back to the drawing board, I might have a lot of desoldering to do unless there is a way to get these in with the plate/keys attached. Completely my fault being a newb and skipping directions.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: The_Beast on Sat, 29 June 2013, 02:43:17
Did you solder those 3 extra pins on the teensy?

Nope....  :(

Back to the drawing board, I might have a lot of desoldering to do unless there is a way to get these in with the plate/keys attached. Completely my fault being a newb and skipping directions.

You might be able to insert the pins in through the


your plates already on :(.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: danielucf on Sat, 29 June 2013, 02:51:19
Looking at WhiteFireDragon's teensy picture it looks like I should have pins through D4, D5, and E6 (As labeled on the teensy PCB). It looks like it'll be less work to desolder the small Teensy PCB.

This line right here "Make sure you also install legs to pin 13, 17, and 30." Arg  :-[

Still need a Ansi150 hex file from somewhere. Not worried about function layers until I have more time to learn how to compile my own .hex files.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: The_Beast on Sat, 29 June 2013, 02:52:45
Looking at WhiteFireDragon's teensy picture it looks like I should have pins through D4, D5, and E6 (As labeled on the teensy PCB). It looks like it'll be less work to desolder the small Teensy PCB.

This line right here "Make sure you also install legs to pin 13, 17, and 30." Arg  :-[

How are you going to desolder the teensy with the plate on? Unless you do all the pins on the teensy
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: danielucf on Sat, 29 June 2013, 02:59:16
I was going to desolder all the pins on the teensy (Only 24 instead of 172+ from switches and LEDs), but looking at the unused teensy for my second Phantom I think the solder is on both sides of the small PCB so I'm probably SOL.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: The_Beast on Sat, 29 June 2013, 03:00:39
I was going to desolder all the pins on the teensy (Only 24 instead of 172+ from switches and LEDs), but looking at the unused teensy for my second Phantom I think the solder is on both sides of the small PCB so I'm probably SOL.

Sucker or wick?


Also, I loaded hasu firmware for ansi150 and was freaking out since the caps lock didn't work so I desoldered/resoldered on a new diode and it still didn't work. I loaded in the other default phantom firmware and it work. Just an FYI encase you didn't know
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Rendom on Sat, 29 June 2013, 09:43:23
I need some help for the WFD125 layout plate. Has anyone who has the same plate compiled a layout for the firmware? And willing to share? Please PM me! My Phantom isn't working now. : (
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: WhiteFireDragon on Sat, 29 June 2013, 14:28:48
Did you solder those 3 extra pins on the teensy?

Nope....  :(

Back to the drawing board, I might have a lot of desoldering to do unless there is a way to get these in with the plate/keys attached. Completely my fault being a newb and skipping directions.

Looking at WhiteFireDragon's teensy picture it looks like I should have pins through D4, D5, and E6 (As labeled on the teensy PCB). It looks like it'll be less work to desolder the small Teensy PCB.

Yeah looks like you skipped this step at 22m 53sec (http://www.youtube.com/watch?v=gdLAdci6p-w#t=0h22m53s). You need to access both sides of the PCB to add in those 3 extra pins. Since you already have the plate installed and soldered the switches, you need to desolder all switches to take the everything off before you can access both sides of teensy.

To anyone building for the first time, test all connectivity between diodes, traces, and controller before the switches goes on. It saves the hassle that danielucf had to go through. That's at 34m 48s (http://www.youtube.com/watch?v=gdLAdci6p-w#t=0h34m48s), and 36m 00s (http://www.youtube.com/watch?v=gdLAdci6p-w#t=0h36m00s).
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Sat, 29 June 2013, 14:45:41
Is it  completely impossible the solder would jump the gap down onto the Phantom board through the Teensy if you add enough? Maybe it is possible to first add solder to the pads on the main board. There should be some room without a pin in there. Then heat some pin up pushing it through both holes, re-flowing the solder?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: WhiteFireDragon on Sat, 29 June 2013, 15:00:07
I was thinking something like that too since it's only 3 pins, but didn't recommend it because if he messes up, it might make the problem worst.

Do what bpiphany said if you're using solder wire. Add a lot of flux, melt a little bit of solder wire at a time and let it flow down the teensy hole into the keyboard PCB. Add the pin, reflow, and add more solder to the top. Alternatively, it might be easier to use solder paste and push it down all the way, add the pin, then heat it until it melts. The risk of doing this is that heating solder that's all the way down the hole might damage the top traces first before the solder on the bottom remelts.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Sat, 29 June 2013, 15:46:44
Solder paste of course.. That way you'll be able to get it all the way down where it is supposed to be before it solidifies =) Then just add the pin and heat it up.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: The_Beast on Sat, 29 June 2013, 16:01:27
Did you solder those 3 extra pins on the teensy?

Nope....  :(

Back to the drawing board, I might have a lot of desoldering to do unless there is a way to get these in with the plate/keys attached. Completely my fault being a newb and skipping directions.

Looking at WhiteFireDragon's teensy picture it looks like I should have pins through D4, D5, and E6 (As labeled on the teensy PCB). It looks like it'll be less work to desolder the small Teensy PCB.

Yeah looks like you skipped this step at 22m 53sec (http://www.youtube.com/watch?v=gdLAdci6p-w#t=0h22m53s). You need to access both sides of the PCB to add in those 3 extra pins. Since you already have the plate installed and soldered the switches, you need to desolder all switches to take the everything off before you can access both sides of teensy.

To anyone building for the first time, test all connectivity between diodes, traces, and controller before the switches goes on. It saves the hassle that danielucf had to go through. That's at 34m 48s (http://www.youtube.com/watch?v=gdLAdci6p-w#t=0h34m48s), and 36m 00s (http://www.youtube.com/watch?v=gdLAdci6p-w#t=0h36m00s).

Yup, I used my cheap $10 multimeter to test the columns and rows. I also did a aquatest with a bent wire just to double check.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Wraul on Sun, 30 June 2013, 07:11:03
Still need a Ansi150 hex file from somewhere. Not worried about function layers until I have more time to learn how to compile my own .hex files.
I built you a default ansi 150 firmware.
It uses this layout https://github.com/tmk/tmk_keyboard/tree/master/keyboard/phantom#2-ansi-150 (https://github.com/tmk/tmk_keyboard/tree/master/keyboard/phantom#2-ansi-150)
You can download it here https://dl.dropboxusercontent.com/u/1357824/tmk_phantom_ansi_150.hex (https://dl.dropboxusercontent.com/u/1357824/tmk_phantom_ansi_150.hex)
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: megaforce on Wed, 03 July 2013, 16:33:02
Need a bit of help with my programming my Phantom (using hasu's firmware) . I've modified phantom_ansi_150.h as shown below, and kept the rest of the headers and sources untouched.

Not sure what do to from here on out:

Code: [Select]
// Phantom ANSI 150
static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
    /* 0: qwerty */
    KEYMAP_ANSI_150(\
        ESC,      F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,       PSCR,SLCK,BRK,  \
        GRV, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,      INS, HOME,PGUP, \
        TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,      DEL, END, PGDN, \
        CAPS, A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,                       \
        LSFT,     Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,     RSFT,           UP,        \
        LCTL,LGUI,LALT,               SPC,                     RALT,FN0,RCTL,      LEFT,DOWN,RGHT),
    /* 1: media keys */
    KEYMAP_ANSI_150(\
        TRNS,     TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,      TRNS,TRNS,SLEP, \
        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,      TRNS,TRNS,VOLU, \
        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,      MSEL,MUTE,VOLD, \
        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,     TRNS,                      \
        TRNS,     TRNS,TRNS,CALC,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,     TRNS,           MPLY,      \
        TRNS,TRNS,TRNS,               TRNS,                    TRNS,TRNS,TRNS,      MPRV,MSTP,MNXT)
};
static const uint16_t PROGMEM fn_actions[] = {
    [0] = ACTION_LAYER_MOMENTARY(1)
};
[code]
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Findecanor on Wed, 03 July 2013, 17:00:58
I use bpiphany's firmware and the keyboard sometimes stops working. If I power-cycle (remove and reinsert the cable), it works OK again. Has this happened to anyone else?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Wraul on Fri, 05 July 2013, 10:51:17
Need a bit of help with my programming my Phantom (using hasu's firmware) . I've modified phantom_ansi_150.h as shown below, and kept the rest of the headers and sources untouched.

Not sure what do to from here on out:

Code: [Select]
// Phantom ANSI 150
static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
    /* 0: qwerty */
    KEYMAP_ANSI_150(\
        ESC,      F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,       PSCR,SLCK,BRK,  \
        GRV, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,      INS, HOME,PGUP, \
        TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,      DEL, END, PGDN, \
        CAPS, A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,                       \
        LSFT,     Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,     RSFT,           UP,        \
        LCTL,LGUI,LALT,               SPC,                     RALT,FN0,RCTL,      LEFT,DOWN,RGHT),
    /* 1: media keys */
    KEYMAP_ANSI_150(\
        TRNS,     TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,      TRNS,TRNS,SLEP, \
        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,      TRNS,TRNS,VOLU, \
        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,      MSEL,MUTE,VOLD, \
        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,     TRNS,                      \
        TRNS,     TRNS,TRNS,CALC,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,     TRNS,           MPLY,      \
        TRNS,TRNS,TRNS,               TRNS,                    TRNS,TRNS,TRNS,      MPRV,MSTP,MNXT)
};
static const uint16_t PROGMEM fn_actions[] = {
    [0] = ACTION_LAYER_MOMENTARY(1)
};
[code]

Now you should compile the firmware using the following command:
Code: [Select]
make -f Makefile.lufa ansi_150This requires that you have a AVR toolchain installed.

For more information about building tmk firmware look here https://github.com/tmk/tmk_keyboard/blob/master/doc/build.md#build-firmware-and-program-controller
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: megaforce on Sat, 06 July 2013, 16:23:37
Thank you Wraul!
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Denonic on Wed, 10 July 2013, 11:10:22
Hi all!

Just fiddling with the firmware and have hit a little snag.  I'm using the TMK source and I'm trying to program locking switches for caps lock and scroll lock.  I've managed to get caps lock to work but I've not seen any way to get Scroll working as a lock switch.

I've also managed to get NKRO to work over USB but since I'm running low on USB slots, was there any way to get the phantom working over the Ps/2 port?

Thanks!
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: hasu on Wed, 10 July 2013, 22:30:43
CapsLock is only supported Lock key, ScrollLock and NumLock are not supported atm.
Filed this issue.
https://github.com/tmk/tmk_keyboard/issues/46
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: agor on Sat, 13 July 2013, 17:11:01
Firmware was built using: make -f Makefile.pjrc iso

Just debugged the keyboard matrix, it seems the whole column0 is not working, which for iso seems: Esc, 1, Tab, Caps, LShift, LCtrl



Check your connection on pin D5



I returned!
 
Tested the connection from Pin D5 to there Square Pad of the Diode, every connection in Column 0 works. Diodes are also correct (black band to square) and measured fine from the back side of the pcb (soldered diodes on front).
Keys dont register :(

Two fairly highres pics of front & back attached, maybe someone can catch something. But don't laugh at these solder joints, they were my first :D

I also tried using another firmware (this: http://geekhack.org/index.php?topic=26742.msg640096#msg640096), same problem
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Sat, 13 July 2013, 19:15:11
edit: nevermind
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: WhiteFireDragon on Sat, 13 July 2013, 20:08:34
How did you know it "measured fine"? Did you use continuity test or resistance test? There must be continuity between the teensy legs and all switches/diodes. If you've already done this, then something is wrong during the firmware flashing, or the firmware itself.


Btw, you won't be able to mount switches for #4 and #5 properly, because solder joints from the teensy on that side are not flush. Also, when you're clipping the excess leads from the diodes, try not clipping the solder joint. It looks like you snipped almost all the diode solder joints. This potentially causes cold joints, so if you're not lazy, reflow all those joints.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: agor on Sun, 14 July 2013, 03:48:21
Multimeter: Digimess HM100 (http://www.digimessinstruments.co.uk/manuals/english/mhm100eng.pdf)

Im using the Continuity Test of to measure following points (pcb backside):

Rows:
- B5 - Top Left Switch Leg ESC: Success (Beep)
- B4 - Top Left of 1: Success
- B3 - Top Left of Tab: Success
- B2 - Top Left of Caps: Success (Both Positions)
- B1 - Top Left of Shift: Success (all 3? Positions)
- B0 - Top Left of Ctrl: Success (Both Positions)

Cols:
- D5 - Square Diode Pad of Esc Diode (D5:0) - Success
- D5 - Square Pad of 1 (D4:0) - Success
- D5 - Square Pad of Tab (D3:0) - Success
- D5 - Square Pad of Caps (D2:0) - Success
- D5 - Square Pad of Shift (D1:0) - Success
- D5 - Square Pad of Ctrl (D0:0) - Success

Diodes (using Diode Test):
- D5:0 - Success (0.56V forward voltage drop)
- D4:0 - Success (0.57V)
- D3:0 - Success (0.563V)
- D2:0 - Success (0.562V)
- D1:0 - Success (0.565V)
- D0:0 - Success (0.563V)

Continuity:
- Round Diode Pad - Bottom Right Leg of Switch ESC: Success
- 1: Success
- Tab: Success
- Caps: Success (Both Positions)
- Shift: Success (on 3 Positions)
- Ctrl: Success (Both Positions)

I really don't unterstand it. Other Diodes all show similar measures. Did I do something bad on the Teensy itself?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Sun, 14 July 2013, 11:05:01
I would just resolder both connections at D5 in case you haven't already. That is what I said in my earlier post (3 posts above) before I read that you had checked the connection, but really, why not just reflow those joints and see if it is fixed?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: agor on Sun, 14 July 2013, 11:36:58
Just did, still same. Continuity D5 -> Square Pads works, Actual Keys do not. I don't unterstand this :(
If any more pictures would be helpful, just say of which region I should take them. Have Macro Equiptment
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: agor on Tue, 16 July 2013, 08:53:51
Macro of my soldered Teensy attached.

Continuity Test of D3 -> second pin from lower right works. D5 -> rightmost doesn't.
Did I somehow fry the Teensy pin?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: WhiteFireDragon on Tue, 16 July 2013, 14:34:14
Continuity doesn't tell you if something is fried or not. It just tells you if there is a broken trace or no connection, which seems to be the case here. You can try to isolate where the broken trace is, and bridge a wire at that area of possible.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: agor on Wed, 17 July 2013, 02:34:33
How would I unsolder the D5 pin?
I don't own a pump.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: gnubag on Wed, 17 July 2013, 03:28:22
How would I unsolder the D5 pin?
I don't own a pump.

you could get desolder wick for cheap and it should do the job.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: oTurtlez on Fri, 19 July 2013, 15:49:09
So how would I go about changing a firmware for hardware Colemak?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: gnubag on Fri, 19 July 2013, 15:57:13
So how would I go about changing a firmware for hardware Colemak?

Code: [Select]
/* Layer 1: COLEMAK
    *
     *
     *
     * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.
     * |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
     * `---'   `---------------' `---------------' `---------------' `-----------'
     * ,-----------------------------------------------------------. ,-----------.
     * |~  |  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backsp | |Ins|Hom|PgU|
     * |-----------------------------------------------------------| |-----------|
     * |Tab  |  Q|  W|  F|  P|  G|  J|  L|  U|  Y|  ;|  [|  ]|    \| |Del|End|PgD|
     * |-----------------------------------------------------------| |---|---|---|
     * |Backsp|  A|  R|  S|  T|  D|  H|  N|  E|  I|  O|  '|Return  | |???|???|???|
     * |-----------------------------------------------------------| |---|---|---|
     * |Shift   |  Z|  X|  C|  V|  B|  K|  M|  ,|  .|  /|Shift     | |???|Up |???|
     * |-----------------------------------------------------------| |-----------|
     * |Ctl|Gui|Alt|          Space                |Alt|Gui|FN0|Ctl| |Lef|Dow|Rig|
     * `-----------------------------------------------------------' `-----------'
     */

    KEYMAP(\
        ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,            PSCR,SLCK,BRK, \
        GRV, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,      INS, HOME,PGUP, \
        TAB, Q,   W,   F,   P,   G,   J,   L,   U,   Y,   SCLN,   LBRC,RBRC,BSLS,      DEL, END, PGDN, \
        BSPC, A,   R,   S,   T,   D,   H,   N,   E,   I,   O,QUOT,     ENT,       0,   0,   0, \
        LSFT,Z,   X,   C,   V,   B,   K,   M,   COMM,DOT, SLSH,          RSFT,      0,   UP,  0, \
        CAPS,LGUI,LALT,          SPC,                     RALT,RGUI,FN0, RCTL,      LEFT,DOWN,RGHT),


that is my colemak layer.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: oTurtlez on Fri, 19 July 2013, 23:54:55
So how would I go about changing a firmware for hardware Colemak?

Code: [Select]
/* Layer 1: COLEMAK
    *
     *
     *
     * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.
     * |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
     * `---'   `---------------' `---------------' `---------------' `-----------'
     * ,-----------------------------------------------------------. ,-----------.
     * |~  |  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backsp | |Ins|Hom|PgU|
     * |-----------------------------------------------------------| |-----------|
     * |Tab  |  Q|  W|  F|  P|  G|  J|  L|  U|  Y|  ;|  [|  ]|    \| |Del|End|PgD|
     * |-----------------------------------------------------------| |---|---|---|
     * |Backsp|  A|  R|  S|  T|  D|  H|  N|  E|  I|  O|  '|Return  | |???|???|???|
     * |-----------------------------------------------------------| |---|---|---|
     * |Shift   |  Z|  X|  C|  V|  B|  K|  M|  ,|  .|  /|Shift     | |???|Up |???|
     * |-----------------------------------------------------------| |-----------|
     * |Ctl|Gui|Alt|          Space                |Alt|Gui|FN0|Ctl| |Lef|Dow|Rig|
     * `-----------------------------------------------------------' `-----------'
     */

    KEYMAP(\
        ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,            PSCR,SLCK,BRK, \
        GRV, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,      INS, HOME,PGUP, \
        TAB, Q,   W,   F,   P,   G,   J,   L,   U,   Y,   SCLN,   LBRC,RBRC,BSLS,      DEL, END, PGDN, \
        BSPC, A,   R,   S,   T,   D,   H,   N,   E,   I,   O,QUOT,     ENT,       0,   0,   0, \
        LSFT,Z,   X,   C,   V,   B,   K,   M,   COMM,DOT, SLSH,          RSFT,      0,   UP,  0, \
        CAPS,LGUI,LALT,          SPC,                     RALT,RGUI,FN0, RCTL,      LEFT,DOWN,RGHT),


that is my colemak layer.

So how to I turn this into a hex firmware file to flash to the teensy?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: gnubag on Sat, 20 July 2013, 00:05:25
do you just need the colmak layer?
i can upload a hex file for you.

otherwise there should be instructions in here somewhere, so you can make your own hex file.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: hasu on Mon, 22 July 2013, 21:07:14
Just fiddling with the firmware and have hit a little snag.  I'm using the TMK source and I'm trying to program locking switches for caps lock and scroll lock.  I've managed to get caps lock to work but I've not seen any way to get Scroll working as a lock switch.

Fix this issue. Mechanical locking switch support for NumLock and ScrollLock are implemented now.
https://github.com/tmk/tmk_keyboard/issues/46

See this.
https://github.com/tmk/tmk_keyboard#mechanical-locking-support
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Denonic on Tue, 23 July 2013, 08:03:23
Just fiddling with the firmware and have hit a little snag.  I'm using the TMK source and I'm trying to program locking switches for caps lock and scroll lock.  I've managed to get caps lock to work but I've not seen any way to get Scroll working as a lock switch.

Fix this issue. Mechanical locking switch support for NumLock and ScrollLock are implemented now.
https://github.com/tmk/tmk_keyboard/issues/46

See this.
https://github.com/tmk/tmk_keyboard#mechanical-locking-support

Awesome!  Updated and working great.  Thank you =)
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: MJ45 on Sun, 28 July 2013, 16:55:41
I just finished my Phantom, my first keyboard build and it works great. I flashed the firmware with the PHANSIWIN.hex but I use Macs and have no programing knowledge or experiance. Does anybody have a Mac layout hex file they could share? I am going to try to learn to program this Teensy eventually i hope. Thanks, MJ 
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: rindorbrot on Mon, 29 July 2013, 10:15:46
Hey guys,

my Phantom PCB arrived at the weekend and since I have to wait for a case and the corresponding plate before I can continue building it, I wanted to prepare the firmware and stuff.

I am using hasu's TMK firmware and it works quite nice.
But I have one little problem that I still need to solve.

The physical layout of my Phantom will be ISO_150 with short right Shift and a 1x FN-key beneath it.

I already defined a corresponding macro for this layout in the keymap.c (copy-paste of ISO_150 and changed the right shift)
Code: [Select]
#define KEYMAP_RIND( \
    K5A,      K5C, K5D, K5E, K5F, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O,      K5P, K5Q, K5R, \
    K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4O,      K4P, K4Q, K4R, \
    K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M,           K3P, K3Q, K3R, \
    K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2N,                     \
    K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1M, K1N,           K1Q,      \
    K0A, K0B, K0C,                K0G,                     K0L, K0M, K0N,      K0P, K0Q, K0R  \
) KEYMAP( \
    K5A, NO,  K5C, K5D, K5E, K5F, NO,  K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, K5Q, K5R, \
    K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, NO,  K4O, K4P, K4Q, K4R, \
    K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, NO,       K3P, K3Q, K3R, \
    K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2N,      NO,  NO,  NO,  \
    K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1M, K1N,      NO,  K1Q, NO,  \
    K0A, K0B, K0C, NO,       NO,  K0G, NO,            NO,  K0L, K0M, K0N,      K0P, K0Q, K0R  \
)

I also defined to use the file keymap_rind.h if the layout "rind" is chosen, which works correctly.

here is my keymap_rind.h
Code: [Select]
// Phantom RIND
static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
    /* 0: qwerty */
    KEYMAP_RIND(\
        ESC,      F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,       PSCR,SLCK,BRK,  \
        GRV, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,      INS, HOME,PGUP, \
        TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,           DEL, END, PGDN, \
        CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,NUHS,ENT,                       \
        LSFT,NUBS,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,RSFT,FN0,            UP,        \
        LCTL,LGUI,LALT,               SPC,                     RALT,RGUI,RCTL,      LEFT,DOWN,RGHT),
    /* 1: media keys */
    KEYMAP_RIND(\
        TRNS,     TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,      TRNS,TRNS,MSTP, \
        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,           MPLY,MPRV,VOLU, \
        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,      MUTE,MNXT,VOLD, \
        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,                      \
        TRNS,TRNS,TRNS,TRNS,CALC,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,           TRNS,      \
        TRNS,TRNS,TRNS,               TRNS,                    TRNS,APP, TRNS,      TRNS,TRNS,TRNS)
};
static const uint16_t PROGMEM fn_actions[] = {
    [0] = ACTION_LAYER_MOMENTARY(1)
};

Everything I defined works as it should besides the three keys MPLY,MPRV,VOLU, which are on the Fn0 layer over INS, HOME,PGUP,

Without pressing Fn0 Insert, Home and Pgup work as intended. Also the rest of the PCB is physically fine.

Can anybody spot my mistake? Help would greatly be appreciated ;)

Edit:
to be more precise, MPLY, MPRV and VOLU are working, but there are on the wrong keys!
They are shifted one key to the left each.
So MPLY is on Backspace instead of Insert, MPRV on Insert instead of Home and VOLU on Home instead of Pgup...
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Grimey on Mon, 29 July 2013, 14:55:07

Code: [Select]
// Phantom RIND
static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
    /* 0: qwerty */
    KEYMAP_RIND(\
        ESC,      F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,       PSCR,SLCK,BRK,  \
        GRV, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,      INS, HOME,PGUP, \
        TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,           DEL, END, PGDN, \
        CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,NUHS,ENT,                       \
        LSFT,NUBS,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,RSFT,FN0,            UP,        \
        LCTL,LGUI,LALT,               SPC,                     RALT,RGUI,RCTL,      LEFT,DOWN,RGHT),
    /* 1: media keys */
    KEYMAP_RIND(\
        TRNS,     TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,      TRNS,TRNS,MSTP, \
        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,      MPLY,MPRV,VOLU, \
        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,           MUTE,MNXT,VOLD, \
        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,                      \
        TRNS,TRNS,TRNS,TRNS,CALC,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,           TRNS,      \
        TRNS,TRNS,TRNS,               TRNS,                    TRNS,APP, TRNS,      TRNS,TRNS,TRNS)
};
static const uint16_t PROGMEM fn_actions[] = {
    [0] = ACTION_LAYER_MOMENTARY(1)
};

Does this fix it?  Looks like you have an extra column in Funtion Row 2 on yours
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: rindorbrot on Mon, 29 July 2013, 15:01:05
Nicely spotted Grimey, that fixed it. Thanks!
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Wraul on Mon, 29 July 2013, 16:03:37
Nicely spotted Grimey, that fixed it. Thanks!

Yeah there is a bug in the ISO layout files.
As pointed out here http://geekhack.org/index.php?topic=41989.msg957945#msg957945

I have yet to send hasu a pull request for the fix. And I won't be able until I get home in 2 weeks.
Sorry about that.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: agor on Wed, 31 July 2013, 16:34:16
Finished my Phantom today, it's very nice! Still had to fight my unusual usb driver problems, and only a reinstall of Windows helped, not even deinstalling all unused USB devices in devmgmt..
But the work paid off, it looks really well.
I'm going to take some pictures with actual sunlight tomorrow, artificial light does not do this justice.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: gnubag on Wed, 31 July 2013, 16:43:11
make sure to use usb 2.0 instead of 3.0 when you have driver/compatibility problems.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: agor on Thu, 01 August 2013, 03:47:10
Yeah I did, but it was completely f***ed up. Could not solve the problem, even tried copying drivers from another pc on which it worked fine. Heck, it does work in BIOS, but my old windows just did not want to
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Batmann on Wed, 14 August 2013, 15:00:36
I am trying to dim the leds but I am not very familiar with compiling.
Is there someone who could compile an ANSI with windows key firmware with leds set to something like 35 for me?
that would hel a LOT  :)
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: agor on Thu, 15 August 2013, 04:44:09
Well it ain't that hard - why don't you try it and play with Layouts a little bit? :-)
https://github.com/tmk/tmk_keyboard/blob/master/doc/build.md
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Melvang on Thu, 15 August 2013, 07:40:14
Does anyone know if I was to cut an opening in a Round 1 Phantom plate for the controller would it fit a QFR PCB?  I guess another way to ask is the controller the only thing preventing use of a Phantom plate in a QFR case and PCB?  If it is does anyone have any numbers that I can use to modify a phantom plate to work? 
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Batmann on Thu, 15 August 2013, 07:49:21
Well it ain't that hard - why don't you try it and play with Layouts a little bit? :-)
https://github.com/tmk/tmk_keyboard/blob/master/doc/build.md

Thanks a lot  :D
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: SpAmRaY on Thu, 15 August 2013, 07:52:25
Does anyone know if I was to cut an opening in a Round 1 Phantom plate for the controller would it fit a QFR PCB?  I guess another way to ask is the controller the only thing preventing use of a Phantom plate in a QFR case and PCB?  If it is does anyone have any numbers that I can use to modify a phantom plate to work? 

Why not get a universal plate with the controller area cutout already from WFD?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Melvang on Thu, 15 August 2013, 10:05:14
I was just trying to save another vet in the forums a couple $$ and I have a phantom plate that I won't be using plus WFD is on vacation until the 27th.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: SpAmRaY on Thu, 15 August 2013, 10:20:42
I was just trying to save another vet in the forums a couple $$ and I have a phantom plate that I won't be using plus WFD is on vacation until the 27th.

No worries!!! I just hated to see a phantom plate get chopped up ;)

But hey, a bucks a buck!!


Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Melvang on Thu, 15 August 2013, 10:21:53
Not going to chop it up that bad just want to mod it so it will be compatible for a QFR.  Just needing to know if the key spacing is the same.  And dimensions on the plate for other holes that need to get cut.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: simkev on Thu, 22 August 2013, 06:10:32
Not going to chop it up that bad just want to mod it so it will be compatible for a QFR.  Just needing to know if the key spacing is the same.  And dimensions on the plate for other holes that need to get cut.
the spacing is the same so go ahead and dremel a controller cutout.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Melvang on Thu, 22 August 2013, 06:11:29
Not going to chop it up that bad just want to mod it so it will be compatible for a QFR.  Just needing to know if the key spacing is the same.  And dimensions on the plate for other holes that need to get cut.
the spacing is the same so go ahead and dremel a controller cutout.

Excellent thank you.  Now just need some measurements for the hole to cut.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: danielucf on Wed, 28 August 2013, 22:15:12
I am experiencing something weird with my Phantom. When I plug it into my computer F4, 6^, T, G, and V do not work. However when I plug it into my tablet through an OTG cable those keys magically work. Any idea what on earth could be causing this? If a trace on COL5 was bad I would assume that the keys would never work period, but they work on one device but not another...
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Melvang on Wed, 28 August 2013, 22:23:48
That is an odd one.  Not sure on that one.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: danielucf on Wed, 28 August 2013, 22:43:03
After more troubleshooting I think I have a bad USB port on the teensy. If I have the cable at an extreme angle pulled away from the PCB then those keys work. I guess it is a good thing that jdcarpe is doing a group buy for teensy controllers right now. Sucks that I have to desolder the entire board to fix it *sigh*
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: gnubag on Wed, 28 August 2013, 22:46:53
I am experiencing something weird with my Phantom. When I plug it into my computer F4, 6^, T, G, and V do not work. However when I plug it into my tablet through an OTG cable those keys magically work. Any idea what on earth could be causing this? If a trace on COL5 was bad I would assume that the keys would never work period, but they work on one device but not another...

there were some windows 7 updates that fked things over for me. have you tried to re flash the firmware and/or try the phantom on another pc?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: danielucf on Wed, 28 August 2013, 23:46:53
I am experiencing something weird with my Phantom. When I plug it into my computer F4, 6^, T, G, and V do not work. However when I plug it into my tablet through an OTG cable those keys magically work. Any idea what on earth could be causing this? If a trace on COL5 was bad I would assume that the keys would never work period, but they work on one device but not another...

there were some windows 7 updates that fked things over for me. have you tried to re flash the firmware and/or try the phantom on another pc?

Yea that didn't do it. As a last ditch effort I heated the pin again that effected those keys and now everything works fine *sigh* cold solder joint I guess and when I applied pressure to the USB cable it moved the connection just enough for input to work. Case closed, that was a weird one.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: jonathanyu on Wed, 18 September 2013, 22:02:41
I just soldered my teensy on to my phantom today, but the firmware seems a little bit confusing to me.  Is the any step-by-step tutorial/guide here? or which firmware should I use for ansi 1.50x layout?
Because I found the firmware here https://github.com/BathroomEpiphanies/AVR-Keyboard (https://github.com/BathroomEpiphanies/AVR-Keyboard), but.... it just got ton of file there...
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Thu, 19 September 2013, 04:08:14
phantom_ansi_iso.hex is supposed to be correct, but you probably want to head over to https://github.com/tmk/tmk_keyboard instead. Hasu's firmware is a lot fancier.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: oaklandishh on Wed, 09 October 2013, 00:23:41
Is there any guide or help file on how to program macros? I have everything working except I am unsure on how to make macros work. I saw somewhere in this thread someone used MACRO(MD(KEY),D(KEY2),END)  does this work? is there a way to have it type something without making each key a D(KEY)? Thanks
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: damorgue on Wed, 09 October 2013, 00:29:58
Is there any guide or help file on how to program macros? I have everything working except I am unsure on how to make macros work. I saw somewhere in this thread someone used MACRO(MD(KEY),D(KEY2),END)  does this work? is there a way to have it type something without making each key a D(KEY)? Thanks

You are better off asking that question in Hasu's thread about his firmware. I believe MD is mod down and, and other keys just use D for down. Then you have to specify when you release the key etc. There are a few other fuctions which are listed among his help files.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Glod on Fri, 11 October 2013, 19:52:43
HELP. Anybody! i think i fudged this and i need someone who is familiar with which teensy pins go to which columns--if that is the issue.

This is not my first Phantom but it is my first one i am building for myself.

I did a test of each key by shorting each of the switch connections, better to find this stuff out now than when all the switches are on.

I have 2 columns of keys not working
(http://almightyglod.com/public_stack/phantomnowork.png)

I have tried reflowing and removing solder and adding more to all teensy pins
I have checked to make sure all diodes are in the correct position

Every time i go to redo the soldering, in hopes that is the problem, i end up exposing more of a couple traces, as shown in the photos; the exposed trace started as a scratch. The trace is NOT come up and is not loose, it is just exposed, my guess it has something to do with the quality of the PCB. Putting a meter to it shows the area is still good.

Here is the solder points
(http://farm3.staticflickr.com/2829/10215716343_a4fa71aa68.jpg) (http://www.flickr.com/photos/panicfx/10215716343/)
(http://farm3.staticflickr.com/2863/10215518424_6842d2fa0b.jpg) (http://www.flickr.com/photos/panicfx/10215518424/)

This picture is misleading, the burned rosin (is that what it is?) makes a black ring i cant clean off around the solder point, the picture makes it look like the traces are all lifting up but its fine, the pictures above show they are not
(http://farm8.staticflickr.com/7387/10215519994_8fb90d72db.jpg) (http://www.flickr.com/photos/panicfx/10215519994/)

Here is the teensy, the more i tried to redo things, the more the teensy got dirty and burned up and it slowly moved away a little bit from the pcb, i would hope it is still good though, it is just those 2 columns that don't work. The teensy on the other phantom i built also kind of looked like this
(http://farm4.staticflickr.com/3693/10215520964_68af1f5b8e.jpg) (http://www.flickr.com/photos/panicfx/10215520964/)
(http://farm3.staticflickr.com/2887/10215521264_e5f2129664.jpg) (http://www.flickr.com/photos/panicfx/10215521264/)
(http://farm4.staticflickr.com/3748/10215719603_25744a8052.jpg) (http://www.flickr.com/photos/panicfx/10215719603/)

anyone have any ideas? something a little more precise than me trying to redo everything and making things worse? I'm just about to say this is a $50 loss and losing money is not what i need right now.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Grimey on Fri, 11 October 2013, 21:46:58
Stuff...

Well having not seen what firmware you are using, I would still guess that two points of connection very close to the teensy are the issue.

My first thought is , did you run pins through the teensy & PCB for the two or three other pins than the two long rows?  I ask this is because I did not on my build at first and my firmware acted up in a similar manner.  I can see that you have a least applied solder to these extra pins holes, but I can't detect if any actually wire was run through it form this angle.

Another this to check would be to make sure the diodes in those columns are all running in the same correct direction. 

Outside of taking a look at the firmware you used, I don't see anything off the top of my head outside of the things above.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Glod on Fri, 11 October 2013, 21:56:43
i put pins in those three extra holes, they are all soldered to the pcb

i used this firmware
http://geekhack.org/index.php?topic=26742.msg640096#msg640096

i tried all three but the one i used with the other phantom i built was phantom-PHANSIWIN.hex
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: MJ45 on Sat, 12 October 2013, 08:56:42
i put pins in those three extra holes, they are all soldered to the pcb

i used this firmware
http://geekhack.org/index.php?topic=26742.msg640096#msg640096

i tried all three but the one i used with the other phantom i built was phantom-PHANSIWIN.hex
It looks like you have too much solder & heat on those joints. You could try if you haven't already the diode check as described in the DT wiki Phantom assembly instructions. That is where you test each switch pad to the row & column to the
corresponding pads on the pcb where the Teensy goes. Maybe that might tell you if the problem is on the main pcb or the Teensy pcb, good luck with the problem.   
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Glod on Sat, 12 October 2013, 13:02:34
I realize there is more solder on the teensy because I redid every joint, but even with it like this only those two columns are the ones failing. the heat was on low, I think the brown is mostly the rosin I couldn't clean up. this isn't my first keyboard.

do you know which teensy pins go to which columns? should I redo all the diodes in those columns?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Sat, 12 October 2013, 13:34:16
Schematics http://deskthority.net/wiki/File:Phantom_schematic.pdf

col_6 -> F0
col_13 -> D6

Honestly, a lot of those connections look very poor. You probably don't want the iron turned down all the way. You want to heat the pads up quickly, adding solder, and move straight out again. I would suggest, sucking the pins clean, or using a braid if you don't have a sucker. Then clean as much gunk as possible off with some solvent before starting over again. You probably wont be able to get the Teensy to come off completely, but that doesn't matter. Remove as much solder as possible, and clean everything up as much as possible. Watch some videos on how soldering should work.  Quick in, quick out, as much heat as fast as possible (within reason).

Edit: This is a bit over the top, but that's the flow you want to do it in
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Glod on Sat, 12 October 2013, 14:43:09
ok ok

i sucked up all the solder i could, i couldnt get it all and the teensy stayed attached to the phantom,

i resoldered every joint on high heat with less solder, i cleaned up before and  soldering and i applied flux with pen before soldering

I get the exact some result. those 2 columns dont work everything else works fine

here is the soldering after redo. The flash photography really brings out every defect......

(http://farm4.staticflickr.com/3806/10231609625_e298f8cd1d.jpg) (http://www.flickr.com/photos/panicfx/10231609625/)

(http://farm4.staticflickr.com/3775/10231609155_be5795fa33.jpg) (http://www.flickr.com/photos/panicfx/10231609155/)

(http://farm9.staticflickr.com/8409/10231517494_cc94620154.jpg) (http://www.flickr.com/photos/panicfx/10231517494/)

(http://farm6.staticflickr.com/5504/10231613396_b21ba39f4e.jpg) (http://www.flickr.com/photos/panicfx/10231613396/)

Grrrrr i really dont want to tell my wife i just threw $50 in the garbage. I wish there was still hope for this thing
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Sat, 12 October 2013, 15:53:39
The only thing you could have screwed up beyond fixing is the Teensy. And that isn't too expensive at least. If you have pointy enough multimeter probes you probably want to check for continuity all the way up to the pads under the ATAmega. That would tell you if you messed something up on the Teensy board. test for continuity and find where the chain is broken. If it isn't there is something wrong with the chip, or the firmware.

Those new solder joints look a lot better =)

Edit: Also make sure the wrong things aren't shorted out to GND or something... On the top of my head I think that should have given the opposite behavior though. Switches being pressed all the time.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Glod on Sat, 12 October 2013, 17:50:09
i don't see any shorted connections.

i could try checking it with my cheap meter, my hands shake a lot though so im not sure if i can do it.

My only problem with scrapping the teensy is that even after sucking up all the solder it didn't come off because some solder got between the two pcbs, as i elected to solder them so close to each other to fit in a certain keyboard case. it will take a good amount of work to get it off and i am fearing damaging the phantom pcb. But, if is truly the reason i guess i don't have a choice.

i do have another idea to see if it is the teensy! I have a mini breadboard and some cables. i could temporarily connect a fresh teensy to the current connections and see if it works, It would require very little soldering and it would look like a total monster. anyone see any problem with that?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Glod on Sat, 12 October 2013, 19:26:30
ok so i busted out my meter again but this time actually did it right

something is wrong with the teensy i found

1. F0 was not connected to ATAmega, i scratched the trace with an xacto knife carefully and then directly wired it with a spare wire i had. and what-do-you-know the column for F5 now works!!!! :) that's one column fixed!
2. B6 was damaged by me it seems, i simply applied a peice of wire to the exposed trace and now we are good. i think this had something to do with the caps lock light not working because now it works
3. D6 though doesn't seem to be hurt, i did a meter continuity test (meter doesn't have many options) and D6 connects to the chip according to the meter. at least some sort of connection exists

So one column fixed, caps lock light fixed, now any suggestions anyone for how to fix the F12 column (col 13?)?


oh here is a picture of my ghetto fix lol,
(http://farm8.staticflickr.com/7421/10235720346_080174950a.jpg) (http://www.flickr.com/photos/panicfx/10235720346/)

It looks like crap but it is actually sturdy, if manage to fix this column, i'll be able to save this without trashing the teensy :)
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Glod on Sat, 12 October 2013, 20:25:17
Holy **** I fixed the teensy, all columns operational.

there was indeed something wrong with D6, i didnt read correctly. i didnt realize it connects through the LED

Along with bpiphany's diagram I used this one http://www.pjrc.com/teensy/atmega32u4.pdf and this one http://www.pjrc.com/teensy/schematic.html (which showed me about the LED.

(http://farm4.staticflickr.com/3746/10236379044_b3e7fab7b4.jpg) (http://www.flickr.com/photos/panicfx/10236379044/)

F0 Fix was scratching trace CAREFULLY with xactro knife near the Atmega and then soldering a wire between that and the F0 pin. Its a mystery to me how F0 was messed up because the trace is on the backside, im sure its my fault and not PJRC

B6 Fix was scratching trace right next to the pin which a connection was severed between them visibly due to bad soldering. l i cut off a small piece of metal from a diode leg that was trimmed off and then soldered it in there

D6 Fix was soldering directly to LED or whatever, like B6 i used a piece of metal from a diode leg. This was probably also my fault why D6 was damaged, it looks burned up around the pin.

everything is sturdy and i saved the teensy, im so happy i danced a little bit!!

Thanks bpiphany for stopping by!
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: bpiphany on Sun, 13 October 2013, 02:16:10
Considering the look of your original joints this is awesome work, congratulations =D Hell it's awesome either way, those traces are darn tight.

Side note: In this case it was probably you having destroyed something, since it works for other people. But that LED has screwed me over more than a couple of times by just being there. They really should make it possible to disconnect it altogether..
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: MOZ on Sun, 13 October 2013, 02:31:51
This is good to know glod!
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Glod on Sun, 13 October 2013, 02:37:26
so i started typing up a response on my phantom saying the phantom is finished now and working great........
but now the celebration has been halted!, when i press P now the entire row goes off randomly pressing other keys.

nooooooooooooooooo,

what the hell! it was working just a minute ago.  Its only the P key, all other keys are fine, maybe something is shorting i dont know. Its bed time for me, 3AM, i guess ill deal with that tomorrow. I needed to do something to it anyway, one of my blue switches isn't clicky and i was going to swap out switches.



edit: Fixed! time for custom firmware!

edit2: TMK Custom firmware success! Phantom officially complete, :)
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: MOZ on Sun, 13 October 2013, 02:38:46
Time for a TEENSY switch
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Tarzan_ on Fri, 18 October 2013, 10:06:22
Congrats on the hardware/firmware fix!

Not to derail the thread, but what is the recommended firmware file for custom keyboards - hardwired Teensy mods?  I thought I saw Hasu had recommended the macway version, but the label on that file on GitHub says "retired."
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Findecanor on Fri, 18 October 2013, 21:30:04
col_13 -> D6
Yep. I found out yesterday that D6 is also connected to the Teensy's on-board LED, so I can't shut off the annoying thing in firmware ...

BTW, the AVR-Keyboard firmware launches the boot loader if you press both Shift keys... which I noticed that I do occasionally when typing.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Hzza on Sat, 19 October 2013, 03:23:39
BTW, the AVR-Keyboard firmware launches the boot loader if you press both Shift keys... which I noticed that I do occasionally when typing.
Same, I changed mine to lshift, rshift, rcontrol and printscreen I think. No way you're going to press that **** accidentally ;).

Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Melvang on Sun, 20 October 2013, 23:06:13
BTW, the AVR-Keyboard firmware launches the boot loader if you press both Shift keys... which I noticed that I do occasionally when typing.
Same, I changed mine to lshift, rshift, rcontrol and printscreen I think. No way you're going to press that **** accidentally ;).

[attach=1]
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Findecanor on Mon, 21 October 2013, 04:43:16
Same, I changed mine to lshift, rshift, rcontrol and printscreen I think. No way you're going to press that **** accidentally ;).
I'm thinking of changing it to Caps Lock - LGUI - RGUI for nostalgic reasons... ;)
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Hzza on Mon, 21 October 2013, 04:49:23
Same, I changed mine to lshift, rshift, rcontrol and printscreen I think. No way you're going to press that **** accidentally ;).
I'm thinking of changing it to Caps Lock - LGUI - RGUI for nostalgic reasons... ;)
lel

I only have one of those keys on my boards with custom firmwares, should make it even more difficult to press ;).
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: nebo on Sat, 25 January 2014, 15:29:34
I'm having a problem with the row 1 on my recent build. When I tested it before putting on the switches everything worked fine, but now not so much.

I have ruled out a few things by now. Went a re-flowed the entire bottom row to be sure the joints were good. No real change. Then for the hell of it I went to rule #1 with electronics, if it doesn't work hit it. By that I mean I pressed a key pretty hard and it registered. So that sounds like something is lose, but all the joints are good (and it's weird that it's exactly only row 1. It really only helps if I push the top part of the switch down (above the stem) and then press the stem. Never seen anything like it.

I currently don't have a multimeter but I doubt that is the problem if the keys do register sometimes.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Photekq on Thu, 30 January 2014, 10:35:35
So my phantom's all soldered up (except the switches) and is running TMK firmware. I just used jumper wire to confirm all the keys worked, and the greys ones in this picture aren't responding.. Any ideas what could be causing this and what I can do to fix it? Also worth noting I've tried the two firmwares in the OP of this topic, and the phantom is running ANSI 150

(http://i.imgur.com/XEPswNg.png)
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: MJ45 on Thu, 30 January 2014, 11:14:27
So my phantom's all soldered up (except the switches) and is running TMK firmware. I just used jumper wire to confirm all the keys worked, and the greys ones in this picture aren't responding.. Any ideas what could be causing this and what I can do to fix it? Also worth noting I've tried the two firmwares in the OP of this topic, and the phantom is running ANSI 150

Show Image
(http://i.imgur.com/XEPswNg.png)

It looks like col0 (esc,1,capslock,Lshift,ctrl) are not connected to the controller. You can find a Phantom build guide in the DT Wiki. i would check for continuity from the pin on the controller back to that col0 and the switch pins and diodes. That is also one of pins that have to be added to the Teensy. I would also do the same for the other non working ones.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Photekq on Thu, 30 January 2014, 11:44:13
It looks like col0 (esc,1,capslock,Lshift,ctrl) are not connected to the controller. You can find a Phantom build guide in the DT Wiki. i would check for continuity from the pin on the controller back to that col0 and the switch pins and diodes. That is also one of pins that have to be added to the Teensy. I would also do the same for the other non working ones.



The connections all seem absolutely fine :-[
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Photekq on Thu, 30 January 2014, 12:17:58
Added a bit of solder to all the teensy connections.. Now all the keys work except caps lock. No idea why that single key isn't working :/

All fixed!
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: MJ45 on Thu, 30 January 2014, 14:46:23
Added a bit of solder to all the teensy connections.. Now all the keys work except caps lock. No idea why that single key isn't working :/

All fixed!
Great News! I had to reheat and re flow the solder joints on a Teensy to get to work also.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: James35 on Wed, 07 May 2014, 14:09:03
I would like to build a phantom with a layout like the plum 96.
(http://i.imgur.com/xHcgfXy.png)
I'm assuming the Teensy can handle the extra keys correct?  What plate would I purchase to go along with the Phantom PCB?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: jdcarpe on Wed, 07 May 2014, 14:18:26
I would to build a phantom with a layout like the plum 96.
Show Image
(http://i.imgur.com/xHcgfXy.png)

I'm assuming the Teensy can handle the extra keys correct?  What plate would I purchase to go along with the Phantom PCB?

But Phantom PCB only has 3 columns on the right, not 4.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: James35 on Wed, 07 May 2014, 14:39:26
Oh crud.  I overlooked that. 
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Pacifist on Wed, 07 May 2014, 14:45:11
has there been a GB yet for 1.5x 1.x .5x 7x phantom with 1.75x left shifts plate?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: jdcarpe on Wed, 07 May 2014, 14:46:48
has there been a GB yet for 1.5x 1.x .5x 7x phantom with 1.75x left shifts plate?

You mean right shift? No. You can always have a one-off plate made.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Pacifist on Wed, 07 May 2014, 14:48:32
has there been a GB yet for 1.5x 1.x .5x 7x phantom with 1.75x left shifts plate?

You mean right shift? No. You can always have a one-off plate made.

Whoops yea right shift. Thanks for letting me know, I will probally get a one off plate made if I truely want to get a tkl
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Findecanor on Wed, 07 May 2014, 16:25:49
But Phantom PCB only has 3 columns on the right, not 4.
All plates should have holes for the keys in-between the arrow keys and the 6-key cluster, though. They are also fully supported by the PCB.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: James35 on Fri, 09 May 2014, 16:46:50
Are there any advantages of building my own phantom + Teensy over a Duky Shine 3 TKL?   I can't seem to find much information on the capabilities of the Teensy.  I'm hoping that the fact that we can make our own firmware mods would be an advantage. 
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: SpAmRaY on Fri, 09 May 2014, 16:54:27
Are there any advantages of building my own phantom + Teensy over a Duky Shine 3 TKL?   I can't seem to find much information on the capabilities of the Teensy.  I'm hoping that the fact that we can make our own firmware mods would be an advantage. 

If you want the backlighting features offered in the ducky shine you are wasting your time with a phantom, however if you want a completely customizable layout and don't care about backlighting then by all means the phantom is the way to go.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: James35 on Fri, 09 May 2014, 18:22:21
I do want backlighting, but I don't need the flashy options.  Brightness control is all I'm interested in.
Can I can get more layers with the Teensy than I could with the Ducky?  For example, could I use something like "Function Q" to register as a unique keystroke in which I could then use AutoHotKey to identify and use it? Or is Function limited to certain keys?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Pacifist on Fri, 09 May 2014, 18:29:25
I do want backlighting, but I don't need the flashy options.  Brightness control is all I'm interested in.
Can I can get more layers with the Teensy than I could with the Ducky?  For example, could I use something like "Function Q" to register as a unique keystroke in which I could then use AutoHotKey to identify and use it? Or is Function limited to certain keys?

imo with metalliqaz's software any programable board>anything stock
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: James35 on Sat, 10 May 2014, 16:20:05
Can the Teensy do anything more than the Ducky Shine 3?  With the Teensy, does anyone know if I can apply the Fn key toward any key or is it limited like most keyboards?
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: SpAmRaY on Sat, 10 May 2014, 16:50:55
Can the Teensy do anything more than the Ducky Shine 3?  With the Teensy, does anyone know if I can apply the Fn key toward any key or is it limited like most keyboards?

The teensy is fully programmable. The ducky shine 3 is not programmable at all. Also it seem you want backlighting, the phantom does not offer backlighting.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Findecanor on Sat, 10 May 2014, 20:31:12
The Teensy is not a keyboard controller really.. It is a microcontroller - a very small, not very capable computer - that has been made to work as a keyboard controller when it is a part of the Phantom. The magic is in what the pins are connected to and how it is programmed. The software on a microcontroller is called "firmware".

Your best bet for custom features without doing any C programming would be to use the Easy AVR USB Keyboard Firmware and Keymapper (http://geekhack.org/index.php?topic=51252.0). I suggest that you ask in that thread about the specific features that you are interested in.

Another option would be to get a CM Storm Quickfire Rapid or Filco tenkeyless and replace the controller with a programmable one (http://geekhack.org/index.php?topic=46700.0). The replacement controllers can also run the Easy AVR USB Keyboard Firmware. That way you won't have to build the entire keyboard, but you won't be able to customize the layout or switches (not without difficulty). Be quick though, because it looks like the Quickfire Rapid was recently discontinued and stores have only old stock.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: James35 on Sat, 10 May 2014, 22:38:11
Thanks guys. This is very helpful!  I love the functionality of the Easy AVR. Looks like I won't be able to do backlighting though unless Frosty Flake works with the CM Quickfire Rapid I (http://gaming.coolermaster.com/en/products/keyboards/rapid-i/).
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: megaforce on Fri, 06 June 2014, 17:11:13
Anyone have the specs for the diodes or know where I can order more of them?

Edit: Found it. If anyone needs it for future reference: http://www.mouser.com/ProductDetail/Fairchild-Semiconductor/1N4148/?qs=i4Fj9T%2foRm8RMUhj5DeFQg%3d%3d&gclid=CjgKEAjwzcWcBRCat43fy9e5i3ASJADXOBwu6qHa2_KmRD8XsItWcffpue_uyzabE_G9TrXSBmVbTvD_BwE
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: mastercontrol90 on Tue, 18 August 2015, 02:57:13
Well some "necro-posting" here! What are the exact "dimensions" of the phantom pcb? And about the leds, are those necessary or you can omit putting them on the pcb? I need to know those things for a custom keyboard, thanks!
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: gaunt on Mon, 01 August 2016, 06:10:39
So I figured I'd see if I have more luck with necro-posting than the previous poster; I don't think my problem deserves a new topic, it's pretty dumb.

I build my Phantom a few weeks ago, and while it was fine in the beginning, entire rows of keys became erratic after a while, becoming periodically unresponsive or chattering. Since rows and not individual switches were affected, I managed to fix it by sucking off most of the solder on the Teensy joints, and resoldering. One row didn't get fixed though, the uppermost one, so I tried to do the same procedure again at the B5 joint... and ended up sucking up the leg. I guess in that case, the problem was that the B5 leg wasn't properly soldered to the Phantom, so desoldering it on the Teensy side made it come loose.

Can this be fixed without desoldering every switch to access the topside of the PCB? I assume no, but I've been wrong about a lot when it comes to soldering lately.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Data on Mon, 01 August 2016, 06:17:24
So I figured I'd see if I have more luck with necro-posting than the previous poster; I don't think my problem deserves a new topic, it's pretty dumb.

I build my Phantom a few weeks ago, and while it was fine in the beginning, entire rows of keys became erratic after a while, becoming periodically unresponsive or chattering. Since rows and not individual switches were affected, I managed to fix it by sucking off most of the solder on the Teensy joints, and resoldering. One row didn't get fixed though, the uppermost one, so I tried to do the same procedure again at the B5 joint... and ended up sucking up the leg. I guess in that case, the problem was that the B5 leg wasn't properly soldered to the Phantom, so desoldering it on the Teensy side made it come loose.

Can this be fixed without desoldering every switch to access the topside of the PCB? I assume no, but I've been wrong about a lot when it comes to soldering lately.

Inspect the Teensy and PCB closely to make sure you didn't pull any pads.  Assuming you didn't, just buy another pin and solder it from both sides.  They're cheap -- you'll pay more for shipping than for the pins.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: gaunt on Mon, 01 August 2016, 08:28:48
So I figured I'd see if I have more luck with necro-posting than the previous poster; I don't think my problem deserves a new topic, it's pretty dumb.

I build my Phantom a few weeks ago, and while it was fine in the beginning, entire rows of keys became erratic after a while, becoming periodically unresponsive or chattering. Since rows and not individual switches were affected, I managed to fix it by sucking off most of the solder on the Teensy joints, and resoldering. One row didn't get fixed though, the uppermost one, so I tried to do the same procedure again at the B5 joint... and ended up sucking up the leg. I guess in that case, the problem was that the B5 leg wasn't properly soldered to the Phantom, so desoldering it on the Teensy side made it come loose.

Can this be fixed without desoldering every switch to access the topside of the PCB? I assume no, but I've been wrong about a lot when it comes to soldering lately.

Inspect the Teensy and PCB closely to make sure you didn't pull any pads.  Assuming you didn't, just buy another pin and solder it from both sides.  They're cheap -- you'll pay more for shipping than for the pins.

Thanks, I guess that's a no.  I'm not sure if it's my cheap equipment or what, but even desoldering a single switch is a huge pain for me: there's always a tiny bit of solder left behind that is damn hard to remove. So I guess I'll have to sell the keyboard in parts.
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Data on Mon, 01 August 2016, 13:15:45
So I figured I'd see if I have more luck with necro-posting than the previous poster; I don't think my problem deserves a new topic, it's pretty dumb.

I build my Phantom a few weeks ago, and while it was fine in the beginning, entire rows of keys became erratic after a while, becoming periodically unresponsive or chattering. Since rows and not individual switches were affected, I managed to fix it by sucking off most of the solder on the Teensy joints, and resoldering. One row didn't get fixed though, the uppermost one, so I tried to do the same procedure again at the B5 joint... and ended up sucking up the leg. I guess in that case, the problem was that the B5 leg wasn't properly soldered to the Phantom, so desoldering it on the Teensy side made it come loose.

Can this be fixed without desoldering every switch to access the topside of the PCB? I assume no, but I've been wrong about a lot when it comes to soldering lately.

Inspect the Teensy and PCB closely to make sure you didn't pull any pads.  Assuming you didn't, just buy another pin and solder it from both sides.  They're cheap -- you'll pay more for shipping than for the pins.

Thanks, I guess that's a no.  I'm not sure if it's my cheap equipment or what, but even desoldering a single switch is a huge pain for me: there's always a tiny bit of solder left behind that is damn hard to remove. So I guess I'll have to sell the keyboard in parts.

Sorry, I didn't fully answer your question.  In my defense it was very early.     :-[

You can only pass solder from one side, presumably because of the switch plate.  So that definitely presents a problem.  But if you can get the solder to melt/flow all the way through both PCBs, and assuming your Teensy is as close as it can possibly get to touching your Phantom PCB, then you might be able to force enough solder in from the Teensy (bottom) side all the way through.  The goal is to get as much solder in there as possible so it connects to the pad & pin on the opposite Phantom side.  Get a hot iron and work quickly.  It's worth a try.

The tricky part will be holding the new pin in place while you solder.  Maybe needle-nose vice grips will work? 

Wait -- Did you use the black plastic spacers on the pins in your Teensy?  If you did you are SOL.   :-X
Title: Re: Building Phantom Hardware and Firmware Mods
Post by: gaunt on Mon, 01 August 2016, 14:12:59
Sorry, I didn't fully answer your question.  In my defense it was very early.     :-[

You can only pass solder from one side, presumably because of the switch plate.  So that definitely presents a problem.  But if you can get the solder to melt/flow all the way through both PCBs, and assuming your Teensy is as close as it can possibly get to touching your Phantom PCB, then you might be able to force enough solder in from the Teensy (bottom) side all the way through.  The goal is to get as much solder in there as possible so it connects to the pad & pin on the opposite Phantom side.  Get a hot iron and work quickly.  It's worth a try.

The tricky part will be holding the new pin in place while you solder.  Maybe needle-nose vice grips will work? 

Wait -- Did you use the black plastic spacers on the pins in your Teensy?  If you did you are SOL.   :-X

I did not use the spacers, so I'll give that a try. Actually, I was pretty careful when I soldered the Teensy onto the PCB, so I wonder if what might have happened was that I heated up the pin to the point that even solder on the PCB side became liquid when I tried to resolder the Teensy side, and that the PCB side solder got sucked up as well... Thanks again!

Title: Re: Building Phantom Hardware and Firmware Mods
Post by: Data on Tue, 02 August 2016, 13:58:14
Yeah, safe bet that's what happened.  Now just do that again, but in reverse.  :D