Mathematica tricks and notes

I created a page that contains my notes on Wolfram’s Mathematica 6.

Mathematica notes


Recently, I implemented a Mathematica 6 version of the Weasel program by Richard Dawkins. It is a simple demonstration of the power of the process of cumulative natural selection as compared to random process. Continue Reading »

I stumbled upon an interesting statistical way of comparing various kanji learning systems when I played with XML kanji data available from Jim Breen‘s kick-ass KANJIDIC2 project (XML version of his KANJIDIC project). I present the findings below. Continue Reading »

While working on my Arduino magnet levitation (details here), I stumped upon some problems with the way the compiler, AVR GCC, handles multiplication. I had to implement optimized multibyte multiplication routines because Arduino in my project preforms some digital signal processing with 20kHz sampling frequency. Since I couldn’t find those routines online, I’m posting the code of some of them here I posted the code on GitHub at https://github.com/rekka/avrmultiplication.

Continue Reading »

Recently, I finished my first Arduino project, a magnet levitation device. It levitates a magnetic object under an electromagnet. What makes it different from similar projects is the position sensor for the feedback loop. I use a single Hall effect sensor placed directly on the bottom of the core of the electromagnet. This creates a problem of separating the electromagnet’s field from the levitating magnet’s field. Fortunately, this can be done in software by the microcontroller ATmega168 that is the heart of Arduino Duemilanove, the board that I use to control the levitation. This article gives a detailed description of the project together with source code at https://github.com/rekka/levitation, as I promised.

WARNING: This is an advanced project that requires quite a substantial amount of tweaking and understanding of the software internals to make it work. Please consider this post just a description of what I did. Furthermore, it is more than 3 years old and therefore hopelessly outdated; the software most likely needs nontrivial changes.

Continue Reading »

I found a couple of interesting magnetic levitation projects online when I was doing research for my Arduino magnet levitation project. I was also pointed out some really cool projects that I didn’t know about by¬† visitors of my blog and of my Arduino forum thread. Here’s the list:

It’s been only a couple weeks since I discovered Arduino, an open source microcontroller platform. I was looking for a cheap interface between my laptop and electronic circuits. Arduino with its price $35 and easy to use development environment was the best choice. So after getting my Arduino Duemilanove board and ordering some cheap components from AllElectronics, I had everything to start working on my old dream, making a magnet fly. Well, float.

Update: detailed description here

It took only a few days to figure out all the problems and my magnet floating device was born:

Floating a dart with Arduino

Floating a dart with Arduino

Here’s a video:

Continue Reading »