Covered Topics

Please see the list of the topics I've covered. It's located near the bottom of the page. Thanks for stopping in!!

Monday, April 11, 2011

Ten-Tec Short Wave Receiver




Short wave and Amateur (ham) radio are good for keeping in contact with the outside world during emergencies, and as an alternative source of news and information. One only has to look to the recent events in Egypt to understand the need for other means of staying informed on breaking news. This, and the recent events in Japan, impelled me to obtain a general coverage shortwave receiver. Years ago, I built a converter that allowed me to receive the 9.5-10 MHz and 11.5-12 MHz bands through a car AM radio. This converter still works, but I wanted more bands and the capability to receive CW (morse code) and SSB transmissions from amateur radio operators. The problem is that unlike 20+ years ago, decent short wave radios aren't available to the average American consumer for an affordable price. Nearly all have digital tuning that mutes the audio while you are tuning. That is practically worthless when you are tuning around looking for a particular station, as one generally does when listening to short wave. Most of my listening does NOT involve typing in a known, published frequency on a keypad; it involves tuning around, looking for an unpublished station. The few cheap radios with analog tuning are likewise so bad as to not be worth having, in my opinion. As a 'starving' grad student, I need something that works but doesn't cost $1000+ . I could build one "from scratch", as I did the converter, but I don't have the time to invest in designing, testing, troubleshooting, re-work, ... that such a project would entail. And so I looked into kits.

After much searching on the net, I found Ten Tec. Their products are built in the USA, and they have a number of relatively inexpensive kits for both short wave receivers and amateur radio gear. They make a 9-Band short wave radio, the Model 1253, as well as a less expensive Model 1054 which covers 4 bands. Both the Model 1054 and the 1253 are a Regenerative type receiver. This design, when carefully engineered and constructed, offer reasonable performance for a cheap price, and were often used years ago. I built one from a Radio Shack kit when I was in grade school. While that worked, it was very unstable and it was quite prone to "hand capacitance" effects. I was skeptical of building another one at first, but a demonstration on you-tube of the Model 1253 convinced me to give Ten-Tec a try.

The unit I really wanted was their model 1253 9-Band SW Receiver kit, priced at $99 USD. They told me that they are not currently selling these because a particular diode used in the band switching circuitry is unavailable. So I defaulted to the Model 1054 4-Band receiver priced at $39 US. These were in stock; I ordered one on a Friday, and had it within about 4 days. I also ordered the matching $7.99 aluminum case, but that is on back order and will (hopefully) arrive in a few weeks.



The Kit and Technical Details:
The manual was easy to read and follow, though there were some corrections and addendums that looked almost "pencilled in" in some instances. The circuit uses 3 FETs, 2 bipolar junction transistors, and an LM386 audio amp IC. One of the FETs acts as an RF amplifier. This is a good design feature - isolating the antenna from the rest of the circuit and mostly prevents it from radiating RF through the antenna. Tuning is accomplished with a varactor diode controlled with a potentiometer. The regeneration control is also a potentiometer. Another trimmer potentiometer serves as an attenuator to keep very strong signals from overloading the 'front end'. The circuit uses two 9-volt type batteries: one for the RF section and the other for the LM386 audio section. As explained in the manual, this was done to minimize problems for beginning kit builders in getting the circuit to work properly. Band switching is accomplished with two push-button switches. These are operated in four different permutations to select the different bands. (See the picture of the front panel - it's pretty straight forward) Note the blue LED I added to the front panel as a power-on indicator lamp. Though I had to drill another hole in the front panel to accommodate the LED, the PCB has a spot for the LED and dropping resistor. The LED is powered by the audio amp battery through one of the DPDT power switch contacts.

I was able to fully assemble the kit within two and a half hours.

Testing, Use, and Operation:

A VERY USEFUL thing to have around is another (borrowed) short wave receiver OR a crystal oscillator with crystals that fall within the bands of the receiver - you will need one or the other of these to properly calibrate your radio and know what parts of the bands you are tuning.
I was able to use my old converter to check the alignment on Band #3 - the 8.5 - 10.2 MHz band. That still leaves the other three bands in question, as far as calibration goes. I can use my 40 meter ham transmitter with a 50 ohm dummy load for checking Band #2.

This receiver does work. Using a 25 foot random wire antenna lying on the floor inside my house, I have received WWV time signals from Ft Collins, CO; China Radio International; many Latin stations; and numerous religious stations. That said, here are some more detailed observations and critiques:

1) The regeneration control is quite "touchy". The manual tells you, as part of the initial setup, to adjust a certain trimmer potentiometer such that the front panel regeneration control will start regeneration at about half of its rotation. Mine starts VERY ABRUPTLY at between 1/8 and 1/4 turn - I cannot get it to do better than this. I double-checked to make sure I got all the right parts installed in the right locations and in the right direction, in the case of polarized components.

