PWM with PIC16F88 controlling h-bridge


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    May 2010
    Posts
    11


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by HenrikOlsson View Post
    Hi,
    That schematic looks a bit strange to me.....

    First, there doesn't seem to be any low side supply voltage (Vcc) as pin 3 seems to not be connected to anything except the bootstrap capacitor and diode. Only the logic supply (Vdd) seems to actually be connected to any supply rail.

    Second, even if pin 3(Vcc) and 9(Vdd) ARE connected they are both connected to +5V while the datasheet for the IR2110 calls for a Vcc of 10-20V. The undervoltage protection for the low the side supply (Vcc) kicks in at around 8V which means the bridge drivers aren't even operating.

    /Henrik.
    So if i understand correctly i need pin3 connect to 12V supply, y ? Sorry my mistake, its everything okay, just i didn't draw that... pin 3 is connected to 12V supply.

    This pin is made HIGH before the main loop then made LOW within the loop but never serviced again if you are wanting to Shut Down again sometime. That's why it's always LOW.
    The main point of getting SD low is to make sure that MOSFETS are off at the start. In the loop he used Low sd / high SD for modulating signal and i think i should see that different in tester, or its making turn off/on SD to fast to get that information ? (Sorry for pure language).
    Last edited by deimantas; - 19th May 2010 at 23:44.

  2. #2
    Join Date
    May 2010
    Posts
    11


    Did you find this post helpful? Yes | No

    Default

    Anyone ? sorry for my impatience, but i have reason for it i need to get this thing work as soon as possible, because it's for my graduation and it slows me from doing other parts.
    Last edited by deimantas; - 20th May 2010 at 11:30.

  3. #3
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default

    Hi,
    Have you disconnected the hardware from the PIC and verified with a scope or whatever that what you think is a software bug really is a software bug and not a problem with your hardware.

    If PortB.2 doesn't go high then try something simple, connect a LED to it and do something like:
    Code:
    TRISB.2 = 0    'PortB.2 as output
    
    Main:
     PortB.2 = 1
     Pause 100
     PortB.2 = 0
     Pause 100
    Goto Main
    Now, does it toggle? If not, double check the ADC and comparator settings in case you have some other functions multiplexed on PortB.2 (I haven't checked). If it still doesn't work, try another pin, perhaps you've fried PortB.2....

    Then, when you have that going, move on to the PWM part and get that going - THEN when you know that the software is doing what you think you want (which usually isn't what you really need....), go on and connect the bridge.

    /Henrik.

  4. #4
    Join Date
    May 2010
    Posts
    11


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by HenrikOlsson View Post
    Hi,
    Have you disconnected the hardware from the PIC and verified with a scope or whatever that what you think is a software bug really is a software bug and not a problem with your hardware.

    If PortB.2 doesn't go high then try something simple, connect a LED to it and do something like:
    Code:
    TRISB.2 = 0    'PortB.2 as output
    
    Main:
     PortB.2 = 1
     Pause 100
     PortB.2 = 0
     Pause 100
    Goto Main
    Now, does it toggle? If not, double check the ADC and comparator settings in case you have some other functions multiplexed on PortB.2 (I haven't checked). If it still doesn't work, try another pin, perhaps you've fried PortB.2....

    Then, when you have that going, move on to the PWM part and get that going - THEN when you know that the software is doing what you think you want (which usually isn't what you really need....), go on and connect the bridge.

    /Henrik.
    Yeah thank you for advice. Led's are blinking as i want. But i don't get it why my h-bridge show nosenses, everything is okay but one thing, all 4 drains are high, don't get it why.

  5. #5
    Join Date
    May 2009
    Location
    USA
    Posts
    16


    Did you find this post helpful? Yes | No

    Default

    I always thought the output of 7805 needed a capacitor as well? Anyway I would repace the IR2110 with something easier to use like UCC27322.

    You are using just a regular motor right? Not a stepper motor? An oscilloscope will be a great tool to have here to see the pulses at each output.

    To be honest, it's easier for me to look at a schematic, try to understand what is going on and then rebuild it as to how I understood it. Takes a little longer but I learn a lot more by thinking about it rather than just putting stuff together and hoping it works.
    Why is the email address verification case sensitive?

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts