Friday, January 30, 2009

Arrival in Malaysia

I recently arrived in Malaysia for a one month holiday that my girlfriend and I booked early in 2008. It has been quite hot and very humid since we arrived. So far, we've visited some of Kuala Lumpur and Petaling Jaya, and are about to head out to Kuching, in Sarawak, on the island of Borneo.

Some of the pictures of my journey so far are online here: http://www.flickr.com/photos/28808691@N05

Tuesday, January 27, 2009

Mengenal ADC (2)

lm35 Kali ini kita akan ngebahas gimana cara menggunakan ADC yang disambung ke sensor suhu LM35.

Output dari sensor kita hubungkan dengan PORTA.0 (chanel ADC 0). Untuk kodenya kita gunakan aja CodeWizard agar lebih efisien n kita gak usah pusing2 hafalin register2 AVR.

Oke sekarang langsung aja:

1. klik icon CodeWizard di CodeVision AVR. Lalu klik tab ADC image

2. Pada tampilan tab ADC, centang ADC ENABLED utk mengaktifkan ADCimage

Use 8 Bits: untuk memilih apakah ADC menggunakan resolusi 10 bit atau 8 bit. Biarkan kosong(jangan di centang) agar ADC menggunakan resolusi 10 bit.

ADC Interrupt: Interrupt ADC diaktifkan apa tidak.

High Speed: mode high speed digunakan apa tidak.

Volt. Ref: referensi tegangan ADC. ubah ke AVCC pin, agar ADC menggunakan referensi teg. 5 volt.

ADC Clock: untuk memilih frekuensi clock ADC.

Ada pertanyaan menarik dari Mas HaPE, tentang ADC Clok ini:image

di keterangan Clok ADC memang tertulis 125.000 kHz.

Itu bukan 125ribu kHz (125Mhz)

Tapi 125,000 kHz (125,0 kHz)

Inget orang Inggris nulis koma pake titik.

Auto Trigger Source: untuk menentukan sumber trigger ADC

...Ok let's finish this thing....

3. sekarang tinggal klik File ---> Generate, Save and Exit

image

lalu kasih nama dan simpen File2nya.

Contoh program ADC untuk LM35 :

#include <mega8535.h>
#include <stdio.h>.
#include <delay.h>

// Alphanumeric LCD Module functions
#asm
.equ __lcd_port=0x18
#endasm
#include <lcd.h>

#define heater PORTB.0//heater di hubungkan dg PORTB.0

#define ADC_VREF_TYPE 0x40

unsigned int read_adc(unsigned char adc_input)
{
ADMUX=adc_input|ADC_VREF_TYPE;
ADCSRA|=0x40;
delay_us(10);
while ((ADCSRA & 0x10)==0);
ADCSRA|=0x10;
return ADCW;
}

unsigned char buff[33];
void lcd_putint(unsigned int dat)
{
sprintf(buff,"%d ",dat);
lcd_puts(buff);
}

void main(void)
{

unsigned int suhu;
float adc;

DDRB=0xff;
PORTB=0x00;

// ADC initialization
// ADC Clock frequency: 125.000 kHz
// ADC Voltage Reference: AVCC pin
// ADC High Speed Mode: Off
// ADC Auto Trigger Source: None
ADMUX=ADC_VREF_TYPE;
ADCSRA=0x85;
SFIOR&=0xEF;

// LCD module initialization
lcd_init(16);

while (1)
{
// Place your code here
adc = read_adc(0);
adc=adc/255;
suhu=adc*175;
suhu=suhu-12;
if (suhu<27)heater=1;
if (suhu>32)heater=0;
lcd_putsf("Suhu= ");
lcd_putint(suhu);
delay_ms(1000);
lcd_clear();

};
}

Program diatas untuk membaca nilai suhu dari sensor LM35 trus hasilnya digunakan sebagai acuan untuk menyalakan Heater yg terhubung ke PORTB.0

Dalam program diatas terdapat code:

adc=adc/255;
suhu=adc*175;
suhu=suhu-12;

