1. 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!
  2. 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
  3. 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

Question Arduino UNO, SMC3 & Pololu VNH5019 Driver Problem

Discussion in 'DIY Motion Simulator Building Q&A / FAQ' started by Kahala, Nov 14, 2021.

  1. Kahala

    Kahala New Member

    Joined:
    Jan 28, 2021
    Messages:
    9
    Balance:
    48Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform, 6DOF
    Hello friends
    I have finally managed to get my first tests of a 6DOF motion platform built with standard RC servos to work thanks to all the help I received from all the nice people here on the forum.
    Thanks!

    Now I want to take the next step before I start building a full-scale platform, so I bought 3 Polulu VNH5019 Dual Drivers (Arduino Sheild) and 3 Arduino UNO Rev 3. The Oubit VNH5019 Driver Dual I found on Amazon.

    Information about the motor driver I found here:
    https://www.pololu.com/docs/0J49/3.c

    I connected everything with a few small 9V DC motors to test the driver and learn how everything works before the full-scale construction starts. Pin configuration looks like the attached image below. Arduino UNO has a separate power supply via USB and VNH5019 has its power supply via 5.5 - 24 VIN and GND. Both UNO and the driver have a common GND.

    I uploaded a demo sketch to Arduino and tested the driver with two 9V DC motors connected without any problems. It worked just fine and both motors spinned as they shold so the driver works. I found the demo sketch here:
    https://www.pololu.com/docs/0J49/3.d

    Now I come to the problem I have and which I can not find any solution to. I have read, and read and read on this forum and googled so I am almost dizzy but without results.

    After the first successful demo test, I uploaded the sketch SMC3 v1.0 to my UNO. Then I started "SMC3 Windows Utilities" and followed the instructions I found here:
    "SMC3 Arduino 3DOF Motor Driver and Windows Utilities"
    https://www.xsimulator.net/communit...3dof-motor-driver-and-windows-utilities.4957/

    THE PROBLEM:
    When Motor 1 is ON and I increase PWMmax slowly to about 40, motor 1 slowly starts spinning properly. So it works well.

    When Motor 2 is ON and I increase PWMmax slowly, absolutely nothing happens, no matter how much I increase PWMmax.

    What's wrong? Both motors worked in the demo test so the driver is ok. I suspect that it has something to do with the pin configuration and/or that something in the SMC3 sketch needs to be rewritten but I do not know what.

    Can someone please help me or is there an SMC3 sketch that has already been written/changed to work with the VNH5019 driver? If it exists, I have not been able to find it. . .

    PLEASE HELP!

    UNO - VNH5019 PIN Config.JPG
    20211114 Arduino SMC3 Pololu VNH5019.jpg
    VNH5019 Pict.jpg
  2. Ads Master

    Ads Master

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
  3. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    17,324
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    125,068Coins
    Ratings:
    +9,800 / 47 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  4. Kahala

    Kahala New Member

    Joined:
    Jan 28, 2021
    Messages:
    9
    Balance:
    48Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform, 6DOF
    Thanks noorbeast,
    but the information in that thread I have already studied and it does not help against my problem. It mentions that the Arduino UNO and VNH5019 should have separate power supplies and I already have that.

    This is not where my problem lies but it lies in the fact that when the shield is mounted on top of UNO, only motor 1 works but not motor 2 (when testing them in SMC3Utils v1.01) and it does not matter if I solder wires between UNO and VNH5019 insead. The same thing happens anyway.

    I still think it has to do with the PIN configuration in the Arduino sketch. Does anyone know if or how M1EN/DIAG and M2EN/DIAG pins might have something to do with it?

    The strange thing is that if I upload the sketch on this page (https://www.pololu.com/docs/0J49/3.d) then they work perfectly together. . .