Shop OBEX P1 Docs P2 Docs Learn Events
Getting encoder ticks from a DHB-10 motor controller — Parallax Forums

Getting encoder ticks from a DHB-10 motor controller

Hopefully someone can point me to a place in the documentation that I've missed.
I have the motor mount and wheel kits on an Arlo base and the encoders are connected to a DHB-10 motor controller. Somewhere I read that you can pull the encoder "ticks" from the motor controller board. Does anyone know how to do that?

Comments

  • I have used the DIST command for this before.
  • robotsRcool,

    Thanks for your reply and a DIST command sounds like what I need. However, I have gone over the DHB-10 motor controller documentation and I cannot, for the life of me, find any way to send commands to it or to receive responses from it. There doesn't seem to be a COM port or USB port on the board.

    Could you please tell me how you were able to use the DIST command with a DHB-10 motor controller?

    Thanks,
    Doug
  • PublisonPublison Posts: 12,366
    edited 2019-11-14 19:36
    The DHB-10 communicates with the outside world through CH1 and CH2 via serial protocol.

    The easiest way to communicate with DHB-10 is with an Activity Board-WX.
    http://learn.parallax.com/tutorials/robot/arlo/arlo-activity-board-brain

    All the C libraries and programs are available at the Learn web site. They use SimpleIDE available from the Parallax web site:
    https://www.parallax.com/downloads/propeller-p8x32a-software

    You may be able to use the Parallax Serial Terminal to communicate on CH1, but I have not tried it.
    Serial
    Under a default configuration, connect a bidirectional serial port at 19,200 kilobaud, to CH1. For different
    baud rates or separate transmit and receive pins, see the BAUD and RXPIN commands.

  • Wow, thanks! I was just using the pulse control, but I'll switch to the serial protocol right away. Thanks again.
  • If you go through one of the Arlo tutorials then you will see an example of how to hook a microcontroller up to the DHB-10 for PWM and Serial usage.

    Summary:
    * Connect your uC's UART Tx pin to the white pin of the DHB-10's CH1 port.
    * Connect your uC's UART Rx pin to the white pin of the DHB-10's CH2 port.
    * Make sure that your uC and the DHB-10 share a common ground. The black pins on the CH1/CH2 ports are ground.
    * Send "TXPIN CH2\r" to switch DHB-10 from half-duplex serial on CH1 to full-duplex on CH1/CH2.
Sign In or Register to comment.