Latest Entries »

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:

These E14 bulbs can be bought on eBay or Asian sites for less than 5 euro each with shipping included. Since I was curious about how the current was supplied to the LEDs I decided to disassemble one of them.

This is the bulb in question, it has an E14 base and is very similar in shape and size to a candle shaped incandescent bulb:

LED bulb

LED bulb

This is the bulb without the diffuser glass, the glass top is glued to the heat sink with silicone (or a similar substance):

bulb without diffuser

bulb without diffuser

The bulb is rated at 3W, so it’s probably safe to assume these are 1W LEDs.

The base of the bulb is screwed to the aluminium heatsink and it’s easy to disassemble:

base unscrewed

base unscrewed

Then I unsoldered the wires from the LED board, this how the inside of the heat sink looks like:

inside the heat sink

inside the heat sink

The controller was protected by heat shrink tubing, this is the controller with the protection removed:

controller top

controller top

And the bottom of the PCB:

controller bottom

controller bottom

This is the top of the controller with the capacitor lifted:

driver ic

driver ic

The IC is labeled 3706M and the layout of the board suggests that it’s either a BCD AP3706 or an equivalent, since the board layout is very similar to the datasheet’s “Typical Application” section.

The top transistor is labeled 13003 and should be similar to ST’s STX13003.

After looking at the board  I took some measurements. My AC mains was steady at 230V and the current draw was 15,4mA. At the output of the controller the voltage was 9,67V and the current draw of the LEDs was 313mA, this suggests the LEDs were getting 3.03W, so it’s dead on the rating, at the mains side the overall power was 3,54W, this means the energy wasted by the LED driver could be lower, but still making this bulb energy efficient.

At this price level I was actually expecting a simple capacitive transformerless power supply, but the LED Driver appears to be pretty well made. I don’t know how it would cope with high humidity locations, but for regular indoor situations I expect these to last long.

There is one minor problem, the 3 LEDs are wired in series, that means if one fails the others will go dark too.

Now some buying tips and color comparisons.

There are lots of suppliers selling these bulbs but they are not similar, even if they look the same, and the most significant difference is the color temperature. This disassembled bulb is part of a pair that I really don’t like because the color is greenish, but I also bought bulbs looking exactly the same (and also “warm white”) from a different supplier with very good color.

These comparisons were made with a white paper as a background and shot with 55mm lens set to F/4 on a Canon 550D manually set to ISO100, 1/80 sec. exposure and the white balance set to “White fluorescent”.

This is the comparison of those 2 bulbs, the disassembled bulb on the right and the one I prefer on the left:

good vs greenish

good vs greenish

Even the light output is similar,  the only difference is the LED quality.

This is the greenish bulb compared to an halogen bulb (Philips EcoClassic 20W):

Philips EcoClassic vs greenish

Philips EcoClassic vs greenish

And the same halogen lamp compared to the “good” warm white LED:

Philips EcoClassic vs warm white LED

The color temperature is very pleasant.

This is the “good” warm white compared to a Luxram branded 11W 4000K CFL (3min warmup):

warm white LED vs 11W 4000K CFL

This is the same “good” warm white compared to a Digilamp branded 15W 6400K CFL (3min warmup):

warm white LED vs 15W 6400K CFL

warm white LED vs 15W 6400K CFL

In a hall with lights turned on by a movement sensor that was initially lit by four incandescent bulbs the power consumption was considerable, when these incandescent bulbs were replaced by CFLs the bulbs kept dying very shortly because of the several daily starts. Now the CFLs were replaced by these cheap LED bulbs and they are still going, after more than six months. The four 3W LED bulbs don’t have the light output of the 4 incandescents but are still adequate.

I now believe that the way to go is to buy samples from a couple of cheap suppliers and then buy the rest from the supplier with the best samples. The problem with these cheap LEDs is that after several months the same supplier might be selling the same bulbs but with slight differences in color, but that might also happen with CFLs.

