Archive for October, 2007

a blog about electronics

2007-10-02

Finally! A blog that’s devoted to something nerd-centric on the internet. It’s about time!

I’m taking a class in electronics this semester. There’s a final project we have to complete, so I’ll track the progress of that here, as well as write about other things related to electronics.

arm7-oled-clock

For my final project, I decided to make a clock based on an arm7 microcontroller from atmel (an at91sam7s64) using a 128×128 pixel full-color oled display as the output. I wanted to do this for several reasons:

  • The choice of the arm7 was so that I could learn a new microcontroller that had higher performance than I was used to (motorola hc05, zilog z8). This one can do about 55 MIPS (although there’s a mandatory wait state if running code from flash instead of from sram, so it’s somewhere around 30 MIPS in that case).
  • The choice of an oled display was because it was fairly low-cost ($37 in single quantities), easy to interface to and is lower power than an lcd in the case that only a few of the pixels are on (because there’s no backlight on an oled display).

tools

I made it a fairly simple project (it is just a clock after all) so that I could determine whether it was straightforward to get a development platform setup on linux to assemble, compile, link and program the arm7 using freely available software. In this regard, it has turned out well. Here are the tools that I’m using right now to get the prototype working:

  • the gnu assembler
  • the gnu c compiler
  • the gnu linker
  • gnu make
  • openocd (to program the device over jtag as well as for simple debugging)
  • sam_I_am (to program the device over usb as well as for simple debugging)

current status

At this stage, I have a bunch of stuff written in assembly language. It does the following:

  • sets up the microcontroller
  • sets up the display
  • reads the voltage from a light-to-voltage sensor (TSL250) and sets the display’s brightness accordingly (dark in a dark room, bright in full sunlight)
  • displays a simple pattern on the display

Right now, I’m working on getting the time out of a real-time clock (over spi).

rant

The hardware designs will be released under a creative commons license so that anyone can take the design and make one (or improve upon the design it and make one) for themselves. The license will be BY-NC-SA (attribution, non-commercial, share-alike). This means the following:

  • attribution = You are free to distribute copies of my designs, but if you do, you have to give me credit. If you make a clock from my designs, you have to credit me for the hardware design.
  • non-commercial = You can’t sell my designs. You can’t sell clocks based on my designs. That is, unless you get an alternate license from me (and give me some of the money).
  • share-alike = You are free to make modifications to my designs, but if you do, and you share the result with others, you have to give them the same rights as I’m giving you. This means you can’t take it and modify it slightly and say it’s copyright you and then charge people for it. This share-alike clause also relates to distributing unmodified versions of my designs.

For more information, see this.

The software will be released under the gnu general public license (I’m not sure which version yet, either 2 or 3). This means you are free to take the software and use it or sell it (and you can keep your money this time) or you can modify it and then use it or sell it. Either case is only under the condition that you give others the same rights you got. See this for details.

Both of these licenses rely on copyright law as it stands right now in the united states. If you don’t like my terms, that’s fine, you didn’t sign anything, but nothing else gives you the right to copy my work (except fair-use; but that’s more of a defensible position than a right, now isn’t it?).

The difference between the non-commercial part of the license for the hardware design and the sell-it-as-much-as-you-want part of the software license has to deal with economies of scale. It addresses the problem that can occur if I design hardware and software for a widget and start making and selling them for fun and profit. It costs almost nothing to distribute every copy of a piece of software. It costs real money to make hardware, and the costs drop dramatically if you make a lot of something at one time versus just making a few of something.
If big company A takes my software and sells clocks with my software, that’s fine because they designed their own hardware and if they modify my software, they have to share their modifications with everyone because they’re distributing it with their hardware or as a download. This benefits everyone involved. If I let them copy my hardware design for commercial purposes, they can put me out of business because big company A can make 1000 at a time and undersell me because I can only make 10 at a time. Disallowing the commercial use of my hardware design prevents them from selling an identical product (hardware and software) for much less than I ever could, driving me out of business making and selling something I designed in its entirety.
Now, that’s a fine point, you might say, but if they’re selling clocks based on their own design with my software, they can still run me out of business. Ah. But that’s already happening, right? I don’t make clocks yet (and don’t really plan to, but there’s no sense in not planning ahead) and big company A already sells clocks for $5. I’m not trying to displace big business, I just don’t want them to profit on ruining me.

The parts of this blog and associated materials relevant to the arm7-oled-clock will also be licensed under the cc by-nc-sa license.

…end rant…