geekhack

geekhack Projects => Making Stuff Together! => Topic started by: robotmaxtron on Fri, 27 May 2016, 14:42:40

Title: GH60 Rev.C Underglow with a WS2812 strip
Post by: robotmaxtron on Fri, 27 May 2016, 14:42:40
I've been trying to read up on some the specifics of the GH60 pcb (Not the Satan board, the Rev.C) and I saw on the QMK Github readme that it's possible to use a strip of the leds as an underglow type effect with the KC60. Am I understanding things correctly that there are some in-switch led support for things like the WASD and PokerX clusters, this could be leveraged to control an rgb strip of WS2812 leds on the GH60 Rev.C?

I'm trying to get things in order for a full parts list, switches and keycaps are the obvious bits but before I decided on a case I wanted to verify the possibility of the underglow type lighting option.

 
Title: Re: GH60 Rev.C Underglow with a WS2812 strip
Post by: komar007 on Fri, 27 May 2016, 14:48:30
I've been trying to read up on some the specifics of the GH60 pcb (Not the Satan board, the Rev.C) and I saw on the QMK Github readme that it's possible to use a strip of the leds as an underglow type effect with the KC60. Am I understanding things correctly that there are some in-switch led support for things like the WASD and PokerX clusters, this could be leveraged to control an rgb strip of WS2812 leds on the GH60 Rev.C?

I'm trying to get things in order for a full parts list, switches and keycaps are the obvious bits but before I decided on a case I wanted to verify the possibility of the underglow type lighting option.
 

robotmaxtron,

If you build simple transistor based switches for the strip, you can either use 3 of the 4 LED pins (which are also available as pads on the board labelled as GPIO), or if you don't want to use 3 of those, there is also 1 unused pin, PB0, but that would require soldering directly to the chip's pin.
Title: Re: GH60 Rev.C Underglow with a WS2812 strip
Post by: robotmaxtron on Fri, 27 May 2016, 16:45:34
I've been trying to read up on some the specifics of the GH60 pcb (Not the Satan board, the Rev.C) and I saw on the QMK Github readme that it's possible to use a strip of the leds as an underglow type effect with the KC60. Am I understanding things correctly that there are some in-switch led support for things like the WASD and PokerX clusters, this could be leveraged to control an rgb strip of WS2812 leds on the GH60 Rev.C?

I'm trying to get things in order for a full parts list, switches and keycaps are the obvious bits but before I decided on a case I wanted to verify the possibility of the underglow type lighting option.
 

robotmaxtron,

If you build simple transistor based switches for the strip, you can either use 3 of the 4 LED pins (which are also available as pads on the board labelled as GPIO), or if you don't want to use 3 of those, there is also 1 unused pin, PB0, but that would require soldering directly to the chip's pin.

I found these images which I think is from the GH60 Satan PCB, but is this what you mean?

