1

In order to reduce the size of my board, I would like to connect directly my microcontroller to a current source which sink 9 mA (worst case). The datasheet above shows that it is possible. Nevertheless, I would like to have your opinion about this. I think that it will reduce the life time of the circuit as it heats up the microcontroller. What do you think ?

enter image description here

Thank you very much and have a nice day !

Jess
  • 2,694
  • 1
  • 18
  • 46
  • So you have a current source of -9mA? Does this stay within Vss-Vdd? – Jeroen3 Jul 23 '20 at 10:56
  • 2
    Jess - Hi, Although it's unlikely to affect answers at only 9 mA, **beware**! You have posted part of the Absolute Maximum Ratings table for that STM32 MCU (please give the model). Device behaviour isn't guaranteed at anything exceeding the functional ratings (which will be less than those Absolute Maximum Ratings). So you also need to find (and I recommend you add into the question) the table from that same datasheet, showing the GPIO Output Driving Voltage and Output Driving Current (they are related) & check there too. For at least some STM32 MCUs, the ratings vary at lower VDD. Good luck! – SamGibson Jul 23 '20 at 11:43
  • Thank you for this comment it was helpful ! – Jess Jul 23 '20 at 12:34

2 Answers2

3

The rules are simple.

If between Vss and Vdd you can to 25mA on one pin.
All pins together may do 80 mA. So 80mA in and 80mA out.
All currents should stay within 120mA, either way.

The current the chip itself uses subtracts from both ΣIvdd and ΣIvss.

Example: it is possible to sink 50ma and source 50mA with only 4 pins. (don't do that though)

If outside Vss to Vdd, 5mA max, polarity doesn't matter.

However, there is a caveat! Look at the Output voltage characteristics.
You may be looking at a 400 mV drop in voltage over the pin.

And every milliamp of current through the chip adds to the package power, see the chapter about thermals.

Jeroen3
  • 21,976
  • 36
  • 73
1

Your current source is going to source 9 mA. The microcontroller is going to sink it.

The maximum current for any one pin is 25 mA sink or source so your maximum of 9 mA is very safe. Watch out for the chip total current if you have multiple current sources that can be on simultaneously.

Transistor
  • 168,990
  • 12
  • 186
  • 385
  • No the current source is connected to a GPIO, so the current source will sink to the microcontroller 9mA ? The microcontroller has to source 9 mA . Did I do an error ? – Jess Jul 23 '20 at 11:15
  • 1
    Add in a circuit using the CircuitLab button on the editor toolbar. Use the custom component for the microcontroller. Then it will be clear what's sinking or sourcing. – Transistor Jul 23 '20 at 11:18