G2 distorted audio using TRS and standard mic input

G2 operating system and special app's (e.g. p2app) discussion only--post Thetis and piHPSDR questions in their own sub-forums
User avatar
n1gp
Posts: 175
Joined: Sun Apr 09, 2017 6:34 pm

Re: G2 distorted audio using TRS and standard mic input

Postby n1gp » Mon Feb 12, 2024 6:34 pm

When you type in:

cd github/Saturn/sw_projects/audiotest

try to get a listing of that directory by typing:

ls -l

This is what I see:

/home/pi/github/Saturn/sw_projects/audiotest# ls -l
total 156
-rwxr-xr-x 1 mh mh 54368 Jul 5 2023 audiotest
-rw-r--r-- 1 mh mh 17047 Jul 5 2023 audiotest.c
-rw-r--r-- 1 mh mh 12156 Jul 5 2023 audiotest.o
-rw-r--r-- 1 mh mh 17296 Jul 5 2023 audiotest.ui
-rw-r--r-- 1 mh mh 1104 Jul 5 2023 codecwrite.o
-rw-r--r-- 1 mh mh 1240 Jul 5 2023 debugaids.o
-rw-r--r-- 1 mh mh 2892 Jul 5 2023 hwaccess.o
-rw-r--r-- 1 mh mh 607 Jul 5 2023 Makefile
-rw-r--r-- 1 mh mh 2588 Jul 5 2023 saturndrivers.o
-rw-r--r-- 1 mh mh 23180 Jul 5 2023 saturnregisters.o
-rw-r--r-- 1 mh mh 2552 Jul 5 2023 version.o

audiotest is the first file in the listing, so it is there for me.
If it is not there for you please show us what is there. You can
rebuild the audiotest by typing:

make clean
make
MW0XDT
Posts: 13
Joined: Wed Jan 03, 2024 7:56 am

Re: G2 distorted audio using TRS and standard mic input

Postby MW0XDT » Mon Feb 12, 2024 7:58 pm

Thank you for that, very much appreciated!

I’m on call at work now, but will check this out in the morning, and post results.

Thanks again!

Best 73, Rich
MW0XDT
Posts: 13
Joined: Wed Jan 03, 2024 7:56 am

Re: G2 distorted audio using TRS and standard mic input

Postby MW0XDT » Tue Feb 13, 2024 5:22 am

Good Morning,

Please find attached a pic of what is listed…audiotest.c appears to be first on my list, with only 3 files in that location.

Thanks once again, I really appreciate the help.

73 Rich
Attachments
IMG_2007.jpeg
IMG_2007.jpeg (772.51 KiB) Viewed 1821 times
User avatar
n1gp
Posts: 175
Joined: Sun Apr 09, 2017 6:34 pm

Re: G2 distorted audio using TRS and standard mic input

Postby n1gp » Tue Feb 13, 2024 11:03 am

Hi Rich,

Your audiotest directory looks like the application has not been built yet.
From the audiotest directory, try typing:

make

then you should be able to run it:

./audiotest
MW0XDT
Posts: 13
Joined: Wed Jan 03, 2024 7:56 am

Re: G2 distorted audio using TRS and standard mic input

Postby MW0XDT » Tue Feb 13, 2024 11:18 am

Many thanks,

I’ll do this as soon as guys stop calling me in to work!…I really need to retire to enjoy more Radio! :D

Thanks again I’ll try this later today and report back with results…and maybe even that desired audio test!

73 Rich
MW0XDT
Posts: 13
Joined: Wed Jan 03, 2024 7:56 am

Re: G2 distorted audio using TRS and standard mic input

Postby MW0XDT » Tue Feb 13, 2024 7:57 pm

Thanks for the help guys…audiotest app is now running fine. I’ll do a few tests and report back with findings.

Best 73 Rich
MW0XDT
Posts: 13
Joined: Wed Jan 03, 2024 7:56 am

Re: G2 distorted audio using TRS and standard mic input

