开云体育

Audio AVC


Jack Brabham - KZ5A
 

开云体育

I don't think I have ever heard a argument in favor of slow attack AGC before.?

73 Jack KZ5A


On 4/22/2019 9:19 PM, Jerry Gaffke via Groups.Io wrote:

If you digitize the audio, you could delay it to match your pokey AGC scheme (and fancy audio filters and such too).
That's what many SDR rigs do.
In extreme cases it's like talking over a satellite link, and conversation becomes unnatural.


On Mon, Apr 22, 2019 at 06:44 PM, James Lynes wrote:
I wondered about this approach myself.? I figured there would be too much time lag in the software path to be effective(untested).
?



 

On Mon, Apr 22, 2019 at 05:45 PM, Hasan Murtaza wrote:
Control the pot resistance (and hence the transistor amplification) with a digital output pin of the arduino
This isn't requiring the micro controller to do any heavy duty DSP type processing. I think it would be very fast. An Arduino Nano may be fast enough.

However, as time has marched on, there are new faster (and cheap) options. Two that come to mind are ESP32 that Jack mentioned and the "Blue Pill".

The ESP32 is great because of it's fast processor speed. And it has WiFi and Bluetooth integrated right onto the chip. The BLE (Blue Tooth Low Energy) is especially interesting as you could control your uBitx directly from an iPhone app. (Apple only lets BLE connections work on apps where they don't go through an, I imagine expensive, approval process).

The Blue Pill, while "only" having a 72Mhz clock speed, 64KB of flash and 20KB of RAM is still vastly more powerful than the Nano. The STM32F103C8 chip used on the Blue Pill has USB built right into the chip. Great for many types of projects you would want to build, as no need for a separate USB chip keeps down the cost of the project/product. ?

