0
\$\begingroup\$

I am trying to read ADC sensor input to two microcontrollers. I am curious since I am sharing the ADC sensor input, will the internal resistance/circuitry of one microcontroller affect the reading of another microcontroller. In one of the microcontroller's datasheet, it's written that if I turn off that uC then its pin goes to pull down mode then this might affect the other uC reading.

Is there any circuitry I should put in between to avoid any interference of other microcontrollers? Like putting RC filter should work I guess. Following is the block diagram of the situation where I want suggestions/ideas for custom circuitry:

enter image description here

\$\endgroup\$
  • \$\begingroup\$ What do you mean by "turn off"? Remove power from the chip? \$\endgroup\$ – Spehro Pefhany Apr 18 '17 at 10:55
  • \$\begingroup\$ @SpehroPefhany: Yes, removing power from the chip. \$\endgroup\$ – Rudraksh007 Apr 18 '17 at 11:09
  • \$\begingroup\$ Use buffer that has high impedance on input when in the off state to isolate the powered down micro input. Alternately compensate for the second ADC input load by checking if the other micro is awake and using a fudge factor. \$\endgroup\$ – KalleMP Apr 18 '17 at 16:11
6
\$\begingroup\$

If in doubt, use op-amp buffers to segregate each ADC from each other (and the sensor output). You do need to be aware that some op-amps won't be suitable either because of power supply restrictions or error voltages produced (information not mentioned in your question).

enter image description here

In one of the microcontroller's datasheet, it's written that if I turn off that uC then it's pin goes to pull down mode then this might affect the other uC reading

It would be unusual for this to happen - it may produce a light pull down of value 100k or greater of course.

Like putting RC filter should work I guess.

This normally works but you do create measurement bandwidth limitations that may or may not be relevant to your application.

Another option is to use an external ADC with a serial output - both microprocessors could read the serial data output with one micro controlling the clocking out of data and the other one being slave to the clocking.

\$\endgroup\$
  • 1
    \$\begingroup\$ you could also have one uC measure the voltage and the share it with the other uC? \$\endgroup\$ – Makoto Apr 18 '17 at 8:42
  • \$\begingroup\$ @Makoto very true. \$\endgroup\$ – Andy aka Apr 18 '17 at 8:43
  • 1
    \$\begingroup\$ @Makoto: I need to measure the ADC value even when one uC is in off state. \$\endgroup\$ – Rudraksh007 Apr 18 '17 at 11:08
2
\$\begingroup\$

If you remove power from a chip with an input present then the internal ESD protection networks generally will conduct, which can cause problems or even damage. You can think of them as diodes to Vdd/GND with a relatively low resistance in series.

You can simply add series resistance in some cases to deal with this. Let's suppose your source is very low impedance so loading it with a few K to ground doesn't change it significantly. Some processors are happy enough with 10K in series with their ADC inputs. So you give each processor its own 10K resistor, perhaps with a small capacitor (eg. nF) to ground at the chip. Then less than 500uA will flow with a 5V input. Usually that's acceptable, but read the MCU datasheet carefully and make sure the 500uA won't change the source voltage unacceptably. Some MCU data sheets simply state that you cannot exceed Vdd by more than (say) 300mV absolute maximum. A resistor is inadequate in such a case- you would either have to violate the abs max rating (maybe okay in this particular case, but does not give one a warm feeling) or add circuitry that prevents the situation (or, preferably, pick another MCU!)

Like this, but the ADC input is also connected to the CMOS gates. Connecting an input voltage with Vdd disconnected will result in current flowing out the Vdd pin, and possibly powering up the MCU or other circuitry. As well as loading the input, that could cause the micro to not power-on reset properly or cause other problems.

enter image description here

If you need a high impedance input you can use an op-amp buffer and use that to drive the resistors, however the same issue will generally exist if power is removed from the op-amp. That could be handled by having an always-powered op-amp driving (through relatively large series resistors) two more op-amps that are powered with the supplies of the respective MCU.

It's a lot easier if you can ensure that both MCUs are powered at the same time and an input is never present when power is not present. You can usually power-down an MCU (eg. sleep mode) to get very low power consumption without removing Vdd.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.