Pin: max sink current
I am trying to find hardware information about the pins of the SiPy (the current they can drain, the ADC voltage ranges, etc...). I can only find information in the pinout diagram or in the API. Is there any other documentation source for the hardware description?
Meanwhile, my most immediate question is: can I use the GPIO to switch on/down a peripheral when I do not need to use them (f.i. a laser or ultrasonic distance sensor)? Must I use a controller interruptor (f.i. a transistor) to drive enought sink current?
First approach if to use the open drain configuration of a GPIO pin to sink the current of the peripheral, connecting the GND input of it to the GPIO used to control. "0" switchs on the peripheral, "1" switchs it off. Is it possible? How much current can I sink using this method?
@littlebat It said max current 40 mA in the maximum ratings sections, but I myself did not trust that anyhow. Even if, the output levels then are somewhat off GND/Vcc. So 12 mA sounds much more convenient.
40ma drive does not mean 40ma source/sink. I think it is 12ma.
@txinto Most information you can find in the ESP32 data sheet and the technical Reference Manual. All of that can be found here: http://www.espressif.com/en/support/download/documents?keys=&field_type_tid=13
While the GPIO is specified for 40mA max, I would not use it to power other devices, unless their consumption is really low (like 5mA). Better use an external transistor. And for some reason (mayby resulting from analog circuits), I never would switch the GND pin, but prefer to switch Vcc. You can use P-channel MosFet for that purpose, which need almost no gate power and come in all possible current switching capabilities.