element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Ben Heck Featured Content
  • Challenges & Projects
  • element14 presents
  • element14's The Ben Heck Show
  • Ben Heck Featured Content
  • More
  • Cancel
Ben Heck Featured Content
Documents Episode 48: See Ben Heck's Motorized Wheelchair Episode
  • Blog
  • Forum
  • Documents
  • Events
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Ben Heck Featured Content requires membership for participation - click to join
Actions
  • Share
  • More
  • Cancel
Engagement
Author: joeman
Date Created: 17 Aug 2012 2:38 PM
Last Updated: 30 Jul 2016 4:53 PM
Views: 279
Likes: 3
Comments: 7
Related
Recommended

Episode 48: See Ben Heck's Motorized Wheelchair Episode

element14's The Ben Heck Show

Join the Ben Heck team every week for amazing hacks! Watch them build and mod community-inspired projects using electronics!

Back to The Ben Heck Show homepage

Connect with TBHS
Featured Bonus Materials
See All Episodes

 

 

You don't have permission to edit metadata of this video.
Edit media
x
Upload Preview
To help a viewer with a new baby on the way, Ben builds a power drive add-on for his wheelchair, with foot controls.
  • heck's
  • episode
  • wheelchair
  • see
  • 48:
  • motorized
  • ben_heck
  • bh_accessibility
  • heck
  • ben
  • tbhs_ep
  • Share
  • History
  • More
  • Cancel
Anonymous
Parents
  • Former Member
    Former Member over 9 years ago

    Is the code available somewhere? I've had a head-scratcher over the same tank steering with a stick thing,

    http://f.cl.ly/items/2E2G3c1a3t28390B3y3o/Image%202012-08-13%20at%205.51.25%20PM.png

    Problem is that I currently have 3 ranges to do different things because I can't figure out how to do it in one continuous range, which cases a weird discontinuity, basically within a deadzone in the middle left/right is directly mapped to wheel speed with one being reversed as you'd expect, and above and bellow the deadzone the vertical axis is mapped to wheel speed and if you move left/right it reduces the speed on that side compared to the other, this works fine as long as I never hold full left/right and move the vertical axis between those 3 ranges, if I do it suddenly changes behavior in a very ungraceful manner, it's going forwards and to the left, bring the throttle back to the middle and it suddently spins in place full speed, but it was slowing down as I brought back the throttle and similar.

     

    Here is my actual arduino code: http://pastebin.com/5KSYyRvM  I've basically split the controls over 2 sticks one being used for vertical and one horizontal but combined they're the same as ben's, and I've split them into 8 distinct variables for ease of math and the deadzone part is handled by the remote controller side. (Arduino in the remote as well that grooms the numbers a bit to ease the robot's burden).

     

    I also have directly mapped tank steering controls, vertical axis of each stick directly controls the motors which works nicely, but it's not very intuitive for people used to driving cars.

     

    Any help figuring out how to get something close to that "graph" above with a single continuous function would be great.

     

    If you're interested here is what the code lives in: http://f.cl.ly/items/1k1W0P1l2v1d1i443j1A/IMG_0961.JPG

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
  • colecago
    colecago over 9 years ago in reply to Former Member

    I did something like this on our AGV at work.  I ended up using the 4 quadrant approach.  It wasn't a single continuous function, but it didn't feel real weird at the border conditions.  I also had a deadzone around each axis so you could achieve straight moving pretty easily.  I'll see if I can write up some pseudo-code from it tomorrow.

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
  • Former Member
    Former Member over 9 years ago in reply to colecago

    Much appreciated, as said I already have deadzones set up on the controller end, my arduino based remote controller does a lot of the heavy number crunching to get more "usable" variable values to work with here is the stick related code in the controller:

     

    http://pastebin.com/8xDRbLxj

     

    the values might look odd but I pulled these sticks out of a very old logitech gamepad, I've basically made the middle dead-zone the value is showed with the stick centered +/- 100 etc, same with top and bottom values, the hole in the enclosure stops the stick moving far enough to engage the pot's whole range, I basically moved the sticks around to different places, wrote down the numbers in the serial monitor and adjusted up/down as needed to get good ranges including a "medium" deadzone in the middle and a bit of a deadzone at the far ends in all directions to ensure you don't need to push hard against the edges. The values are unique per stick due to them not being flawed in quite the same ways etc.

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
  • colecago
    colecago over 9 years ago in reply to Former Member

    Hey, send me an email at colecago at gmail.com

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
Comment
  • colecago
    colecago over 9 years ago in reply to Former Member

    Hey, send me an email at colecago at gmail.com

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
Children
No Data
Element14

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2022 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube