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

HB-25 object

CJCJ Posts: 470
edited 2006-10-03 23:16 in Propeller 1
Here is a rough HB-25 object I put together tonight, the pulses are a good width according to my bs2.
It has selectable single/dual, manual pulses/auto-refresh modes
runs my cont. rotation servo just fine


comments and corrections welcome

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Who says you have to have knowledge to use it?

I've killed a fly with my bare mind.

Comments

  • ALIBEALIBE Posts: 299
    edited 2006-09-29 12:26
    CJ,
    thanks for the initiative toward this object and help. I will give this a shot today and over the w/e.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ALIBE - Artificial LIfe BEing. In search of building autonoumous land robot

    http://fstop.crosscity.com/
    http://icar.crosscity.com/
    ·
  • ALIBEALIBE Posts: 299
    edited 2006-09-30 23:11
    CJ,
    I hooked up my EMaxx to the HB25 and ran your test code - w/·two modifcations. 1) changed the Dual (1) to Single (0), changed the ::SetMotors() duration params to both 1700.

    What I'm seeing is that the motor runs for less than a sec and then stops. The HB25 is reporting Fault right after it runs the test app.

    Here's how I hooked up the pins on HB25:
    · 1. Left Jumper there (to indicate Mode 1)
    · 2. Servo cable is hooked up to the WRB. However, "R" is NOT CONNECTED per datasheet
    I scoped it, looks like I am seeing the pulseout going to the out pin (see attached).

    I did not set the motors' polarity reverse. I have attached a snapshot of the robot.

    What am I missing. Your help is greatly appreciated.

    Thanks again

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ALIBE - Artificial LIfe BEing. In search of building autonoumous land robot

    http://fstop.crosscity.com/
    http://icar.crosscity.com/
    640 x 480 - 151K
    640 x 480 - 142K
    640 x 480 - 147K
    640 x 480 - 153K
    1.bmp 1.3M
    1.jpg 151.1K
    2.jpg 142K
    3.jpg 146.9K
    4.jpg 153.3K
  • CJCJ Posts: 470
    edited 2006-10-01 00:09
    have you used the HB-25 in this setup before? it looks rather unorthodox, two battery packs(7.2v?) in series, with one motor hanging off of each motor terminal.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who says you have to have knowledge to use it?

    I've killed a fly with my bare mind.
  • ALIBEALIBE Posts: 299
    edited 2006-10-01 00:15
    I have not. Not sure why in series going to be a problem. The +ve of each motor is hooked up to M1 and M2 respectively. While the -'ve is hooked up to the -'ve of the HB25 ?


    Do you want me to try a different wiring? Can you please recommend?

    thanks

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ALIBE - Artificial LIfe BEing. In search of building autonoumous land robot

    http://fstop.crosscity.com/
    http://icar.crosscity.com/
    ·
  • CJCJ Posts: 470
    edited 2006-10-01 00:20
    I would try it with one motor connected to both motor terminals, if you need to run both at the same time, you may be able to run them in parallel, if someone in the know from parallax could let us know if you can run them in parallel, the motor control page indicates the possibility of two in the same direction.

    the series would only be a problem if you were exceeding the max voltage for the controller

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who says you have to have knowledge to use it?

    I've killed a fly with my bare mind.
  • ALIBEALIBE Posts: 299
    edited 2006-10-01 00:48
    I'm attaching the current way I have it·wired (#1) and #2 is what you're recommending.
    Am I understanding your reco correctly in #2

    thanks



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ALIBE - Artificial LIfe BEing. In search of building autonoumous land robot

    http://fstop.crosscity.com/
    http://icar.crosscity.com/
    572 x 392 - 24K
    559 x 486 - 24K
    1.jpg 23.7K
    2.jpg 23.8K
  • CJCJ Posts: 470
    edited 2006-10-01 01:07
    here is how I suggested.

    your number two is a direct short on the hb25's output and guarranteed to blow your fuse!
    I recommend you delete the attachment to prevent someone from accidentally using it

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who says you have to have knowledge to use it?

    I've killed a fly with my bare mind.
    559 x 486 - 15K
    2.jpg 15.3K
  • ALIBEALIBE Posts: 299
    edited 2006-10-01 01:13
    so, can you clarify your object's call ::SetMotors(1700,1300)

    Is it not these 2 params for each of the 2 motors? How do you have it wired? If I were to connect the 2 motors parallely, how would this method behave. Sorry, I'm lost

    thanks

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ALIBE - Artificial LIfe BEing. In search of building autonoumous land robot

    http://fstop.crosscity.com/
    http://icar.crosscity.com/
    ·
  • ALIBEALIBE Posts: 299
    edited 2006-10-01 01:32
    cJ, I tried the above wiring both individual motors and in parallel. IT works FANTASTIC!!

    Thanks a lot for your guidance and Timely HELP!!

    I owe you one!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ALIBE - Artificial LIfe BEing. In search of building autonoumous land robot

    http://fstop.crosscity.com/
    http://icar.crosscity.com/
    ·
  • CJCJ Posts: 470
    edited 2006-10-01 01:33
    the hb25 is made to run a single motor with its + and - connected to M1 and M2, maybe two in parallel. the second number is for the second hb25 in dual mode, I should document it better, I will do that tonight.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who says you have to have knowledge to use it?

    I've killed a fly with my bare mind.
  • CJCJ Posts: 470
    edited 2006-10-01 01:37
    good to here!!

    *goes back to documenting the code for official upload*

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who says you have to have knowledge to use it?

    I've killed a fly with my bare mind.
  • CJCJ Posts: 470
    edited 2006-10-01 03:07
    I just submitted my code to the object exchange with lots of documentation and a small change, the set_motors() method is now set_motor1() and set_motor2() to remove ambiguity as well as a diagram to help prevent others from having the same problems

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who says you have to have knowledge to use it?

    I've killed a fly with my bare mind.
  • ALIBEALIBE Posts: 299
    edited 2006-10-01 12:13
    CJ, thanks. I updated my caller methods.

    I had couple of other ?s.

    1. In your test routine, you're calling :tongue.gifulse_motors in a repeat block - this works w/o any problems. However, it was my understandng that one would not need to re-send pulses to hb-25 in a loop as it keeps the state till you change the config again and send your new pulse?

    2. In your ::Config method, the auto vs manual refresh, by setting this param to Auto (1), the motors don;t seem to rotate anymore. What is the real purpose of the auto.

    thanks

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ALIBE - Artificial LIfe BEing. In search of building autonoumous land robot

    http://fstop.crosscity.com/
    http://icar.crosscity.com/
    ·
  • CJCJ Posts: 470
    edited 2006-10-01 12:40
    1. I don't actually have an HB-25, so I was sending pulses to a BS2 for measurement, and a continuous rotation servo for testing

    2. launching the cog is manual right now. the refresh cog is separate from the configuration call, typically you configure something before setting values in it, though I could easily alter it to set center values and then launch the cog in the config routine, that could throw someone for a loop if they transition from manual to auto mid-program with motors already running(Why'd that motor stop, the light is still green?)

    programming notes for later:

    auto launch cog on config, with center values if no values already set

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who says you have to have knowledge to use it?

    I've killed a fly with my bare mind.
  • ALIBEALIBE Posts: 299
    edited 2006-10-01 13:24
    I commented out the "if State" in ::Start_Cog() and it works great for my app.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ALIBE - Artificial LIfe BEing. In search of building autonoumous land robot

    http://fstop.crosscity.com/
    http://icar.crosscity.com/
    ·
  • CJCJ Posts: 470
    edited 2006-10-01 15:07
    here is the updated code with launch when set to auto, and center set if not previously set

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who says you have to have knowledge to use it?

    I've killed a fly with my bare mind.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-10-03 22:22
    ALIBE,

    ·· Both of the schematics you posted show incorrect connections for the motors.· The M1 terminal should be connected to one side of the motor and the M2 to the other.· In your second schematic you are essentially shorting out the outputs, which will cause a fault.· One other quick note on your screen capture of the pulses…If you move the trigger up slightly it will capture the pulses correctly instead of them scrolling by on the display.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • ALIBEALIBE Posts: 299
    edited 2006-10-03 22:28
    Chris, thanks for the feedback. CJ confirmed the incorrectness of my wiring earlier on in this thread. I have since corrected my project.

    On a side note, it would help to describe the wiring btwn te hb25 and the motors w/ a picture in the user manual for hb-25. I am sure there are other newbies like myself who might make a similar mistake. A picture says a 1000 words IMHO.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ALIBE - Artificial LIfe BEing. In search of building autonoumous land robot

    http://fstop.crosscity.com/
    http://icar.crosscity.com/
    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-10-03 22:40
    ALIBE,

    ·· I will see what I can do to make the documentation more clear on the connections.· I originally thought you were following the article in SERVO magazine which describes this exact setup on the E-TREX R/C Truck that appears in your photos.· Looking at CJ’s SPIN file I originally thought he had the same connections in the ASCII schematic.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • ALIBEALIBE Posts: 299
    edited 2006-10-03 22:46
    Chris,
    I was going both directions. Was not very clear which wiring one is valid or not. Or if either of the wirings were legit. I was proved wrong of course.

    CJ, did not include the wiring diagram in his spin file till after he determined it migt be useful to help support newbies like me - which happened in is his last posted spin file.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ALIBE - Artificial LIfe BEing. In search of building autonoumous land robot

    http://fstop.crosscity.com/
    http://icar.crosscity.com/
    ·
  • CJCJ Posts: 470
    edited 2006-10-03 23:16
    made some minor changes to the code, as well as the important clarification for the motor hookup

    the current code uses just 90 longs

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who says you have to have knowledge to use it?

    I've killed a fly with my bare mind.
Sign In or Register to comment.