What's new
Van's Air Force

Don't miss anything! Register now for full access to the definitive RV support community.

PWM Conversion

cdeerinck

Well Known Member
Can anyone tell me if a device exists to convert the Dynon Skyview PWM out signal (Pin 26) which is a open collector to ground, into a PWM +12v signal?

For details to difficult to explain, I need a dim-able PWM +12v instead of a dim-able PWM ground.
 
Last edited:
What you need is an inverter.
https://reipooom.files.wordpress.com/2011/09/pmosfet.jpg
http://www.talkingelectronics.com/projects/MOSFET/MOSFET.html
PNPtr_and_MOSFET.gif
 
Not familiar with the Dynon output specs but in general you need a pullup resistor to the Vbatt (+12V). Then the open collector output will switch between +12V and ground. Without the resistor to +12V there is no positive supply to pull up the PWM output when the output transistor turns off. Think of the output as a switch with one end connected to ground the other side of the switch needs the resistor.

The value of the resistor is dependent on the current the output is capable of switching. So for example +12V with a 1K ohm pullup would be +12V / 1K = 1.2 milli-Amps. The power the resistor needs to be capable of handling is V^2 / R or 144/1K = 144 milli-Watts for my example.

Just verify that the Dynon output can handle that voltage level before you make the connection.
 
Depending on what you are driving, you may be ok with what you have. Need more details.
 
Half way there

Thanks guys, I was also doing some side research, and determined I needed a transistor and was just about to add that, when I saw your replies. So you confirmed that for me! :) Now I am just stuck with specifics.

The output of the Dynon is a PWM at about 120hz (Dynon also says they might raise this to 3khz in the future), and varies it's duty cycle between 100% and 0.02%. As mentioned above, it is an open collector to ground. It can sink a maximum current of 120mA, and a maximum voltage of 40v.

I am driving about 36 LED's and 2 LED backlight panels. The gounds of these LED's are already cross connected with other circuits, hence why I need a PWM + voltage. They consume about 500ma in total. The "rail" voltage (aircraft voltage) will be in the range of 12v to 14.6v. While my over voltage protection comes on at 14.6v, it would probably be best to withstand up to 20v.

So am I understanding the correctly, that I would connect
  • Gate to Pin 26 on the Dynon
  • Drain to the + terminals of the LEDs
  • Source to the + Aircraft +12 power.
Is that correct?

I found the data sheet here: http://www.redrok.com/MOSFET_IRF4905_-55V_-74A_20mO_Vth-4.0_TO-220.pdf

Now here is where my electronics fails me. :confused: If I use a IRF4905 MOSFET, is the 10k resistor in Mich48041's diagram the correct value? Is the P-channel 18v diode required, and if so, what values for that would I need? Given the numbers above, which I think are very low compared to what the MOSFET can handle, will this need to be bonded to a heat sink?
 
Last edited:
I am no expert at electronic circuits. People on the Matronics AeroElectric list are more knowledgeable. Ask your question there.
I do not think that the 10K resistor value is critical. Plus or minus 50 percent should work.
Mosfet transistors are very vulnerable to voltage spikes. The 18 volt zener diode protects the transistor from damage.
 
Would this be backwards?

Not familiar with the Dynon output specs but in general you need a pullup resistor to the Vbatt (+12V). Then the open collector output will switch between +12V and ground. Without the resistor to +12V there is no positive supply to pull up the PWM output when the output transistor turns off. Think of the output as a switch with one end connected to ground the other side of the switch needs the resistor.

The value of the resistor is dependent on the current the output is capable of switching. So for example +12V with a 1K ohm pullup would be +12V / 1K = 1.2 milli-Amps. The power the resistor needs to be capable of handling is V^2 / R or 144/1K = 144 milli-Watts for my example.

Just verify that the Dynon output can handle that voltage level before you make the connection.

Wouldn't this make the dimming backwards? The Skyview sets the duty cycle to 100% when it wants things bright, and 0.02% when they should be dim. If I understand what you are saying, the LEDs would get dim when they should get bright. I might be able to reverse the direction in the config, but this same pin is ran to other Skyview modules to control their dimming, so that would not work. I think that is why the other posts referred to "you need an inverter".
 
High side switches built for automotive use

Check out highside switches. Under automotive electronics, half a dozen different vendors out there making them specific to automotive lighting etc. Very low loss, many with built in current limit etc.
Much easier these days than rolling your own high side with the needed support circutry to make them bullet proof.
I.E. VN540-E from ST.com
 
I was only responding to how to use an open collector output. The originally simple question has evolved into a much more complicated one. It does sound like logically you need an inversion based upon how you have the LEDs wired.

LEDs are usually current driven not voltage. In the simplest case this would be a current setting resistor in series with the LED and the two connected between the voltage rail and ground. I'm not sure how you have the 56 LEDS connected. I'll assume you have that part under control.

The P channel MOSFET you selected should work as a high side switch. What you still need is a pull up on the open collector output. 10K should be fine. The actual value of this resistor is not critical but you do need a pullup. Then the pin 26 output will switch between V+ and ground. The rest of the connections you had were correct.

The are two rmosfet related specs. Vgs which is the max voltage the part can withstand GS. This is why there is a zener in the circuit shown. This diode is not strictly required if you can't get to a voltage as high as Vgs. The part you picked has Vgs = 20V this is a pretty typical spec. The other spec is Vds. This is the voltage DS that the part can withstand. The part you picked is 55V so this is plenty high so you don't have to worry about that.
 
Would an optocoupler work such as the CPC1002N?
Costs less than $2.00
Connect a 5.6K resistor between terminals 1 & 4.
Connect Dynon PWM negative to pin 2.
Connect load to pin 3.
Connect 12 volts to pin 4.
 
Would an optocoupler work such as the CPC1002N?
Costs less than $2.00
Connect a 5.6K resistor between terminals 1 & 4.
Connect Dynon PWM negative to pin 2.
Connect load to pin 3.
Connect 12 volts to pin 4.

I think that part would be too slow switching if Dynon does go to the 3KHz switching rate.
 
I think that part would be too slow switching if Dynon does go to the 3KHz switching rate.

Good catch! I would have missed that.

FYI, still waiting to have my registration to Matronics AeroElectric approved. In the meantime, the VAF electronics guys seem to have answered all my questions.

I am ordering a few of the IRF4905 and 18v 5w zener diodes to test with. I will test with and without the diodes. I will report back here when done.

Thank you very much for the help!
 
No real reason I can see to have an opto-coupler. No isolation requirement here.
The reason that I suggested an optocoupler is not for isolation, but to invert the negatie PWM with few external parts (one resistor). The negative PWM can turn on the LED which will cause the optocoupler to output a positive pulse.
 
If you are going to add the zener you don't need a 5W zener. In the circuit shown the current through the zener is limited by the 10K series resistor. Again the zener is just for Vgs voltage protection it has nothing to do with the basic operation of the Mosfet switching and it is not required. The more components you add the more difficult it will be for you to get all of the interactions figured out. I would suggest you start with just a 10K pullup and the Mosfet. Then if you want to add protection you can add a series resistor and the zener. The 10K pullup will act as the series resistor to limit the current for all positive voltage. However it doesn't limit current for the negative voltages.

The power rating required for the zener is 18V * current. So a 2w zener could handle 111 mili-amps. 12V / 10K = 1.2 mA so even a 2W part has tons of margin. Remember the gate is going to basically be drawing zero current too.
 
Same form factor

For consideration, my $6 solution for your open collector output. Switching speed looks fast enough.

For the extra cash, you get

1 active component with an isolated tab for mounting (TO-220 style) and 2 resistors. (small filter cap is suggested)
Features:
2.8Amp current limiter
Undervoltage shutdown
Overtemp and shorted load shutdown
Very low on resistance (no heatsink needed at this level)

https://docs.google.com/drawings/d/1z_xQWdMjkHln2WD_EOJ5VSTAe_qxmUOFuM5xyq-eQ8A/edit?usp=sharing

http://www.st.com/content/ccc/resou...df/jcr:content/translations/en.CD00070971.pdf
 
I believe this is all you need, just the P-FET and a resistor.
v33vpf.jpg

The resistor normally keeps the FET turned off. When the PWM output starts conducting, it turns the FET on. Simple!

Note that the tab of the P-FET will be at 12v, so it must not be bolted to the metalwork of the plane...
In your case it's dissipating almost nothing so it doesn't require a heatsink.

 
Last edited:
Still Stuck

My parts came in, and I made a prototype, but it isn't working.
Here are pictures for in the Open and Closed states, but the light always stays on.
I am expecting that in the Open state (with the Dynon sinking zero ground), that the light would be off.

The MOSFET is the IRF4905, per the data sheet the pins in the picture from left to right are Gate, Drain, Source. My test circuit is wired as per Flyleds' diagram.
  • The resistor is a 10k, connected Gate to Drain.
  • The Gate is either tied to Ground (indicating the Dynon wants the LED on) or left open (indicating the Dynon wants the LED off).
  • The Drain is connected to +12v (+9 in the test circuit)
  • The Source is connected to the + lead of the LED
  • The resistor tied into the LED is because it doesn't have an internal resistor.

I also note that the pinouts I called out in my earlier reply do NOT match the last diagram that Flyleds posted. So I hooked it up as he diagramed, but I don't know if there is a difference between a "P-Fet" as he described, and the "Mosfet" that I used.

Can anyone help me figure out what I am doing wrong?

2ep6pea.jpg


2jbw10j.jpg
 
Grrr. Late night diagram...
You are correct, the FET I drew is flipped "backwards" to the diagram at the top of the thread.
Swap the D and S connections.
 
That works!

Paul - That did the trick, it is working now. I really appreciate you taking the time to help, it means the world to me. Thanks!
 
For the record, the picture I (re)posted above is now correct!
Sorry for the head scratching there Chuck!

P-FET was shorthand for P-channel MOSFET.

 
I didn't catch that either in my quick look.

For those who care there is an internal diode in the MOSFET. If installed backwards the diode will be forward biased and hence never turn off. Once the D-S are swapped then the diode will always be reversed biased and not affect the desired operation. Because I can never remember which way the diode goes I normally include it in my schematic symbols.

That you got your circuit working.
 
The final result

Here is the finished product (with a spare).

Thanks again to everyone who contributed to me getting here:
33u9vr8.jpg
 
Last edited:
Back
Top