# Convert 5V PWM Arduino Signal into 12V signal that can deliver 100mA

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.

• If you don't mind the output being steady, do you really need to use the 5V PWM to control it? If not, you can simply use a transistor, and use one of the 5V pins from the arduino to the transistor base to switch the 12V
– MCG
Dec 6, 2019 at 15:53
• The signal is for a motor control (the motor reacts slow enough that PWM is ok) which I want to be able to drive very slowly. With transistors the lower limit would effectively be the 0.7V-bandgap, wouldn't it? Dec 6, 2019 at 15:59
• Which motor, and what is it driving? Dec 6, 2019 at 18:53

Use two transistors, one to convert the logic signal to 12V and then another to switch the 12v 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.

• How do I know which resistors to choose? (I want to understand your line of thought) Dec 8, 2019 at 18:02
• Hey, what is the connection between low current gain and low Vce ? Dec 11, 2019 at 16:14
• VCE is low when transistor has enough gain to pass all the desired collector/emitter current, this is called saturation. so if you design for gains significantly lower than the promised gain of the part you can be sure of a low VCE this is sometimes called "Forced Beta" Dec 11, 2019 at 21:32

If you have +12V as power supply you can use a MOSFET Gate Driver like MCP14E7

Connections:

• 1 Not connect
• 2 Pwm output of arduino
• 3 GND
• 6 +12V
• 7 Pwm 12V output
• There's circuit editor built into the site that you can use to draw diagrams instead of trying to describe circuits with words.
– JRE
Dec 6, 2019 at 16:14
• I wonder why a normal transistor or MOSFET would not suffice. Dec 6, 2019 at 16:48