Friday, March 28, 2008

80m Transceiver in an Altoids tin: Pixie 2

pixie2.jpgJust built a nifty little kit, the Pixie 2 from KennComm, a company that sells some very interesting bits and pieces..

A nice little kit, ideal for a beginner like me who keeps trying to learn Morse code (which of course is required to actually use this thing. I have it on 80m (3.58Mhz) but it can operate on any band up to 10m with some minor part substitutions.

US$29.95 plus some shipping if you are outside the US.

A nice little project for a cold afternoon. I do love these little things that people build into Altoids tins. Such a great form factor and so well shielded.

Wednesday, March 26, 2008

Harvesting parts from an inkjet printer

external.jpgEver since I attended a workshop on stepper motors at Dural conducted by Peter VK2EMU I've been watching for the site of an inkjet printer by the side of the road and this morning there was a rather wet Canon calling me...

After about half an hour of messing about the device was a wreck but these printers sure are a treasure trove of useful parts for the home robot maker: cogs, rollers, pulleys, switches, sensors and motors. Regrettably, this model doesn't use stepper motors but rather they seem to be DC motors with a rotary encoder linked to each one.wreck.jpg

The encoder disk is amazingly fine and it passes through an optical reader which I guess is rather like the encoder in a mouse. The markings are 7120 G516 but so far I haven't found a data sheet for them. The board has 4 wires coming from it so there's not too many options.encoder.jpg

Anyhow, despite my disappointment about the lack of steppers, I did score four very nice DC motors that seem to run well on about 3 volts and will be suitable for computer control or making little robots like

It's truly amazing the amount of perfectly good electronics that are available for free at council junk collection times.

Monday, March 24, 2008

A Chat with Ben and Pete - Episode 20

In this episode we chat about:
  • Ben's Time Capsule experience
  • OmniFocus 1.0.1 review
  • Safari 3.1
  • Bicycle news from Ben (he didn't get the African Hair Sheep gloves)
  • Ham Radio News from Pete
Subscribe in:

Saturday, March 22, 2008

Atmega8 audio oscillator

adcro.jpgHere's a simple sine wave audio generator. It generates a nice looking, and sounding sine wave by using a resistor A/D converter connected to 8 pins on port D. To the right is the waveform as displayed on a CRO. Running at 8Mhz (internal oscillator) it puts out a 400Hz tone.

adaudioboard.jpgI generate the 256 constants for the samples of the sine wave with a little python program - the output is pasted into the C source code. The board you see here is a nifty little target board from Evil Mad Scientist.

The resistor ladder is an R-2R design using 10k and 20k resistors. Here's the circuit I used.

The python code is shown here.

from math import sin, radians

for i in range(256):
degrees = i * 360 / 255
value = (sin(radians(degrees)) + 1) * (255 / 2)
print "0x%02x," % int(value),
if ((i + 1) % 16) == 0:

And here is the actual code for the chip:

#include // Defines pins, ports, etc to make programs easier to read
#define F_CPU 800000UL // Sets up the default speed for delay.h

#define DELAY_MS 0

const int sinevalues[] = //256 values
0x7f, 0x81, 0x83, 0x87, 0x8a, 0x8e, 0x90, 0x92, 0x97, 0x99, 0x9d, 0x9f, 0xa2, 0xa6, 0xa8, 0xac,
0xae, 0xb2, 0xb4, 0xb6, 0xba, 0xbc, 0xc0, 0xc2, 0xc4, 0xc7, 0xc9, 0xcd, 0xce, 0xd0, 0xd3, 0xd5,
0xd8, 0xda, 0xdd, 0xde, 0xe0, 0xe3, 0xe4, 0xe7, 0xe8, 0xe9, 0xeb, 0xec, 0xef, 0xf0, 0xf1, 0xf3,
0xf3, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfa, 0xfb, 0xfc, 0xfc, 0xfd, 0xfd, 0xfd, 0xfd, 0xfd,
0xfe, 0xfd, 0xfd, 0xfd, 0xfd, 0xfd, 0xfc, 0xfc, 0xfb, 0xfa, 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, 0xf5,
0xf4, 0xf3, 0xf2, 0xf0, 0xef, 0xec, 0xeb, 0xea, 0xe8, 0xe7, 0xe4, 0xe3, 0xe1, 0xde, 0xdd, 0xda,
0xd8, 0xd7, 0xd3, 0xd2, 0xce, 0xcd, 0xc9, 0xc7, 0xc6, 0xc2, 0xc0, 0xbc, 0xba, 0xb8, 0xb4, 0xb2,
0xae, 0xac, 0xaa, 0xa6, 0xa4, 0x9f, 0x9d, 0x99, 0x97, 0x95, 0x90, 0x8e, 0x8a, 0x87, 0x85, 0x81,
0x7f, 0x7a, 0x78, 0x76, 0x71, 0x6f, 0x6b, 0x68, 0x64, 0x62, 0x60, 0x5b, 0x59, 0x55, 0x53, 0x51,
0x4d, 0x4b, 0x47, 0x45, 0x43, 0x3f, 0x3d, 0x39, 0x37, 0x34, 0x32, 0x30, 0x2d, 0x2b, 0x28, 0x26,
0x25, 0x22, 0x20, 0x1d, 0x1c, 0x1a, 0x18, 0x16, 0x14, 0x13, 0x11, 0x0f, 0x0e, 0x0c, 0x0b, 0x0a,
0x09, 0x08, 0x06, 0x06, 0x04, 0x04, 0x03, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x03, 0x04, 0x04, 0x06, 0x06, 0x07, 0x09,
0x0a, 0x0b, 0x0c, 0x0d, 0x0f, 0x11, 0x13, 0x14, 0x15, 0x18, 0x19, 0x1c, 0x1d, 0x20, 0x22, 0x23,
0x26, 0x28, 0x2b, 0x2d, 0x2f, 0x32, 0x34, 0x37, 0x39, 0x3b, 0x3f, 0x41, 0x45, 0x47, 0x4b, 0x4d,
0x4f, 0x53, 0x55, 0x59, 0x5b, 0x5e, 0x62, 0x64, 0x68, 0x6b, 0x6d, 0x71, 0x73, 0x78, 0x7a, 0x7e

int main()
DDRD = 0xff; // port D all output
short int i;
for(i = 0; i < 0xff; i++)
PORTD = sinevalues[i];

Thursday, March 20, 2008

Got AD9851 Direct Digital Synthesiser working.

There's a lot of interest in ham radio circles around the new DDS chips which can act as a high stability VFO over a wide range with very fine control.

DDS CRO.jpgAfter hearing about them at a NSW Home Brew meeting, I purchased an AD9851 on eBay and have had about a week of frustration trying to program the thing. You need to send them a clocked 40 bit sequence to set the frequency.

I have been playing with a variety of Atmel AVR processors on various boards and in the end I found some wonderful software for the AVR Butterfly board by Stephen Weber, KD1JV, which has several versions including one for a transceiver and another for a straight VFO. (I'm using the VFO version). Programming was via an AVR ISP MkII rather than the serial protocol, I'm sure either would be fine.

The AVR Butterfly board includes a display and a 4 way rocker switch (plus push) that is used to control the frequency.

DDS Display.jpgNext steps are to put this in a nice box with more robust buttons, output filtering and amplifier. In summary, this gives the builder a very flexible oscillator for not many dollars. It's certain to become a core part of many future radios coming out of the Marxy lab in the future.

So, thanks so much to KD1JV for his excellent software, supplied with source, that has got me started and thanks to members of the NSW Home Brew group including John VK2ASU for his encouragement and offer of a chip in case I'd "smoked" mine.

An AVR Butterfly is about US$20 (a bargain) and I paid AU$50 for the AD9851 plus 30Mhz oscillator and a carrier board, which I consider pretty good all up.

DDS in box.jpgI've put this prototype in a little box to serve as a portable digital signal generator. Tried to run it off two AA batteries but the voltage was a little low for the 30Mhz oscillator to work reliably. (The AVR Butterfly is perfectly happy at low voltage though).

Saturday, March 15, 2008

ATMega8 driving HD44780 LCD

AVRLibLCD.jpgBaby steps here folks. I've just got my Atmel ATMega8 to drive an HD44780 LCD using the 4 bit parallel interface. (Previously I've been using a serial interface which is much simpler).

All the heavy lifting is done by AVRlib, a great library with lots of helpful libraries for driving external hardware.

Beware, there is a very similarly named library AVR-Libc, which also looks good.

I'm driving the LCD in "Port interface" mode and using the 4 bit data mode. As speed isn't important for my application I've chosen to save the extra 4 dataport pins.

Here's my config from lcdconf.h:


// Enter the parameters for your chosen interface'
// if you chose the LCD_PORT_INTERFACE:
// port and pins you will use for control lines
#define LCD_CTRL_RS 2
#define LCD_CTRL_RW 3
#define LCD_CTRL_E 4
// port you will use for data lines
// access mode you will use (default is 8bit unless 4bit is selected)
#define LCD_DATA_4BIT

My wiring for the pins on the LCD circuit board is as follows:

  1. Vss 0V

  2. Vdd 5V

  3. Contrast Pot 10K wiper

  4. RS - C2

  5. R/W - C3

  6. Enable - C4

  7. D0 No Connection

  8. D1 No Connection

  9. D2 No Connection

  10. D3 No Connection

  11. D4 - D4

  12. D5 - D5

  13. D6 - D6

  14. D7 - D7

  15. No Connection

  16. No Connection

Many thanks Pascal Stang!

Monday, March 10, 2008

A Chat with Ben and Pete - eposide 19

iPhone 2.0
This week we talk about:
  • About the podcast
    • Change of name?
    • Suggestions and Feedback? Perhaps we should talk in more depth about topics?
  • iPhone 2.0 software launch and SDK
    • Ben hasn't been able to get the SDK yet:
      • Friday signed up to get the SDK and all day the email link didn't work
      • Saturday email link worked, logged in to find a page without functionality
      • Hit a link to download SDK and got back to the register to download page again.
    • Engadget posts an excellent SDK comparison chart
  • Internet Explorer 8 beta
    • Supports CSS 2.1 and they have open sourced their CSS test suite
    • Mashups built in:
      • Activities. You can do things like select an address, right click and go straight to maps (or see a preview in the menu)
      • Web Slices. A good example is eBay where you can follow an item and place a bid directly from the toolbar
    • They're not going all out. SVG is still unsupported
    • It has a javascript debugger!
  • Google Sites
    • You need to have your own domain with a email account at that domain to get started
    • Features:
      • It uses a wiki style of editing of pages
      • Very simple “list” feature that can be used for simple database tables
      • Built in search
      • Navigation tree
      • Editable nav bar, logos etc
      • Create page: web page, dashboard, announcements, file cabinet, list
        • Dashboards are made up of “gadgets” such as image, calendar, document, picasa web slideshow, presentation, spreadsheet, video, recent items…
    • It certainly is designed to bring together all the Google Apps
  • Silverlight 2
    • We all saw the impressive World Wide telescope demo at Ted, and the intro to the technology at last year's Ted
    • The Hard Rock Cafe launched it's new memorabilia web site at the mix conference with a very impressive demo of Seadragon in Silverlight 2 (it's live here)
    • A good article about data and web services support in Silverlight 2 is on The Register
      • SOAP support by importing WSDL / generic XML support (like YUI?) / JSON support
      • No REST however.

Sunday, March 09, 2008

PSK31 on 20m is becoming very active

99% of my Ham radio activity is now on PSK-31. This interesting mode is very efficient and lets me chat, keyboard to keyboard, with interesting folks around the place. Kind of like Instant Messenger but with radio for transport instead of the internet.

I was having reasonable success but thanks to the kind assistance of VK2HRE in Geelong, I've now got my RF Feedback issue somewhat under control.

Running just 5W into a simple 20m dipole a little over the roof, I have chatted with Japan, Bourail (near New Caledonia), Bribie Island (off Queensland), New Zealand, NSW, QLD, VIC, SA, and Tasmania.

Picture 2.png

Initially, I tried 80m and 40m but didn't hear much activity, probably mostly due to the interference I suffer here in the suburbs probably from switching power supplies. Now that I've switched to 20m, 14.070Mhz and thereabouts, the band has really come alive.

In case you haven't seen this before, each of those vertical traces is someone talking, none of the signals shown above are very clear but probably 60% readable.

Some of the stations seem to be only interested in collecting contacts, they exchange information and then say good bye. There are some very nice folks out there keen to have a real chat.

Update: had a brief contact with RW├śLM who is located in Vladivostok, Russia. This is my furthest contact so far and amazing given that I'm running just 5W here.

Saturday, March 08, 2008

Atmel Atmega8 ICSP on breadboard

icsp.jpgOver the past year, I've given up on the PIC micros and have been getting up to speed with the AVR ATMega processors. My favourite is the ATMega8 and 168 which come in a 28 pin DIL package and have loads of I/O.

I've purchased a few boards, made a reasonable one, but for prototyping I keep coming back to the breadboards.

First off I made a simple PC parallel port programmer which worked but was rather inconvenient for me and would stop the project running after programming. In the end I purchased the AVRISPMKII which is really excellent and works perfectly with my Mac. This device has some smarts which set it apart from the simpler devices out there. The multi-coloured LED tells you if it's seeing the voltage it expects to see for example.

The prototyping board is a really excellent on I bought from Parallax some time back called the "Professional Development Board #28138" it has on board switches, LEDs, audio amp and speaker, potentiometers, seven segment displays, serial port, real time clock etc etc. Of course it can be used with any CPU.

Anyhow, the news here is that I've made up a little adapter board that converts the 6 pin In Circuit Serial Programming into both the 10 pin version, my own in-line version and now a plug with fly leads as shown above that I can plug directly in to a proto board.

The objective of all this madness is to build some ham applications of which there are many.

I'm using:

So far I've got useful things going such as reading a value from an analog to digital input and writing it out via serial to an LCD display.

I notice that the ATMega8s come set to run at 1MHz with the internal RC oscillator, this works just fine but I turn them up to 8MHz internal and find this accurate enough to do serial at 9600 baud.

Friday, March 07, 2008

Flashback to MacOS 9 - we've come a long way

os9desktop.pngA sequence of computer hand-me-downs here left us with an old PowerPC iBook with no owner. Leopard won't run on it and I'm so in to all the Leopard features and multi-touch stuff that it's getting hard to use.

Digging through my disk collection I found the original recovery CDs and thought I might travel back in time and try running MacOS 9 again.

Oh nostalgia!

It wouldn't connect to my WPA2 encrypted network so I shared the ethernet from another Mac and that worked just fine. The old Internet Explorer can't render many popular pages, this blogger page was rather scrambled and ironically, the Low End Mac page was unreadable.

os9sherlock.pngRandom notes: The old launch bar along the bottom of the screen was very functional compared to the dock we have now. Fonts all look rather jagged. Sherlock doesn't work any more, there must be a proxy that no longer exists.

No Google in there at all!

There is an early iTunes and iMovie but really what were we thinking with that brushed metal look?

It certainly shuts down faster than MacOS X but I would have to say that Tiger runs faster on a PowerPC G3 than MacOS 9 does which is certainly to the credit of the OS team who have done amazing optimisations over the past 8 years.

Would I go back? No way. I am totally in to Leopard and totally addicted to having a Unix shell and all those great tools available to me. I can't imagine what we'll be running in 8 years from now.os9About.png

Gosh, plenty of free memory there. I used it for a while, had a poke around some of the old apps just for fun. I wonder if I can install some sort of linux on this thing?

Tuesday, March 04, 2008

A seminar with Michael Reichmann

Reichman.jpgI had the great pleasure of attending a seminar presented by the author of one of my favourite photo web sites, the Luminous-Landscape. Despite a great turnout here in Sydney, Michael circulated around and I was able to have a personal chat, ask a few questions and even snap a picture.

Michael showed a series of images, many were familiar from his web site, and spoke about his view of where we are in photography today.

Basically, it's a very exciting time. Technology is advancing faster than ever. In the film days, Nikon would release a new "F" camera about every 8 years, now it's almost every 8 months. Are they getting better, yes, do we need to buy every new model... no.

The talk ranged over all the hot topics in photography, is digital higher quality than film (yes), is it ok to adjust the scene or clone out powerlines, an interesting debate.

Some interesting insights about the new techniques of selective colour de-saturation, high dynamic range, and focus bracketing, were shared.

Michael is a pragmatic photographer with a straight forward, ethical approach. I am grateful for the effort he puts in to sharing his experiences and promoting this fantastic subject.

Sunday, March 02, 2008

Enjoyed the local Model Railway Exhibition

WarringahModelEngineers.jpgThis weekend is the North Shore Railway Modeller's Association 36th Model Railway Exhibition at Forestville. I always enjoy these shows but for some reason my two daughters were too busy to attend this year.

It's a wonderful sub-culture with lots of great craft being done by talented enthusiasts. I particularly like the work of the Warringah Model Engineers. These folks fabricate machines out of metal and are clearly very skilled with the metal lathe. I understand that you can now buy a decent metal lathe for around AU$3,000 which will allow you to work aluminium and brass.

Members build things like petrol motors, steam engines, and stirling engines (including one so efficient it runs on the heat of your hand).

The club meets on the second Thursday of each month at the Urobodalla Hall, Aquatic Drive, Allambie Heights, Sydney.

I mention this fact as they don't have a web site. (I guess they're hanging back to wait and see if this internet thing will last).

Saturday, March 01, 2008

Listening to a satellite on a hand held receiver

satellitePass.pngI've heard about the amateur satellites for years but never tried to listen in. I guess my assumption was that a directional tracking antenna would be required, but it seems with at least a recent device, AO-51, that's not the case.

It only passes over for a few minutes, when it does, and you find out where it is here. I entered latitude and longitude for Sydney (34 south, 151 east) and clicked predict.

This morning there was a pass that looked perfect so I wandered out into the back yard with a hand-held receiver tuned 435.3Mhz and with the antenna positioned horizontally, I was able to hear snippets of people talking.

Sorry about the poor quality, this was recorded with a little dictation recorder held up to the speaker.

Anyhow, this is very encouraging. I understand it's even possible to talk back through the satellite with a hand held. The uplink is on 145.92Mhz.

Because of doppler shift, you have to tune up as the satellite approaches and down as it runs away.

There's a nice page of suggestions on the Amsat site.