Shop OBEX P1 Docs P2 Docs Learn Events
HB-25 question — Parallax Forums

HB-25 question

DiverBobDiverBob Posts: 1,116
edited 2011-12-19 14:46 in Propeller 1
I've been playing around with the HB-25 object but I need to run 3 HB-25's and one of them will have the Parallax position encoder attached. I have some ideas on how to proceed but wanted to possibly save some time searching the exchange library by seeing if any one is familiar with any existing object that might work better. The HB-25 object can run 1 or 2 controllers but not 3. I could use this for the 2 controllers without a encoder and use something else for the third controller but it would be nice if there is something already out there that I wasn't aware of.

This is for a new hexapod robot I'm creating (here is the link to the Parallax Robotics forum: http://forums.parallax.com/showthread.php?135857-Next-large-robot)

Thanks for the help in advance!

Bob

Comments

  • bsnutbsnut Posts: 521
    edited 2011-12-18 02:20
    I hate to break the news. But, you will need to setup another pin to run the other HB-25, since the HB-25 is designed to have no more than two of them connected to one I/O pin. In order for it to work with your project, you will need 2 I/O pins (max) for each HB-25 leg and it can be setup like this.

    I/O PinX Kicker HB-25 and Lift HB-25
    I/O PinX Swing HB-25

    This means that you will need 12 pins to pull off your cool project and this just the motor control part.

    Or, you can do this and that is.

    2 pins for the HB-25's Kicker and Lift and Swing speed and direction
    3 pins for relays to select which motors to use in each leg.
  • Jim FouchJim Fouch Posts: 395
    edited 2011-12-19 06:15
    You may want to consider using an MCP23S17 SPI 16 pin port expander. I did some work a few years ago writing a driver in PASM and was able to drive outputs down under 2-4us. You could modify the object to multiplex and drive several HB-25s with only three propeller pins.

    I think there was a limit of 192 I/Os per 3 SPI pins. Also the update rate would slow down as you added each MCP32S17 as you would have more chips to update.

    Let me know if you'd like a copy of the driver. It is not 100% finished, but would be a good start.
  • DiverBobDiverBob Posts: 1,116
    edited 2011-12-19 14:46
    My question wasnt about running out of IO pins on the prop, I will be using one prop board for each leg so there will be plenty of IO available for any additional sensors I can think of.

    I'm trying to see if there are any existing solutions out there that would easily allow me to run 2 HB-25 motor controllers directly and drive one position encoder that controls a HB-25 controller. Rather than reinvent the wheel, I'm looking to see if there are other possible solutions that I hadn't thought of yet. Right now the plan is to use the HB-25 object to run the 2 HB-25s and use a separate object (still to be determined which one) to run the position encoder. Since I haven't started any serious coding on this yet, asking the question to see what else might be out there could save some time. I'm mainly testing code segments now, seeing what objects work the best for my needs. I like the HB-25 object for its simplicity (since I'm not dealing with wheels and turning that means large portions of some of the existing objects would not be used).

    I appreciate the help, it seemed like my question might have been misunderstood.

    Bob
Sign In or Register to comment.