Home / Posts tagged "LegoNxt"

DIY Steampunk Keyboard

It is such a stupid idea but in the same time it is so much fun to build it.

Few month ago I saw this ( Qwerkywriter ) on the internet, it caught my eyes right away, it looks amazing and beautiful. However there’s one problem with it : It’s too expensive. Don’t get me wrong, I believe the quality of the final product will be amazing, and I believe he spend a lot of time and effort to build this and it looks great. But for me it’s just hard to spend 300 dollars on a keyboard. So I looked around and found actually there’s a lot of people doing their own customize vintage or steampunk style keyboard. At the end I found this one, it looks great and seems to be possible for me to build a similar one. So I decided to build one on my own.

 

Getting the parts

The first thing to do is to get the parts. I choose to buy a mechanical keyboard because it has a better type feeling and also the sound of hitting the key is closer to vintage typewriters. This is not too hard to find. And then it comes the challenge : the keys. It took me some time to finally settle with the metal buttons. I was searching for typewriter keys which already comes with the letters but they are quite expensive too, and also for a modern keyboard you have about 105 keys in total, for the vintage typewriter you only get 35-50 keys i think. Which means you need to buy 2 or 3 full sets of them and also need some customize jobs too. Therefore I switch to search for metal buttons, which you can find a lot on amazon or ebay. There are couple things you need to be careful : the first one is the size of the button, you don’t want it to be small but you don’t want it to be too big either, from my point of view i think between 14 ~ 16mm is the best. The second thing is that you want it to be flat, some buttons comes with a small ring in the back. I don’t have proper tool to remove it and bear in mind we are looking at over 100 keys. To remove it for everyone of them is going to be a huge amount of work. At the end I found these :

SteamPunk_02

These buttons are perfect to me, they do have that small thing on the back but it’s really flat so it doesn’t matter. And I really like edge in the front, make it look like one of those vintage typewriter keys.

 

Building it

So finally we get all the things we need and can start building it. What I did is really simple : I remove the key from the keyboard, then cut the 4 sides of it and leave only the top. And then just use super glue to glue these buttons on to the key. There are things you can do to improve this such as minimum the surface the key and also make it thinner as well. As for me this is already good enough.

SteamPunk_03

But these are only the small keys. For the bigger keys such as space bar, shift, backspace and enter, I don’t want to put just a button on it. It will looks empty and hard to type. So I decide just to remove the 4 sides and leave it like that, which looks quite ok to me to be honest. However there some extra work needs to be done for these big keys : I need to polish the edges. Because when I cut them it leaves a very ugly and uneven edge, I want to polish it and make it smoother.

Again I don’t have the right tool to do it, but I don’t want to spend some money on a tool that I won’t be using that often. So I asked myself : why not just build it myself, and I can have some fun with my LegoNxt ! And here it is, my DIY lego nxt polisher 😀

SteamPunk_04

The button on the left is for turning on and off, the ultrasonic sensor is for detecting the distance from my hand to the wheels. The original idea is that the wheel will start itself automatically when my hands is close to the machine, and stop itself when I move away. It does work however I get some noise from the ultrasonic sensor ( return a lot of zeros ) and also I find actually easier just let it run. So at the end I just disable it but it’s still very fun to play with these sensors. It’s a simple thing which I spent about 2 hours to build it and make it work, but it’s perfect for polish my keys. Here is a short video of how it works  :

 

So that’s it, that’s my DIY steampunk keyboard, I’ve never feel so nerdy in my life 😀 There are still things can be done to make it better. But I kind of enjoy the look of it now so i’ll just leave it like this for now. To be honest it’s not very difficult to make one, I spend the most time on cutting the keys, but if you have proper tools it could save you a lot of time. Also I really enjoy building this mini robot. I’ve always been working with codes and haven’t explored hardwares that much. My next goal will be learning Arduino and build some awesome robot !

 

 

Lego NXT / Processing

When I left my last job, my friends gave me a big farewell gift : LegoNxt. It’s an amazing gift, i’ve always loved lego. And when I was a boy the toy I love the most is always lego. And LegoNxt is even more awesome for me now as I become a programmer, combining program and lego is the sweetest dream for me.

So in order to return my thanks to my friends, I try to come up with a project using LegoNxt, I did have an idea a year ago and had a working prototype, but the result is not satisfying enough, however I really enjoy the process of building robots and control them through codes.

This time i had a simple idea : I want to record myself building another lego set, but i don’t want the camera stay still. I want it to move slowly from one side to another. So i begin to build this little lego car and control it by processing.

 

NXTComm

I found this NXTComm library and it’s very useful. It allows you to control your legoNxt via bluetooth, and it’s very easy to use. To setup you just need to do this :

_nxt = new LegoNXT(this, Serial.list()[4]);

As I recalled the only tricky thing is to find the right bluetooth port you are using which is the [4] means, you might need to test a little bit to find out which one is exactly the one you need.

After this you are ready to go, the library is very compact, you have all the api you need including both the sensors and motors. I didn’t need any sensor on this project but i did a quick test with ultrasonic sensor to get the distance from the sensor to the object, the result is very responsive, makes me want to do more with it. As for the motor it’s really simple to control as well :

_nxt.motorForwardLimit(LegoNXT.MOTOR_A, maxForce, 150); // moving with limit
_nxt.motorForward(LegoNXT.MOTOR_A, maxForce); // just keep moving, need to call _nxt.motorStop manually.

So this library covers pretty much all the controls you need, the only thing left is to build the actual robot. It’s so much fun to build it e.g. how to place the gears to control the speed so it won’t go too fast, some old knowledge from high school/university i thought i’ll never need them become very handy now :)

I’ve always worked on the coding part and didn’t get involved with the hardware part too much. But now i’m really interested in building robots, hope I’ll have more time to dig into this field and I’d like to learn arduino as well !

 

And last, a short video of the recording result using this little robot: