mattdibi / redox-keyboard

Ergonomic split mechanical keyboard
MIT License
1.78k stars 167 forks source link

keyboard not working? #7

Closed nicolai86 closed 5 years ago

nicolai86 commented 5 years ago

Hey,

thank you for this reduced ErgoDox design, I think I'm really going to like it.

My FalbaTech order arrived today. I've soldered everything according to the build guide. However, when I try to flash the micros it seems the reset button is not working:

$ make redox/rev1:default:avrdude
QMK Firmware 0.6.140
Making redox/rev1 with keymap default and target avrdude

avr-gcc (GCC) 8.2.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Size before:
   text    data     bss     dec     hex filename
      0   23468       0   23468    5bac .build/redox_rev1_default.hex

Compiling: tmk_core/common/command.c                                                                [OK]
Linking: .build/redox_rev1_default.elf                                                              [OK]
Creating load file for flashing: .build/redox_rev1_default.hex                                      [OK]
Checking file size of redox_rev1_default.hex                                                        [OK]
 * The firmware size is fine - 23468/28672 (5204 bytes free)
Copying redox_rev1_default.hex to qmk_firmware folder                                               [OK]
Detecting USB port, reset your controller now..................................................................................................................................................................................................................................................................................................................................^Cmake[1]: *** [avrdude] Interrupt: 2
make: *** [redox/rev1:default:avrdude] Interrupt: 2

I tried various things to get the reset buttons to work - in the end I just shorted GND and RESET. Now I've flashed the keyboard with the RGB underglow modification, but no single key stroke is recognized:

Any ideas what might be the issue?

I've soldered the SMD diodes included in the FalbaTech package, not the regular ones.

Best,

nicolai86 commented 5 years ago

I think I've found the culprit, closing for now.

mattdibi commented 5 years ago

Hi, I'm glad you resolved the problem. May I ask you what was the issue and how you solved it? It may help others with the same problem.

nicolai86 commented 5 years ago

I did not properly solder some of the micro headers on the front of the PCBs. I started checking the SMD diodes using a multimeter while the keyboard was attached to my laptop and they were missing voltage. I’m sorry to say that the root cause was my sloppy soldering; I was able to fix this by desoldering every single switch as well as the pro micros, bc there was no other way to access these solder points with the case attached.

If you have suggestions on how to eg replace the switches below the pro micro or the pro micro itself; would be a very useful addition to the guide for “repairs” like mine. For the future I know that I’ll verify every single pin next time before soldering the micro as it is so hard to get it off.

nicolai86 commented 5 years ago

@mattdibi I'm re-opening this as it seems I'm missing more:

after correcting the soldering points the reset buttons work fine, flashing works fine - when I connect each half individually to my laptop, both halves work fine. However, when I connect them via TRRS, the half not connected via USB does not work. As I've got a RGB underglow mod I've tried removing it and reverting to I2C instead of serial, but no success.

I verified with a multimeter that the TRRS line is carrying ~5V. I expect the other micro to light its green light, but this only happens when connected via USB. Any ideas what I am missing?

nicolai86 commented 5 years ago

I've flashed the EEPROM on both hands; now every hand sends the right key when used alone, but when attached via TRRS still only one side works. Not sure how to debug the connection issue further, any ideas?

mattdibi commented 5 years ago

You are correct in assuming that the Arduino should light up when connected through the TRRS connection. I suggest you to double check the connection of the TRRS jack and the cable. Every pole of the jack should correspond to the same pole on the othe end of the cable. Also check for continuity to the arduino: the top pin of the TRRS connector should connect to ground, the bottom one to VCC. A picture of the PCB might help.

nicolai86 commented 5 years ago

I think I bricked one of the Pro Micro PCBs when de- and re-soldering: i’ve soldered the TRRS pins directly on the headers on each pro micro, and still the second half doesn’t light up. I’ll have to pick this up once I get a replacement. Thanks for the help, I’ll report back once I’ve replaced them.

nicolai86 commented 5 years ago

@mattdibi so I've replaced the pro micro now, here are some pictures:

left hand: img_5087

right hand: img_5088

both hands work individually without any issues.

nicolai86 commented 5 years ago

Now, for the TRRS debugging: right hand has a fine tip and bottom I think:

img_5089

However, left hand seems to have VDD on the round, not the tip:

img_5090

Could the PJ320 be defect?

nicolai86 commented 5 years ago

desoldered the PJ320A, I think it works fine. I think there's an issue with the pins actually: img_5091

According to my multimeter the left hand side is

T R R S (GND),

but the right hand side is

T(VDD) R R S (GND)

So there is no VDD on the tip. I think this means that the pro micro VDD pin is not soldered properly? Short circuit between VDD on pro micro and the PJ320 should answer this question; hope I can check this tmw.

