Jump to content


My eee now has a keyboard light


84 replies to this topic

#1 tristand

    Advanced Member

  • Members
  • PipPipPip
  • 53 posts
  • LocationOxford UK

Posted 29 November 2007 - 08:09 PM

I've been finding the eee hard to use in the dark. I miss the keyboard light on my old Thinkpad!

I decided to fit a white LED in the frame above the LCD to light up the keyboard. And I wanted it to be software controlled - I need to be able to switch it on and off without an external switch.

To do this I have fitted a PCF8574 I2C IO expander to the SMBus on the eeePCs motherboard.

It's worked out pretty well! My eeePC is now pretty tricked out with an extra 4 gigs of internal flash, internal bluetooth and a keyboard light! (see http://forum.eeeuser...id=25175#p25175.

Here's how I fitted the LED into the frame of the LCD. I drilled a hole through at an angle so the LED would shine on the keyboard. It's fixed down with hot melt glue. I had to sand the LED down a bit to let the eee close fully.
Posted Image

This is how I routed the cables (the blue ones) through the hinge. I used a bit of PVC sleeving to prevent the cables getting damaged in the hinge. The two wires go down the same hole as the fan wires and into the miniPCIe expansion area.
Posted Image

An easy place to tap into the SMBus is on the EEPROM chip on the memory module, I did try the SMBus connections on the miniPCIe expansion connector but had no luck. They had signals on but not the ones I was expecting!
Posted Image

Posted Image

This is the miniPCIe expansion bay. You can see my 4g USB flash drive and bluetooth adapter. The chip wired like a dead bug is the PCF8574 I2C IO Expander. The two blue wires go to the LED. The anode is wired to 3V, the cathode to P4 of the PCF8574. The other connections to the PCF8574 are 3V, ground, SDA, SCL and 3 address line pulled to 3V.
Posted Image

This is what the outside of the lcd frame looks like with the LED poking out. The black tape prevents the LED blinding me while I'm working. It's not too pretty but it's OK with me!
Posted Image

Lights off:
Posted Image