2) The audio amplifier is an LM386 IC. These have the advantages of being cheap, use a low parts count, and will drive a small speaker to a nice volume level. On the flip side they are electrically noisy, and suffer from high distortion levels. I'd much rather have a decent quality audio section based on a NE5532, or similar, audio op amp (these are used in audio mixer panels). I'd GLADLY give up speaker volume, using headphones only, to have a better audio circuit!

3) One VERY GOOD thing that struck me was the stability - I didn't notice much thermal drift at all, and "hand effect" is minimal. Ten Tec got that right!

4) Sensitivity is good, though you have to get the 'feel' of the regeneration control to maximize sensitivity and selectivity without distorting the audio. This tends to be true of any regenerative type radio.

5) The silk screened labels on the front panel and PC board are of excellent quality. If the case ever does arrive, this kit will have a very professional appearance.

6) Tech Support is lacking - I wrote tech support an email regarding the regeneration control almost a week ago, and still have NOT heard ANYTHING from them. NOT ZESTY AT ALL - I expected MUCH better from these people!!

7) A SAFETY NOTE - if you have the volume turned up to a normal listening level and the radio goes into full regeneration, the squeal is deafening - especially when wearing headphones!! You can DAMAGE your ears if you are not careful. An audio limiter circuit or automatic volume control would be VERY nice here. Until I can do something about this, I turn the volume down to almost minimum while adjusting the touchy regeneration control.

8) Come on, Ten Tec. The manual I got with my kit has a 1994 publication date! You guys can afford a 2011 update to your manual with all the corrections, revised part numbers, ... so it doesn't look like the notes I've scrawled during college lectures. I'd be very happy to write you a proper manual for reasonable compensation.

Conclusion:
All in all, this kit is, in my opinion, worth the $39 US spent on it. It's a great introduction to radio and electronics for the beginner, and is a very worth-while father-son (or daughter) project. With certain improvements I plan on making, it will be a usable radio for emergency situations or for getting alternative news.

I intend to do some modifications such as adding a dual 9-volt regulator circuit that can be fed from an external 12 volt battery, and possibly adding a band spread control for better selectivity in crowded bands. I want to build my own improved audio section based on a decent audio chip. I would also include an active filter for CW reception and a limiter to prevent hearing damage from loud noises.

Here is a link to their website:
http://www.tentec.com/

For my follow-up post, see http://inkarlslab.blogspot.com/2011/05/ten-tec-model-1054-shortwave-radio.html

Sunday, January 23, 2011

Which laptop computer is most reliable?

Readers of my blog will recall my recent post regarding Dell laptop computers.
See http://inkarlslab.blogspot.com/2010/12/why-i-wont-buy-dell-laptop-pc.html.

I need a laptop for graduate school and have been looking at HP and Acer laptops at my local big box stores. Fortunately I did some research on those before making a decision.

The following two articles might be of interest to those who are shopping for a laptop PC.

http://www.pcworld.com/article/211402/reliability_and_service_laptops.html

http://www.pcworld.com/article/211074-2/the_tech_brands_you_can_trust.html

Hope this information is of use to someone out there.

Sunday, December 26, 2010

Why I WON'T Buy a Dell Laptop PC

It's almost January - the start of the Spring 2011 college semester. With my impending graduate school coursework comes the need for a laptop computer. I have been to several stores during the past several weeks, shopping price v.s. features. The college book store offers what seems like "sweetheart deals" on Dell laptops; you simply pick out the recommended machine based on the academic department for your course of study. While this seems like an easy option, and the package had lots of goodies thrown in, I was still put off by the $699 price tag. I ask myself "Do I really need all this or will a $349 Acer at Wal-Mart do as well?" Since I really don't yet know how much computer I really need, I decided to get advice from my instructor based on the actual demands of the curriculum before making a purchase.

One brand I have ELIMINATED is Dell - I will NOT have one of these unless some kind soul gives me a free one. Even then, I'd likely sell it on eBay and buy something else. Here's why:

A Descent Into (D)ell:
Recently, a neighbor asked me to look at his laptop and see if I could repair it. His girlfriend had dropped the machine and it had landed directly on the charger power plug, while it was still connected. This damaged the DC power connector on the laptop and the unit would no longer charge or even run off the AC adapter.

To make a very long story short
I replaced the connector, reassembled the laptop, and it still won't work from the AC adapter. Voltage checks with a DVM show all the connections to be good and that the AC adapter is supplying the proper voltage. The computer runs just fine from the battery; problem is right now there is no way of recharging the battery - and said battery is nearly depleted. On doing some online research, I found out Dell uses a special ID chip in all its AC power adapter/chargers - as well as its batteries. This ID chip "talks" to one located on the motherboard. If the computer does NOT recognize the power adapter/charger as a genuine Dell artifact, the machine will not charge the battery and may not even run, as in the case of my neighbor's unit. Same with the battery - if the computer does NOT recognize the battery as a genuine Dell artifact, it will not turn on.

During the fall, my neighbor's DC power connector got shorted out as a result of being smashed. Evidently this resulted in part of the ID system being damaged and disabled.

For more detailed technical information see the following links:

http://getsatisfaction.com/dell/topics/dell_laptop_wont_recognize_power_adapter_or_charge_battery

http://www.laptops-battery.co.uk/blog/dell-ac-power-adapter-type-cannot-be-determined-solution/

But wait, It gets even worse.
From my research, I've found that these chips fail regularly in both the AC charger units as well as the motherboards. MANY folks have been forced to buy replacement batteries and chargers because their ID chips and/or the three-pin charger power connectors got loose enough where the data line didn't make good connection any more. Dell's solution - buy new accessories and if the problem persists, replace the motherboard, a $330 dollar item as quoted to me by Dell tech support.

Several web sites have commented on the poor engineering and flimsy construction of these things but Dell continues to make them the same way.

While some other laptops also have ID chips in the batteries, I've found the Dell machines seem to garner by far the most complaints online.

A Possible Workaround
If you are in my neighbor's situation and don't want to or can't afford to shell out several hundreds of dollars to fix the problem, there is an external charger that will communicate with the battery's ID chip and thus be able to charge it out of the laptop.

http://www.laptop-junction.com/toast/content/standalone-laptop-battery-charger-dell-laptops

This is definitely a kluge, since you cannot simply plug the machine into AC power when the battery gets low and keep working. However, for those who cannot afford to replace the motherboard, or their entire machine, this is at least a way to retain partial use of it until a later time.

Conclusion
For those of us in the market for a new laptop, Let the buyer beware! If I can, I will select a machine that does NOT use multi-pin power connectors and ID chips for batteries and chargers. This, by itself, eliminates a potential source of unreliability in something I will have to depend on to get work done.

I also would like the option of running mine on off-grid power WITHOUT having to resort to a power inverter to feed the AC charger. Clearly a Dell would NOT be compatible with a home made battery supply or a solar panel without major internal hacking.

In view of the fragility of laptops and how difficult they generally are to repair, I highly recommend buying a 2-3 year extended warranty if the cost of such is no more than 1/3 of the everyday price of a comparable new machine. Even a cheap, "bottom of the barrel" laptop is a big enough investment that one would want to use it for at least 3 years - far longer than the 90 day to 1 year that most manufacturer's warranties last.

Friday, November 19, 2010

Using gcc and g++ To Compile Programs In A LINUX Or Windows Environment

Many LINUX and most UNIX users are familiar with the gcc and g++ compilers. GCC stands for the "GNU Compiler Collection". GCC supports C, C++, JAVA, and a few others. GCC and g++ are available for free for most distributions of LINUX and UNIX. Many folks have used these utilities for both school projects as well as actual production development. The "GNU Compiler Collection" is ideal for developers, students, hobbyists, or anyone else wanting to work with or learn C/C++, JAVA, or Fortran on a shoestring and NOT shell out major funds for a commercial product. CygWin g++ and MinGW are designed for Windows machines; I've posted a link concerning this near the end of this post.

The gcc utility supports C, whereas g++ also supports C++.

GCC may be operated either from the command line or via a graphical IDE (Integrated Development Environment). Some folks also use it from within the vim or emacs text editors. I will cover the Code::Blocks IDE environment in a future post.

These are operated from the command line using commands such as the following:

