Author Topic: Help fixing a dead Ducky Shine 3  (Read 4235 times)

0 Members and 1 Guest are viewing this topic.

Offline Pikipum

  • Thread Starter
  • Posts: 12
Help fixing a dead Ducky Shine 3
« on: Mon, 11 January 2021, 07:14:02 »
Hello everyone!

Recently I have run into a problem with my old Ducky Shine 3, and I am on a mission to fix this keyboard. What happened to my keyboard is pretty similar as described in this old thread: https://geekhack.org/index.php?topic=82882.0

Basically I reversed the power connector and sent power backwards to the PCB. I'm not sure if the microcontroller is completely fried, because some of the LEDs light up as I connect it to my computer. However, none of the keys work.

I am quite new to this whole scene, so I am looking for some pointers on where to get started.

First I would like to determine whether the microcontroller is completely dead and unsalvageable, I am getting a multimeter tomorrow to get some readings, but I am not entirely sure how to go about this.

I've done some research into handwiring the switches to a Teensy board, and bypassing the original controller. I live in the EU, and it seems quite difficult to get hands on a Teensy++ 2.0, which is often the recommended choice. I have found this guide: https://matt3o.com/building-a-keyboard-firmware/ which details instructions on how to build a firmware for a 3.xx series Teensy, which I could get my hands on more easily, what do you guys think about that option?

I've attached a couple of pictures of the PCB to give you guys a better idea of what I'm talking about.

Thank you in advance!

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Help fixing a dead Ducky Shine 3
« Reply #1 on: Mon, 11 January 2021, 11:26:52 »
What happens when you plug the USB in?  Does the device flash up as 'unknown device', or do you get a 'too much power' message or does the computer not notice at all?

There is not much to see in the pics as most of the matrix is on the other side.  Some columns are connected on the right switch pins though, so that's a start.

QMK as used in the guide you linked is the most popular firmware and as long as your matrix is sane it's good but if not you need to list the switch locations as they are in the matrix then rearrange them to match the physical layout adding gaps where neccesary.  I used Soarer's then EasyAVR which both let me generate the layout from the spreadsheet I noted the mapping in which is much easier.  But as your PCB doesn't look anything like mine it might be sane.  Or not.  Also EasyAVR only supports a couple of options for row and column count...

I think you need the multimeter to see what you're dealing with before I'm willing to suggest which to get.  You can get a 2.0++ from Hobbytronics if you want to go that route, I bought mine from them and it's genuine (leaving the link here so I don't have to find it again later)
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline Pikipum

  • Thread Starter
  • Posts: 12
Re: Help fixing a dead Ducky Shine 3
« Reply #2 on: Tue, 12 January 2021, 07:43:10 »
Hello again.

Here are some connections I found with the multimeter. I'm quite new at this, and I'm not entirely sure about the results. Not sure if this matrix is something that would count as sane, and some of the switches don't seem to have continuity with anything else.

When I plug the keyboard into my computer, Windows doesn't recognize it at all. Some of the LEDs do light up, but no other response.

I have an official Teensy seller in my neighborhood, but sadly they don't seem to have the ++ 2.0 models available.

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Help fixing a dead Ducky Shine 3
« Reply #3 on: Tue, 12 January 2021, 10:59:30 »
You can make a matrix where all those connections you found go vertically down a single column of keys and have 5 rows going across the board - this is very sane and easy to work with, it's what they do in the guide you linked (I don't even need to look as Matteo is not a pro, he's one of us)  Or you can make the columns in a U shape connecting two physical columns and have two rows per row - not so easy but saves a lot of pins on the controller so still still sane in my book.  Or you can wire some 'columns' going across the top and bottom of the board, like your Ducky.

I highly doubt any of the keys are on their own, it looks like at least some of the ones you haven't found connected have the diode attached to the other side - did you assume it would always be the right pins because most are?  Again, on a sane board they would be but this is 'professionally designed' and I'm sure the job advert specifies you must have a serious problem with drugs to design keyboards.

Next step would be to list the groups you've found in a column each in a spreadsheet.  Then you have to see which diodes are connected to each other - one connected to a switch from each group. I highlighted the cells to make it easy to see which are connected, then reorganised the columns so the colours matched going across, with gaps where there isn't a switch.

In the middle they should be alternating, though pairs may be easier.  Either would be sane so they probably did some of each.  Good luck!

P.s. if you could also map the ISO key positions that would be much appreciated thumb:
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline Pikipum

  • Thread Starter
  • Posts: 12
Re: Help fixing a dead Ducky Shine 3
« Reply #4 on: Wed, 13 January 2021, 05:31:35 »
Hello again.

I did assume the connections would always be on the same pin. However, that wasn't the case, and I found some more connections. Now every key (except FN) seems to be connected to a group, I've marked the new connections with an orange color in the picture. The Fn key seems to be somewhat special, not sure how it fits to the matrix.

I am not entirely sure how to check whether diodes are connected to each other. Just to test it out, I got a couple of readings from the + sides of a couple of diodes, I have marked them with white in the picture. Does it matter which lead of the multimeter (red or black) I use to check the diodes, and how exactly should I go about this? As I understand, current should flow only one way from diode to diode, so I am somewhat confused as to why the + sides give a reading. 

As for my layout, it is a Nordic one (with big enter key etc.).


Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Help fixing a dead Ducky Shine 3
« Reply #5 on: Wed, 13 January 2021, 06:42:21 »
That looks better :thumb:  When you're nearly done it may become clear that some of the small groups are connected and maybe you'll even find a home for FN but for now call it good.  Oh, except for adding the ANSI keys and if you're really keen the JIS ones (don't usually see them on a PCB!)

If you connect one probe to + on a diode and the other to - it will only work with the probes one way round because the currrent only goes one way through them, but we're interested in the connection after the diodes so it makes no difference - your whites are good.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline Pikipum

  • Thread Starter
  • Posts: 12
Re: Help fixing a dead Ducky Shine 3
« Reply #6 on: Wed, 13 January 2021, 08:33:00 »
Quick update - I've started compiling the spreadsheet and it seems to be going quite smoothly. The process is fairly logical - for example, diodes 82 to 93 are connected, comprising of alternate keys in a row such as ?, 9, 7, 5, 3, 1 in this case, but sometimes also includes switches from other rows, here F1, F5, F8, F11, Scr lk, backspace, home and num /.

Not sure what you mean by adding the ANSI keys, and the JIS keys are mostly used for stabilizers for the wide spacebar etc. For clarity, my keyboard layout is similar to this one (including the keys for web, mail etc. in the upper right corner): https://cdn.verk.net/images/55/2_238753-2030x725.jpg

EDIT:
I think I know what you mean, the switchless spots are still connected to the circuit! I didn't even think about that.
« Last Edit: Wed, 13 January 2021, 08:48:58 by Pikipum »

Offline Pikipum

  • Thread Starter
  • Posts: 12
Re: Help fixing a dead Ducky Shine 3
« Reply #7 on: Thu, 14 January 2021, 09:06:06 »
Hey! I'm finally done mapping the matrix! It took quite a while but everything seems to be in order.

It's funny that you said I might find a HOME for Fn, because I tried to check if Home and Fn are connected and what do you know :D It indeed belongs to that group.

I'm not that great at Excel, is it possible to rearrange the cells according to the number in the diode cell?

I'll let you have a look at my findings. I guess the next step is to start the soldering process. I'm trying to figure out the best way to wire the matrix, since there are 9 diode groups (one without switches) and 18 switch groups (one without switches). I guess these would be my rows and columns, such as in Mateos' guide, only mine are a bit all over the place.

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Help fixing a dead Ducky Shine 3
« Reply #8 on: Thu, 14 January 2021, 11:09:09 »
Two lists rather than colours, this will be fun.  Haven't played in Excel since escaping an office job 3 years ago and no Windows at home so will have to see what LibreOffice can do :)

Edit:  Wow, they left a big clue in the diode numbers!

Edit 2:  Your mapping has some issues.  Some of them are inconsistencies (D23 is attached to 3 sets of pins - I fixed this), others are possibly due to your funky Nordic layout (is <- a key or is it the missing left?) and the red ???s are very hard to work with.  I'll post what I manage to do later then you can clarify/fix it, no point us both working on different versions.
« Last Edit: Thu, 14 January 2021, 13:05:24 by suicidal_orange »
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline Pikipum

  • Thread Starter
  • Posts: 12
Re: Help fixing a dead Ducky Shine 3
« Reply #9 on: Thu, 14 January 2021, 15:04:08 »
Whoops, sorry! Looks like the autofill in feature must have mixed up some of the info where I have been trying to add a single digit number. However, the same diode is usually used for two switches if the other one is an unused spot in the board. D23 should only be used for two, Alt_R should most likely be D11. The diode for .: should be d5, another mistake from the autofill.

As for the <-, yes it's supposed to mean the left arrow. Looks like I forgot what I was doing halfway through and didn't keep it consistent.

The ones I've marked as red were something I was going to go back and double check. Didn't realize you'd start working on it, sorry about that. Anyway, D85 should be an empty spot (near backspace) and d101 is Insert.

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Help fixing a dead Ducky Shine 3
« Reply #10 on: Thu, 14 January 2021, 15:24:47 »
Ok, the writing on the PCB is very confusing for the bottom row so I've gone with the logic that your board is standard so it should use the 4 diodes numbered <110 in the order they appear on the board and there is no <- key on the similar board linked above so that is now called left.

I'm sure the random JIS keys will fit in somewhere especially as one has a home but it's not going to save you any pins and you're not going to use them anyway so up to you if you can be bothered to map them.  What are the chances of a Japanese person breaking this exact board and finding this thread?  Pretty slim.

If you want to try and convert this into a config following the guide you linked give it a go, you'll need to pretend you have a UK board when it comes to the key names/labels though, because ... I actually have no idea because the original maker of tmk (Hasu) is Japanese.  It is what it is...

Or if you're not having fun wrapping your head round the craziness I've added the EasyAVR section at the bottom, fill in the row/column for each switch and it will give you a copy/paste-able mapping.  You'll need a 2.0++ though...
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline Pikipum

  • Thread Starter
  • Posts: 12
Re: Help fixing a dead Ducky Shine 3
« Reply #11 on: Fri, 15 January 2021, 03:43:26 »
Thank you so much for the help! I guess I'll try wrapping my head around the guide first, as getting my hands on a Teensy 3.2 or 3.5 would be much easier and cheaper.

I'll be back in a couple days when I've got the unit in my hands and I'm ready to solder. Just to clarify, I'll be soldering a wire from the first switch on each column (for example, §½) on the pin that is not connected to the diode, and then a wire from the last on each row (for example f10) on the + side of the diode. Is that correct?

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Help fixing a dead Ducky Shine 3
« Reply #12 on: Fri, 15 January 2021, 06:42:03 »
You can solder to any switch and any diode as they're all connected, ones near wherever you will be gluing the Teensy are better as you wont have long wires to worry about trapping under a switch pin causing a short when you put it back in the case.

Good luck!
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline jingalalahoe

  • Posts: 1
  • Location: India
Re: Help fixing a dead Ducky Shine 3
« Reply #13 on: Fri, 15 January 2021, 22:29:01 »
I was on a similar boat, having killed my Ajazz AK33 when swapping switches. I finally decided to hand wire it, I used an Arduino Pro Micro clone, took out the resistors to get 2 more pins apart from the 18. I used a 14x6 matrix, built the firmware using kbfirmware.com and flashed it using QMK toolbox. Everything works except for the backlight and the missing caps lock light.






Offline Pikipum

  • Thread Starter
  • Posts: 12
Re: Help fixing a dead Ducky Shine 3
« Reply #14 on: Wed, 20 January 2021, 11:11:35 »
Quick update, soldering is pretty much done, but I have encountered a problem. I tried using kbfirmware to plot the matrix wirings, but it doesn't seem to like my Ducky at all. I get errors even though everything seems to be alright. I guess I'll have to do it manually in the text file, as done in the guide on my original post.

I was on a similar boat, having killed my Ajazz AK33 when swapping switches. I finally decided to hand wire it, I used an Arduino Pro Micro clone, took out the resistors to get 2 more pins apart from the 18. I used a 14x6 matrix, built the firmware using kbfirmware.com and flashed it using QMK toolbox. Everything works except for the backlight and the missing caps lock light.


That's great! Hopefully I'll get mine working too.

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Help fixing a dead Ducky Shine 3
« Reply #15 on: Wed, 20 January 2021, 11:40:31 »
Is that one of the graphical websites?  It may not like the overlapping "rows" or your choice of controller chip (I think Teensy 3.x support is fairly new)  If you can send a link of what you've done I'll have a look.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline andresteare

  • Posts: 39
Re: Help fixing a dead Ducky Shine 3
« Reply #16 on: Wed, 20 January 2021, 15:54:40 »
I'm finishing the same kind of project, the MCU was also dead.
I first mapped the columns by checking continuity between negative sides of different diodes

260111-0

and then the rows

260113-1

when you're done cabling I recommend doing a pinout for the teensy and a reference for the coordinates of the keys http://www.keyboard-layout-editor.com (you can choose the ISO layout on "Preset"), here are my references:

260115-2

260117-3

If you do those two, making the firmware will be a breeze, when you have your layout ready in KLE, select the "</> raw data" window, copy all the text then paste it here: https://kbfirmware.com/

Here's my baby now

260146-4

« Last Edit: Wed, 20 January 2021, 17:07:31 by andresteare »

Offline Pikipum

  • Thread Starter
  • Posts: 12
Re: Help fixing a dead Ducky Shine 3
« Reply #17 on: Fri, 22 January 2021, 08:07:51 »
I am back with an update, I tried to do a basic layout without FN layers to get me started, but it doesn't seem to work.

After I have compiled the .hex file and flashed to my Teensy with Teensy Loader. However, after flashing it just keeps resetting, not sure what's causing that. None of the keys work. Even if my keymap and configs are all messed up, it should at least be able to output something, right?

I've attached my firmware files (pre-compiling) if someone wants to take a look.




Here's my baby now


