30 September 2008

My first Atmel program

I have been able to program an ATtiny2313 with a very simple setup:
  • 1 DB25, 3 resistors and one 20-pin socket
  • avreal32 Win software
  • computer with a parallel port ("LPT")
Even the laptop was able to drive the programmer. Although the female lab personnel (AKA wife) said the programmer doesn't look trustworthy, it did the job.

I can both read and write the uC. The "reading" ability is a huge improvement from my serial PIC16F84 write-only programmer, since I can write the chip and then verify what was written on it. This is how I know the chip was programmed with my code.

The commands for my LPT1 and my programmer:
READ: avreal32 +TINY2313 -ap -p1(0x378) -o0 -r a.hex
WRITE: avreal32 +TINY2313 -ap -p1(0x378) -o0 -w -c b.hex

Reading the chip displays:

v1.26rev0 (Aug 7 2008 17:52:48) http://www.ln.ua/~real/avreal
bug-reports, suggestions and so on mail to [censored]
Command: +TINY2313 -ap -p1(0x378) -o0 -r aaa.hex
Power ON
Device connected, TINY2313 detected
Chip not locked
Fuses
OSCCALs = 68 6A
CKDIV = 0
CKOUT = 1
SUT = 2
CKSEL = 4
DWEN = 1
EESAVE = 1
WDTON = 1
BODLEVEL = 7
RSTDISBL = 1
SELFPRGEN = 1
Reading CODE memory
.... done
Reset pin released
Power OFF


Fuse values are displayed in decimal, while the datasheet lists their meaning bitwise.

Unfortunately the success was only partial, since the uC didn't seem to produce any activity out of the programmed code.

25 September 2008

Optical system going NLOS

Thanks to the interest of a colleague in my optical experiments, I sped up the work on my MCW light receiver.

Using a 10mm red LED at ca. 30mA and the OPT201 without any lens or post-amplification I could make some spectrograms with Spectrum Laboratory.


First of all I studied the environment: the incandescent bulb produced a clear set of harmonics every 50 Hz, with those at n*100 Hz being stronger ("1"). Then the 520 Hz line is definately the laptop TFT dimmed backlight ("4"), since at full brightness the signal disappears. Notice the result of a mixing between 488 Hz MCW signal and the strongest 100 Hz harmonic ("2"): this certainly occurs at electrical levels, not optical.

Next was a ca. 4.5m LOS test, with the LED light overloading the sensor. Even the cameraphone could see it:


I used my CW memory keyer to send a meaningful message (pre-recorded holiday CQ) at the lowest possible speed, about QRSS0.5 (0.5 seconds per dot).

In total darkness except the laptop screen, the spectrogram looked like this:

A quick test at 15 WPM revealed a perfectly readable signal. The shade effect of a hand obstructing the light beam is surprisingly strong. A wav recording is available, if anybody wants to hear it.

Then I moved the TX further away in another room, for a total of 11.5 metres Non Line Of Sight (NLOS). Only after my eye had adjusted to darkness I could see some weak red reflections on objects in the intermediate room, but the spectrogram was faster:


There it is! My QRSS CQ was on the screen, fortunately not masked by the laptop backlight. Remember the receiver had no focusing lens whatsoever.

I forgot to measure the response of OPT201 with a 3.3 Mohm series feedback resistor. Next test could be 300m LOS still without lens on the receiving side.

Stay tuned! Or better.... watch out! :-)

22 September 2008

NiMH constant current charger

I started working on this circuit long ago, and never used it thoroughly.

Given that NiMH cells can be slow-charged at a constant current rate for a given amount of time, I built this circuit. Provided the timed slow-charge condition is verified, you can live without end-of-charge algorithms.

Some charging facts (if I remembered where I read this, I'd credit the author).
A NiMH cell, if charged at C/10, in 10 hours will reach approx. 66% of the fully charged state. You achieve the remaining 33% with 5 more hours. That's where the magic 15 hours come from.

My constant current circuit required a PNP transistor. I picked a BD646 from the junk box in a TO220 package. Since the transistor had to be floating from ground, I needed a way to attach it to the metallic enclosure for thermal dissipation without electrical contact.
Forgot about nylon screws, a search through the electronic junk showed this solution: wrap the transistor in what I believe to be a mica foil and then press it against the heatsink/box.

This is how it looks like:




I recharged a 9.6V pack while watching the temperature and the current. The transistor runs barely warm, while the power resistor heats up considerably.

The pack under charge will increase its voltage, thus effectively reducing the charge current, in a auto-stop fashion. But since this occurred quite early in my charge cycle, I had to increase the input voltage to more than 14V.

One word of caution about the plugging sequence.

Charge start: connect the power supply and then the battery pack
Charge end: disconnect the battery pack and then the power supply

Otherwise the pack will discharge into the power supply. Probably a 1N400x diode on the +Vcc line blocks the process and allows to use a timed AC socket.

02 September 2008

The Amateur's Code

I'm copying and pasting this text here for future personal reference. A Good Reading anyway!


The Radio Amateur is

CONSIDERATE...never knowingly operates in such a way as to lessen the pleasure of others.

LOYAL...offers loyalty, encouragement and support to other amateurs, local clubs, and the American Radio Relay League, through which Amateur Radio in the United States is represented nationally and internationally.

PROGRESSIVE...with knowledge abreast of science, a well-built and efficient station and operation above reproach.

FRIENDLY...slow and patient operating when requested; friendly advice and counsel to the beginner; kindly assistance, cooperation and consideration for the interests of others. These are the hallmarks of the amateur spirit.

BALANCED...radio is an avocation, never interfering with duties owed to family, job, school or community.

PATRIOTIC...station and skill always ready for service to country and community.

--The original Amateur's Code was written by Paul M. Segal, W9EEA, in 1928.


[...meanwhile in the lab a constant current NiMH battery pack charger has been completed and tested...]

28 August 2008

18 km per liter = 42 miles per gallon

I've read on CNN.com a long article about hypermilers. I've read on WIRED (April 2008) about a fake company that promised electric cars and, to go with them, a Smart Fortwo that scored an eco-friendly 37 mpg (15.7 km/l).

Yesterday I filled the tank on my FIAT Seicento (1100cc unleaded fuel engine) with 31,61 liters. I had driven 575km (357 mi), on highway, countryside (80%) and suburban, with an average 70 km/h (44 mph) speed limit. With some easy math it turns out to be 18,19 km/l (42.78 mpg). Cool!

My urban average is between 14 and 15 km/l (33-35 mpg) driving 20-25 km per day.

19 August 2008

Field Day Logging and the Dupe Sheet (on paper)

If you've browsed through my past posts, you probably know I like to do outdoor VHF contesting. Since I usually carry my station on my shoulders (from battery to antenna), there's no way I would take a laptop with me. Therefore all the logging is done on paper, using a homemade logbook.

I have produced and published two PDFs with either A4 or A5 size pages (scroll down my website to HAM Travel section), the latter being much more convenient when there is no chair and table at the operating position.

Each page obviously stores a limited number of contacts so soon the list of worked stations gets out of sight. In the old days without real-time computer logging, how did contesters avoid duplicated QSOs? Here's a tip I have not seen mentioned in the last years: use a dupe sheet!

What is it? The dupe sheet is a separate page where you copy all worked callsigns, sorted by the first suffix letter, after each QSO. If you turn page on the main log, the dupe sheet will stay under your nose for a quick lookup. During the post-contest log typing, the dupe sheet provides a callsign cross-check to minimize bad/quick handwriting errors.


The dupe sheet from my Alpe Adria VHF 2008 Contest.

From the picture you may also spot another field day tip: you need a sure-write mean of writing. Something that works below 0C/32F and upside down (as well as in absence of gravity). While a scalpel or a chisel might do, they're not fast enough for contest logging. A pencil does the job. I also carry a felt-tip marker (OK for low temperatures).

08 August 2008

Open project of keypad for FT-817?

I posted this request on the GQRP reflector.

I am looking for an external keypad to match my FT-817 that can be built at home. Has it ever been published on SPRAT?

I've seen a couple of commercial products whose cost is equivalent to setting up my own development station, since I can master both software and hardware programming.

Yesterday I operated 6 hours /P in the Alpe Adria VHF contest and noticed that I'd like to have direct access to, in descending order:
- VFO A/B control
- Power setting
- Direct frequency dial
- Metering control (Pwr, Mod, Alc, Swr)
- VOX on/off
- Operating Mode (but this control has dedicated buttons anyway)

If there is no known open (= free circuit diagram and microprocessor code) design, I will develop my own external keypad and share it.


I received no feedback, so either everyone is on holidays or the world doesn't need an(other) FT817 external keypad.


Update 2008-11-24: the IK1ZYW keypad is now real! See newer blog posts or its homepage.

06 August 2008

My QSL for 9A/IK1ZYW, Summer 2008

I had a little more than 50 QSOs from Rab, nevertheless I wanted to design a nice QSL front.



This originates from a digital picture I shot, some work on the computer and printed at the photo shop around the corner. I printed it in 10x13cm format, and will cut the excess bottom band to fall within QSL bureau 9x14cm limits.

The bottom band also carried an experiment: how small can the text be to stay readable (with magnifying glass, if needed)?

Using a pro service for printing is both cheaper (30 eurocents/pic in small quantities) and guarantees a longer lasting product than home printing.

I will honor all QSL requests for my contacts from 9A of July 2008. I am not sending out first.