Posts tagged ‘Hack’

CNC for summerproject

I have decided to build a CNC machine in the summer vacation. As soon as I finish the last exams i’ll start building / hacking. For the moment I’m looking into building plans and cnc in general. At first I wanted to build a reprap using a kit, but my funds are limited, so it will be a three axis cnc router which hopefully will be able to act as an repstrap.

The project as it looks so far :
I ordered a set with steppers, motor-control and psu from ebay, and I’m waiting for it to arrive(The seller said 10-12 days, so maybe if I am lucky next week). It should be 1.7NM motors and a more or less “plug’n’play” set.

I intend to drive the motors using a old computer running linuxcnc. linuxcnc looks real neat, but might prove to be hard to set up.

The construction

I am looking at two set of plans at the moment

How-to-Make-a-Three-Axis-CNC-Machine-Cheaply

This was the building plan that made me decide that this was a possible task. But there are some issues with the construction I don’t like, especially that it uses belts. They are hard to find and they are not cheap.

JGRO’s plans

This is a free diy plan. it can be found here : http://www.cncroutersource.com/cnc-router-plans.html

It uses threaded rod instead of belts. And the overall construction looks simpler.

Materials

Although I do want to do “fabbing” using a extruder at first I think that there will be enough work for a couple of days getting the mechanics and electronics up and running. Just as there is a lot to learn about g-code and all sorts of 3dmodelling.

To begin with I want to cut using a dremel tool, maybe a more powerful spindle(?) to be able to cut wood – if I have enough power in the steppers.

You might ask what do you want to make / “fab” with a 3 axis cnc machine?  I can come up with a lot of different small things like “coat hanger”, “coffee filter”, “PCBs” but I guess that it just boils down to: ” I think its a very fascinating technology and want to play with it”

CLI voip calls

front1
Sometimes it would be nice to use a script call somebody and play a message.
I “needed” a wake-up-call system and since I use a voip-phone and have access to a server. I thought i would be quite nifty if I could have the server call me. Furthermore i would like to be able to script calls, so for instance the calendar could call me with reminders rather than sending an email.

I googled around but weren’t able to find such a utility. But i did find cli-sip client pjsua, based on pjsip. Its posible to use it in conjunction with a shell script.

Scripting

jacob@vps:~./control.sh sip:108329@foobar.com "wake up you lazy bastard!"
Is the basic usage i wanted to have. In order to get this functionality there are two steps.

Continue reading ‘CLI voip calls’ »

Collection of Processing.org hacks

Its been quite a while since I last posted anything.

That doesn’t mean that i haven’t been coding small hacks, just that i haven’t posted them. But now is probably a good time to show some of the stuff.

As the title suggest it has something to do with processing.org. I have been using processing on and off for some time. Its is really nice when you want to make a quick hack, or as its called in processing a “sketch”.

In no particular order here is some of the fun stuff made using processing.

General remarks

The following sketches and their sourcecode have served as small hacks, hence don’t expect nice comments or optimal algorithms…

shrinkImage

It is possible to remove the line from a picture representing the least amount of information. The algorithm evaluates every pixels “weight” as the absolute difference between the different color channels (r,g,b). And then finds the “lightest path” from the bottom to the top.

This means that “prominent features” won’t be removed or change size when shrinking the image. Here the definition of “prominent features” is high difference in colors between the neighboring pixels.

Have a look at shrinkImage

Room for optimizations :

Eventhough its quite quick at calculating the weights and finding the lightest path, it does so in every iteration. Letting it use a bit more memory and just recalculate the changes when removing a line should speed it up. I found a huge speedup when just having an array with the weights from the last and current line, when calculation the path, so not only would saving all weights require a bit more memory it would also slow down the first calculation. But I’m sure it would give a significant speed up in the next iterations, and a lot of +-1 frustrations 😉

helloFoo

There a some quick getting to know processing hacks, this is one off the. helloFoo

One of the very cool things about processing is the ability to use openGL, so originally this sketch uses openGL. But applets and openGL isn’t exactly the best combination. It can be done, but since it doesn’t work for me (firefox, linux openJDK JRE) i just converted it to standard java graphics. And the effort required to do this, is remove an import and don’t say setup(400,400, OPENGL) but just setup(400,400). This is trivially true the other way around. If you want to use openGL its quite easy.

The sketch is just bouncing balls, when going away from openGL I reduced the size and number of balls, in order to get a decent animation speed.

FooIII

Again used openGl originally FooIII

Some satellites rotating around some satellites rotating around some ….

sndHello

yes sketches tend to have silly names : sndHello

From Clifford Pickovers  book : Computers, Pattern, Chaos, and Beauty – graphics from an unseen world (p 39 section 4.3 snowflakes from   sound)
Draw symmetrically and in “polar form” the fft of the sound, hence creating snowflakes based on the sound.
Music by David Rovics
Choppy sound I had some problems with the sound when run as an applet. You might have better luck using the jar directly or by downloading the sourcecode and running it with processing

Slit-scanning

The former applet relied on an external library for the sound, ther are quite a few libraries available. I did use GSvideo to hook up my crappy webcam and do some video effects. I experimented with slit-scanning in different ways.Unfortunately this won’t run as an applet and it might only run on Linux.

By creating a cube of the images, where the z-axis represents time, its possible to play back different parts of the movie from different layers in time. Which makes for some quite interesting and dizzing effects.

For example a time buble where playback is delayed around a “bulge in the timespace continuum” :s (a video of some guy playing with it (timebuble1.avi) some sourcecode for a similar effect where the mouse pointer moves the buble (TimeCube.pde) another more “traditional slitscan” (CamWarpTime.pde) .

In general there is plenty of room to fiddle with the code, there a functions like selectSlice or initQueues where its decided how to slice time. its great fun to play with..