Archive for the ‘Microcontrollers’ Category

Replacing an iPod Nano’s battery

July 24, 2008

I bought a first generation iPod Nano more than 2 years ago. I use it every work day (see also http://dbenn.wordpress.com/2006/08/27/astronomy-science-podcasts/), but the battery has been on the way out over the last few months. In the end it was holding charge for less than an hour, irrespective of charge time, often dying before my walking trip was over.

Getting it replaced through official channels would’ve cost in excess of AUD $100, about a 3rd of the device’s original cost. So instead, I spent AUD $20 on an iPod replacement battery kit from JayCar (I’ve seen them advertised elsewhere on the web too).

It came with the 3.7V Li-ion Polymer battery (400mAh instead of the original 340mAh), two plastic tools to pry the case open, and a brief but effective instruction sheet.

The most painful part was getting the case open. The plastic tools from the kit only get you so far and I pretty much wrecked mine. My wife Karen and I took turns carefully prying open different sections of the case with a small flat blade jeweller’s screwdriver (not suggested by the instruction sheet, but effective nonetheless), in addition to using the plastic tools.

Once the back of the case was off, the battery was easily removed, and I used a fine-tipped soldering iron to remove the three wires from the PCB, and fine solder to connect the new battery’s wires in place before putting the case back together.

I replaced the battery on the weekend and didn’t have to charge it again until 3 days later. Hopefully this will make my Nano last another 2 or 3 years, by which time it will probably be time for an iPod upgrade. It won’t owe me anything by then, that’s for sure.

Now, all I have to do is stop breaking earphones.

PIC C Library on Sourceforge

May 8, 2007

My PIC C library is now on Sourceforge. I’ve developed and used this library for my own projects in conjunction with the Hi-Tech PICC Lite compiler on and off for a few years now. It’s been sitting on my laptop for personal use, and I thought it was time to make it available for others to use.

Making picclib available is my first experience of Sourceforge, and a fairly pleasant one. The documentation is quite reasonable, although it helps to have some background with Unix, ssh, CVS/Subversion etc. I chose Subversion as I’ve been using it for my own projects for awhile now.

There’s plenty of Sourceforge features yet to explore. I’ll certainly use it for future projects.

Embedded Java: Down to the metal

October 18, 2006

In September 2004 I gave a talk to the Adelaide Java User Group (http://ajug.org.au/display/AJUG/AjugAdlMeeting20040920) entitled Embedded Java: Down to the Metal at which I talked about:

The TINI is Java 1.1.6 compatible with respect to the language and libraries, while the Javelin Stamp implements a smaller subset of Java with some deviations (e.g. ints are really shorts, no interfaces, no GC).

At that JUG meeting I demonstrated the Javelin Stamp displaying the temperature from a DS1620 IC on an array of 7-segment LEDs and dumping to System.out, which on the Stamp is a serial port.I mostly use the Javelin Stamp to prototype an application with unfamiliar hardware due to its easy serial-port based progamming and source-level debugging, and because I can write OO code for similar yet slightly different devices (e.g. for 7-segment LED displays that are direct pin to pin, via BCD-to-7-segment IC, or via serial-to-parallel-to-7-segment IC), varying driver code implementation while keeping the interface fixed. It also comes with a nice assortment of Java library code for exploiting the Stamp’s hardware features.

I wasn’t quite ready to demonstrate the DS TINI during the JUG meeting, but have experimented further since. The TINI, like the Javelin Stamp has serial I/O, but in addition, physical interfaces for Ethernet, CAN bus, I2C, DS 1-wire, and iButton. It comes with a similarly rich set of Java libraries (along with the many of the standard Java 1.1.6 libraries including collections and network I/O) for working with its capabilities.

Here’s a link to a simple PLT Scheme (http://www.plt-scheme.org/) servlet (currently unavailable, Jan 2008) that connects to a Java server running on a DS TINI in my home with a DS18S20 temperature IC connected to its 1-wire adapter:

  

http://www.kepler.podzone.net:8080/servlets/david/get_tini_temp.ss 

The TINI is suitable for more ambitious yet relatively resource-low projects. If you want to see even more resource-constrained Java, check out JavaCard for smartcards. I worked on a team that developed a JavaCard VM for a smartcard development and test tool in the late ’90s.Here’s an embedded.com article about some alternatives to C for embedded system development: Java and Ada.

So folks, Java is not just for the desktop or web/Enterprise, but also for the embedded space.

About “Strange Quark’s”…

August 26, 2006

Thanks for visiting Strange Quark’s. In this first post I’ll tell you what I intend to write about and why I chose that name. In the late 80s I ran a “service” called Quark’s Cosmos on Australia’s Viatel, later called Discovery 40, pretty much the same as the UK Prestel (40 column teletext-style) system. The content of Quark’s Cosmos was focused upon astronomical and space mission news.

It was pre-Internet, so news items were distilled from traditional media along with regular snail mail from space agencies such as NASA, ESA, and occasionally NASDA (Japan) and the agencies of other countries such as Russian and India.

A highlight was that I was able to use the forum to provide up-to-date information about Neptune as seen through Voyager 2’s eyes in 1989 because of previous communications with the Tidbinbilla Deep Space Tracking Network near Canberra.

Quark’s Cosmos also had chat boards for these topics plus Sci-Fi and Philosophy along with running the odd astronomical quiz complete with prizes (books usually). Running Quark’s Cosmos was a labour of love and actually cost my wife and I money. Nevertheless, it was fun, rewarding, and appreciated by a lot of people.

With the advent of the Internet, Viatel and Quark’s Cosmos became less compelling. Competing with the richness of the Net became a zero sum game.

Much has changed in the last 20 years, but from a content and presentation perspective, systems like Viatel 40/Discovery and CompuServe were the ancestors of most of what we see on the Internet today. Long before Internet banking was available, Viatel had it for at least one large Australian bank. IRC, ICQ, blogs, all had some counterpart on these systems. The main difference is that the Internet is unbounded, unlike these older systems (and bulletin boards) hence the need for search engines.

I’ve been considering a blog for ages, and wanted to retain the “Quark” theme, but since I and the world in general are stranger than almost 20 years ago, Strange Quark’s place/blog seemed appropriate.

The main topics of interest to me these days are:

  1. Programming paradigms and languages
  2. Low-resource microcontrollers such as PIC, TI MSP430, AVR, 8051
  3. Amateur astronomy (generally sharing the night sky with others, planetary nebulae, the life & work of Johannes Kepler)
  4. Science Fiction books and movies
  5. Philosophy (in particular the Philosophy of Mind)

So, these are the topics I’ll mostly talk about. Anything else will be under clearly different categories. I’m doing this not because blogging is trendy but because I need a writing outlet, and believe I have some worthwhile things to share with others.

Finally, here’s a bit more general background about me:

  • I’m married (I mentioned Karen above) with a 6 year old son Nicholas and a 2 year old girl Heather.
  • I’m a professional developer having worked for Motorola, Freescale, the University of Tasmania, and ISPs (Vision Internet and Internode). Prior to that I was a nurse for the better part of a decade.
  • Several years ago I developed and released the ACE Basic compiler (Amiga) and LittleLisp interpreter (Apple Newton).

My long-standing and slightly antiquated website is at:

http://www.users.on.net/~dbenn

My email address is dbenn@computer.org

Stay tuned for more posts on topics such as:

  • Astronomy and Science podcasts
  • Web-based astronomy software under development
  • Java-based embedded systems
  • TI MSP430F20xx and PIC microcontrollers and rapid development
  • Reflections on personal loss (the odd one out, but something I need to write about).

That’s enough for a first post.