Freitag, 23. November 2012

Programming an ATtiny85


I recently decided that I wanted to use an ATtiny85 for a small project I have in mind. So I ordered a couple from DigiKey. Once I got them I realized that I only had a very vague Idea on how to go about programming them. 
I ended up following instruction from the brilliant people of the High-Low Tech group at MIT: http://hlt.media.mit.edu/?p=1695 

Some things I noticed:
- Their instructions do *not* work with Arduino 1.0.2.
- Dont forget to select the correct board *and* the correct programmer (selecting a programmer was new to me, its in the "tools" menu)
- Yes, the Capacitor is essential. I didn't have 10uF capacitor around the first time I tried it. I tried various wrok-arounds (multiple capacitors in paralel, larger values, smaller values) and nothing worked. (In retrospect, at one point I did get it to work without the suggested capacitor, however there was a different problem, but I was unable to fix it, as I assumed it was the cap. So my recommendation: Just get the capacitor and it'll save you trouble.

Also, use the suggested debugging LEDs. It makes it a lot easyer to understand what is happening.

Here is my setup:


Green LED tells me the ATmega is talking to the ATtiny:


Once I finally got it running I basically fell in love. This thing is sooo simple. It works like magic. No external oscillator, no nothing. It just works. I think in many situations, once you have the initial setup its easier to use than the Arduino. I realized I will want to program ATtinies more often, so I decided to make myself an ATtiny programming shield:


I used a protoshield which I piked up from the METALAB at some point and had lying around. I connected everything like so: 



In addition I added a yellow LED + Resistor on pin 9 (Heartbeat - tells me the programmer is working OK). I also added a red LED on pin 8 (Error) and a green one on pin 7 (communication). The small green LED you see next to the ATtiny is for double-checking if everythng works. Its connected to pin 0 of the ATtiny and is executing the 'blink' sketch which I just uploaded to the ATtiny.


Sorry about the shoddy fotography. If I find a decent camera I might upload some nicer images.

This was a fun project and well worth the time :-)


Donnerstag, 1. November 2012

Kickstarter - A recap of my campaign


