¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

On the TX signal, 5V tolerant I/Os and Pull-up resistors


 

Hi Fred

The 5V tolerant IO and the pull-up resistors to?+5V are all a red herring.?

According to the BS170 datasheet, the device has a gate threshold voltage of typically 2.1V but it could be as low as 0.8V or as high as 3.0V. I was nervous about?3.3V logic perhaps not driving it at sufficient voltage to be properly "ON". In other words not much safety margin between the 3.3V operating voltage of the microcontroller - bearing in mind the output will?not quite be rail-to-rail - and the worst case gate threshold?of the MOSFET.

My plan therefore was to use 10K pull-up resistors to?+5V. Then when I wanted the MOSFETs "On", I would set the I/O pin to be an input; and the 10K resistor would pull the MOSFET gate to?+5V. When I wanted the MOSFET to be "Off", I would set the I/O pin to be an output and set its level low. This is why you see these 10K pull-up resistors at the gates of the Tx/Rx switch Q6, and the three band select switches, and Q2 (on the TX signal).?

HOWEVER... I was mistaken. Because the transistor I used is BSS123 and according to its datasheet, its gate threshold voltage is minimum 0.8V, typical 1.7V, and maximum 2V. Therefore there is a lot more head room than I had expected with a BS170. So in the end, I did NOT keep to my original plan. I simply have the TX, RX and Band control signals all active all the time as Outputs, and set to high (3.3V) or low (0V) by the firmware. In either case (high or low), the pull-up to?+5V is of no consequence. It is an 0.5mA annoyance when the pin is at 0V, and a 0.17mA annoyance when the pin is at 3.3V. Nothing else.?

The microcontroller is not operated out of its spec. There is no possibility of damage. The pull-up resistors are ignored by the current firmware. Irrelevant. Unnecessary.?

As a matter of fact, in Rev 2 of the PCB, I simply deleted those pull-up resistors. I am talking about R5, R10, R11, R12 and R14. They are not required.?

Fred if you want to remove these resistors please go ahead. It makes no difference...?

73 hans G0UPL




 

Interesting.? I am reading that you should not have those pull-ups to 5V there at all if the pin is used as an output.? The inputs have clamping diodes to clamp the 5v input to 3.3v.? If anything having a 5v pull up will burn off current for no gain in the STM32 through one of those clamping diodes.??

It probably makes sense to remove those pull-ups if for anything else lower current draw.? I would normally agree that the risk of damage doing this is low due to the 10k value of pull-up, but there is at least some circumstantial evidence that you might be seeing TX and LPF switching problems now from what is being reported here.? ?Could it be this?? I honestly think it could be.?

So yeah, I will probably pull them on mine.? Again, couldn't hurt, might help.?

Fred W0FMS

On Mon, Nov 8, 2021, 1:25 AM Hans Summers <hans.summers@...> wrote:
Hi Fred

The 5V tolerant IO and the pull-up resistors to?+5V are all a red herring.?

According to the BS170 datasheet, the device has a gate threshold voltage of typically 2.1V but it could be as low as 0.8V or as high as 3.0V. I was nervous about?3.3V logic perhaps not driving it at sufficient voltage to be properly "ON". In other words not much safety margin between the 3.3V operating voltage of the microcontroller - bearing in mind the output will?not quite be rail-to-rail - and the worst case gate threshold?of the MOSFET.

My plan therefore was to use 10K pull-up resistors to?+5V. Then when I wanted the MOSFETs "On", I would set the I/O pin to be an input; and the 10K resistor would pull the MOSFET gate to?+5V. When I wanted the MOSFET to be "Off", I would set the I/O pin to be an output and set its level low. This is why you see these 10K pull-up resistors at the gates of the Tx/Rx switch Q6, and the three band select switches, and Q2 (on the TX signal).?

HOWEVER... I was mistaken. Because the transistor I used is BSS123 and according to its datasheet, its gate threshold voltage is minimum 0.8V, typical 1.7V, and maximum 2V. Therefore there is a lot more head room than I had expected with a BS170. So in the end, I did NOT keep to my original plan. I simply have the TX, RX and Band control signals all active all the time as Outputs, and set to high (3.3V) or low (0V) by the firmware. In either case (high or low), the pull-up to?+5V is of no consequence. It is an 0.5mA annoyance when the pin is at 0V, and a 0.17mA annoyance when the pin is at 3.3V. Nothing else.?

The microcontroller is not operated out of its spec. There is no possibility of damage. The pull-up resistors are ignored by the current firmware. Irrelevant. Unnecessary.?

As a matter of fact, in Rev 2 of the PCB, I simply deleted those pull-up resistors. I am talking about R5, R10, R11, R12 and R14. They are not required.?

Fred if you want to remove these resistors please go ahead. It makes no difference...?

73 hans G0UPL




 

Hi Fred?

I don't agree... When the pin is an output, the processor sets it at either 0V or 3.3V. Provided its current handling capability isn't abused, it doesn't matter what voltage it is "pulled up" to. It could be 1,000V provided the resistor was big enough, nobody would care.?

A 5V tolerant IO pin can withstand being connected to a low impedance 5V source. There are several clamping diodes in series so they don't draw huge current if the IO pin is connected to +5V.?

Those five pull up resistors are, categorically, totally unnecessary and totally harmless. Or I'll eat my hat.?

By all means remove them if it makes you feel better. I removed them in Rev 2. But not because they worried me at all. Just because less components is always better, even if only slightly so. More ground plane, less cost. Etc.?

I'm operating my QDX here every day without issues, on 40m and 20m. I've switched to 80m and 30m too but for receive only because my antenna isn't designed for 30m or 80m.

73 Hans G0UPL
http://qrp-labs.com


-------- Original message --------
From: Fred Spinner <fred.spinner@...>
Date: Mon, Nov 8, 2021, 7:27 PM
To: [email protected]
Subject: Re: [QRPLabs] On the TX signal, 5V tolerant I/Os and Pull-up resistors
Interesting.? I am reading that you should not have those pull-ups to 5V there at all if the pin is used as an output.? The inputs have clamping diodes to clamp the 5v input to 3.3v.? If anything having a 5v pull up will burn off current for no gain in the STM32 through one of those clamping diodes.??

It probably makes sense to remove those pull-ups if for anything else lower current draw.? I would normally agree that the risk of damage doing this is low due to the 10k value of pull-up, but there is at least some circumstantial evidence that you might be seeing TX and LPF switching problems now from what is being reported here.? ?Could it be this?? I honestly think it could be.?

So yeah, I will probably pull them on mine.? Again, couldn't hurt, might help.?

Fred W0FMS

On Mon, Nov 8, 2021, 1:25 AM Hans Summers <hans.summers@...> wrote:
Hi Fred

The 5V tolerant IO and the pull-up resistors to?+5V are all a red herring.?

According to the BS170 datasheet, the device has a gate threshold voltage of typically 2.1V but it could be as low as 0.8V or as high as 3.0V. I was nervous about?3.3V logic perhaps not driving it at sufficient voltage to be properly "ON". In other words not much safety margin between the 3.3V operating voltage of the microcontroller - bearing in mind the output will?not quite be rail-to-rail - and the worst case gate threshold?of the MOSFET.

My plan therefore was to use 10K pull-up resistors to?+5V. Then when I wanted the MOSFETs "On", I would set the I/O pin to be an input; and the 10K resistor would pull the MOSFET gate to?+5V. When I wanted the MOSFET to be "Off", I would set the I/O pin to be an output and set its level low. This is why you see these 10K pull-up resistors at the gates of the Tx/Rx switch Q6, and the three band select switches, and Q2 (on the TX signal).?

HOWEVER... I was mistaken. Because the transistor I used is BSS123 and according to its datasheet, its gate threshold voltage is minimum 0.8V, typical 1.7V, and maximum 2V. Therefore there is a lot more head room than I had expected with a BS170. So in the end, I did NOT keep to my original plan. I simply have the TX, RX and Band control signals all active all the time as Outputs, and set to high (3.3V) or low (0V) by the firmware. In either case (high or low), the pull-up to?+5V is of no consequence. It is an 0.5mA annoyance when the pin is at 0V, and a 0.17mA annoyance when the pin is at 3.3V. Nothing else.?

The microcontroller is not operated out of its spec. There is no possibility of damage. The pull-up resistors are ignored by the current firmware. Irrelevant. Unnecessary.?

As a matter of fact, in Rev 2 of the PCB, I simply deleted those pull-up resistors. I am talking about R5, R10, R11, R12 and R14. They are not required.?

Fred if you want to remove these resistors please go ahead. It makes no difference...?

73 hans G0UPL




 

All,

Just as a reminder the TX signal on my QDX is working fine.? The issue was the secondary check that the MPU does for a valid tone to set and not a failure of the I/O output.? For some reason, my Windows PC does not get along with the QDX.? My Raspberry Pi 4 seems to work.