Very nice! I also tried to use kbfirmware, but it definitely doesn't like my wonky layout, it refuses to compile it, even though everything is in order.

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Help fixing a dead Ducky Shine 3
« Reply #18 on: Fri, 22 January 2021, 09:01:34 »
If you can get it to stay on short a switch to the other side of its diode - it may be configured with the diodes backwards to your board.

As to the constant restarting did you use the reset pin in your matrix?  No idea if you could as you have a weird Teensy but it's a thought.

I assume you removed the original controller chip too?  That might be causing a short (though I don't see why that would make it restart)
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline Pikipum

  • Thread Starter
  • Posts: 12
Re: Help fixing a dead Ducky Shine 3
« Reply #19 on: Fri, 22 January 2021, 14:47:05 »
It actually only keeps resetting when Teensyloader is running. When I connect it to my PC it recognizes it and listing the USB devices lists "Mat3o" if I do it fast enough. However, a couple of seconds after the Teensy seems to go into programming mode. I don't think it's a short, since flashing a LED blinker seems to work just fine (A program that literally just blinks the Teensy LED).

As for the diodes, they seem to be normal. One of the switch pins is connected to the - side of the diode, and only lets current flow to the + side. I have soldered my wires to the + sides.

I actually haven't removed the original controller chip, could it be the culprit here?

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Help fixing a dead Ducky Shine 3
« Reply #20 on: Sat, 23 January 2021, 11:47:54 »
Just looked at the firmware you linked, it has #define DIODE_DIRECTION COL2ROW in config.h which from the comment above it means the + is on the column end, note in the linked guide the black bars are facing away from the switches while on your board the white bars are facing the switches so you need ROW2COL.  There is no normal there is only whatever the board you're programming has :)

I also see that you have done the matrix in 3dwf.h but the top version does not show the physical layout it still shows the matrix layout and this is the part where my head starts head to hurt.  But then I see you've done the layout in keymap.c in the same layout so maybe that should work?  You'd need someone who knows QMK to confirm.

I then looked at your keymap, the "include Finnish" was enough to say that this wasn't going to make much sense and sure enough -FI_ keycodes.  A couple of things I did find were:

K46 doesn't exist in the spreadsheet but it's in 3dwf.h
KC_P1 is in keymap.c twice
KC_H is in keymap.c twice
FN in the spreadsheet has became KC_SPACE in keymap.c (bottom full line), would be KC_APP (right click menu) on a normal board.

There is a problem with this though - you need to have the right amount of keycodes for the number of keys defined and these problems mean you have an extra code so it shouldn't compile.
 
The bigger problem is that none of this would make it restart, it just shouldn't work perfectly (if at all)  Maybe the old controller chip is somehow drawing power through it's IO pins eventually causing it to draw too much and restart?  It has no ground so not sure how that would work, again I would just expect it to short something and output random keys, or prevent them outputting.  It's a huge chip too so not sure how you would remove it - maybe the legs are raised enough to cut them off along the edge?
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline Pikipum

  • Thread Starter
  • Posts: 12
Re: Help fixing a dead Ducky Shine 3
« Reply #21 on: Sat, 23 January 2021, 12:55:42 »
Yeah I didn't fine tune the keymappings so some of them are just placeholders. I just wanted to get everything running to see if I'm doing anything correctly and go from there. It does compile in QMK without any errors though. I guess the Teensy could disagree and just crash? Not entirely sure about how it works.

I changed the diode direction in the files, but nothing seems to have changed. Does this mean I have to make changes to my soldering? I have soldered the wires to the + sides. I guess I'll ask around in the QMK discord and see if they have any ideas.

It would be a problem getting the controller unit out but I guess desoldering all the switches and having a look around the other side is a possibility. Desoldering the actual switches isn't a huge pain, but the leds make it extremely difficult.

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Help fixing a dead Ducky Shine 3
« Reply #22 on: Sat, 23 January 2021, 13:10:55 »
Your soldering is fine, you solder on whichever end is not connected to the switch and match the direction in the firmware.

I should have mentioned removing the chip before but it was in the thread you linked so I assumed you'd read it.  Is the chip now covered in wires and a Teensy?  That would be annoying to remove.  Not as bad as 108 in-switch LEDs though!

You could configure a 2x2 matrix in the firmware and flash that, it would confirm that the Teensy works (well, works more than flashing a single LED) but the QMK discord may say there's something weird about your layout that's breaking it - it's certainly not normal.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline Pikipum

  • Thread Starter
  • Posts: 12
Re: Help fixing a dead Ducky Shine 3
« Reply #23 on: Sun, 24 January 2021, 10:16:44 »
Good news, I made a 2x2 matrix and flashed it. The end result is that the keyboard keeps constantly outputting the key I assigned to a KC. In this case, the number 3.

So something is definitely going in the right direction here. I assume that the problems were because of my shoddy soldering work. I guess my next step is to resolder the wires and check that everything is definitely in order.