Postby MW0XDT » Wed Feb 14, 2024 8:31 am

Hi guys,

Well audiotest app does not record any audio from the XLR input. My Electrovoice RE320 is plugged int the XLR input with a converting cable from XLR to balanced 1/4” plug, with wiring checked as recommended in the manual. PTT is my foot switch into the PTT socket on the back of my ‘no screen’ G2. So no outboard gear, just mic and PTT. Every cable connected is laden with ferrites as I was concerned about RF, although the noise witnessed on transmit, does not sound like RF…more like waves of white noise over the top of my voice when recorded on WebSDR and witnessed on the G2 ‘MON’ output.

So not sure what to do next. The audiocheck app implies I have no audio on the XLR input (only recording the click of the PTT) even if I employ the ‘mic boost’. Yet I’m clearly TXing audio, even if it is with a huge amount of noise.

Your thought once again would be much appreciated.

Many thanks in advance,

Rich
laurencebarker
Posts: 225
Joined: Mon Nov 11, 2019 7:39 pm

Re: G2 distorted audio using TRS and standard mic input

Postby laurencebarker » Wed Feb 14, 2024 8:54 pm

did you select the XLR check box to choose that input? It works fine with my microphone.
Laurence Barker G8NJJ
MW0XDT
Posts: 13
Joined: Wed Jan 03, 2024 7:56 am

Re: G2 distorted audio using TRS and standard mic input

Postby MW0XDT » Thu Feb 15, 2024 6:50 am

Good Morning Laurence,

Yes, XLR was selected with no response, just a ‘click’ at the start of the test as the PTT is depressed. Then tried with the mic boost, just in case drive was too low, but still no audio. I’ll check again in a couple of hours and confirm all settings.

Thanks as again,

73 Richard
MW0XDT
Posts: 13
Joined: Wed Jan 03, 2024 7:56 am

Re: G2 distorted audio using TRS and standard mic input

Postby MW0XDT » Thu Feb 15, 2024 9:58 am

Hi Laurence,

Just to confirm all tested again, with same result on the ‘XLR’ rear input. XLR selected and functional in Thetis also. During test, PTT functions correctly, click burst is witnessed, but no audio….however a quite large signal is registered on the audiotest meter (see pic) This is not audible in playback on audiotest, but might well represent the ‘noise’ accompanying my transmitted audio in Thetis?

Appreciating your thoughts as always.

Best 73, Rich
Attachments
IMG_2018.jpeg
IMG_2018.jpeg (2.46 MiB) Viewed 1692 times
laurencebarker
Posts: 225
Joined: Mon Nov 11, 2019 7:39 pm

Re: G2 distorted audio using TRS and standard mic input

Postby laurencebarker » Thu Feb 15, 2024 7:27 pm

strange.

What sort of microphone is it - does it need a phantom power supply?
Laurence Barker G8NJJ
User avatar
w-u-2-o
Posts: 5576
Joined: Fri Mar 10, 2017 1:47 pm

Re: G2 distorted audio using TRS and standard mic input

Postby w-u-2-o » Thu Feb 15, 2024 9:17 pm

Laurence: he wrote above that it is an RE320, which is a dynamic mic. Thus lack of phantom power is not an issue.

It is conceivable that the cable could be bad. @MW0XDT do you have a way to test the cable with another piece of audio gear?
MW0XDT
Posts: 13
Joined: Wed Jan 03, 2024 7:56 am

Re: G2 distorted audio using TRS and standard mic input

Postby MW0XDT » Fri Feb 16, 2024 6:45 am

Hi Guys,

Yes, Scott is correct, RE320 dynamic mic. Cable is good and tested, plus wired as suggested in manual. I’ve also swapped out with two other XLR dynamic mics for comparison, they all respond identically.

I also noticed that the audiotest app locks up after a couple of tests, failing to respond to any clicks and has to be restarted…this may of course be completely unconnected.

