1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

Pololu VNH2SP30 Motor driver

Discussion in 'Motor actuators and drivers' started by whaleman, Dec 11, 2010.

  1. whaleman

    whaleman Member

    Joined:
    May 15, 2010
    Messages:
    30
    Location:
    Finland
    Balance:
    7Coins
    Ratings:
    +1 / 0 / -0
    I’m about to use two VNH2SP30 MD01B with Tronicg’s AMC1.5. There have been some suggestions that it’s an alternative to famous Tronicg’s dual motor H-bridge, but I haven’t yet seen it used with AMC. So it’s time to find out how they work together.
    I ordered mine from Coolcomponents in UK, since Pololu announced that it’s currently sold out in their stocks. I also like the idea of ordering things inside EU, becouse I don’t have to worry about Finnish customs and taxes. It took less than a week to arrive and my email questions were answered quickly from Coolcomponents before I ordered them.
    After DIY electronic PCBs, Pololu boards are just incredibly small. In picture 1/2 you can see the boards, cooling accessories and comparison with 2 euro coin. Heat sinks are ordinary computer coolers picked from an old broken PC. Pictures are very fuzzy, but I believe you’ll get the point.

    pic1.JPG
    pic2.JPG

    Underneath the Pololu card, there are lots of elecrical connections, some of them are directly in contact with the chip. On sides of the board, there are connections to AMC, motors and power supply. For this reason I decided to put a larger heat sink on top of the chip and a small one under the board. This way it doesn’t touch any conductive area. Small springs press the upper sink against the chip.

    pic3.JPG
    pic4.JPG

    Here is the way I connected Pololu (motor1) with AMC:

    [AMC – VNH2SP30]
    M1N1 – INa
    M1N2 – INb
    PWM1 – PWM
    GND – GND
    VCC – +5 V (IN)

    pic5.jpg

    In addition to above, VNH2SP30 has also DiagA/ENa and DIAGB/ENb pins. I didn’t connect them with AMC. Should they be connected, I honestly don’t know. Data sheet explains them this way:

    Open drain bidirectional logic pins.These pins must be connected to an external pull up resistor. When externally pulled low, they disable half-bridge A or B. In case of fault detection (thermal shutdown of a High-Side FET or excessive ON state voltage drop across a Low-Side FET), these pins are pulled low by the device (see truth table in fault condition).

    So is their task to shut down Pololu card in case of fault but doesn’t have any other purpose?

    Of course I connected battery’s wires to pololu plus and minus, and motor wires also to their places. In this way I didn’t use FET BYPASS pin. In Coolcomponent’s web site, there is a mention about using it:

    The motor driver boards include an N-channel MOSFET for reverse-battery protection. This component keeps the motor driver from destroying itself if the input power is accidentally connected backwards. However, this component does slightly increase the total resistance between your battery and your motor. For slightly improved performance, the MOSFET can be bypassed by connecting the negative battery terminal to the bypass pin. (This terminal will also need to be connected to your logic supply ground.)
    In this case I don’t understand why mosfet should be bypassed. Can the board still work without it?

    So everything was hooked up and it was time to test. I did the test without connecting AMC to computer. When I connected 12V battery to motor driver, motor started to spin like expected. Position feedback pot’s position was about 1000 on the AMC lcd. When I decreased position pot to about 600, motor stopped spinning. In the halfway, ~^450-550, motor made electrical noise, but didn’t spin at all. Now when pot value was increased or decreased motor didn’t start to spin in either direction. I disconnected battery and motor driver was cool and 10A fuse still unbroken.
    In second test I put position pot value to zero and connected battery, motor started to spin in other direction than before as expected. Behaviour was still the same: near value of 400 motor stopped spinning and didn’t start to spin again. After this I checked connections to AMC with multimeter and added some solder to Pololu connections just to be sure.
    Again time to run tests: no difference noted, but I decided to try fast changes of direction with pot. In this way, motor changed its spinning direction, but if pot was turned too slow, motor stopped. I also realized that if I waited a few seconds when pot value was zero, motor started to spin without disconnecting the battery. That didn’t apply in the other end (1024), waiting didn’t put the motor to spin.

    I believe the fault isn’t in AMC, as I have tested it with DShmb with success. After some tests few weeks ago eventually I ended up having broken mosfets (IRFZ44N) which I replaced with IRL540N. Anyway, that’s another story but proves that AMC has worked before. Altough only motor 1 worked and motor2 didn’t. I made a led tester assembly to test was the problem in AMC or DShmb, and led tester worked well for both motor outputs. Led tester was introduced by Thanos and is discussed in AMC topic: tronic-s-amc-motor-motion-controller-with-pwm-servo-output-t559-630.html

    I use AMC with 18kHz crystal, so that shouldn’t cause any problem. Any suggestions what might be wrong?

    Attached Files:

    • pic6.JPG
      pic6.JPG
      File size:
      188.4 KB
      Views:
      920
    • pic7.JPG
      pic7.JPG
      File size:
      236.2 KB
      Views:
      891
  2. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    These pins must be connected to an external pull up resistor. Did you? :)

    You should put the larger heatsink on the back of the board and smaller on top of the chip. Back of the board makes much better contact.
  3. Deleted member 4120

    Deleted member 4120

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
  4. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    It is easier to replace a single driver if it burns. If one burns on dual, you can't replace one.

    Other than that, it doesn't matter.
  5. whaleman

    whaleman Member

    Joined:
    May 15, 2010
    Messages:
    30
    Location:
    Finland
    Balance:
    7Coins
    Ratings:
    +1 / 0 / -0
    Thanks Frakk for guiding me in the right direction! However, after reading datasheet again, I just don't have any idea what that means. Let's assume I don't use this fault function, where should I place a resistor? Does it mean that when they are pulled low, resistor value should be low? And in normal operation a high resistor? Needless to say that I belong to that majority who knows very little/nothing about electronics. :no:

    Underneath the card, there were connections to chip's mounting legs. That's why I placed a smaller one underside. In picture there can be seen these connections. You mentioned earlier about that it should be covered with solder mask, but this mask doesn't cover the connections. Or is it possible to put an extra layer of mask to cover the connections?

    Attached Files:

  6. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    I had bad expierence with VNH2SP30 drivers before too... that why I ended up building my own h-bridge. They were operating fine in 6v and small motors but when I tried to drive them with 12V and wiper motors I had the same results as you. I'll try to give another try on mine's to see if I'm missing something!!!
  7. kubing

    kubing Member

    Joined:
    Sep 27, 2010
    Messages:
    259
    Occupation:
    teacher, Industrial electronic programmer
    Location:
    kelantan Malaysia
    Balance:
    350Coins
    Ratings:
    +0 / 0 / -0
    i have same problem with my diy controller...but after increase kp value problem solve.
  8. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0

    That's not a solution.... hahahaha... Thats is killing the PID.... :lol: :lol: :lol:
  9. kubing

    kubing Member

    Joined:
    Sep 27, 2010
    Messages:
    259
    Occupation:
    teacher, Industrial electronic programmer
    Location:
    kelantan Malaysia
    Balance:
    350Coins
    Ratings:
    +0 / 0 / -0
    When I decreased position pot to about 600, motor stopped spinning. In the halfway, ~^450-550, motor made electrical noise, but didn’t spin at all.

    I only refer to this statement.. what do you mean killing PID :D
  10. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Increasing the PID too much is like limiting the range of PWM signals you sent to the h-bridge, for example instead of all range 1%-99% PWM only 60%-99% PWM. The h-bridge then acts like you are controlling it with relays with ON during motion and OFF when target reached. Full speed and sudden stop. I seen that to your videos too... :uups:
  11. whaleman

    whaleman Member

    Joined:
    May 15, 2010
    Messages:
    30
    Location:
    Finland
    Balance:
    7Coins
    Ratings:
    +1 / 0 / -0
    If you can take a look at it , that would be great! :happy: Is it possible that it has something to do with those fault ENA/DiagA/ENB/DiagB pins?

    Thanks kubing for advice! I'll try that and see how it works!
  12. kubing

    kubing Member

    Joined:
    Sep 27, 2010
    Messages:
    259
    Occupation:
    teacher, Industrial electronic programmer
    Location:
    kelantan Malaysia
    Balance:
    350Coins
    Ratings:
    +0 / 0 / -0
    IMHO playing with PID just like playing with adjustable shock absorber..low kp = comfort, hi kp = performance..
    I agree with Thanos, do not over kill Kp setting...its killing your h-bridge..my controller can set up to 31..for testing purpose only. i do test,yes at this high you can feel the road surface grabber but for gaming NOT RECOMMEND. unless you like to see smoke coming from your Hbridge/motor.... :)
  13. whaleman

    whaleman Member

    Joined:
    May 15, 2010
    Messages:
    30
    Location:
    Finland
    Balance:
    7Coins
    Ratings:
    +1 / 0 / -0
    Tested with different kp values, I increased it little by little all the way to 30. Still motor didn't always start to spin during slow direction changes and there was still dead zone in the middle position. With kp 3 motor didn't spin at all.
  14. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    Pull up resistors are needed to set the default state of a pin. If you leave the DiagA/B pins floating (nothing connected), their state will be unknown and move all over the place. If those pins are a logic 0, they will disable the bridge.

    Connect them to the +5V with a 10k ohm resistor to permanently enable them and see if it fixes it.
  15. kubing

    kubing Member

    Joined:
    Sep 27, 2010
    Messages:
    259
    Occupation:
    teacher, Industrial electronic programmer
    Location:
    kelantan Malaysia
    Balance:
    350Coins
    Ratings:
    +0 / 0 / -0
    what is your pwm freq?
  16. whaleman

    whaleman Member

    Joined:
    May 15, 2010
    Messages:
    30
    Location:
    Finland
    Balance:
    7Coins
    Ratings:
    +1 / 0 / -0
    Okay, yesterday I connected two 10kOhm potentiometers between +5V and diagA and same for DiagB. I tried different resistor values 0-10kOhm, but it didn't change behaviour. I'm using 18.432 kHz crystal, so it should be low enough. I have also one 14,7456 kHz crystal, so I'll try it in the weekend.
  17. kubing

    kubing Member

    Joined:
    Sep 27, 2010
    Messages:
    259
    Occupation:
    teacher, Industrial electronic programmer
    Location:
    kelantan Malaysia
    Balance:
    350Coins
    Ratings:
    +0 / 0 / -0
    It should working fine without resistor..there must be something :yes:
  18. whaleman

    whaleman Member

    Joined:
    May 15, 2010
    Messages:
    30
    Location:
    Finland
    Balance:
    7Coins
    Ratings:
    +1 / 0 / -0
    I tried with 14,7456kHz and with different kp values, but still it works like before. Now it seems that VNH2SP30 isn't just plug-and-play device in my case :(
  19. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    The problem is not the VNH2SP30. kubing has it working without any problems with his controller so I think we should look somewhere else.