Thursday, April 7, 2011

AVR with Eclipse and Ubuntu

I have not been playing that much with microcontrollers at all. I have an Arduino that I tried out some of the basic things with, but have not put it in any project. Now I want to use the AVR directly and in this case the tiny 8 pin attiny13.

I have developed a preference for AVR over PIC that I can not. at this point with so little experience, explain in a technical way why, but it is just more of a feeling. Some of the projects that I have an interest in use AVRs but maybe the main reason is that the Gnu compiler can work with AVR, so a free chain of tools to develop software is available.

I was able to buy quite a lot of these small AVR chips cheaply, but they were SMD, so the first thing I had to do was to solder it to a small pcb board and add a few headers for easy access.

The programmer I use is the 'swiss army knife' kind of tool called the Bus Pirate. A great tool that can be used for so many things. It is only around $30 and the case I put it in is an old DAT tape enclosure. There is a guide on AVRDude and Bus Pirate that I followed. By taking a look in the datasheet of the chip to be programmed, it is easy to hook up the Bus Pirate.

To do AVR development in Ubuntu 10.10 you have to install some packages. I have found a guide on this. It is in Swedish but I think you can understand the key points. You also should install the Oracle Java Distribution. After that, Eclipse Classic can be downloaded and then the AVR Development Plugin can be added.

Here is a screenshot of Eclipse. By taking a close look at the code you can figure out where this is heading.

Ok, so now the AVR is programmed, now over to the building and soldering, so an update on this project in a blog post, hopefully within 2 weeks.

Sunday, April 3, 2011

Simple direct conversion receiver - MRX-80

I have built my first analog receiver! This is maybe one of the simplest ones you can build ( a crystal radio might be simpler depending on how you count). The direct conversion receivers basically mixes the incoming signal with the local oscillator and the result is within frequency for our ears. The classic basic combo of ICs, NE602 and LM386 are used. The circuit is from the book "More QRP Power" from ARRL and is called the MRX-80. As you might guess it is for 80 m. 

The build is done inside an old box used for an Ethernet network hub. The BNC connection hole was already there but I had to to use a side of PCB material so I could mount the pots for gain and tuning. Yes, talking about the tuning, it is somewhat limited. I can change crystals and a diode is used as a varactor so a small swing of frequency is allowed, but I have not yet measured how big this is, maybe 1 kHz or so. The build is a mostly with leaded parts built ugly/Manhattan but all resistors are tiny 0805 smd, just because I wanted to try and see if it works. Maybe it does or probably not completely.  The build is not the prettiest, but if you see any bad choices of building other than aesthetic, please comment or if you have any other comments.

When I turned it on, the first thing I did was to measure the voltage out from the regulator. OK! I then turned my small Degen 1103 radio on and listened for the local oscillator. It was loud and clear so OK on that too! Then I connected my signal generator, but nothing heard, apart from noise. I started tapping on some connection and I heard them. So I guess the audio amp was working too.  Hmm, I started double checking other connections and soon found that I had connected earth connections between antenna and gain pot but not to the real earth on board. Then my test signal could be heard. When put in S9 mode it was OK, but not in S1. I wonder about what to expect from this simple thing. The real test will of course be when I try it with a decent antenna and see if I can hear any real on the air signals. 

I might have heard some today, or maybe not, because I never checked if they were present on another receiver. Next weekend I will go out to a 'quiet' place and listen. 

Below is a audio recording. Some signal can be heard, but QRM level is high so much noise. It does not sound as what I am used to what a radio should sound like. Either this is what a direct conversion receiver sounds like or I have some construction errors. I will bet on the last one. 

The sum up, a good build I think. Fun to do and easy. First small steps and more experience in radio homebrewing!

Update 2011-07-15:
The receiver has worked fine and the signal on the recording is SL0FRO by the way SM5-1252 Ullmar told me. 

Softrock Linux software

I have been using my little Softrock lite II SDR receiver on 30 m now for a while together with the SDR-Widget. I can only say that this little setup works great! Initially I tested it with Windows software (see previous post) but I want be in the Linux world. There are different software available to use with the Softrock receiver and the SDR-Widget. So far I have tried two, Quisk and GHPSDR3. As the SDR-Widget is cable of running in different setups (USB Audio version 1/2 and HPSDR) it was a great step forward when a unified firmware was released so that I can flip between them with just a 'reboot' of the SDR-Widget, compared to doing a real reflashing of firmware.

SDR-Widget control software
Below is a screenshot of Quisk with 192 kHz sample rate.
I have also tried the HPSDR protocol and the gHPSDR3 suite of software. The first screenshot is QtRadio, which I think is the most recent software in this still developing suite of software. The great thing with this is that is built for network use. A software called dspserver is running on one computer and the GUI on another (but they could of course be on the same box). Over the network the audio and screen updates is sent. I have also let others try the minimal GUI called jmonitor over the Internet! I will try these software a lot more in the future.

In this case I was using just a wire inside my apartment so a lot of QRM but there are a few CW signals that I am able to listen to.
Ghpsdr is another software:
Finally some pictures of the Softrock in a box  (Ikea as usual):

This is when I tried it at the club station: