## Wednesday, 12 June 2013

### Proof of Concept: The cheap DIY optical potentiometer

Recently I did some tests regarding the idea to make a fully printable optical potentiometer.

So I did the first proof of concept by simply using photoshop to print a linear gradient on a sheet of paper and holding this paper between an IR-diode and an IR-phototransistor. The result was this:

The horizontal axis is the length in cm. The vertical axis is the measured voltage (transparency of the paper). At 0 cm the paper was completely black and at about 30 cm (length of an A4 sheet) it was completely white. As you can see the area of the first 10cm is relatively linear, so this test was promising.

In the next step I cut of the area between 10 and 30 and enlarged the other therefore. The result is this:

The blue line shows the measurement, the red line the desired and the purple one the difference. The formula above shows the regression curve that excel has calculated.

With this information I calculated the inverse function of the regression curve and wrote an openFrameworks-program that would print a non-linear gradient so that the measurement gets linear. The result is shown here:     CODE

This is the final curve. Now both axis are measured in %. As you can see the curve is relatively linear but still pretty noisy but I have to say that I used an ordinary multimeter to measure it. Maybe the curve would look better if I had something to measure it more accurately.

I have started to design a sensor case and uploaded the early version to thingiverse.

But sadly the code is still not capable of creating round gradients, only straight ones so I´m not able to try it at the moment.

## Tuesday, 11 June 2013

### Spherbot-GUI

Good news guys :D

It took me some days but finally I found out how to compile statically with Qt and how to upload my stuff to Github. You can find the code and the exe for the spherbot-GUI here.

## Monday, 3 June 2013

### The Spherebot

My latest project has been a Spherebot. I used my 3D printer to print the parts and for the electronics I used an Arduino Nano with two Pololu Stepper Driver inspired by this Design:
I had some problems in getting the Arduino to be found as a COM port by my pc. I found out that, as it seems, the designer of the Arduino Nano has forgotten to connect the Test Pin of the FTDI chip with ground. The solution of this is to do it yourself with a little solderbridge. Coincidentially the neighbouring pin is a ground pin :D .  I unintentionally connected also a 3rd pin with the solderbridge but after a look in the datasheet I knew that it is ok and the additional pin has no important function. Despite this little flaw with the missing grounding I really like these little arduinos and they are also cheap enough to be left in a project.

After solving the problem it still didn´t work as I wanted it to work. the servo motor worked as it should but the stepper motors made crazy things. The pen motor made nothing until it was touched and then it suddenly accelerated until it reached the end. The egg motor suddenly rotated without a reason. First I tought about an unwanted feedback from the output to the step pin but as it turned out simply 2 wires of each motor were switched and this caused my problems. I didn´t thought that the motors would do anything if connected the wrong way but they teached me better xD.

The Firmware is based upon this

Because of the lack of a convinient host-side-program I decided to write the gcode-sender on my own. It was my first Qt-project but I´m quite satisfied with it. It may not be the most beautiful code but it works. In the future I will try to write more modular code for reusing.

### New Blog

Hi guys!

This will be my new blog about programming, electronics, arts, robots and all the other cool stuff that I´m curious about :D