Now I must make a confession, I have another HF rig besides the uBitx. I like the "squelch" it has. Well kind of. It really is not all that consistent in where you set it, or totally reliable, or stable. (I'm always having to tweak it.)

Image an ESP32 or Blue Pill that actually does process the audio, into and out of the chip. You could make an improved "signal/noise" assessment in software. But, by also delaying the audio slightly through the chip, the point where the software decides the the signal is signal, not noise, could be time shifted back to the start of the desired beginning of the signal, rather than chopping off the first part of what someone is saying. (As happens now with the analog squelch on my rig). This type of squelch would be a great addition to the uBitx, too. So a little delay in the software can be a benefit.

Tom, wb6b
?


 

开云体育

Wow!? Jack is an ESP32 convert!

?

?

From: [email protected] [mailto:[email protected]] On Behalf Of Jack Purdum via Groups.Io
Sent: Monday, April 22, 2019 9:04 PM
To: [email protected]
Subject: Re: [BITX20] Audio AVC

?

Exactly. Consider the ESP32 with 1.3Mb of flash, 350Kb of SRAM, all scooting along at 240Mhz at a price of around $6. It also has two DAC ports. While the DAC ports are only 8 bit, it's better than no DAC. Also, you can program the ESP32 from within the Arduino IDE. So far, I haven't found any libraries that don't work with it. Oh, it also has builtin WIFI and Bluetooth.

?

Jack, W8TEE

?

On Monday, April 22, 2019, 9:37:05 PM EDT, Jerry Gaffke via Groups.Io <jgaffke@...> wrote:

?

?

Doing AGC in software would incur added delay, especially with an i2c pot on our beloved little Nano.
We want to keep the attack time as short as possible.
Would be fun to try, perhaps using one of the small ARM processors with fast embedded ADC and DAC capabilities.
Jerry


On Mon, Apr 22, 2019 at 05:45 PM, Hasan Murtaza wrote:

Technically the simplest circuit (for some people) would be a software solution. Send the amplified output to a diode plus capacitor in a peak detector configuration. The capacitor voltage will be a quasi DC signal proportional to the maximum value of the signal. Read it into the arduino via an ADC pin.?

So far, component count =2.

Next replace the collector resistor in the class A common emitter amplifier with a digital potentiometer. Control the pot resistance (and hence the transistor amplification) with a digital output pin of the arduino. Write some software to set the gain based on the measured peak output voltage.

Total parts count is 3.?

If you sample the audio voltage directly you can do even fancier tricks like computing rms value or histograms etc.

Hasan


Virus-free.

--

…_. _._


 

I played around with audio processing for the esp32. I limited external components to analog conditioning only. Core 1 did sample service, core 2 frame processing. Sampling on the timer (rather than DMA) added some phase noise.

Now I like the Nordic nRF52840 dongle—$10—M4F, BLE radio, ADC but no DAC.
Still looking for the complete digital audio processor for $10.

wm6h


 

Primary hit on using a Nano for AGC is the time it takes to drive a digital pot via the i2c bus,
especially since i2c is also running the si5351 and perhaps a display.
Don't have enough pins to go spi, unless it's a second Nano.
Regardless, way easier to do it with 2 or 3 FET's than it is to trip over software timing every
with every hack to the Nano firmware, or to add an extra processor.


On Mon, Apr 22, 2019 at 09:47 PM, Tom, wb6b wrote:
This isn't requiring the micro controller to do any heavy duty DSP type processing. I think it would be very fast. An Arduino Nano may be fast enough.


James Lynes
 

Hasan:

Give it a try and report back. It's an interesting idea.

1. What are the required AVC attack and decay times vs, the Nano maximum ADC read rate plus the added I2C/SPI pot communications overhead?

2. Can loop() tolerate any more overhead without impacting the operability of the UI? Adding another processor defeats the original premise of a minimal part count implementation. Maybe it could be implemented in an ISR, but I believe that I read awhile back of issues with I2C and ISRs. Find/develop a custom I2C library?

James


Jack Purdum
 

In a normally clocked Nano, the maximum read rate is 100 microseconds (0.0001sec), or 10,000/second. However, that's just an analog read call. Since something has to be done with the data, the "useful" rate is going to be less.

Jack, W8TEE

On Tuesday, April 23, 2019, 9:52:10 AM EDT, James Lynes <jmlynesjr@...> wrote:


Hasan:

Give it a try and report back. It's an interesting idea.

1. What are the required AVC attack and decay times vs, the Nano maximum ADC read rate plus the added I2C/SPI pot communications overhead?

2. Can loop() tolerate any more overhead without impacting the operability of the UI? Adding another processor defeats the original premise of a minimal part count implementation. Maybe it could be implemented in an ISR, but I believe that I read awhile back of issues with I2C and ISRs. Find/develop a custom I2C library?

James


Jack Purdum
 

Al Peter (AC8GY) and I are working on a new Projects book and in it, I took a few minutes to pull my head out of the sand and look around to see what's happening. Rather than limiting it to the Arduino family, we limited our ?C's to microcontrollers that can be programmed in the Arduino IDE so the reader doesn't need to learn a new programming environment. The book uses the Arduino Nano, but also the Teensy 3.6, the STM32F103, and ESP32 controllers. It is amazing what less than $10 buys in terms of processing power! What I don't understand is why Atmel hasn't come out with a reasonably-priced competitor to these alternatives.

Jack, W8TEE

On Tuesday, April 23, 2019, 2:18:10 AM EDT, MadRadioModder <madradiomodder@...> wrote:


Wow!? Jack is an ESP32 convert!

?

?

From: [email protected] [mailto:[email protected]] On Behalf Of Jack Purdum via Groups.Io
Sent: Monday, April 22, 2019 9:04 PM
To: [email protected]
Subject: Re: [BITX20] Audio AVC

?

Exactly. Consider the ESP32 with 1.3Mb of flash, 350Kb of SRAM, all scooting along at 240Mhz at a price of around $6. It also has two DAC ports. While the DAC ports are only 8 bit, it's better than no DAC. Also, you can program the ESP32 from within the Arduino IDE. So far, I haven't found any libraries that don't work with it. Oh, it also has builtin WIFI and Bluetooth.

?

Jack, W8TEE

?

On Monday, April 22, 2019, 9:37:05 PM EDT, Jerry Gaffke via Groups.Io <jgaffke@...> wrote:

?

?

Doing AGC in software would incur added delay, especially with an i2c pot on our beloved little Nano.
We want to keep the attack time as short as possible.
Would be fun to try, perhaps using one of the small ARM processors with fast embedded ADC and DAC capabilities.
Jerry


On Mon, Apr 22, 2019 at 05:45 PM, Hasan Murtaza wrote:

Technically the simplest circuit (for some people) would be a software solution. Send the amplified output to a diode plus capacitor in a peak detector configuration. The capacitor voltage will be a quasi DC signal proportional to the maximum value of the signal. Read it into the arduino via an ADC pin.?

So far, component count =2.

Next replace the collector resistor in the class A common emitter amplifier with a digital potentiometer. Control the pot resistance (and hence the transistor amplification) with a digital output pin of the arduino. Write some software to set the gain based on the measured peak output voltage.

Total parts count is 3.?

If you sample the audio voltage directly you can do even fancier tricks like computing rms value or histograms etc.

Hasan


Virus-free.

--

…_. _._


James Lynes
 

Well since Atmel is now Microchip they are probably having problems rationalizing bigger Atmels vs. PIC32s vs. Me-too ARMs vs. RPIs.

The chipKIT and Fubarino boards are nice().

James


Jack Purdum
 

Still, there's a large base they could tap into. However, the uC32 resources (512K flash, 32K SRAM, 80MHz clock) for $35 doesn't even come close to the competition. Just makes no sense to me.

Jack, W8TEE

On Tuesday, April 23, 2019, 9:38:22 AM PDT, James Lynes <jmlynesjr@...> wrote:


Well since Atmel is now Microchip they are probably having problems rationalizing bigger Atmels vs. PIC32s vs. Me-too ARMs vs. RPIs.

The chipKIT and Fubarino boards are nice().

James


 

People seem to have tried I2C controlled digital AGC before, with TPA2016 amplifier.
Nick VK4PP seems to have had success with it.
/g/BITX20/topic/9586139


So digital AGC via I2C control is very much possible.


 

At $10 for a 2.8W class D audio amp operating from 5v, that looks nice.
Here's what the webpage says:
? ??I2C interface pins for setting gain, AGC configuration parameters, etc.?
?
So you would use the i2c interface when setting the volume or turning on AGC.
But the AGC action all happens internally to this board once you have set it up.
You don't need to constantly write to it via the i2c interface to make AGC happen.

Apparently worked for Nick.
But be careful with Class D amps.? They send high frequency square waves
out to the speaker, and if not filtered correctly that can be very noisy in a radio.

Jerry, KE7ER?



On Tue, Apr 23, 2019 at 10:13 AM, Ismo V??n?nen OH2FTG wrote:
People seem to have tried I2C controlled digital AGC before, with TPA2016 amplifier.
Nick VK4PP seems to have had success with it.
/g/BITX20/topic/9586139


So digital AGC via I2C control is very much possible.


 

If Class-D output is a problem, perhaps the pre-amp/processor could feed a conventional o/p stage? Or is that much available alone as a chip?
73 de ZL2DEX


 

On Tue, Apr 23, 2019 at 09:38 AM, James Lynes wrote:
Well since Atmel is now Microchip
I have the PICKit 4 Programmer/Debugger and now that Atmel is under Microchip the new PICKit 4 box will program PIC, AVR and ARM chips. Although I also have an Atmel ICE to fall back on when the PICKit does not handle a particular AVR chip. They are gradually merging their toolsets to handle PIC/AVR/ARM chips more seamlessly. So Microchip may cover all the bases.

The Nordic chips are interesting. When it comes to battery operation, some folks seem to prefer these. I bough a LoRa development module based on one of these chips. I use manufacture toolsets often, but the documentation from the LoRa development board is helter skelter.?

I'm learning more about these chips, as I ended up buying a genuine Nordic development board, a J-Link Programmer/Debugger and installed the Segger toolchain, so I have a known starting point before tackling the Lora board (and disorganized documentation) again. The Segger stuff is first class (fortunately it is supposed to be free to use with Nordic chips), but even with experience on multiple manufactures toolchains, culling through the many disconnected documents and connecting the dots, is making this toolchain one of the longest for me to get set up with.?

If Nordic chips get more support in the Arduino IDE it would be a real benefit to the casual user. I Like the ease of Arduino IDE with the consistent libraries and the (at least most of the time) just works programming environment. For the Arduino environment it might be good if they try supporting the inexpensive ST-Link V2 clone programmers to program boot loaders into the Nordic chips.?

Tom, wb6b



Jack Brabham - KZ5A
 

开云体育

I like the TPA2016. ?? I've been using a 15W/ch class D amp to drive my main station speakers for 2 or 3 years and haven't noticed any RF noise.

One aspect of the uBitx AGC consideration I haven't heard much on is.... to what extent, if any, do strong signals outside of the recovered audio pass band, but inside the 45 or 12 mhz passbands affect the mixers and amps in the RX chain??? Is there an optimum max signal level?

73 Jack KZ5A








On 4/23/2019 5:30 PM, Tom, wb6b wrote:

On Tue, Apr 23, 2019 at 09:38 AM, James Lynes wrote:
Well since Atmel is now Microchip
I have the PICKit 4 Programmer/Debugger and now that Atmel is under Microchip the new PICKit 4 box will program PIC, AVR and ARM chips. Although I also have an Atmel ICE to fall back on when the PICKit does not handle a particular AVR chip. They are gradually merging their toolsets to handle PIC/AVR/ARM chips more seamlessly. So Microchip may cover all the bases.

The Nordic chips are interesting. When it comes to battery operation, some folks seem to prefer these. I bough a LoRa development module based on one of these chips. I use manufacture toolsets often, but the documentation from the LoRa development board is helter skelter.?

I'm learning more about these chips, as I ended up buying a genuine Nordic development board, a J-Link Programmer/Debugger and installed the Segger toolchain, so I have a known starting point before tackling the Lora board (and disorganized documentation) again. The Segger stuff is first class (fortunately it is supposed to be free to use with Nordic chips), but even with experience on multiple manufactures toolchains, culling through the many disconnected documents and connecting the dots, is making this toolchain one of the longest for me to get set up with.?

If Nordic chips get more support in the Arduino IDE it would be a real benefit to the casual user. I Like the ease of Arduino IDE with the consistent libraries and the (at least most of the time) just works programming environment. For the Arduino environment it might be good if they try supporting the inexpensive ST-Link V2 clone programmers to program boot loaders into the Nordic chips.?

Tom, wb6b




 

No issue with being considered a fossil but I really want to delay becoming a fossil!


Joe Puma
 

开云体育

Someone needs to make a schematic for an AFD (automatic fossil delay) :)