Having had the G2 for almost a week now and not be able to get basic clean audio out of it is frustrating to say the least. I take the same mic and same lead, plug it straight into my old Flex 6500 XLR socket and get unsolicited ‘flowers’ about my ‘BBC’ quality audio. That being the case I’m going to try routing audio into the Anan via the 3.5mm audio jack using the wiring diagrams posted elsewhere here…I’ve even ordered the Neutrik balanced to unbalanced transformer mentioned, which should be here in a couple of days.

That said, I’d still like to know why the dedicated balanced input on the back of the G2 fails to provide a the clean solution it promises.

Thanks again guys, I’ll report back with any developments.

Best 73 Rich.
laurencebarker
Posts: 225
Joined: Mon Nov 11, 2019 7:39 pm

Re: G2 distorted audio using TRS and standard mic input

Postby laurencebarker » Fri Feb 16, 2024 9:44 pm

Yes I'm aware that Audiotest can hang sometimes. That won't affect what it tells you until it hangs; and as an engineering rather than operational app, I haven't yet prioritised it. From the symptoms I would suspect a wiring issue.

I would suggest making a suitable lead to connect your microphone to the 3.5mm jack unbalanced sockets.
Laurence Barker G8NJJ
MW0XDT
Posts: 13
Joined: Wed Jan 03, 2024 7:56 am

Re: G2 distorted audio using TRS and standard mic input

Postby MW0XDT » Sat Feb 17, 2024 6:39 am

Thanks Laurence,

As far as the audiotest app is concerned I was just checking that the occasional hang wasn’t indicative of another issue, so I’m relieved that is to be expected at this time…and for me, is really not a big issue. It works very well and as you suggested, and I hinted, I did move my attention to the unbalanced input and modified the wiring in accordance with the attached recommendation, using the ‘better’ example, linking pins 1 and 3 at both ends. A quick test on the audiotest app yielded good results and nice audio. A quick swap to Thetis and the transmitted audio was great using multiple profiles….all was fine until I shut down the radio…I thought I’d heard something when I closed down the raspberry and shut off the radio after using audiotest, but figured it was the headphones. However when I shut down the radio after closing Thetis, a loud ‘pop’ or ‘click’ came from my precious RE320.

So obviously happy that the audio is available, not happy to expose my mic to that burst at shutdown. So I’ll continue to wait for the balanced to unbalanced transformer, which I would imagine will not suffer from the ‘pop’….unless you guys have got a suggested alternative.

Thanks again for the continued support and assistance, it’s very much appreciated here.

Best 73 Rich
Attachments
IMG_2040.jpeg
IMG_2040.jpeg (582.74 KiB) Viewed 1510 times
DL8LAQ
Posts: 215
Joined: Sun Apr 09, 2017 3:28 pm
Location: JO43XU

Re: G2 distorted audio using TRS and standard mic input

Postby DL8LAQ » Sun Feb 18, 2024 10:46 am

Neutrik has everythink for a reasonable price (look for sellers): https://www.neutrik.com/de/neutrik/prod ... rm-adapter
73, Norbert - DL8LAQ - ANAN-G2 w/display - Richie's latest Thetis version and pihpsdr by N1GP&DL1YCF
MW0XDT
Posts: 13
Joined: Wed Jan 03, 2024 7:56 am

Re: G2 distorted audio using TRS and standard mic input

Postby MW0XDT » Mon Feb 19, 2024 7:13 am

Hi Norbert,

Yes, there are many Neutrik units available. The ‘F’ versions for Female XLR and ‘’M’ for male, with a variety of sockets available at the other end of the device. I ordered the Neutrik NA2F-D0B-TX, as recommended in the wiring post I mentioned earlier. This one has a phono/RCA socket and Female XLR, this was ordered almost a week ago now, so hopefully here later today. I will of course post results.

All the best Norbert,

73 Rich
MW0XDT
Posts: 13
Joined: Wed Jan 03, 2024 7:56 am

