Shop OBEX P1 Docs P2 Docs Learn Events
HB-25 motor controller power problem — Parallax Forums

HB-25 motor controller power problem

lifeishardlifeishard Posts: 6
edited 2009-01-20 18:08 in General Discussion
ok so I have been having problems with getting maximum torque from my motor and until now I didn't know why. It is a 12 V motor and its wires are connected to M1 and M2 on the HB-25. a 12 V power supply is connected to the +/- terminals on the HB-25. a cable is connected from the HB-25 to the BS2.· When the motor is running, I check the voltage across M1 and M2 and it is only 3 V! Can anyone think of a reason why the HB-25 won't output 12 V to the motor? Thanks.

Comments

  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2009-01-18 03:00
    lifeishard,

    Can you provide any code and a schematic drawing?
    How much current does the motor require?
    How long are the power leads to the HB25 from the supply and to the motor from the HB25?
    lastly, is the 12V supply adequate to drive your motor?



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • lifeishardlifeishard Posts: 6
    edited 2009-01-18 03:09
    The power supply is 12-13.8 V, 3 A and I am using the motors in the motor mount kit which are 12 V 1.5 A so it should be sufficient. I am wondering why the power lead length should matter? they are about a foot long.
    the code is simply a pulse:

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}

    LOW 12

    Main:

    FOR Duration = 0 TO 10
    PULSOUT 12,800
    PAUSE 12
    NEXT
    PAUSE 3000
    GOTO Main
  • PhilldapillPhilldapill Posts: 1,283
    edited 2009-01-18 03:58
    The reason the lead length matters is because of voltage drop. If the wires are either really long, or you are pulling alot of current, you can have a substantial voltage drop across the wires. Remember, they aren't ideal conductors... close, but no cigar. If you have a big drop, then the motor itself wouldn't be supplied with the optimal 12V, which could give problems.
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2009-01-18 05:52
    lifeishard,

    Try a higher number from your PULSOUT command.

    750 would be off and your giving it 800.... that's only about 20% of full throttle. Full throttle being a value of 1000 with the BS2.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • lifeishardlifeishard Posts: 6
    edited 2009-01-18 07:05
    wow it is exhibiting very strange behavior. I changed the pulse to 1000 and now it is just jolting forward a little bit with each pulse...and then when I turn off the basic stamp it starts turning continuously with full force.
  • LeonLeon Posts: 7,620
    edited 2009-01-18 17:11
    Transients from the motor are probably affecting the BS2 operation.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • lifeishardlifeishard Posts: 6
    edited 2009-01-18 18:31
    i'm not familiar with that...how would I overcome the problem? I have everything connected exactly how it says to in the HB-25 documentation and the motor is from the parallax motor mount kit. to be more specific about what's happening: when there is a pulse, the voltage across M1 and M2 is ~0.7 V and when I remove the basic stamp, the voltage across M1 and M2 becomes 4 V and the motor turns continuously(even though it is a 12 V motor)
  • LeonLeon Posts: 7,620
    edited 2009-01-18 19:52
    I always include TVSs like AVX TransGuards in systems that are operated in close proximity to motors.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-01-19 18:10
    lifeishard said...
    ok so I have been having problems with getting maximum torque from my motor and until now I didn't know why. It is a 12 V motor and its wires are connected to M1 and M2 on the HB-25. a 12 V power supply is connected to the +/- terminals on the HB-25. a cable is connected from the HB-25 to the BS2.· When the motor is running, I check the voltage across M1 and M2 and it is only 3 V! Can anyone think of a reason why the HB-25 won't output 12 V to the motor? Thanks.
    Hello,
    ·
    ·· Even with the motor running at full speed on a 12V supply, the output on the M1/M2 terminals will not read what you expect because the output is being pulse-width modulated.· If you’re using a multi-meter it is probably averaging what it sees.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • lifeishardlifeishard Posts: 6
    edited 2009-01-19 21:09
    I'm kind of confused about how this works. If I measure the voltage while the motor is running then the pulse is high so why isn't there a full 12 V? Could you explain this concept or point me to some more information? Thank you.
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2009-01-19 21:45
    lifeishard,

    What Chris said is correct, but it's even more exaggerated when a motor is connected. When you pulse the power in the form of PWM (Pulse Width Modulation) the output power result will get averaged. Suppose you pulse the power %50 "ON" and then %50 "OFF" ... the resulting output power would be about half of your supply voltage. 6V if your supply is 12V. If you adjust the PWM and spend more time ON then OFF then you can increase the averaged output. Likewise, if you spend less time ON then OFF you can decrease the averaged output. The reason that a motor will exaggerate the averaged voltage is because the motor acts like a BIG voltage regulator that is proportional to the speed the motor is turning. Remember when you turn a motor, it acts like a generator.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • lifeishardlifeishard Posts: 6
    edited 2009-01-20 03:37
    thanks, I get it now...but one more unresolved problem: how come sometimes when I turn off the basic stamp the motor keeps on turning continuously?
  • PhilldapillPhilldapill Posts: 1,283
    edited 2009-01-20 04:00
    Your controller probably has the input "floating", which causes the output to act strangely. You can probably prevent this by adding a pull-down/pull-up resistor to the input of the device where the BS2 connects.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-01-20 18:08
    If the motor is already turning when you turn off the BASIC Stamp there’s no reason the HB-25 should stop spinning if it has power unless there is noise at shut-down creating a false pulse. Remember, the HB-25 does not require continuous pulses from the BASIC Stamp to keep running. It the motor should start up when you shut down the BASIC Stamp it is the same. There may be a glitch (noise) on the I/O pin at power-off. You can see this effect on a scope. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
Sign In or Register to comment.