Shop OBEX P1 Docs P2 Docs Learn Events
PWM - Inverse Output pins — Parallax Forums

PWM - Inverse Output pins

PhilldapillPhilldapill Posts: 1,283
edited 2010-05-27 02:46 in Propeller 1
I'm trying to make a High-side/Low-side MOSFET board, but the MOSFET driver I'm using(UCC27201 from TI), takes two input pins for each MOSFET. These pin states need to be the inverse of one another, other wise, if both are high, both mosfets will turn on and a short will occur. This is for a synchronous rectification design, so when the high-side FET turns off, the low-side FET needs to be turned on immediately. I've tried making a simple BJT-resistor NOT gate, but my transistor is too slow upon turn-off. The result, is that the NOT signal is delayed, and the duty cycle is shortened. This won't work.

So, what I am trying now, is modifying the orignal PWM object in the obex, so that two pins are toggled, rather than just one. The first pin would act as normal, but the second pin would be the NOT of the first. How can this be done with timers? My assembly is rusty, so be easy, please.

Comments

  • PhilldapillPhilldapill Posts: 1,283
    edited 2010-01-22 04:33
    Well, I think I got it. I should have done this sooner, but I just read up on the counters. Cool stuff! I'm guessing I need to specify the counter mode as %00101(PWM differential mode) instead of %00101(PWM single ended), then set BPin to a pin. This way, BPin is always the NOT of APin.

    Is this correct?


    EDIT: In other words, CTRA value would need to be·CTRAVal :=· %00101<<26 + PinB<<9 + PinA

    Post Edited (Philldapill) : 1/22/2010 4:58:43 AM GMT
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-01-22 05:05
    That should work. You'd leave frqa set to zero and toggle the pins by setting or resetting phsa[noparse][[/noparse]31]. But setting the pins to opposite states and XORing them with %11, would serve the same purpose.

    -Phil
  • bennettdanbennettdan Posts: 614
    edited 2010-05-27 00:09
    Philldapill
    If you want to free a pin up you could use a 4011 or a 4093 Nand chip also the 4093 is a schmitt trigger. I use these in some of my ac inverter projects i have been working on.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-05-27 02:46
    Phil, I did a BJT MOSFET driver design earlier in the year with the aim of having it drive the MOSFETs in three states from a single Prop pin so that it either source, sinks, or disconnects. Although I have used N-channels for the high side before I find it's a real pain plus you have to have the gate clamped to less than breakdown volts (usually around 20V). I don't know what currents you are looking at but I have also found many dual N and P MOSFETs available.

    My circuit always actively drives the MOSFETs off and via cross-coupling drives the opposite MOSFET on (as long as it hasn't been driven off). So it can never have both MOSFETs on at the same time.

    Anyway, the circuit works well and I even have a LTSpice circuit for it.

    docs.google.com/View?docID=0AVS8dcreQOsuZGRncThrNGJfMWQ3ajRkMmZo&revision=_latest

    EDIT: fixed url

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*

    Post Edited (Peter Jakacki) : 5/27/2010 2:51:36 AM GMT
Sign In or Register to comment.