Re: G2 distorted audio using TRS and standard mic input

Postby MW0XDT » Thu Feb 22, 2024 4:03 pm

Hi Guys,

Further to the comments above I spotted N4VFR’s video on you tube “unboxing a G2” …in this video Darren removes the top cover and fits a clip on ferrite on the XLR to Preamp cable…as recommended by his friend Art. So as I’m having so much trouble getting audio without noise from the XLR socket I thought I’d try this out…only to find when I got inside that Apache Labs have already fitted a large grey ferrite on the cable, cable tied it in place near the socket and wrapped it with insulation tape. I haven’t seen another G2 with this factory fitted ferrite as yet.

Anyhow is this an admission that something is not quite right on the socket? I’ve still got -20db of noise on audiotest with no boost and 0+db of noise with the boost, even with No Mic plugged in.

I fitted a further 2 ferrites to the cable, which as had no effect.
See pics of factory fitted ferrite and my audiotest running with boost and No mic attached…smae noise level whether mic is attached or not.

Needless to say I’m going to forget the XLR socket for now which is a shame as I admire Apache Labs for its inclusion. If anyone has any further ideas or solutions feel free to post. In the meantime I’ll be running audio into the unbalanced rear mic socket with the Neutrik Balanced to Unbalanced transformer.

All the best, Rich
Attachments
IMG_2084.jpeg
IMG_2084.jpeg (4.13 MiB) Viewed 1352 times
IMG_2060.jpeg
IMG_2060.jpeg (2.44 MiB) Viewed 1352 times
echo_india
Posts: 43
Joined: Wed May 03, 2023 8:38 pm

Re: G2 distorted audio using TRS and standard mic input

Postby echo_india » Thu Feb 22, 2024 8:37 pm

The irony, lets admit nothing but just put a Band-Aid on that input just in case. I've said this from the beginning on this thread, there is an issue here but no one is listening. Instead it must be your mic wiring is wrong. :(
Best 73,
EI5GJB
laurencebarker
Posts: 225
Joined: Mon Nov 11, 2019 7:39 pm

Re: G2 distorted audio using TRS and standard mic input

Postby laurencebarker » Fri Feb 23, 2024 10:32 am

It's not the case that no-one is listening. It may be the case that no-one can post the answer you are looking for. And yes I think it should have the ferrite clamp: it is the most sensitive audio input on the unit.

I don't know what the issue is that Rich is describing. I have a balanced microphone connected to my balanced input and I do get reasonable amplitude audio through it. The differential preamp has around 20dB gain; if you turn on the preamp in the codec ("mic boost") too, you do get high amplitude background noise. It could be that for at least some microphones, maybe the gain needs to be increased or decreased, or maybe some initial bandwidth limiting filtering (6KHz?) is needed.
Laurence Barker G8NJJ
User avatar
w-u-2-o
Posts: 5576
Joined: Fri Mar 10, 2017 1:47 pm

Re: G2 distorted audio using TRS and standard mic input

Postby w-u-2-o » Fri Feb 23, 2024 12:20 pm

Laurence: can we publish the schematic for the balanced mic preamp?

It might be helpful if someone who is having distorted audio problems could put an oscilloscope to work and see what was going on. Perhaps on some of these boards the NE5534 is going into oscillation.
User avatar
w9ac
Posts: 295
Joined: Sun Apr 09, 2017 4:01 pm

Re: G2 distorted audio using TRS and standard mic input

Postby w9ac » Sat Feb 24, 2024 10:30 pm

w-u-2-o wrote:Laurence: can we publish the schematic for the balanced mic preamp?

That's a reasonable request.

It might be helpful if someone who is having distorted audio problems could put an oscilloscope to work and see what was going on. Perhaps on some of these boards the NE5534 is going into oscillation.

