wiring an arducam with the power line on a transistor

Thread Starter

Andrew Rudd

Joined Jul 28, 2020
3
I've set up an arducam mini 2MP plus with a nrf52DK (similar to an arduino for this set up) to take pictures.

Ive got the board and camera working when the camera is wired with the VCC line and GND wired directly into the boards 3.3v line and ground pins. The arducam uses about 100 mAmps when its being used or not. Low power mode can run at 20 mAmps. I'm trying to run this on a couple AA batteries so I need really low consumption. Ive been able to modify the code as needed so I can cut the power completely for essentially 0 current and reconnect manually and the camera functions normally. Now I'm trying to control the power to the arducam programmatically with a GPIO pin into a transistor. When I run the the power through the transistor the arducam doesn't work. The only thing I changed is the VCC and GND lines so I assume the arducam isn't getting enough voltage or current. Ive tried to set up the power line about every conceivable way.

Here is the set up and the requirements Board VCC = 3.3 volts max current ~ 150 mAmps GPIO = 3.3 volts current ~15 mAmps

arducam voltage rage: 3.3volts - 5volts 100mAmps voltage on line with arducam 3v (.3volt drop) transistor: PN2222

I would prefer to put the transistor between the power source the load rather than between the load and the ground. The voltage and current in that case are real bad though but when I open the ground from the arducam the arducam still draws about 8mAmps current not sure why or how. I think I need to switch the transistor from PNP to an NPN for that to work. (If I understand those correctly the current flows from E to C when no current on the base. Does this cause a high power draw when off since the GPIO is pulled high in order to stop current flow?)

Here are some of the scenarios and the resulting readings when the GPIO is supplying current

transistor between power and load

3.3v
\/
C
B __|
|
E
\/
2.4v - 50 mAmp 1K 40 mAmp
Load

3.3v
\/
E
B __|
|
C
\/
2.2v - 20 mAmp 1K 11 mAmp
Load

here is the circuit drawing to the best of my ability. I wasnt sure how to represent the load in the tool I was using so I just put it as a resistor.

1595952174012.png


Ive tried with a 1K resistor between the GPIO and the transistor the voltage is the same. The current does drop a little in that case.

transistor between load and ground

3.3v
Load
\/
C
B __|
|
E
\/
~3v ~90 mAmps
ground

3.3v
Load
\/
E
B __|
|
C
\/
~3v ~90 mAmps
ground

circuit drawing again. only 1 but I tested the transistor in both directions as you can see above

1595952247590.png

everything is the same with 1k resistor between GPIO and transistor base I assume the 3v reading is a result of the voltage drop caused by the arducam and the reason the camera inst running is the lower current pull. Best I can tell the emmiter/collector direction doesnt really matter.

Any suggestions on what I can do to get the camera working when GPIO is on and pull the lowest power draw when off?

Thanks for your help!
 

dl324

Joined Mar 30, 2015
16,846
Welcome to AAC!
I would prefer to put the transistor between the power source the load
This is referred to as driving high side and you use a PNP transistor or P channel MOSFET to do this.
rather than between the load and the ground.
This is referred to as driving low side and you use an N type device to do this.

In your first schematic, the circuit on the left doesn't make any sense. The one on the right is a classic example of how not to drive something high side. It requires the drive signal to be a diode drop above the load voltage and most times, that isn't possible.

If you're going to use a transistor to drive a 150mA load, the base current needs to be at least 15mA if you're using a 2N3904. For BC, e.g. BC547, the datasheet says you can use Ic=20Ib.
 

Thread Starter

Andrew Rudd

Joined Jul 28, 2020
3
Thanks for the quick reply! Yea some of the circuits don't make sense as I was pretty much just trying everything. So I'm thinking since the Load (arducam) is drawing 8 mAmps of current even when the ground is open (Im assuming the current is traveling through the data pins when the ground is open) and I want the current to go to 0 I need to put a PNP transistor between the supply VDD and the Load VCC. I don't think I need a mosfet as the current is pretty low or should I use 1? For this case, scenario 1: the GPIO needs to be supplying current (~15mAmps) to keep the circuit open and scenario 2: no current on the GPIO to close the circuit and supply power to the Load (arducam). This should in theory work correct? Is there something else I need to consider? When the GPIO is supplying current to keep the transistor open, which will be the state 99% of the time, will there be much power drawn from the battery to maintain that open circuit on the transistor?
 

dl324

