Archive | Uncategorized RSS feed for this section

uBitx Dynamic Range Improvement

11 Apr

The audio preamp (Q70) in the uBitx isn’t biased optimally and therefore overloads about 10 dB sooner than it should. As it comes from the factory this stage, which is powered from 12vdc, is biased to about 1.6v at the collector. For best large signal handling, it should be biased to 5v or 6v. This is easy to fix by adding a 16K (optimum value; 15K will work) from base to ground. This is very convenient to do with a SMD resistor, but a leaded part can also be used. I’ll post a picture when I get a chance.

My software-derived S-meter is now working very, very nicely with no hardware and no hickups. I moved away from the continuous-conversion interrupt-driven ADC to a timer interrupt based ADC that converts about 3900 times per second. It has very fast attack and software definable decay. I implemented a table-driven logarithmic compression function so I can calibrate the meter in S units. Right now it drives a moving-bar meter on the main TFT display (see the pictures below), but I’ll eventually add a dedicated smaller TFT just for the S-meter and other metering functions. Next I plan to add an I2C digipot in place of the volume control. This will allow the S-meter function to control the volume as a software controlled AGC. I also fine-tuned the 400 ppr encoder so that no step-size selector is required. When you turn the knob very slowly, it tunes in 1 hZ steps, accelerating to 2, 3, 5, 10, 25, 50 and 100 hZ steps as you spin the knob faster. You can smoothly tune in a CW or SSB signal, but also quickly traverse the whole band in a few revolutions when you wish. It feels like an expensive radio.

Advertisements

Digital Sampling S Meter for uBITX

25 Mar

I got some time to work on my digital S-meter/AGC concept. I’m running the Arduino ADC in continuous mode at 9600 conversions/sec. The converter works in the background and generates an interrupt when a new sample is available. This ADC samples the receive audio from the top of the volume control and performs a fast peak-detect function with controllable decay. This drives the S-meter display and also forms the basis for a feedforward AGC that will be implemented with a  D-A converter driving the volume control on a TDA7051A power amplifier chip.

In the process, I fixed the bias on the audio preamp stage to give about another 10dB of dynamic range. This will be very important with feedforward AGC, as everything up to the volume control always operates at wide open gain, so the audio preamp is the stage that overloads first.

I’m having some problems with the Arduino locking up since I implemented the interrupt-driven continuous fast A-D.  I might be asking too much of the Nano. I’ll be working on this; an 80 mHz STM32 board is waiting in the wings if that’s what it takes.

uBITX Taking Shape

18 Mar

I got a chance to do some work on the uBITX build over the weekend. I made a transition board out of perf-board. It makes the electrical interface and mechanical transition between the Raduino board and the TFT color touch-screen. You can see it below in the upper left corner  between the Raduino module and the control panel.

Also, I started to mount everything, including the speaker, into the cabinet. Yet to be mounted are the 3600 mA/hr Li-Ion battery pack I purchased and a buck-boost regulator board that will supply the radio with a solid 13V even when the battery runs down to 8V or 9V. A 3-position front panel rotary switch will select power modes OFF, ON from the battery or ON with external power-pack assist.  I pasted a black & white overlay to the front panel to get an idea what the final rig will look like.

I’ve been listening to 40M the whole day. The radio tunes very smoothly, and the tuning pointer on the slide-rule display gives a nice perspective for where you are in the band. However, the tuning rate of the 400 ppr encoder is too touchy for fine tuning and too slow for fast across-band excursions. I think I’m going to implement a default 1 hZ step-size  with acceleration to 10 hZ and 100 hZ as you spin the knob faster.

Getting the Encoder working with Interrupts

9 Mar

IThis is working nicely now, but it was a bit tricky.

When he designed the uBITx, Farhan decided not to use the Arduino pins dedicated for devices that can externally interrupt the micro controller (D2 & D3). Instead, he used inputs A0 and A1, which are general purpose analog/digital pins and then he polled the inputs in software to determine the encoder state. This works well enough for the primitive low-resolution encoder supplied with the uBITx, but it can’t keep up with higher resolution encoders that have more than 10x as many pulses per revolution of the shaft. This is compounded by the fact that the TFT color display I’m using ‘steals’ a lot of processor throughput every time it updates, causing missed states when the encoder is turned.

 

 

Fortunately, Farhan chose to use analog-capable pins, and with a little trickery, these can generate interrupts by using the Arduino’s built-in analog comparator, which can generate interrupts to detect state changes. To accomplish this, you have to set up the comparator to generate an interrupt on a specified edge of one of the encoder inputs and then immediately poll the other encoder input to compare state combinations. This is now working pretty well with no missed states or ‘stuttering’, no matter how fast you spin the encoder shaft.

