h-bridge problem


Closed Thread
Results 1 to 12 of 12
  1. #1
    vision's Avatar
    vision Guest

    Question h-bridge problem

    hi,

    I'm a beginner in this amazing world of PICs and I have encountered 2 problems in controlling a dc motor direction...

    1. I used this H-bridge to control my motor (see attachments) and works fine while adding a voltmeter across the output but when load it with any load e.g my 9v motor the voltage decreases to a value of 0.01v and couldn't drive my motor.

    2. I wrote this program that reads a potentiometer value ,if this value is greater than 12kohms turns the motor CW, less than 12k ohms turns the motor CCW:
    device=16f84a
    dim R_Value as byte
    trisb=%00000001

    start:
    portb=0
    r_value=pot portb.0,153
    if r_value > 65 then goto rotate_lower 'Making motor rotate CW
    if r_value < 59 then goto rotate_higher 'Making motor rotate CCW

    Rotate_Lower:
    portb.1=1
    delayms 250
    goto start

    Rotate_Higher:
    portb.2=1
    delayms 250
    goto start
    the program worked but instead of comparing the value to 12 k ohms it performs this operation at 1.2k ohms (I have checked my scale!)

    any help will be appreciated, thank you
    Attached Images Attached Images  

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Have you tried some Google-ing on the subject yet?
    What did you come up with?

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Have you tried to use the right forum?

    And your circuit will NEVER work.

    AND i suggest you use a newer PIC... not a museum part

    AND YES I HAD A BAD DAY

    SORRY
    Last edited by mister_e; - 30th November 2006 at 03:39.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4


    Did you find this post helpful? Yes | No

    Post Hello Vision....

    I think you should try to make a google search like they suggested. I guess your problem is that your motor requieres more much current (A) that your H-Bridge can handdle... or maybe you just need somo clamp diodes.... try clamp diodes on google...

    Good Luck.... to you too stev!

    Armando Herjim.

  5. #5
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Diodes

    Hi Vision,
    Looks like your schematic has the diodes reversed biased, I'm not sure you even need them try reversing them or jumpering them and see what happens, I haven't even looked at your code, I assumed the others did.
    JS
    edit
    mister_e I see what you meant about using the correct forum, what manner of basic is that? Looks like a cross between c and basic. JS
    Last edited by Archangel; - 30th November 2006 at 08:39.

  6. #6
    vision's Avatar
    vision Guest


    Did you find this post helpful? Yes | No

    Default

    thanks all of you for your replies...

    Yes I tried Google search but in vain , Well I'll try again

    Actually I thought about adding my question in the schematic forum ,but thought about the PIC problem....

    mister_e: why my circuit will never work ? Is there something wrong?
    and please don't make your bad day affect your welcome to the newbies
    Last edited by vision; - 30th November 2006 at 14:04.

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by vision
    thanks all of you for your replies...

    Yes I tried Google search but in vain , Well I'll try again

    Actually I thought about adding my question in the schematic forum ,but thought about the PIC problem....

    mister_e: why my circuit will never work ? Is there something wrong?
    and please don't make your bad day affect your welcome to the newbies

    You tried a Google search...in vain? I just did a quicky and got over 1.43 million hits. I even got 186 hits on the images.

    Try again....
    JDG

  8. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Sorry Vision for my stupid attitude...

    The major problem is the reverse biased diodes for your PNP transistors. AND if you're going to drive inductive load, you'll have to add 4 diodes to avoid back emf.

    something like the following is recommended
    http://www.mcmanis.com/chuck/Robotic...t-circuit.html
    OR
    http://www.bobblick.com/techref/proj...e/hbridge.html

    There's also dedicated ICs for that. L293D is popular.. and there's more and more like that.

    HTH

    welcome to the forum... even if you're using PDS Proton
    Last edited by mister_e; - 1st December 2006 at 04:05.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  9. #9
    vision's Avatar
    vision Guest


    Did you find this post helpful? Yes | No

    Default

    skimask :Thank you for your hint about the google IMAGE search,I didn't even think about it

    mister_e :Thank you man

    I'll inform you about the results

  10. #10
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by vision
    skimask :Thank you for your hint about the google IMAGE search,I didn't even think about it

    mister_e :Thank you man

    I'll inform you about the results


    skimask :Thank you for your hint about the google IMAGE search,I didn't even think about it

    Well, that backfired on me...and I thought I was being a smart ass! Glad you got some use out of it...
    JDG

  11. #11
    Join Date
    Sep 2003
    Location
    Vermont
    Posts
    373


    Did you find this post helpful? Yes | No

    Default

    I use the L293DD for both stepper and DC gear head motors. It is a great work horse, but is there something smaller and or lower power for driving motors up to 100 mA? The Microchip 4424 looks good, but you would need two for the steppers. Any ideas?

    Thanks,
    Ron

  12. #12
    vision's Avatar
    vision Guest


    Did you find this post helpful? Yes | No

    Thumbs up Solved

    I tried out this circuit and worked fine....

    thank you people
    Attached Images Attached Images  
    Last edited by vision; - 3rd December 2006 at 00:09.

Similar Threads

  1. 18F4620 HPWM Half Bridge Mod problem
    By showtime in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 2nd November 2007, 12:55
  2. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 08:12
  3. Hardware problem or what ?
    By Steve S. in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 4th March 2007, 21:39
  4. 1 slave 1 master 1 MAX232 1 problem ?
    By SuB-ZeRo in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 31st July 2005, 22:59
  5. weird 12F629/675 problem
    By peterdeco1 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 7th October 2004, 01:08

Members who have read this thread : 1

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