I recently successfully funded a project of mine via Kickstarter (link: http://www.kickstarter.com/projects/808216251/mediated-touch-a-telepresence-study). People have been curios about how the process went, so I decided to quickly recapitulate my experience. 

First of all, there is lots of stuff on how to run a Kickstarter campagin and stats about Kickstarter out there. I personally found this website the most helpfull while running the campaign: http://www.kicktraq.com/


So lets take a look at my project:

How did it go?




I marked some interesting points on this graph. 
(1) Begin. This was awesome. I basically clicked submit on the Kickstarter page - just because I was curious *if* it would work. And it did. Then I thought "I should send out an e-mail to people, telling them about this". By the time I had finished that thought, I already had my first backer, a former lab-mate. I ended up opting for not spamming my entire e-mail contacts, but selected a few ~ 20 people who I sent a message to, asking them to forward it to people who might be interested. 

Within the first day, I was backed with over 400$, of which 65$ where from people I knew - the rest where strangers to me. This was quite a thrilling experience. I could not really understand it - it was only later that I realized Kickstarter had selected my project as a staff pick:

During the next couple of days, my project was plastered all over (my corner of) Facebook by me, friends, people I study with and, to my surprise, the odd person who was a stranger to me. Also, people continued backing, and very soon, I hit my goal of 950$

After that things started stagnating a bit. Then something even worse happened. I lost money. I was not even aware this could happen. What I learned is, you must not only convince people to back you, you must continously keep them convinced. Loosing backing was quite a blow to my moral. However, I guess its just one of those things which happen and should not be taken too seriously. I never found out why the two people who 'backed out' backed out.

Things changed half way (2). This was a strange day. I don't know if this is random, or if this is significant. It might also explain day one. What happened is this: My Grandmother, Mother and Aunt decided to back my project with 300$. (It was done from one account, so they do not appear as individual backers). Then all of a sudden, 3 more people backed it, with substantial amounts of money. Quite a day, I was really hyper.

However, as with day one, one of the backers rescinded their backing.

I really did not do much in form of marketing. Towards the end of my project (4) I sent a fb message to a couple of friends who I knew would most likely be happy to back my project, asking them to do so, and telling them not to worry about adding a large sum, I really am just interested to see if I can get more backers. Most of them backed it. On the last day (and some even within the last hour) a bunch of friends ended up making the effort to back my project (5). I would guess that I know around 30 of the 100+ people who backed my project in person. About half of those backed it in the last two days.

And then, of course as soon as the backing period was over (6), I got a bunch of messages by people apologizing for missing the time-window. I assume, if I had written to these people in person, they probably would have backed the project as well.


 Here some more statistics from Kicktraq

After a big backer backs out, things look sad:



It can be corrected though:



 Entire course of project, including trend at each day:



What did I learn


This is what I did right
- My project is very unique. I think this contributed to it being featured on Kickstarter. Without being featured, things would have been very different.
- My project was appropriate in scale to my network. Luckely things went well and I did not have to take any extreme measured, however, before starting I sort of considered which networks I have (family, university, former work, friends in Canada, friends in Austria, friends in the Netherlands) and estimated how much backing I could potentially get if I reached all of them. The project I intended to do, and the reach I thought I had aligned nicely, so I figured I might be able to do this.
- The presentation. I think people liked my video and the way I had things set up. I think it was professional enough for people to believe that I can pull off my project, while being honest and personal enough that people felt comfortable giving me money even tough my rewards where not the most tangible ones. (a lot more people than I would have anticipated opted for the "no reward" option.

This is what I did poorly
- My funding goal. After I had almost reached my goal of 950$, I realized that I had actually anticipated to overshoot that goal by ~ 600$. However all of a sudden I found it difficult to explain to people why I needed their backing, even though I already had 100%. The backing also stagnated once I had reached 100%. This was a huge mistake. I did this, as I was planning on doing my project anyway, and even the 950$ would have been valuable, however I learned this: Be bold. Ask for as much money as you need. If you don't ask for the right amount in the first place, it is hard to justify this later on
- The rewards. This was probably the weakest point of my project. I did not know how to do them, as, unlike most Kickstarter projects, I am not designing a product and I am *not* interested in distributing and selling things. Because of that I thought that I need not put so much focus on this. Well, I think now that I was wrong. For example, I ended up receiving additional backing from one person after some exchange, in which I asked him what type of reward he actually would like to see. After I introduced that reward, he almost doubled his pledge. I did this on the last day. For me it all worked out - I got what I needed and am happy with my project. Next project, first thing I will work on will be the rewards.


A word of warning:

Kickstarter does not initially mention, that you will pay additional fees on top of the 5% which Kickstarter keeps. When it does it says Amazon keeps between 3% and 5%. 

What it does not mention however is that Amazon does not apply this percentage equally to all transactions. For the 1$ pledges I ended up paying 11 cent to amazon. So from every 1% pledge I get to keep 0.84$. This is quite hefty in my opinion. From 5$ pledges Amazon keeps between 0.30$ and 0.35$. Thats 6% to 7%.

All in all, I ended up receiving 89% of the total amount pledged. That is, in my opinion, a lot of fees. I am happy paying Kickstarter these fees, as I feel like it was extremely beneficial that I could use their platform  however, I am not sure how I feel about the Amazon fees.


Some links:


I found following blogpost to be extremely interesting  especially interesting:  http://boardgamegeek.com/article/8849498#8849498

More interesting discussion can be found here: 


Samstag, 27. Oktober 2012

Some Data Visualization

My friend Johanna asked me to help her figure out how to visualize some data she was working with.

(Maybe I can get her to update this blog with some actual information on the Data. My Estonian is about as good as my Esperanto or my Inuit, so I know what the labels on the data say, but well. Not what they mean)

She gave me a list of buildings of a district of Talinn. Each building had two datapoints: a) it was classified according to some (to me completely mystical) Estonian system and b) the year it was built in. My first thought was to just to give each classification a value and create a scatter plot:


This initially seemed quite useful. You can see which classifications concern newer buildings, which ones concern older buildings. You can see that very few - well actually, no buildings at all where built after 1940 and before 1945. However, I did not feel like one sees the entire picture. So I decided to add some jitter. Once I saw the result, I decided to add a whole lot more jitter. This is the graph I came up with:


