Translating PWM from 5v to 10v

Thread Starter

ill_switch

Joined Mar 8, 2010
5
Hello forum,

This is my first post here, looking for advice because I've had trouble getting a consistent answer from other sources. I'm a self-taught hobbyist who no doubt is missing a grasp on some basic concepts, so forgive me if this is poorly worded.

I have a controller (Arduino with ATMega 328p) that can generate a 5v PWM signal at ~500Hz. I need to translate that into a 10v PWM signal to control an LED driver (Meanwell ELN series) that expects a 10v PWM signal. The current requirement is small, it's just a signal to the LED driver.

I need to do six of these circuits, on each of the Arduino's PWM-capable pins.

Out of my own ignorance, I came up with this:



Basically, I take a raw voltage from the Vin pin on the left and convert it to 10v with the voltage regulator and caps on the left. I provide the +10v to the header in the middle of the circuit. On the right, each of the 6 PWM pins is connected through a resistor to an NPN transistor that switches the second of each pair of pins from the jumper to GND. So, each of the 6 circuits swtch from floating to grounded.

I posted on one forum and people seemed happy that it would work fine.

On another forum, several users suggested I instead use a MOSFET to switch between a resistor to pull the signal up to 10v (when the FET is off) or grounding it (when it's on) because this would provide switching between "known 10v and gound" instead of leaving the circuit floating when it's off.

Any thoughts on which approach is "best?" Or should I start from scratch with some other approach? If I'm missing info please tell me and I'll provide it if I can.
 

Thread Starter

ill_switch

Joined Mar 8, 2010
5
If you add a 10K to GND for every input as shown near R1 in the attached, it will hold the xstr off whenever the input is missing.
I'm not so worried about holding the transistor off (the Arduino will take care of that I presume?) rather, the worry was about leaving the connection at the header in the middle "floating" when the xstr was off. Basically, people were saying I should switch it between known-gnd and known-10v instead of floating and known-10v.

Don't forget that you are inverting. What started out as a 30% duty cycle will become a 70% on your output.
Really?

When the Arduino PWM pin is low, the transistor will be off, correct? That means the circuit to the jumper in the middle will be floating (off). When the PWM pin is high, the transistor will be ON, which means the jumper in the middle will have a path to GND, completing the circuit, such that the driver sees 10v.

The 10v on the left of the schematic is always connected to the jumper in the middle, I'm just connecting or disconnecting the GND on the other side - when the PWM pin is high, the transistor is on, the circuit is completed to GND and the driver will see 10v.

Or am I completely backwards?
 

BillB3857

Joined Feb 28, 2009
2,570
If you put a Positive on the base of your NPN transistors, the collector will go Negative. To me, that is inversion. Can you show the connection to the Manwell ELN you plan to use? From what I see on the data sheet, you still need to have pull up resistors between the 10V supply and the collector of each transistor and the collector then driving the PWM input of the ELN. In that case, yes, you will have inversion. I may be missing something in understanding the needs of the ELN.
 
Last edited:
Top