Week 8: Embedded Programming
story of failure and not to dos...

The Assignment

Read this, program our board and make a small change

  • The Problem:As I continue to design the bike jig, my hope is that there can be an on-jig display of the different angles and measurements.
  • The Solution:Learn how to program a board to recieve information and output information. This week is all about learning how to communicate with ATtiny44 so that we can control all kinds input and outputs in future weeks.
  • Time Investment: Too much :-( still working on it... but here are the majority of my stumbling blocks

The Stumbling Blocks

a growing list

This week was tough. I conceptually had a decent idea of what should be happening, but I don't have nearly a good enough foundation in programming and electronics to actually know what is supposed to be happening.

As alluded to above, I still haven't been able to program the board I designed two weeks ago. Each time I think of a new solution, something goes wrong. So, as I continue to try to program a board, I figured I'd keep a running list of the stumbling blocks I've run into (and hopefully the solutions).

Bad FabISP

Not showing up

FabISP not working Several weeks after seeing the FabISP that I programmed in the Electronic Production, the board no longer showed up on my Device Manager. I did some searching and found this was a common problem from previous years and many people resorted to using the ISP in the workshop. I decided to do the same.

Windows hates Atmel

Learn Linux

I installed Arduino on my computer and downloaded the needed informaton for the ATtiny44 following several tutorials from last year. (Here's one). However, after setting everything up, I plugged in the AVRISP mkII and found that Windows didn't have the driver to talk to the device.

That meant searching for the driver which proved to be harder than I thought. I finally found this discussion and this driver which is not "signed" so it still didn't work.

I thought installing Atmel Studio 7 might help, but the download was taking hours so I abandoned that idea for the moment.

Nothing was working, so with the advice of the awesome TA, Will, I decided to just use the workshop linux computer and he helped walk me through it. Which leads me to the next issue.

More board problems

The dreaded "rc=-1"

Will took me through compiling the C code into hex code using "make" in Linux. This was simple enough and it felt good to see something work.

The next step was to send this hex code to the ISP which would then program the board I head designed two weeks ago. This is when we got the "rc=-1" which means that something on the board I designed wasn't working. Four other classmates tried their boards. All of them got the same response... so it was back to the drawing board.

I saw two possible problems:

  • 1) The design of the board was bad and/or
  • 2) The board itself had been stuffed incorrectly.

On-board Problems

checking and checking

I went through board with the voltometer and found some possible shorts, especially where I had used the LED to jump over a trace. I tore up the LED, cleaned out the copper, and installed a wire. I tidied up a few other bad soldering jobs, and got ready to program again.

As you might have guessed, I came up with "rc=-1" again. So, on to redesigning and cutting the board.

That rainbow cord thingy needs to be wedged into the milling machine at just the right angle to get it to work.

Mill troubles

Jiggle the thingy

Because the TA had left for class, I didn't have anyone who could take a look at my board schematic and definitively tell me if it would work or not. Instead, I decided I would simply cut out Niel's echo board in order to control for the possibility that I had mis-designed the board.

Unfortunately, the mill used to cut the traces for the board wasn't working (again). I tried all the tricks that had worked before (restarting everything), and I kept getting the bad response. I also tried to jiggle the jerry-rigged wiring wedged into the machine which was the problem last week, but that didn't seem to make a difference].

Time ran out, and that's where I am now. I really need to get my mind around the programming of this board but it seems I haven't got the previous week's electronic design down yet. More to come...


How To Make (almost) Anything
MIT Media Lab MAS863.15