Activating a bus line stronger pull up resistor on demand

Thread Starter

cmartinez

Joined Jan 17, 2007
8,122
Here's the problem, and it should be an easy yes or no answer to what I'm trying to do.

There's an arrangement of MCU's working in parallel, and they all draw power from the same battery, so power use is critical. In this arrangement, there's a master MCU that receives UART comms from the other slave MCU's. This is possible because the other MCU's UART Tx outputs are configured as open drain, so all they do is pull the bus line down when it's time to transmit information, while the bus itself is being pulled up by a single 100k resistor. Never mind the communications protocol being used.

The aforementioned setup works well at low frequencies (say about 120 bauds). But there are moments during the circuit's operation in which the working frequency switches to a much higher value. About a thousand fold in fact, or 115,200 bauds to be precise. Communication at this speed between the master MCU and slaves is not a problem, since they're all physically close together. The problem is that I found that a stronger pull up is needed, or otherwise the bus line won't have enough time to raise back up when the next bit is being transmitted at this speed. I know that because I've already checked it with my oscilloscope. In fact, if I change the 100k pull up resistor for a 10k one, things start working acceptably well.

But the problem is that I'd like to keep power draw as low as possible. And UART comms are used very frequently. So the value of the pull up resistor is important. More than 99% of the time the circuit works at a low frequency. And every once in a while it has to work at a high frequency. So using a fixed 10k pull up would be a huge waste of energy.

My question is, would the circuit shown below do the trick? ... R1 is the fixed weak pull up resistor used when working at low frequencies. whereas I intend to activate the strong pull up resistor (R2) on demand when the working frequency goes high using a logic level nFet (M1) ... but M1's source pin is not connected to ground, but is rather being pulled up by R1 until one of the slaves pulls it down... would R2 come into action then and act as a stronger pull up?

1695406814541.png
 

ElectricSpidey

Joined Dec 2, 2017
2,628
I know this isn't the answer you are looking for...as per a simple yes/no.

But couldn't you simply use a GPIO pin to pull up the bus with the 10k resistor and then switch to hi-z when not needed?

But to sort of answer your question, I would suspect some signal distortion using that circuit.

Edit:

If you do go with using a transistor, I would suspect switching the high side with a PMOS would work much better.
 
Last edited:

Thread Starter

cmartinez

Joined Jan 17, 2007
8,122
But couldn't you simply use a GPIO pin to pull up the buss with the 10k resistor and then switch to hi-z when not needed?
Also, keep in mind that the pull up does not draw any current until it's pulled down by one of the slaves, and that only happens during active comms.
 

Ian0

Joined Aug 7, 2020
8,943
Could you negotiate the baud rate? If you establish at 120 baud who is going to communicate with whom, could you then switch the transmitter to push-pull instead of open-drain, and disable all the other transmitters?
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,122
Could you negotiate the baud rate? If you establish at 120 baud who is going to communicate with whom, could you then switch the transmitter to push-pull instead of open-drain, and disable all the other transmitters?
I've done that before quite successfully in a different architecture... but the thing here is one of the MCU's in the bus belongs to a GPRS module whose Tx line cannot be configured that way. And I'm using diodes to prevent the Tx outputs from interfering with one another. So the use of a pull up is a must in this case.
 

Ian0

Joined Aug 7, 2020
8,943
I've done that before quite successfully in a different architecture... but the thing here is one of the MCU's in the bus belongs to a GPRS module whose Tx line cannot be configured that way. And I'm using diodes to prevent the Tx outputs from interfering with one another. So the use of a pull up is a must in this case.
Fair enough. I'd go with the P-Channel FET in that case.
 

ElectricSpidey

Joined Dec 2, 2017
2,628
Also, keep in mind that the pull up does not draw any current until it's pulled down by one of the slaves, and that only happens during active comms.
That's fine...the 10k connected to a high-z pin won't draw any current, then when it's pulled high by the pin it will act as your lower resistance pullup.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,122
I've just checked my circuitry. And the only available pin to activate the Fet works at a normally low state because it's already being used to turn on an nFet which in turn activates a pFet that's switches a device that works at a higher voltage on and off.

So if I were to use a pFet for this purpose, I'd need to switch it on using an nFet. And that makes no sense, efficiency wise. IMHO.

I'm going to try and use an nFet first, see how it works.
 

WBahn

Joined Mar 31, 2012
29,496
The NFET probably isn't going to be able to pull the bus line HI enough because you need whatever the threshold voltage is as the gate-source voltage for it. As it tries to pull higher, the channel resistance is going to rapidly increase until you are right back where you started with a too-weak pullup.

I don't quite follow the issue about the pin already being used for something else. If you are going to use that same pin for two different things, then are those two different things always in the same state? In other words, you need the high school communications exactly at the same time that you need to power the other device that works at a higher voltage?

If, so, then if you already have an NFET that is being used to turn on the PFET for this other device. Why not use that same signal to also turn on a high-side PFET for your high-speed pullup? Or, you can probably even use the other PFET that you already have and tie your high-speed resistor to it. If it's at a higher voltage than you need for your pullup, you can always drop it with diodes or a Zener.
 

Ian0

Joined Aug 7, 2020
8,943
How about an emitter follower? You only have to pull up to just beyond the Voh threshold voltage, not all the way to the supply, and pulling up to a lower voltage will take less energy.
 

MisterBill2

Joined Jan 23, 2018
16,534
A really simple scheme that has a chance of working is to use two resistors in series and a capacitor to common between them. For the short data busts at high speed it would be the 10K resistor from the capacitor providing the power, but the steady current would be limited by the input resistance, which you will need to experiment a bit to know the correct value. Probably less than the original 100K ohms.
 
Top