Attached below is my circuit I just quickly drew up. I don't know how to add the picture with my text without it being way to small or way to big. Anyways The goal of this circuit is to have the NPN transistor be driven by my raspberry pi at some frequency and then have the NPN drive the PNP. I want to be able to vary the voltage on R4 by changing the duty cycle through the Pi. The goal is to be able to control the current being drawn through the circuit by making a program that changes the duty cycle over time on the pi while having the constant 5.3V input voltage. Later I want to add a Low Pass filter to get an analog rather than digital output but i'm back peddling and trying to make sure I know what I'm doing on this part. The max current I want to achieve is 400 mA. I'm currently trying to learn circuits so much of the concepts are foreign to me so bear with me. Someone more experienced than me originally drew me up this circuit so my question is, what purpose would R1 have in this instance? If i'm varying the current running through the PNP transitor, do I calculate the base resistor based on the worst case current running from the emitter to collector? How would I go about calculating the base resistor R3? With this set up could I get a relatively smooth control of the current through the circuit by adjusting the PWM duty cycle with a program?
Attachments
-
142.2 KB Views: 54