This weekend, I’ll hopefully connect the new display and encoder to the uBITx, connect an antenna, and give it a whirl.

 

UPDATE: I had a lot of problems with the comparator bouncing on encoder transitions because it has no hysterisis. I rewired the Raduino bard to use the D2 and D3 lines for the encoder and A0 & A1 replacing what D2 and D3 were doing. This works much better.

uBITX Enhanced Tuning Encoder

6 Mar

I purchased one of these optical encoders on Ebay a while back for about $12. It gives 400 pulses per revolution and no contact bounce. It’s much too fast for the Arduino program as-written to keep up with, so I had to completely re-write the encoder code to use interrupts. It works a treat and no need for the annoying speed-up algorithm that makes the uBitx so hard to tune. With step size set to 50 hZ, you get a nice smooth 20 khZ per revolution of the knob.

I have a front panel drilled and cut to accept this and the TFT color touch display. I’ll be unveiling both in the cabinet along with the uBitx, possibly this weekend. It looks like the picture in my previous post.

uBITX now running on ARM Cortex M4

21 Feb

I bought a $10 ST Micro Nucleo-32 board and got the uBITX code running on it. This is a 70 mHz, 32 bit ARM Cortex M4 processor on a board that’s electrically and mechanically interchangeable with the original Arduino Nano board. This will provide a much larger memory space and much more computing power for the things I have planned for the uBITX. I installed the STM32 hardware support in the Arduino IDE and the code compiled and loaded almost effortlessly!  Later, I’ll move the code over to one of the cheaper ($2.50) generic STM32 boards that are available on EBay.

uBITX code running on Nucleo board

I plan to continue with the Nano until it runs out of steam, but iI can now move on without fear of hitting a brick wall, adding the things I have planned such as the 2.8″ TFT touch-screen graphics display and a separate, smaller color display that will be coded as an analog S meter. I purchased a nice painted aluminum cabinet and have a front panel layout and graphics that will make it look like the old Heathkit SB series equipment. All of that will unfold here as I progress.

 

Enclosure

Prototype touch screen

Nucleo-32 board

 

This is what it will look like with the color graphics display and the color graphics S-meter:

 

Front Panel with touch-screen display and S-meter

I’m planning to add a proper IF AGC circuit using the AGC amplifier described in my earlier posting. The AGC voltage will be derived by digitally sampling the received audio in the microcontroller’s 12-bit A-D converter and generating a control voltage using the microcontroller’s 12-bit D-A converter. An accurate software generated S-meter display will also be driven by the processor.

My new uBITX Is up and running

18 Feb

I got my UBITX a couple weeks ago, but haven’t had time to turn it on. For your information, the uBITX is an all-band HF SSB/CW QRP transceiver that comes tested and nearly ready to use for only $120 delivered. (http://www.hfsignals.com).

Today, I got a chance to do a preliminary hookup and it seems to receive. Over the next several weeks, I’ll do some instrument testing and report my findings on a regular basis. For now, I can report that it draws about 160 MA and the minimum discernable signal on 40M is about 1uV (-110 dBm). I would have hoped for a little better sensitivity, but this is fine for the lower HF frequencies where atmospheric and external noise predominates. Also, the 50 hZ tunlng steps are bothersome to me and the tuning acceleration feature is annoying. I’ll probably do a firmware mod to get 10 hZ tuning steps with some other way to speed up the tuning. There also appears to be a substantial low frequency rolloff on the received audio, but I don’t have measurements to back that up yet.

……………

Later in the day update:

After some bench probing, I determined that the low end rolloff is because the BFO frequency isn’t set correctly and the lower audio frequencies are way down the crystal filter skirt. This was confirmed after a read of the BITX forum. I’ll calibrate it when I get some time.

Preliminary receiver spurious response testing with an HP8640B signal generator indicates the hard saturation point is about 3 mV (-40 dBm), so total usable dynamic range is about 70 dB. Since there is no IF AGC, this radio will overload on strong in-channel signals. This will be something I’ll want to address in a subsequent posting.

There are numerous spurious responses about 60-70 dB above MDS, including IF feedthrough, images and birdies. The latter are probably due to the well-known many spurious outputs the Si5351 generates when it’s  outputting multiple LOs, as it does in this radio.

These were all very quick and dirty measurents. Every one of these needs to be individually analyzed and dimensioned, but the preliminary results look like this is an “OK” receiver; good enough to have tons of fun, but nothing to write home about.

I hooked it up to an antenna for a quick listen on 40M. Plenty of band noise and signals heard, though the low frequency audio rolloff made listening to SSB difficult.

I see this little rig as a great bargain for what it does and a starting point for many worthwhile improvements.

This should be fun. Stay tuned…