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

Question hit a brick wall with diy servo and SMC3 (youtube)

Discussion in 'Motor actuators and drivers' started by JeepGunner82, May 3, 2017.

  1. JeepGunner82

    JeepGunner82 Member Gold Contributor

    Joined:
    May 23, 2016
    Messages:
    41
    Location:
    San Jose, CA
    Balance:
    201Coins
    Ratings:
    +16 / 0 / -0
    My Motion Simulator:
    2DOF, SCN5


    I made a youtube of my blathering of commentary. I good bit lost on this one. did try 2 other brand new motor drivers, no go on each.
  2. Alexey

    Alexey Well-Known Member

    Joined:
    Sep 23, 2014
    Messages:
    452
    Occupation:
    Electronics Technician
    Location:
    Adelaide, Australia
    Balance:
    8,060Coins
    Ratings:
    +620 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    This may be silly or I have missed something. but did you press the button next to the Motor1 checkbox (labelled "OFF") in the top left of the program. I was watching the video and it was always off from what I saw. If you push that button it will enable the output to power the motor (label will turn to "ON").
    • Like Like x 2
    • Agree Agree x 2
  3. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,644Coins
    Ratings:
    +1,009 / 8 / -1
    As @Alexey says, just make sure the POT is within the limits (green line between red lines) before trying to turn motor on or it will just switch off again straight away.
    • Like Like x 2
  4. JeepGunner82

    JeepGunner82 Member Gold Contributor

    Joined:
    May 23, 2016
    Messages:
    41
    Location:
    San Jose, CA
    Balance:
    201Coins
    Ratings:
    +16 / 0 / -0
    My Motion Simulator:
    2DOF, SCN5


    thanks for the replies! Yeah, turning on the motor would help...
    • Funny Funny x 1
  5. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,539
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    145,052Coins
    Ratings:
    +10,776 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    The video is marked Private and can't be viewed.
  6. JeepGunner82

    JeepGunner82 Member Gold Contributor

    Joined:
    May 23, 2016
    Messages:
    41
    Location:
    San Jose, CA
    Balance:
    201Coins
    Ratings:
    +16 / 0 / -0
    My Motion Simulator:
    2DOF, SCN5
    how bout now?
  7. Alexey

    Alexey Well-Known Member

    Joined:
    Sep 23, 2014
    Messages:
    452
    Occupation:
    Electronics Technician
    Location:
    Adelaide, Australia
    Balance:
    8,060Coins
    Ratings:
    +620 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    I suppose the only thing now is if you could supply us with a diagram to exactly how you have the connections going from the arduino to the L298N.
    So not a diagram that you have followed but if you could draw it out, pin to pin exactly how it is shown in the video.

    Cheers!
  8. insanegr

    insanegr !N$@n€

    Joined:
    Jan 14, 2014
    Messages:
    505
    Location:
    Athens
    Balance:
    16,715Coins
    Ratings:
    +499 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    i think these boards need to be in mode2 to work. have you configured it in the scetch before uploading it to the arduino?
  9. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,539
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    145,052Coins
    Ratings:
    +10,776 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    That is better.
  10. JeepGunner82

    JeepGunner82 Member Gold Contributor

    Joined:
    May 23, 2016
    Messages:
    41
    Location:
    San Jose, CA
    Balance:
    201Coins
    Ratings:
    +16 / 0 / -0
    My Motion Simulator:
    2DOF, SCN5
    attached my photochopped bit on the wiring. For the code, I have only commented out Mode 1. Never did try Mode 2.

    Attached Files:

  11. JeepGunner82

    JeepGunner82 Member Gold Contributor

    Joined:
    May 23, 2016
    Messages:
    41
    Location:
    San Jose, CA
    Balance:
    201Coins
    Ratings:
    +16 / 0 / -0
    My Motion Simulator:
    2DOF, SCN5
    Mode2 more sporadic feedback, still no effect however
  12. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,644Coins
    Ratings:
    +1,009 / 8 / -1
    I would expect MODE1 is correct if that's an L298 Dual H-Bridge board?

    The arduino is obviously communicating to the PC ok because the feedback line is working.
    The wiring between arduino and h-bridge looks ok (again assuming an L298 h-bridge)

    One thought, given the position of the pins on the h-bridge - should the motor be connected to the other side connector?

    If you can provide details of h-bridge of h-bridge circuit that would help.
    • Like Like x 1
    • Agree Agree x 1
  13. Alexey

    Alexey Well-Known Member

    Joined:
    Sep 23, 2014
    Messages:
    452
    Occupation:
    Electronics Technician
    Location:
    Adelaide, Australia
    Balance:
    8,060Coins
    Ratings:
    +620 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    I cant seem to find the exact board that you have in your picture as it has a double row header strip next to the power inputs.
    The only other ones I have found have only had a single row header. If they are basically the same then yes the wiring looks fine except for the motor should be connected to the other side.

    Edit, Also the 5v line going to the bread board from the motor driver is redundant, you have two 5v lines going to the pot, one from the arduino and one from the motor drive.
    • Like Like x 1
  14. JeepGunner82

    JeepGunner82 Member Gold Contributor

    Joined:
    May 23, 2016
    Messages:
    41
    Location:
    San Jose, CA
    Balance:
    201Coins
    Ratings:
    +16 / 0 / -0
    My Motion Simulator:
    2DOF, SCN5
    its an OPSEPP L298 dual h bridge driver MTD-1 Did just swap motor to corresponding side

    Attached Files:

  15. JeepGunner82

    JeepGunner82 Member Gold Contributor

    Joined:
    May 23, 2016
    Messages:
    41
    Location:
    San Jose, CA
    Balance:
    201Coins
    Ratings:
    +16 / 0 / -0
    My Motion Simulator:
    2DOF, SCN5
    good point! removed that and tested, still not getting feedback to follow sine wave, nor motor to turn though.
  16. Alexey

    Alexey Well-Known Member

    Joined:
    Sep 23, 2014
    Messages:
    452
    Occupation:
    Electronics Technician
    Location:
    Adelaide, Australia
    Balance:
    8,060Coins
    Ratings:
    +620 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Just to clarify, you aren't trying to run the code without any mode selected are you?

    The correct line in the code should be:

    #define MODE1

    or in its place:

    #define MODE2

    MODE1 should be the correct selection.

    If you still cannot get the motor to run upload this to the arduino:

    /* L298N DC motor example */

    int IN1=2;
    int IN2=3;
    int ENA=9;
    void setup()
    {
    pinMode(IN1,OUTPUT);
    pinMode(IN2,OUTPUT);
    }
    void loop()
    {
    analogWrite(ENA, 200);// motor speed
    digitalWrite(IN1,LOW);// rotate forward
    digitalWrite(IN2,HIGH);
    delay(2000);
    digitalWrite(IN1,HIGH);// rotate reverse
    digitalWrite(IN2,LOW);
    delay(2000);
    }
    • Agree Agree x 1
    • Winner Winner x 1
    • Informative Informative x 1
  17. JeepGunner82

    JeepGunner82 Member Gold Contributor

    Joined:
    May 23, 2016
    Messages:
    41
    Location:
    San Jose, CA
    Balance:
    201Coins
    Ratings:
    +16 / 0 / -0
    My Motion Simulator:
    2DOF, SCN5
    If you still cannot get the motor to run upload this to the arduino:

    /* L298N DC motor example */



    Its ALIVE WOOOOO!!!
    • Winner Winner x 1
  18. Alexey

    Alexey Well-Known Member

    Joined:
    Sep 23, 2014
    Messages:
    452
    Occupation:
    Electronics Technician
    Location:
    Adelaide, Australia
    Balance:
    8,060Coins
    Ratings:
    +620 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    The only thing at this stage that I could suggest is if you try to upload an un-modified version of SMC3 code to the arduino and try the sine "Out Mode" again in the SMC3 utils.
  19. JeepGunner82

    JeepGunner82 Member Gold Contributor

    Joined:
    May 23, 2016
    Messages:
    41
    Location:
    San Jose, CA
    Balance:
    201Coins
    Ratings:
    +16 / 0 / -0
    My Motion Simulator:
    2DOF, SCN5
    I do note on the L298 example, reverse seems nil compared to forward. Tried uploading v7.0, .63, and 6.0 to no effect
  20. Alexey

    Alexey Well-Known Member

    Joined:
    Sep 23, 2014
    Messages:
    452
    Occupation:
    Electronics Technician
    Location:
    Adelaide, Australia
    Balance:
    8,060Coins
    Ratings:
    +620 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Try changing from:

    digitalWrite(IN1,HIGH);// rotate reverse
    digitalWrite(IN2,LOW);
    delay(2000);

    to

    digitalWrite(IN1,LOW);// rotate reverse
    digitalWrite(IN2,LOW);
    delay(2000);

    If you are still not getting a reverse speed on the motor then the arduino might have a dud output.

    You could try using different pins on the arduino like this:

    int IN1=4;
    int IN2=5;
    int ENA=10;

    and re-wire accordingly.