Shop OBEX P1 Docs P2 Docs Learn Events
Lynxmotion GHM-02 motor + encoder+ActivityBot C Code - could you pls advise me? — Parallax Forums

Lynxmotion GHM-02 motor + encoder+ActivityBot C Code - could you pls advise me?

tom79tom79 Posts: 1
edited 2015-02-20 14:25 in Robotics
Hello,
I am new in this forum, newbie in robotics and new in C programming of parallax activity board. I am just starting learning microcontrollers and making first project. I would like to build custom mobile robot using 2 Lynxmotion GHM-16 motors and Lynxmotion quadrature encoder. To programm the robot , I would like to use Activity Bot C code + arlodrive.c .
So, I have below concerns:
1. Do I need to make changes to the existing code in arlo (or activity bot) C libraries to be able to use Lynxmotion motor and encoder?
2. Should I use HB-25 motor controllers for Lynxmotion GHM-16 motors or maybe it is possible to replace HB-25 drivers with any other without change of existing libraries code?
I will really appreciate your support. Thank you in advance

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-02-20 14:25
    tom79 wrote: »
    1. Do I need to make changes to the existing code in arlo (or activity bot) C libraries to be able to use Lynxmotion motor and encoder?
    2. Should I use HB-25 motor controllers for Lynxmotion GHM-16 motors or maybe it is possible to replace HB-25 drivers with any other without change of existing libraries code?
    I will really appreciate your support. Thank you in advance

    I'm not sure how well the ActivityBot code will work with your encoders. Those Lynxmotion encoders are very high resolution (I think they're very nice) and I my guess is the ActivityBot (and Arlo) code wouldn't keep up with the transition rate of those encoders. Both the ActivityBot code the code adapted for the Arlo only use single channel encoders. When used with the Arlo hardware, only one channel of the quadrature encoders is used. IMO, this is too bad. Quadrature encoders have several advantages over single channel encoders and it's too bad the second channel isn't used.

    I'm not aware of any solutions for your motors and encoders when using C but there are several solutions for reading quadrature encoders with Spin/PASM.

    There's some discussion about quadrature encoders in this thread.

    http://forums.parallax.com/showthread.php/152292-Four-Quadrature-Encoder-and-Four-PWM-Object-(beta)

    Make sure and check the first two links in the above thread.

    I'm presently taking a break from working on encoder code to work on my hexapod but I plan to return to refining the Spin firmware for the Arlo hardware soon. While I think there's room for improvement on my motor control software, it works pretty well as it is. I think the Eddie firmware could be adjusted work with your motors and encoders. The encoders are read from a fast PASM loop so the higher resolution encoders shouldn't be a problem.

    Let me know if you decide to try the Eddie firmware and I'll point out which constants to adjust to compensate for the high resolution encoders.

    The HB-25 motor controllers should work fine with your motors but you could probably use less expensive h-bridge options. I think the dual MC33926 boards Parallax sells would control your motors just fine. There's a version of the Eddie firmware which would make using this h-bridge relatively easy. Post #40 of the OPP#8 thread includes a video of my test robot using the MC33926 h-bridge.
Sign In or Register to comment.