Joe



On Apr 23, 2019, at 11:07 PM, William R Maxwell <wrmaxwell@...> wrote:

No issue with being considered a fossil but I really want to delay becoming a fossil!


 

开云体育

Yes I agree ESP32 is up for the Job. When we get Time I'm going to use one for DSP audio filter.? SSB/CW. and a AGC that controls the RF Attenuator .and move the S-Meter/DSP to it also.

The ESP32 has enough power to run it all with no other micro's needed.

WB8LGA

Charles


On 4/23/2019 2:18 AM, MadRadioModder wrote:

Wow!? Jack is an ESP32 convert!

?

?

From: [email protected] [mailto:[email protected]] On Behalf Of Jack Purdum via Groups.Io
Sent: Monday, April 22, 2019 9:04 PM
To: [email protected]
Subject: Re: [BITX20] Audio AVC

?

Exactly. Consider the ESP32 with 1.3Mb of flash, 350Kb of SRAM, all scooting along at 240Mhz at a price of around $6. It also has two DAC ports. While the DAC ports are only 8 bit, it's better than no DAC. Also, you can program the ESP32 from within the Arduino IDE. So far, I haven't found any libraries that don't work with it. Oh, it also has builtin WIFI and Bluetooth.

?

Jack, W8TEE

?

On Monday, April 22, 2019, 9:37:05 PM EDT, Jerry Gaffke via Groups.Io <jgaffke@...> wrote:

?

?

Doing AGC in software would incur added delay, especially with an i2c pot on our beloved little Nano.
We want to keep the attack time as short as possible.
Would be fun to try, perhaps using one of the small ARM processors with fast embedded ADC and DAC capabilities.
Jerry


On Mon, Apr 22, 2019 at 05:45 PM, Hasan Murtaza wrote:

Technically the simplest circuit (for some people) would be a software solution. Send the amplified output to a diode plus capacitor in a peak detector configuration. The capacitor voltage will be a quasi DC signal proportional to the maximum value of the signal. Read it into the arduino via an ADC pin.?

So far, component count =2.

Next replace the collector resistor in the class A common emitter amplifier with a digital potentiometer. Control the pot resistance (and hence the transistor amplification) with a digital output pin of the arduino. Write some software to set the gain based on the measured peak output voltage.

Total parts count is 3.?

If you sample the audio voltage directly you can do even fancier tricks like computing rms value or histograms etc.

Hasan


Virus-free.

--

…_. _._


Jack Purdum
 

We did all that and more with the JackAl board, but it's based on the Teensy 3.6 controller, which isn't cheap. We selected the Teensy because of its excellent audio processing library and still think that was the best choice...at the time. Since then, the ESP32 libraries have expanded, so that's probably a viable alternative.