Fungsi kode diatas untuk mengkalibrasi nilai ADC agar sesuai dengan suhu sebenarnya. Setiap rangkaian memiliki error yg berbeda-beda. jadi nilai untuk kalibrasi harus di sesuaikan.

any questions?? post comment on this blog: http:\\avrku.blogspot.com

or send email to: zigan@ymail.com

CodeVisionAVR C Compiler is copyright by Pavel Haiduc, HP InfoTech s.r.l.
AVR is a registered trademark of Atmel Corporation.

Monday, January 26, 2009

Impressive and Frightening

This is one of the most impressive (and frightening on several levels) pieces of engineering I've ever seen. When there exists a device that can turn a living tree into logs in under 15 seconds, it is no surprise that deforestation can be a problem. Fortunately, this appears to be a tree farm... for IKEA?

The unbridled and unapologetic efficiency by which this machine performs its function leaves a visceral sensation of both awe and horror. It is distrubingly animal-like. The fact the tree is mostly debarked by the time it hits the ground makes my jaw drop.

Saturday, January 24, 2009

Surfboards and repairs

So I begun massing quite a collection of surfboards, the current total is up to 7. Many of them have requirred minor repairs and such. I really love retro surfboards, especially twin fins from 79-85 ish... maybe thats because of all my battles with the star system fins. Which btw I finally got a pair of fins that I will soon make molds of (keep checking back with the fin post). Anyways, heres some pictures of my boards.


Before repairs




After Repairs







All my boards!

(in order from left to right)
CB Challenger III shaped by Dan Ollila 5'9" tri fin with Star system fins
Rusty C-5 Shaped by Bill Johnson 5'10" 5 fin
WRV 5'11"-ish twin fin with Star system fins
C.W. Surfboards 6' single fin
Timpone 6'4" glass on tri fin
San clemente Surf co 7'6" tri fin
8' Single fin

Sunday, January 18, 2009

Marvelous Entertainment teases game with Zelda symbols



The Japanese publisher Marvelous Entertainment ('Harvest Moon', 'No More Heroes') has published a website showing a mysterious countdown clock bearing symbols from the 'Legend of Zelda' series.




The clock itself is in triangular shape and there is a completed Triforce logo at the top with incomplete ones in the two lower corners each. There is an unfamiliar feather dangling from the clock and the entire object rises and falls gently.

One revolution of the Zelda clock is thirty seconds, at which point it briefly glows and the second digit returns to its starting position the way it came, counter-clockwise. The main digit remains at the top, pointing to the completed Triforce logo.

The seconds counting down will end sometime early next Friday, January 23rd. When setting my internal clock forward, though, the countdown expired on September 28th 2009, at 14:13:55. Then, the numbers disappear and the (mis-spelt) message "comming soon" appears in their place.

The flash animation is called ´prepre_watch.swf´ and the source code embeds it with the command ´?update=20081228_2018´. Altering the values does not seem to make much difference, however.



I must admit that I have no idea what this could mean. It is very unlikely that Nintendo would outsource either the development or the publishing part of a Zelda game to any third party. If at all, this would have to be a spin-off.

I guess that we will know more by Friday. By then, a similar countdown on a SEGA server ends, teasing the involvement of Takao Miyoshi from one of SEGA's internal studios and showing Mario symbols.

EDIT The Sega game has been revealed as a WiiWare title.


The game is called Pole’s Big Adventure and is supposed to mock 8-bit games released on the Nintendo Entertainment system around its heyday. So that means the title will be on Nintendo’s WiiWare, pricing for Japan currently is 500 Wii Points.

The game is supposed to have inside jokes in each level. The teaser site had a mushroom and apparently in Japanese that is slang for a male’s penis. Now you add pole and a mushroom that grew when you touched it with the mouse, you are going to get a game with alot of dick jokes.


The Marvelous game turns out to be Hero 30, an old-school RPG for the PlayStation Portable.


Source: Marvelous Entertainment, Sega Nerds, IGN
Thanks to: Kotaku, Joystiq, Some Guy

Saturday, January 17, 2009

Three tidbits of exclusive info and rumours



