Shop OBEX P1 Docs P2 Docs Learn Events
balancing skateboard — Parallax Forums

balancing skateboard

shmagoogin77shmagoogin77 Posts: 10
edited 2007-08-23 18:40 in Robotics
is it possible to build something like this
www.hackaday.com/2007/03/08/balancing-one-wheel-scooter/
with a basic stamp2, 2 ping modules, and a motor mind B?

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-03-09 08:22
    Yes, it's doable, but I'm not sure what you're planning to do with the Ping)) sensors?

    Regards,

    Bruce Bates
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2007-03-09 11:38
    It appears to use a gyro rather than two pings to find level.·Some things like this have been done with IR sensors. But only work on level ground.

    You might get by with a level sensing chip, an 2 or 3 axis accelerometer. 400watts might be done with the HB25 motor controller if you use a 12volt motor, they use 24 volt.· Of course you wouldn't need 1/2 of it as you would only be controlling one motor.

    It would be nice to have some sort of dynamic braking that recharges the batteries while slowing you down on a downhill run.· Maybe a magnetic clutch acting as a drag.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "If you want more fiber, eat the package.· Not enough?· Eat the manual."········
    ···················· Tropical regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • shmagoogin77shmagoogin77 Posts: 10
    edited 2007-03-09 16:30
    thanks for the responses
    i assumed i could use the ping sensors to detect how low to the ground either side of the board was like the balancing BOE BOT that someone on here made but i guess the axis accelerometers would be better
    or would the ping sensors be better?
    thanks again
    ed
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-03-09 16:43
    The PING )) would be almost useless in that sort of application. You are far better off with accelerometers or tilt detectors. The response of either of the later is almost instantaneous, where with the ultrasonic detector close range will be a problem, as well as waiting for the sound's time of flight and return.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • shmagoogin77shmagoogin77 Posts: 10
    edited 2007-03-09 16:48
    www.ebikes.ca/projects/Emanual/index.shtml
    there one his first balancing skateboard it uses a ping sensor
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2007-03-11 17:02
    I recommended the accelerometers and I still think they are a better starting point. Sparkfun has gyros.· I still have a bit of trouble understanding when a gyro is absolutely needed.·

    Just measuring equal distance from the ground does not deal with uphill and downhill slopes. The rider needs to feel that level is stationary. Apparently the HB25 is good for only one 12 volt motor if both directions are controlled. So it is a useful fit. AS mentioned, ultrasonics will vary quite a bit on a day-to-day basis due to changes in the weather and such.

    I am still quite curious about if the HB25 would actually allow the batteries to charge on a downhill run OR merely brake. I wouldn't expect anything too steep.· Having the batteries charge on downhill runs would really add a lot to the setup.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "If you want more fiber, eat the package.· Not enough?· Eat the manual."········
    ···················· Tropical regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan

    Post Edited (Kramer) : 3/11/2007 5:08:54 PM GMT
  • LawsonLawson Posts: 870
    edited 2007-03-12 19:20
    getting regenerative braking from any H-bridge power amplifyer requires that it uses "synchronous rectification". (it also requires using MOSFETS or some other switch that conducts in both directions) Synchronous rectification also results in a more efficient H-bridge with fewer power components, so most H-bridge chips i've seen are setup to do this. ( http://en.wikipedia.org/wiki/Buck_converter#Synchronous_Rectification remove the inductor, capacitor, and load then replace them with a DC motor and you've got the usual H-bridge circuit) The reason "synchronous rectification" provides regenerative braking is that when the motor is sourcing power (ie it's braking a load) power is now flowing "backwards" throught the circuit. This reversal in direction combined with the synchronous rectification converts the "buck" style circuit into a "boost" style circuit. I.E. now the circuit is perfectly layed out to boost the motor's output voltage up to the voltage of the battery.

    My two cents,
    Marty
  • crgwbrcrgwbr Posts: 614
    edited 2007-03-12 21:21
    darn, now I have to build one of those.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    NerdMaster
    For
    Life
  • shmagoogin77shmagoogin77 Posts: 10
    edited 2007-03-12 23:26
    thanks for the new information
    there was a new balancing skate board posted on hackaday yesterday that was a cheapo one that used 2 battery powered drills as motors
    looked pretty cheap but i didnt understand how it would turn
    by the way i am probably gonna build some type of balancing skateboard and my friend said hed split the price with me [noparse]:)[/noparse]
    www.kysotech.com/projects/skatanova.html
  • shmagoogin77shmagoogin77 Posts: 10
    edited 2007-03-13 01:35
    2 quick questions:
    on the HB25 does that just run off the basic stamp power?
    so i wouldn't need any lead acid or any kind of high power battery?
    or do i?
    and also would it be better to just use a relay to balance the board?
    or is the HB25 a better method
    thanks
  • FranklinFranklin Posts: 4,747
    edited 2007-03-13 03:19
    The BS2 controls the HB-25s but does NOT provide power to the motors. there are power inputs and motor outputs on the HB-25

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • slamerslamer Posts: 52
    edited 2007-03-13 13:12
    For the precision needed to balance your board you will need a speed controller . Just turning on a relay wil only give your motors full power on or off. You will need much more gentle nudges from your PID software·to keep the board in balance

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    undefinedundefinedundefinedundefinedSteven Kirk Nelson (slamer)

    Team K.I.S.S
    Build Safe, Build Mean, Build Strong!
  • LawsonLawson Posts: 870
    edited 2007-03-13 23:24
    How this balancing skate board turns is kinda sneaky. The first way that I saw being used relies on the dynamics of the super wide tire that's used. Specifically when the tire is tilted into a turn it acts more like a conical tire than a cylindrical tire. (this works better with a low tire pressure) The other way I can think of steering this thing is the same way a unicycle is steered i.e. by carefully timing steering inputs depending on if the board is sligltly ahead or behind the rider's center of gravity. Also, some steering action could also be done by taking advantage of stick-slip while turning the board.

    My 2 cents
  • shmagoogin77shmagoogin77 Posts: 10
    edited 2007-03-14 00:31
    it says it turns like a snowboard, you just shift your weight
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2007-03-14 01:05
    Yes, the steering is done my "smooshing" the tire when leaning (the guy notes this, referring to a "triangular contact patch" -- see his Reply at #12 on the hackaday page.)
  • shmagoogin77shmagoogin77 Posts: 10
    edited 2007-03-14 01:35
    Kramer said...


    I am still quite curious about if the HB25 would actually allow the batteries to charge on a downhill run OR merely brake. I wouldn't expect anything too steep. Having the batteries charge on downhill runs would really add a lot to the setup.

    i dont think i will be adding anything this complex any time soon but maybe sometime in the future
    except for they are no hills where i live eyes.gif
  • shmagoogin77shmagoogin77 Posts: 10
    edited 2007-04-09 01:19
    please help edit my coding
    i have hooked up a motor from ebay to the HB25 and i have an accelerometer measuring the tilt of the leaning but i am having some problems with my coding
    i took the sample code from nuts and volts magazine for the accelerometer and tried to add the coding to control the motor
    i got the motor to ramp up slowly to full speed and then stay there but i want to be able the slow down and turn off the motor when the angle reaches something like -2
    when ever i add something like
    IF xTilt < -2 THEN StopMotor
    the motor just does crazy stuff and never ramps up to full speed
    here is my code so far
    i hope i have provided enough information for somebody here to help me
    thanks in advance
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2007-04-09 01:51
    You have --
    MotorControl:
    LOW HB25
    PAUSE 5
    FOR counter = 0 TO 250           
      PULSOUT HB25, 750 + counter    [color=black]' this should ramp UP
    [/color]  PAUSE 20
    NEXT
    PULSOUT HB25, 1000
    RETURN
    
    StopMotor:
      [color=red]FOR counter = 250 TO 0         [/color][color=black]' this should ramp DOWN
    [/color]    PULSOUT HB25, 750 + counter
        PAUSE 20
      NEXT
    RETURN
    

    I didn't see anyplace in your program like GOSUB StopMotor, but assuming that it got there, there is the problem·that "counter" starts at 250.· The problem is that if/when your speed/PULSOUT counter·<·250 when you need to start your deceleration: it goes to StopMotor whereupon, chock-a-block,·you're·hitting it·with full-speed (which'd likely knock your socks off.)· Yes?· So, whatever the speed/value is, at the instant deceleration is needed, is where the deceleration counter should start at.

    Update -- Are you supposed to PULSOUT the HB25 or PWM it?· Either way, same point.

    Post Edited (PJ Allen) : 4/9/2007 1:57:21 AM GMT
  • JohnBFJohnBF Posts: 107
    edited 2007-04-09 01:58
    One problem is that comparisons like < do not work as expected with negative numbers in pBasic. The pBasic manual has some explanation, and the Smart Sensors text (downloadable from Parallax) has a really clear and thorough discussion of the tricks and workarounds in using pBasic math to make use readings from a variety of sensors, including the memsic accelerometer.

    Hope you get this working - great project!

    /John
  • shmagoogin77shmagoogin77 Posts: 10
    edited 2007-04-09 02:04
    i am way confused about what PJ Allen is saying because when going from counter 250 to 0 you are going from 1000 which is full speed down to 750 which is stopped
    but what JohnBF is saying would make sense because of all the calculations and formulas used to get a tilt angle a lot of ABS commands are used and many negative numbers are made absolute value
    thanks John and Allen for the help
    and thanks John for the encouragement
  • WarrlokWarrlok Posts: 77
    edited 2007-04-10 18:41
    Kramer said...

    It appears to use a gyro rather than two pings to find level.·Some things like this have been done with IR sensors. But only work on level ground.

    You might get by with a level sensing chip, an 2 or 3 axis accelerometer. 400watts might be done with the HB25 motor controller if you use a 12volt motor, they use 24 volt.· Of course you wouldn't need 1/2 of it as you would only be controlling one motor.

    It would be nice to have some sort of dynamic braking that recharges the batteries while slowing you down on a downhill run.· Maybe a magnetic clutch acting as a drag.

    how about this its regenerative,,turn.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Problems are the "roads" of life,
    solutions are only "onramps" to the next problem



    ············································· "Brad Smith"
    ·
  • johnnyairplanejohnnyairplane Posts: 25
    edited 2007-08-23 18:40
    Dude,
    Dimension engineering has regenerative motor controllers, nice easy R/C 'type' inputs, really quite nice!

    The Mesmic accelerometer is one heck of a nice piece of work, other than the motor, it's almost all off the shelf
    components with pre-written 'objects' from parallax.....

    I'm waiting for kids to born with the 3 pin connector, program them like a servo....750 750 750! (stop, get it!)....

    John
Sign In or Register to comment.