Jack, W8TEE



On Wednesday, April 24, 2019, 9:05:01 AM EDT, wb8lga <cbeener@...> wrote:


Yes I agree ESP32 is up for the Job. When we get Time I'm going to use one for DSP audio filter.? SSB/CW. and a AGC that controls the RF Attenuator .and move the S-Meter/DSP to it also.

The ESP32 has enough power to run it all with no other micro's needed.

WB8LGA

Charles


On 4/23/2019 2:18 AM, MadRadioModder wrote:

Wow!? Jack is an ESP32 convert!

?

?

From: [email protected] [mailto:[email protected]] On Behalf Of Jack Purdum via Groups.Io
Sent: Monday, April 22, 2019 9:04 PM
To: [email protected]
Subject: Re: [BITX20] Audio AVC

?

Exactly. Consider the ESP32 with 1.3Mb of flash, 350Kb of SRAM, all scooting along at 240Mhz at a price of around $6. It also has two DAC ports. While the DAC ports are only 8 bit, it's better than no DAC. Also, you can program the ESP32 from within the Arduino IDE. So far, I haven't found any libraries that don't work with it. Oh, it also has builtin WIFI and Bluetooth.

?

Jack, W8TEE

?

On Monday, April 22, 2019, 9:37:05 PM EDT, Jerry Gaffke via Groups.Io <jgaffke@...> wrote:

?

?

Doing AGC in software would incur added delay, especially with an i2c pot on our beloved little Nano.
We want to keep the attack time as short as possible.
Would be fun to try, perhaps using one of the small ARM processors with fast embedded ADC and DAC capabilities.
Jerry


On Mon, Apr 22, 2019 at 05:45 PM, Hasan Murtaza wrote:

Technically the simplest circuit (for some people) would be a software solution. Send the amplified output to a diode plus capacitor in a peak detector configuration. The capacitor voltage will be a quasi DC signal proportional to the maximum value of the signal. Read it into the arduino via an ADC pin.?

So far, component count =2.

Next replace the collector resistor in the class A common emitter amplifier with a digital potentiometer. Control the pot resistance (and hence the transistor amplification) with a digital output pin of the arduino. Write some software to set the gain based on the measured peak output voltage.

Total parts count is 3.?

If you sample the audio voltage directly you can do even fancier tricks like computing rms value or histograms etc.

Hasan


Virus-free.

--

…_. _._


 

Here is my Arduino IDE dual core esp32 audio framework. Mainly just tone generation. I did fir filters with but haven’t uploaded them.

Many libraries work but the esp32 unlike other Arduino processors, doesn’t like to spend a lot of time in interrupt routines (I guess because of rtos). I had to rewrite the “Talkie” library because of the interrupt handling.


wm6h