Referring to the image below, I have U1 circled in red. What type of device is it? Hopefully it is NOT a single-stage NE5534 as is customarily done with economized differential mic inputs. And hopefully, U1 is a 3-stage instrumentation input device. I do see that it is preceded by what appears to be differential-mode input filters at FL1 and FL2 rather than a common-mode audio filter.

Differential mode filters affect waveform integrity; common mode type do not owing to 2L inductance cancellation. Of course we're not expecting audiophile-grade audio systems here but it does go to show the depth of thought that went into the preamp design.

Second question: is the 1/4-inch TRS jack sleeve bonded to the G2 frame or is it an isolated-sleeve jack? Switchcraft and Neutrik make both types. I'm referring to the circled jack in orange color.

Paul, W9AC
Attachments
IMG_2060.jpg
IMG_2060.jpg (2.5 MiB) Viewed 1212 times
User avatar
w-u-2-o
Posts: 5576
Joined: Fri Mar 10, 2017 1:47 pm

Re: G2 distorted audio using TRS and standard mic input

Postby w-u-2-o » Sat Feb 24, 2024 11:27 pm

As I posted, it is indeed a 5534. Gain is set to 10 (20dB voltage gain).
User avatar
w9ac
Posts: 295
Joined: Sun Apr 09, 2017 4:01 pm

Re: G2 distorted audio using TRS and standard mic input

Postby w9ac » Sun Feb 25, 2024 2:37 am

[Edited to add example of the 3-element instrumentation amplifier]

In a high RF environment, that NE5534 as a balanced differential input deserves either: (1) an audio input transformer; or (2) a pair of 5534s ahead of it, turning it into a true 3-element instrumentation input with high CMRR across a broad frequency spectrum. Frankly, it's not even debatable.

A transformer solution doesn't require an expensive Jensen or CineMag type but it does add to production cost. By contrast, the instrumentation option with a real common mode audio input choke adds very little to cost in a circuit area that's highly affected by RF ingress. If it were my G2, the cover would be off shortly after unpackaging to add a transformer.

One benefit with the right transformer is passive voltage gain with only a small increase in the input stage's noise figure. The Jensen JT13K6 shown below adds 14 dB of voltage gain ahead of the 5534. To bring overall gain down to 20 dB in the G2 only requires a change to the 5534's feedback resistor and its companion bandwidth-limiting capacitor. Sure, it's a premium part but reasonably good transformer performance can still be had at a fraction of its price.

Paul, W9AC
Attachments
Inst amp.jpg
Inst amp.jpg (52 KiB) Viewed 1157 times
5534 Input.jpg
5534 Input.jpg (96.14 KiB) Viewed 1191 times
Last edited by w9ac on Sun Feb 25, 2024 1:03 pm, edited 1 time in total.
laurencebarker
Posts: 225
Joined: Mon Nov 11, 2019 7:39 pm

Re: G2 distorted audio using TRS and standard mic input

Postby laurencebarker » Sun Feb 25, 2024 10:52 am

It doesn't have a transformer input: it has an NE5534 configured as a differential amplifier.

My understanding is that on new radios there is a common mode ferrite clamp. That transformer is physically large for the space available on the PCB. It would be eminently possible to make an "aftermarket" adapter that connected to the normal mic input or line input though.
Laurence Barker G8NJJ
KC2QMA
Posts: 104
Joined: Mon Jul 13, 2020 11:13 pm

Re: G2 distorted audio using TRS and standard mic input

Postby KC2QMA » Sun Feb 25, 2024 2:15 pm

I know that some Op Amps need external compensation caps to block RF like from getting amplified or going into oscillation.
Question: Do the new G2 radio now ship with the clamp on ferrite on the balanced mic cable in the radio?
If so since my G2 is from the first run I don’t have one in mine, I will tray adding one to see what difference it makes.
laurencebarker
Posts: 225
Joined: Mon Nov 11, 2019 7:39 pm

Re: G2 distorted audio using TRS and standard mic input

Postby laurencebarker » Sun Feb 25, 2024 5:42 pm

My understanding is that new G2s will get the ferrite clamp.