What do you think?

nicolai86 commented 5 years ago

Alright, so I replaced the pro micro on the left hand side too, now I get power via TRRS, yay!

img_5092

However, when both halves are connected I still can only type on the side with the USB cable attached. Maybe I flashed the sides wrong?

Here's what I did:

# attach left side
$ make redox/rev1:default:avrdude
$ avrdude -p atmega32u4 -P /dev/tty.usbmodem14401 -c avr109 -U eeprom:w:keyboards/lets_split/eeprom-lefthand.eep

# attach right side
$ make redox/rev1:default:avrdude
$  avrdude -p atmega32u4 -P /dev/tty.usbmodem14501 -c avr109 -U eeprom:w:keyboards/lets_split/eeprom-righthand.eep

The following changes are made to qmk:

$ git diff
diff --git a/keyboards/redox/keymaps/default/config.h b/keyboards/redox/keymaps/default/config.h
index 22e26c004..264e43d38 100644
--- a/keyboards/redox/keymaps/default/config.h
+++ b/keyboards/redox/keymaps/default/config.h
@@ -22,8 +22,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.

 /* Use I2C or Serial, not both */

-// #define USE_SERIAL
-#define USE_I2C
+#define USE_SERIAL
+// #define USE_I2C

 /* Select hand configuration */

diff --git a/keyboards/redox/rules.mk b/keyboards/redox/rules.mk
index c74a3bda2..d27a75b90 100644
--- a/keyboards/redox/rules.mk
+++ b/keyboards/redox/rules.mk
@@ -66,7 +66,7 @@ UNICODE_ENABLE = no         # Unicode
 BLUETOOTH_ENABLE = no       # Enable Bluetooth with the Adafruit EZ-Key HID
 AUDIO_ENABLE = no           # Audio output on port C6
 FAUXCLICKY_ENABLE = no      # Use buzzer to emulate clicky switches
-RGBLIGHT_ENABLE = no        # Enable WS2812 RGB underlight.  Do not enable this with audio at the same time.
+RGBLIGHT_ENABLE = yes        # Enable WS2812 RGB underlight.  Do not enable this with audio at the same time.
 SUBPROJECT_rev1 = yes
 USE_I2C = yes

@mattdibi thank you so much for your support so far - any idea how to help me over the finish line?

mattdibi commented 5 years ago

You still need to define EE_HANDS in keyboard/redox/keymaps/<your_keymap_of_choice>/config.h like so:

/* Select hand configuration */

// #define MASTER_LEFT
// #define MASTER_RIGHT
#define EE_HANDS

#undef RGBLED_NUM

Full instructions are here.

Also double check the connectivity between PD0 and the TRRS pin below the one you soldered the cable for the RGB lighting.

nicolai86 commented 5 years ago

I've checked continuity for PD0 and PD1, both are correct on both the PJ320A and the inserted TRRS cable. I've checked continuity like this:

left micro PD0 -> left PJ320A -> right PJ320A -> right micro PD0
left micro PD1 -> left PJ320A -> right PJ320A -> right micro PD1

as well as

left micro PD0 -> right micro PD0
left micro PD1 -> right micro PD1

Always a beep, so the connectivity is fine.

img_5094