Now if I can just keep from shorting out the finals again, I can find out why the output is low.

73
Evan
AC9TU


 

Well that's good news I guess.... I thought you said that the TX line from the processor was not functioning at all... I guess I misunderstood.

As bad as it potentially sounds for Hans, in reality we are just helping him improve the product.? ?I am starting to think these issues are not "permanent damage" type of issues, so they can be worked through.

I am glad it at least works with a RPi for you, though.? That's not a horrible limitation by any means.?

Now that you mention this... maybe Windows vs Linux needs to be mentioned with these issues from now on...? ?


Fred W0FMS?

On Mon, Nov 8, 2021, 10:50 AM Evan Hand <elhandjr@...> wrote:
All,

Just as a reminder the TX signal on my QDX is working fine.? The issue was the secondary check that the MPU does for a valid tone to set and not a failure of the I/O output.? For some reason, my Windows PC does not get along with the QDX.? My Raspberry Pi 4 seems to work.

Now if I can just keep from shorting out the finals again, I can find out why the output is low.

73
Evan
AC9TU


 

Fred,
Fred,

At first, I did think that the TX line out of the STM32 was at fault and reported the symptoms in the other thread.? After Hans posted the way that the PTT actually works I went back and change to the Raspberry Pi and found that the TX line DID work.? So you were not incorrect, just not informed on the latest news on the other thread.

So I apologize for any confusion that I might have created.? In my defense, the total logic on how that line is set was not explained before.? It was after the explanation from Hans and the RPi test that I confirmed it was not an output pin failure.

Thank you for the suggestions.
73
Evan
AC9TU


 

Evan/ Fred: ?very interesting. My problems ended up being the same thing. I moved the QDX over to my Mac and it is performing normally. I have a USB ?cable with ferrites on order so am currently using the unprotected cable and it works great on the Mac. I¡¯m hoping the new protected cable and installing the radio in its case will improve the situation so it will work on the cheap windows laptop.?

I was getting a lot of warnings regarding the sound card on the windows machine. No warnings on the Mac.?

73¡­ Ron

On Mon, Nov 8, 2021 at 13:05 Evan Hand <elhandjr@...> wrote:
Fred,
Fred,

At first, I did think that the TX line out of the STM32 was at fault and reported the symptoms in the other thread.? After Hans posted the way that the PTT actually works I went back and change to the Raspberry Pi and found that the TX line DID work.? So you were not incorrect, just not informed on the latest news on the other thread.

So I apologize for any confusion that I might have created.? In my defense, the total logic on how that line is set was not explained before.? It was after the explanation from Hans and the RPi test that I confirmed it was not an output pin failure.

Thank you for the suggestions.
73
Evan
AC9TU


 

Hi Ronald,

I was seeing something similar with WSJT-X here today in Windows 10 where Tune would enable RF but trying to initial a QSO would not result in any RF although the QDX was indicating it was in transmit mode. But when I switched over to JS8Call, it was working fine! So I was fiddling around with the CAT settings in WSJT-X and suddenly it was working, but I'm not sure what I changed to fix it,?ha, ha. Here is my (working) Windows 10 CAT settings in WSJT-X for reference:




I am a bit perplexed as to what setting was causing the issue, and also why JS8Call (which is very similar) was working fine.

73,
Gregg


On Mon, Nov 8, 2021 at 9:21 PM Ronald Taylor <wa7gil@...> wrote:
Evan/ Fred: ?very interesting. My problems ended up being the same thing. I moved the QDX over to my Mac and it is performing normally. I have a USB ?cable with ferrites on order so am currently using the unprotected cable and it works great on the Mac. I¡¯m hoping the new protected cable and installing the radio in its case will improve the situation so it will work on the cheap windows laptop.?

I was getting a lot of warnings regarding the sound card on the windows machine. No warnings on the Mac.?

73¡­ Ron

On Mon, Nov 8, 2021 at 13:05 Evan Hand <elhandjr@...> wrote:
Fred,
Fred,

At first, I did think that the TX line out of the STM32 was at fault and reported the symptoms in the other thread.? After Hans posted the way that the PTT actually works I went back and change to the Raspberry Pi and found that the TX line DID work.? So you were not incorrect, just not informed on the latest news on the other thread.

So I apologize for any confusion that I might have created.? In my defense, the total logic on how that line is set was not explained before.? It was after the explanation from Hans and the RPi test that I confirmed it was not an output pin failure.

Thank you for the suggestions.
73
Evan
AC9TU