Category: Projects

  • OpenCL First Steps

    There is an increasing noise about GPGPU computing and how much faster than CPU (even parallel) it is. If you didn’t hear about all that, GPGPU is about using the computer’s graphics card(s) to do general purpose computations. The key to the performance lies in the parallel architecture of these devices. From what I read, an average graphics card has 64 parallel units, but they are not as versatile as the CPU of which a typical PC these days has 4 cores. That means, if the task is well suited, it can boost performance significantly, but if not, it’s nothing more than a lot of wasted work.

    So I wanted to see for myself. To get started I read the book “OpenCL Programming Guide“. It gave a good overview. But now it was time to give it a try.

    (more…)

  • CyanogenMod and Ubuntu on my Samsung Galaxy S

    I wanted to install a real debian based linux distro and Cyanogen on my Android smartphone for a long time. First I was scared off by voiding the warranty on a new phone. But now it’s one and a half years old. And recently they announced that there will be no more firmware upgrades for my device.

    First step was rooting. There are lots of tutorials and descriptions online. Most of them are way too compilcated. Effectively, you just have to find a rooted kernel suitable for your device, and then: (more…)

  • packaging libboost compiled with llvm clang

    I read many articles and posts over the last year or so, citing how great llvm clang is. On one side it shall have a static checker that makes lint redundant, and on the other side the optimizer has an -o4 where the -o3 shall be comparable to other optimizers. On top of that, compilation speed shall be really fast. And the part that makes it interesting for folks like Apple (who uses and contributes), is that it’s licensed under a BSD style license. What more could you want?

    (more…)

  • Robot Arm part 1 packaging and simple manipulation

    Another project that I had in mind for a while was to experiment with robot arm path planning and inverse kinematics. If you don’t know what that is, think about how robot arms could be programmed. The simplest form would be capture and replay, in which you have a controller which which you record how you manually move the joints. The robot can then replay the movements. We humans have developed a good  intuition for moving our body parts and grasping, but when it comes to formally describing what you do with the joints of your arm, it quickly becomes difficult. My younger son is in the phase of learning to grasp right now, and it’s amazing to see how the eye arm coordination evolves. The second approach would be to program it like a CNC milling machine with something like G-codes.  This is a bit more general and more exact, but it’s also more difficult to do collision avoidance. And it’s complicated to calculate as most joints tend to be revolutionate. Both these approaches are only suited for repetitive tasks often found in industry automation, but completely unsuited for robots in dynamic environments. Now with inverse kinematics, you can tell the robot where the arm should move to in cartesian coordinates, and it does all the arm geometry calculations and positions the gripper to the correct position in the desired orientation. Maybe there are obstacles in between the current and the target position. To navigate around these, you also need path planning. That is usually done in configuration space. Real robots have also to care about dynamics such as inertia, but I won’t go that far.

    (more…)

  • Mixing boost versions –as-needed

    Some linux distributions defaulted to use the –as-needed linker flag for a while. Ubuntu tried it in natty, but then reverted. Now with oneiric, it really is enabled by default.

    I ran into this when one of my packages wouldn’t compile on oneiric. I always got linker errors with boost::filesystem and boost::system. Between natty and oneiric, the default version of the packaged libboost changed from 1.42 to 1.46, thus switching from filesystem v2 to v3. Obviously my first thought was that it must have to do with that. Also libwt which I use in the project had the same error in a previous version. So, I reduced my app until I was sure that couldn’t be the cause here. Also all my other packages didn’t have any problems with the transition to filesystem v3 apart from the regular changes for adapting to the new interfaces. But for these changes the compiler helps.

    The project in question is organised more or less like that:

    (more…)

  • Best names for algorithms

    I’ve worked in Baar for two months now and I go to work by train. It takes a while longer than to Schwyz as before, but I don’t have to switch trains or busses. That means it’s good for reading. Currently I read “Artificial Intelligence: A Modern Approach” which is accompanying an online curse (ai-class.com from Stanford) that I currently attend. Today I was reading in the chapter about neuronal networks. There it describes an algorithm called “optimal brain damage“. It tries to find an optimal topology for the NN by randomly cutting connections from an initially fully connected NN.While it describes adequately what the algorithm does, it struck me awkwardly when I first read the name.

    What are the best names for algorithms you have come across?

    (more…)

  • RepRap part 3: Ethernet connection

    With the X and Z gears propperly glued, all axes moved. But it didn’t take long for the Z axis gear to break again. The gear that came with the kit was multilayered wood glued together and laser cut. The place where the belt is, is off the axle of the stepper motor. That’s obviously not a good combination. So I ordered an alloy gear from maedler. That came without a hole in the center. I didn’t have anything else then my hand drill available. Well it’s a bit more off center then I had hoped, but nut much worse than the laser cut wooden gears. And still, it works. So, all three axes work now. The ammount by what they move doesn’t seem right, so I’ll have to adjust some parameters still.

    (more…)

  • RepRap Part 2 : It moves

    It’s been a while since I assembled the Gen7 Electronic board and the extruder. I ordered the extruder together with the steppers from the Netherlands. The hot end v6 is a very nice design compared to the original, where you had to wrap the heating wire around the nozzle yourself. But it’s too big to fit through the hole of my wooden X-Axis sledge from the gffr kit. So, for the moment the extruder is tied to the X-sledge with a clamp.

    When I assembled the electronics, I flashed the Teacup firmware onto it but I was never able to connect to it with the reprap host software on the computer. When I connected to it with a serial terminal, I saw a “0” about once a second.

    Now after some months I found the time again to make some progress on my RepRap. Also ReplicatorG showed no sign of a successful connection. So I thought to be sure, I would flash the firmware again. But this time I didn’t succeed in doing so, not even with the ICS programmer. Looks like my avr suffered from a corrupted bootloader. That’s a known bug resulting from random operation during power down. Traumflug guided me through the process of flashing the bootloader on IRC. After that, flashing the firmware worked again. Traumflug also told me that neither the reprap host nor ReplicatorG are too well suited for operating with Teacup. He suggested to use printrun instead.

    (more…)

  • Time Tracking with RFID on BORM ERP

    Before I discovered what my Bifferboard really is, I almost disposed it, but now It found a new purpose. It’s a networked rfid Terminal for time tracking on our BORM ERP. I use a simple python script on the device because it’s easier to experiment on a device where I would rather not compile too much every time trying something. In fact, this is my first python project appart from looking through some scripts and changing a few lines here and there.

    (more…)

  • Make an RFID tag with an AtTiny and a coil

    When I stumbled across this blog post, I was sure I have to try this at home. I had some interest in RFID for a while, but the Proxmark was too pricy for me just to play with. So this experiment came just right.

    The attiny85’s were difficult to get in Switzerland, so I ordered them from Germany along with an ISP programmer. I think it would also work with other AtTiny’s for example the 45 is available from Conrad. The hex file is just 1.7 kB, so the AtTiny45 should suffice.

    (more…)