Light on! (It's not easy to see from the photo but the keyboard has enough light to use easily).
Posted Image

Now for the software side.

I compiled the PCF8574 module from the ASUS source tree and installed it. I needed these modules:

modprobe i2c-dev
modprobe i2c_i801
modprobe pcf8574
Now, to control the LED I wrote this script:

/usr/bin/kblighttoggle:

#!/bin/sh
LIGHTSTATE=`cat /sys/bus/i2c/drivers/pcf8574/0-0027/read`

if [ $LIGHTSTATE = "255" ]; then
echo 239 > /sys/bus/i2c/drivers/pcf8574/0-0027/write
else
echo 255 > /sys/bus/i2c/drivers/pcf8574/0-0027/write
fi
Each time it is run it toggles the state of the LED.

I have bound it the the key combination Ctrl-Alt-L by adding this to my ~/.icewm/keys file:

key "Alt+Ctrl+l"                sudo kblighttoggle
So now when I hit ctrl-alt-L the light comes on or goes off.

Done!

Edited by tristand, 29 November 2007 - 08:51 PM.


#2 pmeee

    Senior Member

  • Members
  • 545 posts
  • LocationEee PC 4G White w/Xandros - UK

Posted 29 November 2007 - 08:14 PM

Haha, great mod. Not sure how useful it would be for me personally, but what a great job!! :D

#3 quagga

    Senior Member

  • Members
  • 411 posts
  • LocationVirginia, Earth

Posted 29 November 2007 - 08:14 PM

Now that's pretty wicked. Nicely done!

#4 streetUK

    Senior Member

  • Members
  • 178 posts

Posted 29 November 2007 - 09:23 PM

lol i just noticed your wallpaper. Its a similar thing to mine where i took a pic of the sunset from my window. Nice mod btw, i was alittle dissapointed when i realised it was just a light, i actually thought the keys actually lit up (imagine there was a light underneath the keyboard).

#5 LazerTag

    Senior Member

  • Members
  • 506 posts
  • LocationSTL

Posted 29 November 2007 - 09:30 PM

That is cool, but it begs the question


"Great mod? or, Reason to buy EEE in white?" :lol:
LT
----------------------------------------------------------------------

#6 flinch

    Advanced Member

  • Members
  • PipPipPip
  • 52 posts

Posted 29 November 2007 - 09:32 PM

awesome
black 4g with beryl on default xandros & ubuntu 7.10 on external harddrive

#7 Phantaxus

    Member

  • Members
  • 24 posts
  • LocationUK

Posted 29 November 2007 - 09:42 PM

LazerTag: i bought one in white for exactly that reason

Edited by Phantaxus, 29 November 2007 - 09:43 PM.


#8 refl3x

    Advanced Member

  • Members
  • PipPipPip
  • 83 posts

Posted 29 November 2007 - 10:08 PM

Very nice! Don't fancy doing that myself but a very nice idea.
Black Eee 4G // 2GB DDR-2 6400 // Win XP Pro // Currently Modding my Eee!

#9 tnkgrl

    Advanced Member

  • Members
  • PipPipPip
  • 71 posts
  • LocationSan Francisco

Posted 29 November 2007 - 10:34 PM

@tristand, that's a pretty awesome mod! Thanks for sharing...

#10 a06play

    Member

  • Members
  • 13 posts
  • LocationLondon, UK

Posted 29 November 2007 - 10:50 PM

wow, very impressive! i couldn't even dream of being able to do something like that.

#11 Haku

    Senior Member

  • Members
  • 456 posts
  • LocationGlos. UK

Posted 29 November 2007 - 11:03 PM

Neat idea, the Fujitsu U810 UMPC (looks great, wish I could afford one) has a couple of LEDs built-in to illuminate the keyboard: http://digital-lifes...ok-u810-lg1.jpg

Does anyone know if on the Eee the white text on the black keys shows up in UV light? or wether the white Eee shows up in UV light?
The Asus Eee is not a laptop, it's a legtop!

#12 Hahutzy

    Senior Member

  • Members
  • 264 posts

Posted 30 November 2007 - 04:03 AM

I really want to try and take this to the next level -- putting led lights in the keyboard to light them from below...

Here's the question: will LED light shine thru the black 3e's keyboard keys? I can confirm that LED will light up white keyboard keys, because I just tested it with my (and soon to be my brother's) white 3e.

#13 devil2k

    Senior Member

  • Members
  • 273 posts

Posted 30 November 2007 - 06:28 AM

you've got balls...that's all i have to say

#14 KaiBosh

    Advanced Member

  • Members
  • PipPipPip
  • 45 posts

Posted 30 November 2007 - 08:51 AM

That is truly sick dude. Shocking how actual little work needed to be done, you need to do a tiny bit more cosmetic mounting with littly retracting hood for the LED. Then it will become prime-time stuff...

#15 Triple-E Wannabe

    Senior Member

  • Members
  • 142 posts

Posted 30 November 2007 - 09:40 AM

*applause*

That is an impressive and technically very slick mod indeed. I would love to be able to hack my EEE (when I get one) to bits on that level, but I have nowhere near the electronic expertise (nor hand-eye co-ordination I reckon! ;) ).

Very well done.
...and the black 4G!

#16 Crihz

    Advanced Member

  • Members
  • PipPipPip
  • 86 posts
  • LocationAmsterdam

Posted 30 November 2007 - 10:44 AM

I like the software on/off capabilities of this mod more than the actual mod itself. How much load can this IO expander take?

Chris

Edited by Crihz, 30 November 2007 - 12:05 PM.


#17 tristand

    Advanced Member

  • Members
  • PipPipPip
  • 53 posts
  • LocationOxford UK

Posted 30 November 2007 - 12:01 PM

The PCF8475 can drive 25mA on each of its 8 IO pins, although you can't take more than a total of 100mA. Each of its IO pins is also an input so it can be used for monitoring other things.

I'm considering adding a proper (hardware) caps lock LED using one of the other IO pins. I'm also considering using other ones to switch the power supply to my internal bluetooth adapter, although it really doesn't use enough power to warrant it. See http://forum.eeeuser...pic.php?id=3043.

Edited by tristand, 30 November 2007 - 12:04 PM.


#18 Crihz

    Advanced Member

  • Members
  • PipPipPip
  • 86 posts
  • LocationAmsterdam

Posted 30 November 2007 - 12:07 PM

This is getting more interesting by the minute!
How would I go about switching in XP? (thinking of GPS usage)

Good work on the current draws there. Do you know of any other IO boards with a higher output rating?

Chris

#19 tristand

    Advanced Member

  • Members
  • PipPipPip
  • 53 posts
  • LocationOxford UK

Posted 30 November 2007 - 12:16 PM

I have no idea how to access the I2C bus from windows I'm afraid.

I'm using a single IC not a board and 25mA for a logic level IC is considered pretty high! It wouldn't be hard to use a transistor / FET to increase the current handling capability.

If anyone else is considering this, the MCP23016 would allow 16 IO ports (if you need more than the 8 I have) or the PCA9536 would allow 4 IO ports.

The PCA9536 would be ideal as it has no address strap pins so it is in a 8 pin package (nice and small). I don't stock the PCA9536 so I used what I had to hand.

#20 Crihz

    Advanced Member

  • Members
  • PipPipPip
  • 86 posts
  • LocationAmsterdam

Posted 30 November 2007 - 12:19 PM

True, a FET set-up should work without any problems.
I was just wondering if there is anything "out of the box" I could use to get a clean setup.

Good find man!

Now for a way to control it in XP...hmm





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users