Here we can see a whole lot more detail. For example the third, fourth and fifth category from the top looked fairly similar around the year 200 in the first graph. Here we see that there is actually a lot more going on. I still was not quite satisfied, so I considered it a programming challange and tried to see what I could come up with using processing.


I would have never anticipated the huge spike in the first classification just by looking at the chart I had previously made. I'm not quite sure if the mirrored thing is so smart, as it might make the differences between a large and a small number of occurrences appear to be smaller then it is... still, I think its a pretty graph.

Here is (some of) the code I used:
("some of" because estonian seems to break snippler which I use for the code formatting)


Finally, this is what happened, when i did not use pushMatrix() and popMatrix() correctly. I think its quite a beautiful result:




Dienstag, 2. Oktober 2012

How you can help my Kickstarter campaign



Three things you can do:

- If you could publicly back me, by contributing 1$ that would be A-M-A-Z-I-N-G. I know many of you don't have any more extra money to spare than I do, however, this 1$ means a lot. It shows the world that you are publicly supporting me. Not only by sharing a link, but by contributing what (sadly) seems to be the one thing which counts in this world: $$$. Depending on where I go with this project, demonstrating that I have a broad supporter base may be extremely valuable to me.

- Please criticize what I am doing. Please find the flaws in my reasoning, the fallacies of my ideas. I will post them on the kickstarter page in order to start a discussion, to start discourse. I will learn from your criticism and other will learn from it. There is so much valid criticism to what I do... lots of my ideas are very problematic. I want people to point this out so it can be discussed and analyzed. Science is negotiation, our future is negotiation. The more standpoints we find, the richer my project can become.

- Finally, please share what I am doing. If you know somebody who is interested in this type of thing - tell them about my project. 

Prototype for my Kickstarter Campaign

Hi Everyone

as you might or might not know, I recently launched a kickstarter campaign in order to collect funding for my bachelor thesis. 

Check it out: http://www.kickstarter.com/projects/808216251/mediated-touch-a-telepresence-study

The money will go towards the hardware I require for running my experiment. Part of the hardware will be a humanoid robot with 4 DOF. In the following video you can see a rough prototype of the head, which will be the most complex moving part of the robot:


 
(I had to add music, as my flatmates complained that they did not want to be heard talking in the background. I find Estonian makes for beautiful background sounds... but then again - I have no idea what they where saying :-D....)


I built these prototypes with parts I had around the house. The brackets where freebies which I was presented with by John Iovine from Images Scientific Instruments quite some time ago. (Thanks again, btw!...) 

 *
Here are some pictures of the process:
... the servos and the brackets which I used for mounting them. I'm just getting started.


Continuing to assemble things...


The servos did not hold as tight as I wanted them to - in order to give the whole thing some additional strength I cut thin strips of thermoplastic, heated it up and then wrapped it tightly around the joint. I like this way of attaching things as its quite effortless but super, super stable.


 You also see that I used thermoplastic as shims (or washers? don't know that word. hat to google it). The screws I use are so tiny that finding fitting ones is quite a task - this is again, easyer and better.




Chassis is finished, and firmly mounted on two bottles filled with water for stability:

 


Anyway thats it for now. Lets see how this whole Kickstarter thing goes :-)

Samstag, 8. September 2012

Software Sketch for BerrieBase


I threw this together to get a feel of what our software could potentially look like.




This is similar to various data-flow languages (like vvvv, pd and Max/MSP) ...

 In theory I really liked data-flow languages, but I have never found an environment I was comfortable enough with to stick with. My plan with our software is to keep it simpler than the ones I just mentioned, and have the ability to switch over to code view, if you want to do something more complex. Basically I want to be able to generate flow-charts from code and code from flow-charts. I imagine every graphical node to be represented by a function. A newly declared variable would also be a node, and all other variables would be represented by lines.

This will of course require users to stick to a more functional style of programming than the relatively imperative way that is used with Arduino. Which could be a curse or a blessing. I am not sure which one yet.

Mittwoch, 29. August 2012

More Pictures of BerryBase Prototypes

Some more Pictures of our Hardware Prototypes:
The Base:
The shift registers which connect the base with the RaspberryPi

The first Berrie Modules :-)