Now, I've flashed the hands according to the linked instructions, but still only one side sends keystrokes. I'm feeling like I'm missing something obvious, but I can't find it... :(

Here's the diff:

$ git diff
diff --git a/keyboards/redox/keymaps/default/config.h b/keyboards/redox/keymaps/default/config.h
index 22e26c004..c4aa7226a 100644
--- a/keyboards/redox/keymaps/default/config.h
+++ b/keyboards/redox/keymaps/default/config.h
@@ -22,14 +22,14 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.

 /* Use I2C or Serial, not both */

-// #define USE_SERIAL
-#define USE_I2C
+#define USE_SERIAL
+// #define USE_I2C

 /* Select hand configuration */

-#define MASTER_LEFT
+// #define MASTER_LEFT
 // #define MASTER_RIGHT
-// #define EE_HANDS
+#define EE_HANDS

 #undef RGBLED_NUM
 #define RGBLIGHT_ANIMATIONS
diff --git a/keyboards/redox/rules.mk b/keyboards/redox/rules.mk
index c74a3bda2..d27a75b90 100644
--- a/keyboards/redox/rules.mk
+++ b/keyboards/redox/rules.mk
@@ -66,7 +66,7 @@ UNICODE_ENABLE = no         # Unicode
 BLUETOOTH_ENABLE = no       # Enable Bluetooth with the Adafruit EZ-Key HID
 AUDIO_ENABLE = no           # Audio output on port C6
 FAUXCLICKY_ENABLE = no      # Use buzzer to emulate clicky switches
-RGBLIGHT_ENABLE = no        # Enable WS2812 RGB underlight.  Do not enable this with audio at the same time.
+RGBLIGHT_ENABLE = yes        # Enable WS2812 RGB underlight.  Do not enable this with audio at the same time.
 SUBPROJECT_rev1 = yes
 USE_I2C = yes

I feel like this is a software issue at this point - but I'm not sure why the diff in the readme you linked doesn't work for me :(

mattdibi commented 5 years ago

I think this is a software issue too. Try this: in this repository for the Redox rev.1 I uploaded a pre-built hex file for RGB enabled version here. Try using that hex and see if it works.

nicolai86 commented 5 years ago

@mattdibi hm, I'm confused. I've flashed each half individually with the RGB hex file you linked:

$ avrdude -p atmega32u4 -P /dev/tty.usbmodem14501 -c avr109 -U flash:w:redox_rev1_default_RGB.hex

both times flashing worked without any issues.

Now I connect the keyboards via TRRS, attach one half via USB - and still, only one half works. So, maybe a hardware issue after all? Is there any way I could debug the 1-wire connection between each half? Note that the RGB LED strips lights up in red, so at least that data wire seems to work...

mattdibi commented 5 years ago

OK this is getting weird. Have you tried to disable the RGB lighting? I'm trying to think a way to debug this. When I come home from work tonight I'll try to reproduce the problem on my debugging board.

nicolai86 commented 5 years ago

I’ll solder the 4.7k resistors on the left side tomorrow (11:15pm here) and flash both halves with the default hex from the folder you linked.

Will report back with the results.

Thank you so much for your continuing support.

EDIT other options I need to explore, in order of preference:

lleonini commented 5 years ago

Hi, I have the same problem. I have ordered a built keyboard at falbatech. Then after 2 days, one microusb plug was defective and detach. So I have just replace the pro micro by a new one. Now, as you, I can flash each hand separately and connect my keyboard via 2 micro usb and basically it works. But connected with TRRS (tested with microusb on each side) it will not work anymore (the part connected via TRRS is not seen). However when I plug it I have a the leds lines and pro micro led on on of both side. I don't really understand what have changed. Thanks

nicolai86 commented 5 years ago

So I’ve soldered the resistors & flashed the default hex without RGB, same result. Currently disassembling the entire keyboard to find a flaw; so far, no luck. Hope to know more later this weekend.

lleonini commented 5 years ago

My side I have fixed the problem with these steps:

1) On right part: sudo avrdude -p atmega32u4 -P /dev/ttyACM0 -c avr109 -U flash:w:redox_rev1_default_RGB.hex -U eeprom:w:keyboards/lets_split/eeprom-righthand.eep

2) On left part: sudo avrdude -p atmega32u4 -P /dev/ttyACM0 -c avr109 -U flash:w:redox_rev1_default_RGB.hex -U eeprom:w:keyboards/lets_split/eeprom-leftthand.eep

Then it works.

3) Then to reflash my custom config I have used: EE_HANDS + USE_SERIAL in config.h

Hope this help you, in my case that was definitely a software issue.

mattdibi commented 5 years ago

@lleonini Thanks for sharing. I'm glad you solved your problem.

@nicolai86 I still have no clue, neither was able to reproduce the problem. Please keep me updated.

nicolai86 commented 5 years ago

@mattdibi I’ve kind of given up after spending a couple of more hours today; currently working in rescueing as many switches/ pro micros as I can and waiting on my second kit from FalbaTech 😞

mattdibi commented 5 years ago

@nicolai86 I'm sorry to hear that. If you need support for your next kit or some instruction is not clear feel free to ask.

nicolai86 commented 5 years ago

Will do, thank you @mattdibi :)

nicolai86 commented 5 years ago

@mattdibi for what it’s worth I figured out the issue: the TRRS cable from FalbaTech was broken; unfortunately I have already thrown away the soldered PCB, but my second Redox works really well . Hah!

Lesson learnt for next time: test everything once, and then, after a days break, test everything again.

mattdibi commented 5 years ago

@nicolai86 Well at least you found the culprit. Thank you for letting me know!

luistorres commented 5 years ago

Hi there. I just ordered a fully assembled redox keyboard from falbatech. I guess it comes with the default keymaps, but some keys are not really what they should be, so I'm trying to flash it with the default image. My problem is I can't make the keyboard enter the RESET mode...somehow the key combinations are not working. What are the default keys? Is there any other way to do it? Preferably one that doesn't involve disassembling it? Thanks 🙏

mattdibi commented 5 years ago

Hi, on the back of the keyboard there's a button for this purpose. Hope this helps.

P s. Next time or if this doesn't help you, please open a new issue.