Category: Modifications

Update: Some people requested details on the LED replacement, so I made a new video (on the bottom of this post) to clarify the process.

I tried a keyboard with Cherry blue mechanical switches and I loved the feeling, a couple of weeks later I decided to buy one.  As I was about to spend 100 euros on a keyboard, I decided that I might as well pay 20 or 30 more and buy one with backlighting. Backlighting is pretty unimportant on a keyboard, but it does help a bit when using it on dark environments and, let’s be honest, it looks cool…

After searching for a bit, the cheaper peripheral that fitted the requirements that I could find was the Razer BlackWidow Ultimate and it also has extra programmable keys, so I picked one up in a store for 120euro (yes, for some reason razer peripherals are sold with a conversion rate of 1USD to 1EUR). During the day it was almost acceptable but, in darker environments, the blue backlight was really unpleasant. I bought a big bag of 3mm white LEDs on eBay (around 5usd), improvised a keycap remover and replaced the blue LEDs with the white ones:

Improvised keycap puller.

Improvised keycap puller.

All the blue LEDs were replaced.

All the blue LEDs were replaced.

It looks a lot better and feels a lot less harsh to the eyes in dark environments.

Quality-wise the hardware is not bad but I quickly found out the software is atrocious. What Razer calls Synapse 2.0 is one of the most obnoxious pieces of software I’ve erver used. It is large, it required me to login and it crashes half the time (the last one might be because of my environment, but everything else works fine so I won’t lose any time trying to make it work), unfortunately the macro keys, macro recording and, basically, everything macro-related doesn’t work without the software running. When selecting the backlight brightness with the combination Fn+F12 there are only OFF, DIM, NORMAL, BRIGHT and PULSATING (wich is pretty useless). In the configuration software there is a tab with a sliding trackbar control for selecting the brightness but, after selecting the desired brightness level (wich is updated immediately in the keyboard) and releasing the mouse button, the trackbar jumped to one of the predefined settings and the same happens on the keyboard. Unfortunately for me, I found out that my preferred light level to use at night under fluorescent lighting was between the “OFF” and “DIM” positions. I emailed razer support and, after a couple of emails, the final answer was:

Thank you for your patience. 

We would like to clarify this further. 
The lighting option cannot be adjusted to specific level of brightness like you are trying to achieve. 
You are only able to use the options available – OFF, DIM, NORMAL or BRIGHT. 

Hope that clarifies the matter, thank you.

Well, it became pretty “clear” that I bought a very expensive crappy product.

Not one to accept defeat easily I decided to try and implement a custom backlight controller. Fortunately it was easy to understand how they did it. Every LED’s anode is connected directly to +5V from the USB and each individual LED’s cathode has a resistor (470 ohm, if I’m remembering correctly).

Razer's backlight schematic.

Razer’s backlight schematic.

The resistors are then all connected to a SOT-23 transistor that looked like a general purpose NPN with the base connected with a 10k resistor to the microcontroller (freescale MC9S08).

Original location of the NPN transistor driving the LEDs.

Original location of the NPN transistor driving the LEDs.

After realizing it was going to be reasonably easy easy to build a custom brightnesss controller, I found out the top cover is actually slightly translucid, that means it is possible to sense the ambient light level without  using visible sensors. I made a simple PCB based on the ATtiny1634 (eagle project and source code available for download below):

Eagle schematic.

Eagle schematic.

The relay is latching, that means it only needs a quick pulse to change and remains stable without additional current, it is used to switch between the two sources of PWM, the one from Razer’s MCU and the AVR one. The light sensor is a common photoresistor and I used a BCP56 NPN transistor to drive the LEDs.

During  the preliminary tests I realized I needed to know when the PC was off, otherwise the backlight would remain connected (I’m using the keyboard connected to a powered USB hub), for this purpose I connected a 10k resistor between the PWM signal from Razer and the AVR pin PA4, this way the microcontroller knows that if Razer’s backlight signal is disconnected the PC is turned off and it needs to drop the brightness to zero.

The button is used to switch between modes with a long press (automatic brightness, manual brightness and razer’s original mode). With a short press it is used to toggle the manual brightness options.

The brightness can also be configured via the AVR’s serial port, it is connected to a 3.5mm audio jack located near the button.

Button and serial port jack.

Button and serial port jack.

Everything in place, ready to reassemble.

Everything in place, ready to reassemble.

This is the final result:

In conclusion, if you want a backlit mechanical keyboard just buy a ducky, or deck, or something other than a Razer, the software is really bad and without it the macro keys and macro recording are useless anyway…

Eagle files for the PCB:


LED repalcement:

For those who don’t know the Razer Orochi [], here is the very short review:
The good:
– Very well built, good components
– Lots of buttons, cool features and configuration options
– USB / Bluetooth hybrid
– Very comfortable

The bad:
– Bluetooth power saving is too fast (after 20 or so seconds there is a momentary but noticeable lag to start moving again, didn’t notice this problem in microsoft bluetooth mice)
– Even with this agressive power saving the battery life is very bad (as in comically bad)

Regarding the first problem, the only way to fix this is probably changing the bluetooth module firmware (beyond my current capabilities) and after a while you kind of stop noticing it.

Regarding the battery life problem, like most people, I was using AA rechargeable batteries and the whole “take batteries out, recharge them, put them in again” is kind of inconvenient. The solution? A rechargeable lithium cell, of course!

Items needed:
– 14500 lithium (14 x 50mm, very close to a AA battery)
– Lithium charge controller
– A couple of hours

How I did it:
First I bought a test 14500 cell on ebay, 2USD with shipping to Portugal included!
Here it is, next to a AA for size comparison:

Now the charge controller, I had a couple of AnalogicTech AAT3681 charging ICs so I made the eagle part library and etched a very simple PCB based on the datasheet:

Those 3 diodes are there as a very simple way to lower the voltage from 4.2V of the maximum Li cell to around 3.3V, closer to two new AAs (not the best way but very quick and cheap 🙂 )

Now I just wired everything:
– The USB and battery ground are the same, this makes things easier as it will also be the charger ground.
– +5v from USB to charger input
– Charging current set to around 80mA (the charging IC is really small, I didn’t felt very confident with higher charging currents)
– The 3 diodes are in series between the Litium cell and the previous battery in
– The status pin of the charger is wired to a orange LED that I’ve placed near the mouse status LEDs

Closing time, battery in one side and controller board in the other:

And voilá! When I connect the mouse via USB, if the battery voltage is under the threshold, the charge starts:

When the charge is complete the orange LED turns off.

Eagle files:

All suggestions are welcome and feel free to use the eagle files as you like!