Overview
(http://i.imgur.com/d2LHKNG.jpg)

Closeup of soldered to PB0
(http://i.imgur.com/hvUhGU0.jpg)

Glamour shot/results
(http://i.imgur.com/6h0BZk8.jpg)

Would that be all that it would take? Just wiring to PB0 and then supplying power and ground?

Additional shot of where PB0 is:
(http://www.pighixxx.com/test/wp-content/uploads/2014/11/atmega32u4.png)
Title: Re: GH60 Rev.C Underglow with a WS2812 strip
Post by: odd on Fri, 27 May 2016, 23:19:59
I've been trying to read up on some the specifics of the GH60 pcb (Not the Satan board, the Rev.C) and I saw on the QMK Github readme that it's possible to use a strip of the leds as an underglow type effect with the KC60. Am I understanding things correctly that there are some in-switch led support for things like the WASD and PokerX clusters, this could be leveraged to control an rgb strip of WS2812 leds on the GH60 Rev.C?

I'm trying to get things in order for a full parts list, switches and keycaps are the obvious bits but before I decided on a case I wanted to verify the possibility of the underglow type lighting option.
 

robotmaxtron,

If you build simple transistor based switches for the strip, you can either use 3 of the 4 LED pins (which are also available as pads on the board labelled as GPIO), or if you don't want to use 3 of those, there is also 1 unused pin, PB0, but that would require soldering directly to the chip's pin.

I found these images which I think is from the GH60 Satan PCB, but is this what you mean?

Overview
Show Image
(http://i.imgur.com/d2LHKNG.jpg)


Closeup of soldered to PB0
Show Image
(http://i.imgur.com/hvUhGU0.jpg)


Glamour shot/results
Show Image
(http://i.imgur.com/6h0BZk8.jpg)


Would that be all that it would take? Just wiring to PB0 and then supplying power and ground?

Additional shot of where PB0 is:
Show Image
(http://www.pighixxx.com/test/wp-content/uploads/2014/11/atmega32u4.png)


That's not PB0 in the pics BTW so don't go messing up your board  :p
Title: Re: GH60 Rev.C Underglow with a WS2812 strip
Post by: komar007 on Sat, 28 May 2016, 02:41:19
I've been trying to read up on some the specifics of the GH60 pcb (Not the Satan board, the Rev.C) and I saw on the QMK Github readme that it's possible to use a strip of the leds as an underglow type effect with the KC60. Am I understanding things correctly that there are some in-switch led support for things like the WASD and PokerX clusters, this could be leveraged to control an rgb strip of WS2812 leds on the GH60 Rev.C?

I'm trying to get things in order for a full parts list, switches and keycaps are the obvious bits but before I decided on a case I wanted to verify the possibility of the underglow type lighting option.
 

robotmaxtron,

If you build simple transistor based switches for the strip, you can either use 3 of the 4 LED pins (which are also available as pads on the board labelled as GPIO), or if you don't want to use 3 of those, there is also 1 unused pin, PB0, but that would require soldering directly to the chip's pin.

I found these images which I think is from the GH60 Satan PCB, but is this what you mean?

Overview
Show Image
(http://i.imgur.com/d2LHKNG.jpg)


Closeup of soldered to PB0
Show Image
(http://i.imgur.com/hvUhGU0.jpg)


Glamour shot/results
Show Image
(http://i.imgur.com/6h0BZk8.jpg)


Would that be all that it would take? Just wiring to PB0 and then supplying power and ground?

Additional shot of where PB0 is:
Show Image
(http://www.pighixxx.com/test/wp-content/uploads/2014/11/atmega32u4.png)


Sorry, I didn't read what WS2812 is, so in fact you need just one pin and forget about the transistors.
As mentioned, it's not PB0 in the picture, but the general idea is right. If you don't need all 4 LED clusters, then go ahead and use one of GPIO pins instead of soldering directly to the chip.
Title: Re: GH60 Rev.C Underglow with a WS2812 strip
Post by: robotmaxtron on Sat, 28 May 2016, 12:28:48
Very cool. Thanks for your input. I'll of course post some pictures and everything as progress happens.
Title: Re: GH60 Rev.C Underglow with a WS2812 strip
Post by: robotmaxtron on Thu, 09 June 2016, 22:07:29
I'm working on my QMK keymap while I wait for the last of my parts to arrive, I was hoping somebody could help take a look at my keymap to see if I'm on the right track. There's a couple things that I'm not sure I understand.

Is this how this is supposed to work to both work as a capslock and a momentary switch to a function layer named _FL?
Code: [Select]
ACTION_LAYER_TAP_KEY(_FL, KC_CAPS),

How do I enable the caps lock when it's toggled?
Code: [Select]
gh60_caps_led_on()
I don't understand this section:
Code: [Select]
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
  // MACRODOWN only works in this function
      switch(id) {
        case 0:
          if (record->event.pressed) {
            register_code(KC_RSFT);
          } else {
            unregister_code(KC_RSFT);
          }
        break;
      }
    return MACRO_NONE;
};

Full Keymap: https://github.com/robotmaxtron/GH60-Rev.C-Keymap/blob/master/max.c
Edit: Removed old repo, full repo is available in the next reply.
Title: Re: GH60 Rev.C Underglow with a WS2812 strip
Post by: robotmaxtron on Sat, 11 June 2016, 22:01:17
Well the good news is that my keymap compiled at least.

Full source is available here: https://github.com/robotmaxtron/qmk_firmware/tree/master/keyboard/gh60/keymaps/robotmaxtron

I haven't tested it yet since I'm still waiting on switches. Stabs installed, switches ordered, the plate and pcb are here. Progress is coming along!
Title: Re: GH60 Rev.C Underglow with a WS2812 strip
Post by: robotmaxtron on Sun, 03 July 2016, 11:03:25
Mostly finished with the board, the neopixel strip half works. I can get it to turn on/off and change mode but I haven't been able to get it to change colors.

Full build log posted here: http://imgur.com/gallery/tlm0C
Title: Re: GH60 Rev.C Underglow with a WS2812 strip
Post by: cyd3r on Wed, 06 July 2016, 17:17:34
Looking at this just confuses me even more. I've got the KC60 (purple PCB '2015-09-12 Version 2.0') as shown here https://imgur.com/a/kYyyb

How exactly could I use the strip LEDs for underglow while using the LEDs on the switch at the same time (Is this even possible? If so how?)
Title: Re: GH60 Rev.C Underglow with a WS2812 strip
Post by: robotmaxtron on Thu, 07 July 2016, 16:29:44
Looking at this just confuses me even more. I've got the KC60 (purple PCB '2015-09-12 Version 2.0') as shown here https://imgur.com/a/kYyyb

How exactly could I use the strip LEDs for underglow while using the LEDs on the switch at the same time (Is this even possible? If so how?)

Here's some pretty clear instructions on wiring and everything with the KC60 v2.0: https://github.com/jackhumbert/qmk_firmware/tree/master/keyboards/kc60/keymaps/ws2812
Title: Re: GH60 Rev.C Underglow with a WS2812 strip
Post by: Moistgun on Thu, 07 July 2016, 16:43:32
Theres a thread on this on DT.

https://deskthority.net/workshop-f7/gh60-rev-c-underglow-with-a-rgb-strip-questions-about-the-pcb-pinout-t13897.html

Its not a complete clear explanation, but its a start.
Title: Re: GH60 Rev.C Underglow with a WS2812 strip
Post by: robotmaxtron on Fri, 08 July 2016, 11:33:21
I got the neopixel strip working on the GH60 Rev.C after adjusting some of my keymapping.

http://i.imgur.com/sxGmxC5.jpg
Title: Re: GH60 Rev.C Underglow with a WS2812 strip
Post by: redbanshee on Fri, 08 July 2016, 12:22:56
I got the neopixel strip working on the GH60 Rev.C after adjusting some of my keymapping.

http://i.imgur.com/sxGmxC5.jpg

Well done! Care to share your git repo? looked thru your repo's and see the GH60 one but it doenst appear to have the QMK code in there

EDIT: nevermind
Title: Re: GH60 Rev.C Underglow with a WS2812 strip
Post by: cyd3r on Fri, 08 July 2016, 13:27:39
I'm new and not so good when it comes to modding and DIY stuff. It would be awesome if someone could explain this or put it to steps. Like where is the "unused pin B0", "PF5 breakout pin", "VCC", "GND", and "DI".

Which part needs soldering? Is it the same for KC60?
Do you solder the wires any different from the switches?

I just found about 2016-04-19-Satan-GH60-Build-Log (http://missourivalleyambulance.com/2016-04-19-Satan-GH60-Build-Log) by cheddarbek and have a vague idea now.

*edit
Found http://imgur.com/a/NxL1X by fuzzycuffs.
Also I don't know why but anything related to "a0-c" is gone. By that I mean his reddit (https://www.reddit.com/user/a0-c) account deleted github (https://github.com/a0-c/qmk-satan-rgb) repository removed, his imgur album (http://imgur.com/a/BzSMq) deleted
All my answers were here (https://www.reddit.com/r/MechanicalKeyboards/comments/42mn3y/serpent_and_the_rainbow_satan_qmk_rgb/) though it's useless now, since it's not available anymore.
Title: Re: GH60 Rev.C Underglow with a WS2812 strip
Post by: Moistgun on Fri, 08 July 2016, 15:47:43
I'm new and not so good when it comes to modding and DIY stuff. It would be awesome if someone could explain this or put it to steps. Like where is the "unused pin B0", "PF5 breakout pin", "VCC", "GND", and "DI".

Which part needs soldering? Is it the same for KC60?
Do you solder the wires any different from the switches?

I just found about 2016-04-19-Satan-GH60-Build-Log (http://missourivalleyambulance.com/2016-04-19-Satan-GH60-Build-Log) by cheddarbek and have a vague idea now.

*edit
Found http://imgur.com/a/NxL1X by fuzzycuffs.
Also I don't know why but anything related to "a0-c" is gone. By that I mean his reddit (https://www.reddit.com/user/a0-c) account deleted github (https://github.com/a0-c/qmk-satan-rgb) repository removed, his imgur album (http://imgur.com/a/BzSMq) deleted
All my answers were here (https://www.reddit.com/r/MechanicalKeyboards/comments/42mn3y/serpent_and_the_rainbow_satan_qmk_rgb/) though it's useless now, since it's not available anymore.

Are you trying to do this to a GH60 PCB or a Satan PCB?? very different things.

I can help you with the latter.
Title: Re: GH60 Rev.C Underglow with a WS2812 strip
Post by: cyd3r on Fri, 08 July 2016, 16:30:32
It's actually KC60. I'm assuming it's the same as GH60, someone got it working here https://geekhack.org/index.php?topic=82762.0
Title: Re: GH60 Rev.C Underglow with a WS2812 strip
Post by: Moistgun on Fri, 08 July 2016, 18:01:12
It's actually KC60. I'm assuming it's the same as GH60, someone got it working here https://geekhack.org/index.php?topic=82762.0

I suggest you post in that thread or pm the guy.

They arent going to be the same.  Maybe minor differences, but not the same.
Title: Re: GH60 Rev.C Underglow with a WS2812 strip
Post by: robotmaxtron on Sat, 09 July 2016, 00:46:59
I got the neopixel strip working on the GH60 Rev.C after adjusting some of my keymapping.

http://i.imgur.com/sxGmxC5.jpg

Well done! Care to share your git repo? looked thru your repo's and see the GH60 one but it doenst appear to have the QMK code in there

EDIT: nevermind

I've been neglecting my QMK repo, but yes I absolutely plan to submit a PR actually upstream to the QMK core so that others can use mine as an example. There was a recent change to how the config to the WS2812 strip actually works with QMK that I still haven't sorted out yet.
Title: Re: GH60 Rev.C Underglow with a WS2812 strip
Post by: robotmaxtron on Sat, 09 July 2016, 00:48:42
It's actually KC60. I'm assuming it's the same as GH60, someone got it working here https://geekhack.org/index.php?topic=82762.0

Again, as I mentioned in Reply #10 there are very clear instructions on how to wire the KC60 and how to program it in the QMK repo.
Title: Re: GH60 Rev.C Underglow with a WS2812 strip
Post by: robotmaxtron on Sun, 10 July 2016, 00:52:20
Keymap has been accepted upstream to QMK: https://github.com/jackhumbert/qmk_firmware/pull/502
Title: Re: GH60 Rev.C Underglow with a WS2812 strip
Post by: robotmaxtron on Thu, 14 July 2016, 15:36:20
Forgot to post the updated build log: http://imgur.com/a/NkwCD (http://imgur.com/a/NkwCD)
Title: Re: GH60 Rev.C Underglow with a WS2812 strip
Post by: MajorKoos on Fri, 15 July 2016, 11:52:38
It worked beautifully.

I killed a few LEDs at first by not insulating the back of the strip - they shorted out against some pads on the PCB and left the whole strip non-operational.
I stuck some electricians tape over the pads on the back, cut off 8 LEDs, spaced them around the edge of the PCB and used some 26 gauge hookup wire to join them all up.

Thanks for putting in the footwork to get this working.
Title: Re: GH60 Rev.C Underglow with a WS2812 strip
Post by: Moistgun on Fri, 15 July 2016, 12:32:29
It worked beautifully.

I killed a few LEDs at first by not insulating the back of the strip - they shorted out against some pads on the PCB and left the whole strip non-operational.
I stuck some electricians tape over the pads on the back, cut off 8 LEDs, spaced them around the edge of the PCB and used some 26 gauge hookup wire to join them all up.

Thanks for putting in the footwork to get this working.

I did the same thing,  shorted some lights and had to start over
Title: Re: GH60 Rev.C Underglow with a WS2812 strip
Post by: robotmaxtron on Fri, 15 July 2016, 13:41:15
It worked beautifully.

I killed a few LEDs at first by not insulating the back of the strip - they shorted out against some pads on the PCB and left the whole strip non-operational.
I stuck some electricians tape over the pads on the back, cut off 8 LEDs, spaced them around the edge of the PCB and used some 26 gauge hookup wire to join them all up.

Thanks for putting in the footwork to get this working.

I did the same thing,  shorted some lights and had to start over

I've got you both beat. I shorted out my pcb, the reason the wiring look a million times better in this build log is because I had already done it once.
Title: Re: GH60 Rev.C Underglow with a WS2812 strip
Post by: MajorKoos on Fri, 15 July 2016, 16:35:09
It worked beautifully.

I killed a few LEDs at first by not insulating the back of the strip - they shorted out against some pads on the PCB and left the whole strip non-operational.
I stuck some electricians tape over the pads on the back, cut off 8 LEDs, spaced them around the edge of the PCB and used some 26 gauge hookup wire to join them all up.

Thanks for putting in the footwork to get this working.

I did the same thing,  shorted some lights and had to start over

I've got you both beat. I shorted out my pcb, the reason the wiring look a million times better in this build log is because I had already done it once.

You "Win".  I guess you got "Lucky" and fed 5v into the microcontroller.
On the bright side you now have a donor board to cut in half and make a split ergo 60% with a RGB backlight.