gcc file.c

or

g++ file.c

Various command line switches such as -o, -g, ... tell it to save to a specific output file name, use the gdb debugger, etc.

The gcc and g++ compilers, by default, output to a file named a.out, unless you use the -o switch.

To compile a program and output to a filename of your choosing, such as "My_File", you would do the following:

gcc file.c -o My_File

To quickly test my compiler, I typed out the ever popular "Hello World" program in my text editor as shown below:

#include

main() {
printf("Hello from Karl's Lab!\n");

return 0;

}

and saved it as "Hello_Test.c" in my home directory. I wanted an output file called "Hello_1". I also wanted debugger information. Here's the command I used:

gcc Hello_Test.c -g -o Hello_1

The "-g" switch activated the gdb debugger; the -o Hello_1 part told it to name the output file "Hello_1"; "the "Hello_Test.c" part told it the name of the source file to be used.

When I typed "Hello_1" without the quotes at the command line, I received the following output:

Hello from Karl's Lab!


See a Compiler error:

In C, you must use the ";" symbol at the end of a statement. I wanted to see how gcc responds to an actual error, so I removed the ";" symbol from the "printf" line in the code snippet above, then saved and compiled the code as before. Here's the message it returned:

Hello_Test.c: In function ‘main’:
Hello_Test.c:7: error: expected ‘;’ before ‘return’

The first line of information shows the function - "main" - the error occurred in. The second line of output shows which line number the error occurred in and there is a ";" symbol missing in the code. While the actual typo was in line 4 of the code, the 'return' statement at line 7 is where the compiler errored out. With this output, you are at least given somewhere to start in trouble-shooting your code.

See the gdb debugger work:

Suppose your working directory is /home/mike/c_progs, and your executable is My_File. The command you would enter at the command line is:

gdb /home/mike/c_progs/My_File

You will get something like the following:

Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...
(gdb)


At this (gdb) prompt, RUN "My_File" by typing "r" (without quotes).

(gdb) r

Starting program: /home/mike/c_progs/My_File
Hello from Mike!

Program exited normally.


This shows the program's output (Hello from Mike!), as well as that it executed without any errors or warnings.

When you are finished working, EXIT the gdb prompt by typing "q" without the quotes at the (gdb) prompt. This exits the debugger and returns you to the UNIX shell prompt.


Here are some good links on using gcc and g++ :

GCC's Homepage - Look here for the manuals to whatever version of gcc you have.
http://gcc.gnu.org/onlinedocs/

http://www.network-theory.co.uk/docs/gccintro/


Some good info for getting g++ for a Windows machine:

http://cocoon.cs.odu.edu/cocoon/~cs252/open/yourOwnCompiler/allPages.html


Here are some links to a good tutorial on the gdb debugger:

http://heather.cs.ucdavis.edu/~matloff/UnixAndC/CLanguage/Debug.html#tth_sEc3.2.1

and

http://www.cs.cmu.edu/~gilpin/tutorial/


The GCC Homepage:

http://gcc.gnu.org/

Monday, November 15, 2010

Test of Ubuntu 10.10 "live" CD




Yesterday I tested Ubuntu 10.10 - Maverick Meerkat "live" CD release.

After downloading the iso file and burning it to CD, I booted my dual core 1.8 MHz machine to it. It took about 2.5 minutes to boot from the P.O.S.T. screen to the desktop. As I said in my last post, this is about typical of my experience with a "live" CD boot.

Ubuntu 10.10 auto-detected my HP printer and prompted me to install the HPLIP utility and drivers. Very cool!

Other observations:

1) This distribution has Open Office
2) Screen capture applet shows in the screen captures here - I suspect this is a bug
3) NO Gnu Image Manipulation Program (GIMP)
4) The gcc compiler does come with the "live" CD
5) The buttons to close, expand, or reduce active windows have been moved to the upper left-hand side of the windows. Why Canonical, the makers of Ubuntu, decided to do this, I don't know. I'm used to these functions being in the upper right hand corner of the window and prefer it that way.
6) Still the same GNOME desktop - the "Unity" desktop we've been hearing about lately is to occur in an upcoming "11" release.
7) As with Fedora 14, setting up my broadband access was a snap. A browser window may be seen in the following screenshot



I did not bother to try it on my 800 MHz Pentium III machine due to hardware issues.

You can get your own copy of Ubuntu 10.10 here:
www.ubuntu.com