I have three little tidbits of exclusive info and rumours for you. The first one concerns troubled developer Factor 5. I can confirm to you that work on all current projects is continuing. Expect an official announcement within two weeks.

Secondly, concerning 'Dead Rising: Chop Till You Drop' and fears of no more than fifteen enemies on screen at any one time, fear not. I have just spoken to someone who has played a current build of the game. While there will not be a hundred zombies on screen, there will be a sufficient amount, I was told. Basically, you can expect a few dozens of them rather than one dozen. This will be a really cool game, I understand.

Lastly, I have some reason to believe that Silicon Knights ('Eternal Darkness', 'Too Human') may be working on a Wii title. This is slightly going out on a limb here. But, like I said, I have some reason to believe so.

There you go. I said it.

Thursday, January 15, 2009

Wii in Europe outsells PS3 worldwide



Nintendo of Europe has published Wii and DS 2008 sales figures for the territory on their press server (press registration required). The numbers show that Nintendo sold more Wii units in Europe (14,2 million) than Sony sold PS3 units in the entire world (13 million).


In 2008, 8,3 million units of the home console were sold. This is an increase of 58 percent compared to 2007 and constitutes the highest yearly sales of a home console in Europe ever. This increases the number of Wii console in European households to more than 14,2 million.


According to Nintendo, the DS sold 11,2 million units in Europe - the highest sales of any console in Europe ever. Altogether, 31 million DS units have been sold in Europe.

So while Wii sales in Japan are reported to have dropped 20 percent in 2008, European sales for the same period were up almost 60 percent compared to the previous year.

Source: Nintendo of Europe (press registration required)

Sunday, January 11, 2009

Menghitung Resistor untuk LED

electronics_led_diagram

LED memang device kecil yg sepele, tapi kadang kita pusing saat mo nentuin resistor yang akan di seri ke LED untuk membatasi arus yang masuk. Karena bingung akhirnya maen comot aja nilai R nya, dan hasilnya nyala LED gak maksimal klo R nya ke besaren. Ato LED nya gampang meleduk klo R nya terlalu kecil.

Rumus menghitung nilai R untuk LED

R= V / I

Weheee.... sederhana kan... itu kan rumus dasar tegangan.

Nilai tegangan(V) adalah nilai tegangan sumber(Vs) dikurangi nilai tegangan LED(VL) (nilai tegangan LED diasumsikan 2,2 volt).

Arus yg boleh melewati LED kira-kira 20mA (0,02 A)

Jika tegangan sumber 12V besar VL nya adalah: 12-2,2 = 9.8 volt

R=9.8/ 0.02 = 490 ohm

Di pasaran sudah nyari R 490 ohm jadi kita nyari yang di atasnya dikit 510 ohm.

Setiap alat yang di aliri listrik pasti menimbulkan panas, begitu juga R yg kita gunakan ini. Semakin besar Daya maka panas yg dihasilkan juga semakin tinggi. So... kita harus memilih R dengan kapasitas daya yang sesuai agar R nya gak meleduk.. He3.....

P= V*I

So.... P= 9.8*0.02 = 0.196 watt

jadi minimal kita harus memilih LED yang 1/4 Watt (0.25 watt)

http://www.AVRku.blogspot.com

zigan@ymail.com

Friday, January 9, 2009

Sensitive Object - make any surface touch sensitive

This is not extremely new technology, but not a lot of people know about it and it has evolved quite nicely in recent years. Sensitive Object is a French company that sepecializes in the use of microphones to detect touches anywhere on an arbitrary objects. With multiple mics they can determine the location of touches or even dragging (as well as multiple dragging touches - not shown in the video below).



I've had a chance to play with it in person, and it's pretty impressive stuff. It works a lot better than I would expect. It doesn't detect touch locations using a triangulation technique (i.e. see how long it takes for the sound to reach each microphone) because that would vary greatly depending on the material the object was made of (plastic, metal, wood, etc) and depend on the shape of the object. Sensitive Object can do any shape like a vase, or statue.

They accomplish this using a pattern matching technique. Each touch sound gets compared to a known table of sound-to-location mappings. Which means you have to enter this mapping during a calibration step. (i.e. give the system a couple examples of touching each location that you want to recognize, touching here sounds like this.... touching there sounds like that). This upfront calibration step is somewhat heavy, but when you are done it's quite powerful. You could turn a cardboard box, a basketball, your car, or even your friend's head into a touch sensitive surface (if it's hard enough). Though, larger objects may only be "bang sensitive" surfaces.

Thursday, January 8, 2009

Nintendo Game Shelf

Sorry its been a while since I posted... classes and work keep me occupied. I'm going to try and put up a few of my older projects soon, as well as the project I'm working on now for my new truck... and if it all goes well some updates to the surfboard fin post. So about a year ago I built a shelf with slots specially shaped to fit all the different nintendo cartridges, dvd cases, as well as a few other random game cartridges. I also made a chamber in the bottom with red rope light inside and put a plexiglass piece in front of it with the nintendo logo spray painted on it. I don't have any photos of the process, its pretty simple though. I still need to make wooden blocks for the N64 games so they don't slide too far back into the slots, I already made the SNES blocks.












Friday, January 2, 2009

360 Controller Mod




Here is a prototype button layout/cover just cut from a thin plastic lid like a pringles can. I used two layers, it gives you enough feel to find all the buttons. Pressing the upper layer has not caused any misfires on the other buttons. Now to make something nicer looking.



More info coming soon, I plan to put this on Instructables as well. I just need to drag my tripod out so I can take a few pictures that are not blurred.



I cannot take a good image unless I use a tripod, my natural shake is evident in most of these pictures (soldering was worse), this one below is no different. And it was the best of the many I took..oh well, you can see the copper trace exposed on SW14 near the bottom. This is where I soldered the switch leads, and since the controller uses a common ground, I soldered only one ground lead to the vibration motors terminal post. Just for the heck of it, I covered the switch pad with silicon glue to help stabilize the wires a bit.



My goal is to make a new set of buttons that will make sure when I hit the upper left portion of the dpad, I actually get that action. As you are aware with the current dpad you can shave away some of the plastic to make it work better, but you still do not get the accuracy of having eight individual buttons. I will paint the lexan cover plate to match the rest of the controller as best as I can. This will at least hide the ugly pcb board from Radio Shack.

I still need to fabricate a new set of buttons that will cover this, and currently I use a small piece of carbon fiber rod to hit the switch on the bottom layer. So far it works like it should, and in short testing it was 100% accurate.

I am using 6.5mm x 6.5mm x 5mm tact switches, a total of eight. Additionally, I have eight Schottky diodes on the bottom layer board to separate the diagonal (upper level) buttons from the main buttons. All the parts used were locally purchased, and so far my budget has been under $15. In the future I could order smaller switches off the internet, but for now I just wanted to make sure everything would work.

Additional images.











Computer Case Project

This case is mainly a beta case, there are things I need to change on the next case, and I built this case rather quickly.

Please do not mind the mess on the floor, I try to get what my three year old throws around, but that is a constant task.

This is a rather large case, since we mainly use a projector for our TV/Games I wanted something that could sit in the living room and not look out of place. This computer is mainly used for MCE duties.

I put the PSU on the other side of the case, behind the motherboard, this allowed me to have a very clean cable setup. Additionally, the whole case breaks apart into three pieces, the bottom piece has a washable air filter. After a year of running, the inside today still looks like these pictures. Again since this is a MCE machine it has been running for almost a full year now.

Under load the cpu was only getting to around 109 degrees, and the GPU in this case was getting 120. In the pictures it is one HD3850, and an Intel Core 2 2.2ghz that is clocked to 2.8ghz. So 109 degrees was not a bad temp I thought. The motherboard is an Asus P5E3 Deluxe Wi-Fi, with 4gb of DDR3 memory.

I call this a beta case since I never did complete it fully..







My Xbox 360 sits in this filtered area, the filters sit angled almost like the radiators in an F1 car. Behind the 360 sits two 120mm fans that are powered off a wall wart, and there is a sheet of lexan to prevent and heated air from entering. So the 360 gets all the fresh air from the front only. When my DVD finally failed and I took the machine apart, the inside was clean and free of dust.