Shop OBEX P1 Docs P2 Docs Learn Events
How to obtain encoder data from #29319 Position Controller — Parallax Forums

How to obtain encoder data from #29319 Position Controller

LarryCardoLarryCardo Posts: 28
edited 2011-03-04 11:53 in Robotics
I am using the Propeller to drive the Motor Mount and Wheel Kit (#27971) and Position Controller (#29319) along with the HB-25 Motor controller (#29144). These units operate nicely as a complete system where the speed, ramp rate and distance can be accurately controlled.

However, for my application (inverted pendulum) the Position Controller does not provide the fine control I need. Thus, I am providing pulse control directly from the Propeller to the HB-25s.

I would also like to use the encoder pulses. Does anyone know how to obtain encoder pulses directly from the Position Controller (#29319).

Comments

  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2011-03-04 09:49
    If you just want to read the encoder directly then it would be pretty easy just to bypass the AT Tiny 2313 chip and just feed the encoder output directly to the headers. It would involve some mods to the board. For reference I pulled up the manual that has the schematic from the product page below:

    http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/position/List/0/SortField/4/ProductID/665/Default.aspx

    I'd keep a ground and +5v connection at the header at the edge of the boards. Some of the other pins can be isolated for your own use by cutting the PCB trace going to it. From there just add small jumper wires (one from pin 6 and another from pin 7 of the CPU) going to the pins you've freed up. This will bring the encoder output directly out and bypass the CPU. It will still get the signals too but it's now isolated and won't mater.

    Either that or use the source code on the product page to rewrite some of the code to just report back the encoder state. You could update the code and reflash them.

    Robert
  • LarryCardoLarryCardo Posts: 28
    edited 2011-03-04 10:13
    Robert,

    Your info is EXACTLY what I was looking for. Thank you! I did not notice the Position Controller schematic in the literature. Duh.

    Do you or anyone know why there are "two" Opto-interrupters?
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2011-03-04 10:57
    Glad I could help.

    There are two optical sensors there so you get a full quadrature output. With only one sensor you can get speed/velocity only. When you add the second sensor you also get direction information too. For most of the applications I work on I really need both. If you do some searches on quadrature encoders there are plenty of websites that can explain them better than I can here.

    Robert
  • W9GFOW9GFO Posts: 4,010
    edited 2011-03-04 11:53
    I believe you can also poll the Position Controllers for the encoder data via the serial link.

    Rich H
Sign In or Register to comment.