Electronic – arduino – Convert 5V PWM Arduino Signal into 12V signal that can deliver 100mA

arduinooperational-amplifierpwm

I am an electronics newbie and I want to convert the 5V PWM signal from an Arduino into a 12V PWM signal which delivers 100mA (rms). How would such a circuit look like? I tried with OpAmps and got the 12V running, but the OpAmps I had could only deliver a few mA. Which OpAmp would be the correct one for me? I have supply voltages of 5V-30V.

Since for my application it doesn't matter if the output is a true analog or a PWM signal I also don't mind changing the signal to a true analog one.

Best Answer

Use two transistors, one to convert the logic signal to 12V and then another to switch the 12v

schematic

simulate this circuit – Schematic created using CircuitLab

Seeing as I want to use the two transistors as saturated switches I need to keep the collector current to base current ratio small, IE less than 10 (but for small transistors (which typically have larger gains than big transistors) like these less aiming for less than 20 would probably be just fine)

Assuming the base emitter voltage is about 0.7v with Q1 on (conducting fully) R1 passes about 11.3mA, R3 accounts for 0.07mA and the rest (call it 11.2 mA comes from, Q2 base. with a 100mA load on Q2 collector that's a current ratio of about 9:1. Thus the collector-emitter voltage drop will be small and the power will flow to the load instead of heating up the transistor.

Q1 needs to accept a little under 12mA (I'm rounding up because two significant figures are plenty here I'm aiming for a ballpark, not a bull's eye) so that means about 1.2mA into the base. from a 5V logic signal that's be about 3K, I guessed 4.7K which means about 0.9mA which is less than I wanted, but still plenty. At 10 mA through the collector a 2N3904 has a current gain of more than 50 so asking it to give a gain of 13 is not going to be a problem.