I've done some experiments today to look at the noise level as reported by Audiotest.

Firstly with no mic inputs connected:
with a 3.5mm mic input, Boost not selected: Audiotest noise level is <-60dB
with a 3.5mm mic input, Boost selected: Audiotest noise level is ~-55dB
with balanced mic input, Boost not selected: Audiotest noise level is <-60dB
with balanced mic input, Boost selected: Audiotest noise level is ~-40dB

those figures all seem reasonable. the difference in noise level with boost selected is because the balanced preamp has 20dB gain.

Then with a dynamic mic connected to the balanced input, and using an oscilloscope to monitor the signal level on J2 pin 1 on the balanced input preamplifier board: I was getting ~100mV p-p on speech peaks. Viewed using audiotest, I was getting peaks at ~-10dBc.

I don't know how typical my mic is (it is a £30 hand microphone such as you get for karaoke etc) but I think the gain needs to be lower or higher. It doesn't seem right using the mic boost preamp in the codec as well as an external preamp. Increasing the gain using a transformer seems like an interesting idea too. I have made a modification to bias the differential inputs to the NE5534 using a voltage regulator rather than a potential divider as that seems like good practice. I might be able to take some photos of that if anyone is interested.
Laurence Barker G8NJJ
User avatar
w-u-2-o
Posts: 5576
Joined: Fri Mar 10, 2017 1:47 pm

Re: G2 distorted audio using TRS and standard mic input

Postby w-u-2-o » Sun Feb 25, 2024 9:14 pm

What was the rationale for 20dB of gain? The CODEC IC already has piles of available gain. Why not 3dB or even 0dB (unity) gain?
KC2QMA
Posts: 104
Joined: Mon Jul 13, 2020 11:13 pm

Re: G2 distorted audio using TRS and standard mic input

Postby KC2QMA » Tue Feb 27, 2024 1:02 pm

w-u-2-o wrote:What was the rationale for 20dB of gain? The CODEC IC already has piles of available gain. Why not 3dB or even 0dB (unity) gain?

I guess they thought since some microphones have low output like a Shure SM-7B having the extra gain would allow the user to plug the mic right into the radio without needing an external preamp?

I would like to recommend a very high quality cable that is very good at blocking RFI made by Canare.
This is the cable that I use in my shack for audio connections and have used for years in the studio it’s a bit pricey but you will only need a few feet/mm in the shack.
I use the L-4E5 and L-4E6 cable it's called Star Quad
https://www.canare.com/_files/ugd/00a28 ... 0dcc65.pdf

https://www.canare.com/analogaudiocable
laurencebarker
Posts: 225
Joined: Mon Nov 11, 2019 7:39 pm

Re: G2 distorted audio using TRS and standard mic input

Postby laurencebarker » Sun Mar 03, 2024 5:06 pm

I got permission from Abhi to publish the schematic of the Mic preamp board for the G2.

I've also marked up the modification I made: this biases the op amp to +5v using a linear regulator. I'm speculating that the cause of "pickup" observed by some users was the effect of 13.8V power supply regulation. At high RF output power, taking 20-25A from the power supply, the voltage into the radio might droop on speech peaks. That would be power level and power supply dependent. With the additional regulator, and with my power supply, it is absolutely stable.

It was a simple modification to make, and I've attached a photo of my PCB. The 78L05 regulator is to the rear of the picture, mounted dead-bug style over C12. A yellow wire runs to the pad of C6, and R1 is removed.

I also found that R8 was 10K on my board; that makes the gain lower than intended. I've increased it to 39K, which then means I have adequate gain from dynamic microphones without using "mic boost" in the codec chip.
Attachments
G8NJJ preamp mod.pdf
(444.02 KiB) Downloaded 51 times
6Y3A0036.JPG
6Y3A0036.JPG (1005.93 KiB) Viewed 843 times
Laurence Barker G8NJJ

Return to “G2 Operating System & Applications”