Tuesday, 15 April 2014

pic - How to dual power PIC18F4550?


In the datasheet there is this shematic how to dual power 18F4550. However they don't specify which transistor to use and what resistor values have to be. For capacitor I use 100uF (diode side) and 470nF (Vusb side). I tried putting in whatever BJT I have at home but it did not switch to Vbus when no Vself available.


Could someone please suggest which BJT to use (model no.) and which resistors should come with it. BJTs are like a dark forest for me.


schematic



Answer



The problem is that you used an NPN transistor instead of the PNP transistor specified in the schematic. Replacing the transistor with a PNP device should get things working. A common PNP transistor that I can remember off the top of my head is the 2N3906, but there are probably other devices better suited for this task.



The basic premise of the circuit is that when the circuit is not self powered, VSELF is floating or at 0 V. This causes a current to be pulled from VBUS through the emitter and the base, and through the two resistors to ground. To estimate what the sum of these resistors should be, we can make some assumptions about the circuit that are somewhat pessimistic. We will say that VBUS = 4.5 V and that we will be drawing 100 mA, which is one of the power levels of USB. We will use the 2N3906 datasheet for some of these numbers.


enter image description here


\$V_{BE} = 0.8 V\mbox{ to }0.9V \mbox{ at }\beta=10\$ depending on temperature (see figure above)


\$I_B=\dfrac{I_C}{\beta}=\dfrac{100 mA}{10} = 10mA\$


\$V_B=V_{BUS}-V_{BE}=4.5V - 0.9V=3.6V\$


\$R_1+R_2=\dfrac{V_B}{I_B}=\dfrac{3.6V}{10mA}=360\Omega\$


Without knowing what else is connected to VSELF or how VSELF behaves when it is not powering the device, I would be inclined to recommend the bottom resistor be 330 Ohms, and the top resistor be 33 Ohms, or omitting the top resistor completely (and having the bottom resistor equal to 360 Ohms).


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...