# Need help calculating maximum current in circuit

Discussion in 'General Electronics Chat' started by parhallenberg, Dec 19, 2015.

1. ### parhallenberg Thread Starter New Member

Dec 19, 2015
10
0
Hi!

I'm making a modified version of the water leak detector from Make #28, please see attached image for my circuit. Right now it's working, with a LED (between Test point and GND) lighting up on when detecting water or when activating test switch. Now I want to calculate the maximum current that could rush through the circuit, before I dare to connect Test point to an input pin on the Arduino UNO (I would also like to be able to supply 5V from an output pin, which also depends on maximum current draw).

Since I'm new to PNP transistors, I'm not even sure where to start. Which route is the important one for me? Is it A) 5V --> PN2907 --> Test point --> R5 --> GND? (And in that case, maybe I should put a resistor between 5V and PN2907 Collector to minimize current to Test point?) Or is it B) 5V --> Test switch --> R1 --> R4 --> Test point --> R5 --> GND?
A)
I = V / R5
V = 5V
R5 = 12k
I = 0,42mA

B)
I = V / (R1 + R4+ R5)
V = 5V
R1 + R4 + R5 = 36k
I = 0,14mA

Apr 5, 2008
15,796
2,384
Hello,

This way we can see what you are doing.

Bertus

3. ### parhallenberg Thread Starter New Member

Dec 19, 2015
10
0
Sorry, yes of course. Not sure if decent, though. Usually I do them on paper. This is from Fritzing:
U1 is my test point. U2 is GND and 5V. U3 is two test probes, which will act like a closed switch if put in water. S1 is test switch (NO). And Q1 is PN2907, Q2 is 2n3904.
View attachment 96842

4. ### parhallenberg Thread Starter New Member

Dec 19, 2015
10
0
Sorry again, there is an error in the schematic. Q2 emitter should go to GND. Corrected here:

5. ### Alec_t AAC Fanatic!

Sep 17, 2013
5,956
1,131
When Q1 switches on, tens of mA could flow into test point U1 if it is a low-impedance input of the Arduino. The current is determined by the gain (beta) of Q1.

6. ### parhallenberg Thread Starter New Member

Dec 19, 2015
10
0
Thanks. From the PN2907 data sheet I find a gain of between min 35-100 and max 300, depending on collector current (Ic). I guess Ic is decided by Q2 gain, which is maximum 300, according to 2N3904 datasheet (minimum is again dependent on collector current). I really don't know what to make of this... Would it be enough to protect U1 with a resistor between Q1 and U1, or would the voltage drop over the resistor give me a wrong reading on the Arduino side? Would a resistor between 5V and Q1 be better?