I now plan to buy 6 decent single LEDs and replace the emitters  in the 2 greenish bulbs I have, then I want to compare the efficiency of these cheap bulbs with the more expensive ones from brands like Philips. In locations where the bulbs are started several times per day and there is no need for great light output these are starting to look a lot better than CFLs.

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!

DIY 5 channel mono sound mixer

Lately I’ve found a new problem: I’ve been collecting some radios and now I have more audio sources than speakers.

To solve this I had to either build more speakers or an audio mixer. Since I didn’t have a lot of space to spare I opted for the “mini-mixing console.

First I had to see what I had around, since I had a lot of  TL071 op-amps I decided to build something like this:

I created a schematic and board in eagle based on the parts I had around, It has 5 inputs and 2 outputs. Schematic:

PCB after etching:

Drills made and all the components soldered:

I’ve bought a new aluminium box for this build. Holes made and components fitted:


Everything in it’s place:

Everything works properly!


Eagle .sch and .brd files:

I just took the time and got my amateur radio license a couple of weeks ago. Here in Portugal the class 3 amateurs are not allowed to transmit alone, we have to wait 2 years listening and then take the class 2 exam… Even not being allowed to transmit I am allowed to use amateur radio equipment to receive, so I decided to take the risk and order this unit (TYT TH-2R) from Asia (radiogearpro). It cost me around USD$50, shipping included, so it was pretty cheap and it took less than two weeks to arrive.

The box included:

  • the transceiver
  • a small SMA antenna
  • battery (copy of Nokia’s BL-5C)
  • USB charger-desktop battery charger
  • belt clip
  • one of those little nylon ropes to hold the radio in the wrist
  • “chenglish” manual, but easy to understand

It didn’t came with a programming cable and I wasn’t able to find one online, not even the pinout. The software can be easily found online.

The interface is easy to use, it has plenty of functionality, the front keys are properly illuminated, there are compatible batteries (BL-5C size and shape) everywhere and it has an extra: it receives broadcast FM radio 🙂

In the negative side, it doesn’t have “roger beep” (I usually don’t use roger beeps, but still, it’s missing), the “text to speech” function is a nice accessibility feature, but is very irritating, had to turn it off, and the frequency scanning is ridiculously slow, almost useless.

I find the audio pretty good, loud and clear taking in account the speaker size. It has one of those 4-pin 2,5mm jacks with speaker and microphone in the same jack.If connected to an external audio amplifier, I find the FM radio quite entertaining, and it still watches the UHF frequency set by the user and mutes the FM radio if something gets received.

Regarding the TX performance, I can’t give you a proper review, given my TX limitations…

My largest problem was the lack of cable or cable schematics, so I tried a couple of variations of schematics from other manufacturers, without success. Next step? Disassemble it to see “how it ticks”!

This is the unit, tuned to 99.2MHz broadcast radio:

Starting to take it apart, only need to unscrew the two screws under the battery:

We can see that everything is held together by a nice aluminium chassis, to keep disassembling we need to unsolder the LCD LED in the right side:

This is the front side of the board without the LCD. To keep disassembling we need to unscrew the 4 screws and unsolder the RF connector from the board:

The under side of the board:

As a side note, we can see that most chips are from Chinese manufacturers, but well known ones. At this price, I was surprised by the overall quality of the unit.

After taking some time trying to understand the thing, I’ve discovered that the data interface wasn’t in the speaker plug, but in the charging interface.Those cheap bastards wired the serial RX and TX to the D- and D+ of the USB connector 😛

I proceeded to assemble everything again and began working in the cable. Since I have a handfull of FT232R, I etched a PCB and soldered the USB cable to my board:

  • Red to 5V
  • Black to Ground
  • White to FT232 TX
  • Green to FT232 RX

Connected everything and voilá! I have a USB charging cable that also works as a data cable:

If there is any problem with the embedded images, the whole set can be found here: