0

I have 20 ldr photoresistors that I will connect to GPIO.

They are connected pretty much like this (but without led): enter image description here

I have also a Hifiberry Dac2Pro connected as a hat.
https://www.hifiberry.com/shop/boards/hifiberry-dac2-pro/

I have meassured with amperemeter in serie from the 3.3volt output and are getting 0.75 mA. Will my 20 ldr get 20 * 0.75 = 15 mA. Ive read that the max current on RPi 4 is 16mA? https://www.tomshardware.com/reviews/raspberry-pi-gpio-pinout,6122.html

Im not sure how much current the HifiBerry draws.

Should I use an external powersupply for feeding the LDR? Can I in that case use 5.2 voltage as powersupply or does it have to be 3.3?

Do I meassure correct? How can I calculate this so I be on the safe side not destroying the RPi

Thanks

1

2 Answers 2

3

The maximum current draw from ONE GPIO is recommended to be 16mA or less.

The maximum current draw from ALL GPIO is recommended to be 50mA or less.

As long as you are within those limits your Pi will be fine.

0

Joan's answer is correct but to address the other question you asked an external power supply will not help.

The Pi GPIO power circuitry can safely handle 50mA; whether it is sourcing or sinking.
If you need more you need transistors but I doubt LDR need much current.


An LDR is a light dependent variable resistor. The Pi has no analog capability so there is no point in connecting to a GPIO.

It is far from clear WHAT you measured. It is not possible to measure current draw by HATs (at least without a dedicated test rig).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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