Joined Mar 30, 2015
16,846
I don't think I need a mosfet as the current is pretty low or should I use 1?
That's not the only reason to use a MOSFET.
For this case, scenario 1: the GPIO needs to be supplying current (~15mAmps) to keep the circuit open
Don't understand what you're trying to say. If you use a PNP transistor to switch the load, the GPIO will only sink current when it is turning the transistor on. When the transistor is off, no current will be drawn from the GPIO.
When the GPIO is supplying current to keep the transistor open, which will be the state 99% of the time, will there be much power drawn from the battery to maintain that open circuit on the transistor?
Still don't understand what you mean. With a PNP transistor, the GPIO will need to sink the base current as long as the load is to be powered.

If you use a P channel MOSFET, the GPIO would dissipate very little power whether the MOSFET is on or off. If you're worried about power dissipation from turning on the transistor, a MOSFET would make that a non-issue; unless you're going to be switching it at a high frequency. In that case, gate charging current might be a limitation and you'd want to go with a gate driver in that situation.
 

Thread Starter

Andrew Rudd

Joined Jul 28, 2020
3
great thanks! Sounds like the P channel MOSFET is the correct solution. I will only be changing the state a few times per day. The camera will be off 99% of the time. The GPIO will flip it on just long enough to take 1 picture and then turn it back off. This should take less than 4 seconds but at least a second to give the camera time to focus and set exposure. This on and off will only happen twice a day. I'll pick up a PNP transistor as well to see how it performs. Ill report back once I get everything set up. Thanks for the help!
 

RPLaJeunesse

Joined Jul 29, 2018
252
Take a look at the 2N4403 for your PNP transistor. It has good current gain up well past 100mA and will be happy with about 2mA base current, so use about a 1K resistor from GPIO to base. But expect to drop 0.4V across the transistor when it is on at 100mA. Not many thru-hole P-FETs work well with 3V drive, good luck finding one. In surface mount the MCH3383 is a possibility.
 

dl324

Joined Mar 30, 2015
16,846
Take a look at the 2N4403 for your PNP transistor. It has good current gain up well past 100mA and will be happy with about 2mA base current,
When BJT's are used in saturation mode, the rule of thumb for 2N* transistors is Ib = 0.1Ic. Some BC* transistors specify a beta of 20 for saturation mode. You're not going to get a beta of 50 unless you use a Darlington.
 

RPLaJeunesse

Joined Jul 29, 2018
252
When BJT's are used in saturation mode, the rule of thumb for 2N* transistors is Ib = 0.1Ic. Some BC* transistors specify a beta of 20 for saturation mode. You're not going to get a beta of 50 unless you use a Darlington.
Yes, for hard saturation the spec is usually Ic/Ib = 10 but that's because the transistor is in full saturation, not on the edge of it. On the edge of saturation the transistor is running at minimum specified beta (or more), which is 100 for the 2N4403 at room temp and Ic = 100mA. As for a Darlington you will never get a saturation voltage as low as one Vbe, so that's just ruled out for low voltage use.
 

dl324

Joined Mar 30, 2015
16,846
Yes, for hard saturation the spec is usually Ic/Ib = 10 but that's because the transistor is in full saturation, not on the edge of it. On the edge of saturation the transistor is running at minimum specified beta (or more), which is 100 for the 2N4403 at room temp and Ic = 100mA.
What's the point. To drive it hard in to saturation, you need to provide Ib = 0.1Ic.
As for a Darlington you will never get a saturation voltage as low as one Vbe, so that's just ruled out for low voltage use.
You can if you don't connect the two collectors of the transistors together.
 

dl324

Joined Mar 30, 2015
16,846
Then it wouldn't be a Darlington would it, just direct coupled drive, surely
There are a number of transistor configurations shown in the Darlington's patent. I don't think the one I mentioned is given, but it's a Darlington-like current multiplier without the high saturation voltage.

EDIT: Simulation showing beta of about 300 and a saturation voltage of 81mV.
1596579826319.png

The crux of Darlington's patent was configuring 2 or more transistors to achieve current multiplication. They must have been splitting hairs if they awarded a patent for a Sziklai pair.

EDIT 2: Traditional Darlington for comparison.
1596588584296.png

Here are some Darlingtons from the patent that don't have the collectors connected:
1596589375780.png
EDIT 3: And, finally, a commercial reference to a split Darlington configuration:
clipimage.jpg
clipimage.jpg
 
Last edited:

AndrewR

Joined Sep 10, 2018
9
Thanks for the great replies all. I did get both a PNP transistor and a p channel MOSFET. I set up the the pnp transistor with a NPN transistor on the base as I couldn't figure out a way to toggle the connection with ground without it. It did work but initially only on the 5v channel from the board and not on the 3v channel. I soldered everything together rather than using the bread board I was using to test. Once everything was soldered up the 3v channel worked as well. I suppose the bread board was causing some resistance of something. I never got to trying the p channel MOSFET because the PNP transistor was working so well. Thanks again for all your help on the successful project!
 
Top