Archive | May, 2020

New Encoder – QSD Receiver

13 May

A couple of posts ago, I talked about the difficulties I was having with the cheapy mechanical encoder as it wears out. There are software methods to prevent acceptance of bad encoder values but they only result in skipped steps, not correction of the issue that caused the skip. Besides, cheapy mechanical encoders typically only have a relatively small number of steps per revolution, requiring spinning like crazy to traverse the band. That’s how it wore out. Lastly, I prefer the silky smooth feel of the tuning knob on a high end rig. Today I started down a path to fix that using this optical encoder I purchased on EBay for about $15Hand Wheel Pulse Encoder 100RPM 5V CNC System Engraving 4 Terminal Eletronic

It puts  out 100 detented encoder values per revolution. As it is, the detents are pretty mild, but I opened it up and removed the detent mechanism, so now it is silky smooth. If you’re tuning at 100 hz/step, then this results in 10 khz per revolution, a very comfortable rate. However, due to the high rate of output changes per revolution, you can’t poll it in the code’s main loop. It just wouldn’t keep up. I’ll be using interrupts to process the output, which is what I’m doing with the present encoder.


More Firmware Infrastructure – QSD Receiver

3 May

Click Here to see the project from the beginning

As is often the case in firmware-defined hardware systems (“Embedded Systems”), there is a constant interplay between firmware and hardware as the design progresses. This system is no exception and the time has arrived to implement some firmware infrastructure before the next major hardware addition. I’m speaking of a fast A-D acquisition process that can capture audio samples for the coming AGC system. These samples will be used for the S-Meter and the firmware controlled AGC processes.

In order to get accurate and regular samples of real-time audio, we need to sample it at least twice the rate of the highest frequency we want to capture. Trying to do this in the main code loop or by using the Arduino analogRead() function would be way too slow and too irregular. We need some way to capture samples much faster and without interference from other code. My solution involves setting up the A-D hardware sub-system to ‘free run’ in the background at a fast rate defined by an on-board timer. Then another hardware timer, running at a slower rate, can pick up a sample at regular intervals. This technique doesn’t tie up any processor throughput except to respond to the interrupts created by the data collection timer.

If done properly, this process can get samples from multiple A-D ports at varying user-defined rates with little to no interaction between measurements or significantly slowing down the main loop. This allows one very fast rate for audio signal sampling, another slower rate for handling events from the rotary encoders, and an even lower rate for measurements that aren’t very timing critical. I actually had this code from a project I did with the uBitx board. Today I snagged that code and got it working in this project.

Now I can move on to the voltage-controlled audio amplifier, the software defined AGC system that controls it and the S meter functionality that is a byproduct.

Encoder Frustrations – QSD Receiver

2 May

Click Here to see the project from the beginning

I’m presently using one of those cheapy 20 pulse per rotation mechanical rotary encoders from Ebay.

The good news is that they’re cheap, about $1.00 if you shop around. The bad news is that contact bounce becomes worse as they age. I have enough experience ‘debouncing’ these things, with hardware, with software and even with sequence decoding state-machines to know that they eventually wear out and become problematic in some way. That’s the point I’m at now. Time to look at something better.

Some time ago, I purchased a couple of these 100 PPR optical encoders, also on Ebay. They can be had for around $15 if you shop.

Although the next step planned in the radio evolution is to get the TDA7051A voltage controlled audio amplifier going, retrofitting this encoder could jump to front and center as my frustration with the present unit grows.



Looking Ahead – QSD Receiver

1 May

Click Here to see the project from the beginning

As I get closer to having everything working to my satisfaction, I’m beginning to look ahead to make the project reproducible by others. An obstacle for many might be that I use SMD components extensively, and many builders might have issues there. Therefore, before the next round of PCB redesign, I am modifying all the component PCB patterns so that either thru-hole or SMD components can be used. For all the common components such as resistors and capacitors, I have a new PCB pattern that looks like this:


This pattern will accept SMD hand-soldered components up to 1210, thru-hole 1/4W resistors on-end, or thru-hole capacitors with lead spacing up to 0.15″. I understand that it is not a recommended practice to put holes in SMD pads if the board is to be machine soldered, but I doubt if anyone will do that.

I intend to incorporate provision for SOIC-to-DIP adapters (below) into any redesigns so that the builder can solder DIP’s and SOIC IC’s directly to the main board or use the adapter board to simulate a DIP. With the DIP option you can socket the IC, which is useful during prototyping and debugging. I intend to post all the schematics, the PCB Gerber files and Digikey/Mouser part numbers as well as instructions for how to order custom PCB boards really cheap.

My first redesign will probably be the QSD detector board, as I’m not totally satisfied with the circuit architecture I chose there. I hope I can fit everything with the new larger patterns. Next will be the PSN/filter board and so on. I intend to make all the board outlines the same so they can be packaged in the little tins I used for the QSD.

Stay tuned.

Q R P e r

QRP radios, product announcements, reviews, news and more. Low power amateur radio fun!

Dian Kurniawan

electronic for better life

N6QW -- Left Coast Radio

For Ham Radio Experimenters

SolderSmoke Daily News

For Ham Radio Experimenters