element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • 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
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • 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
  • Settings
Pi Chef Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Pi Chef Design Challenge
  • More
  • Cancel
Pi Chef Design Challenge
Blog Cracked pepper sir? (Playing and planning) Pi Chef Challenge Blog post #4
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: crackedpepper
  • Date Created: 4 Feb 2018 7:27 AM Date Created
  • Views 762 views
  • Likes 8 likes
  • Comments 4 comments
Related
Recommended

Cracked pepper sir? (Playing and planning) Pi Chef Challenge Blog post #4

crackedpepper
crackedpepper
4 Feb 2018

Unfortunately i haven't made much progress with the pepper bot this week.

 

I've started thinking about how I'm going to tackle the robot arm. I've managed to organise a 3D printer to borrow (which i will be grabbing during the coming week) but its quite a small printer, the print bed is 150mm x 150mm. With the size restriction in mind i had a look through the robot arm designs on thingiverse. I found this one one which looks quite good but ill have to modify the design to fit different motors as i want to use servos rather than the stepper motors used in the design.

image

 

I started looking at writing control software for the arm. The first step for this was running a servo off the pi. I had a servo sitting around in set of supplies i borrowed off of a friend, its a TowerPro SG90 . A very small servo but a good chance to get my hands dirty. I didn't have the original datasheet for it so i dug one out off the internet, though it turns out the one i dug out was incorrect. The one i found listed a 20ms cycle and pulse widths of 1ms for 0 degrees and 2ms for 180 degrees. After playing with the motor i found that the pulse width range was actually 0.5ms - 2.5ms.

 

I decided at this point that i should actually get a bit more familiar with python syntax so i wrote a small class for controlling the servo. The code can be found here. Controling the servo using this class consisted of the following code (this is using BCM pin 17)

import motor

m = motor.create(17)

m.start()

m.moveTo(60)

This moves the servo to 60 degrees past the centre point, negative angles are used for the opposite direction.

 

With the servo control out of the way i started planning moving the robot arm. I want to control it via (x,y,z) coordinates so i did some furious scribbling on paper and came up with the following

 

The following diagram is a side view of the arm with L1 and L2 as the lengths of arm segments.

image

This next diagram is an overhead view of the arm with D being the distance the arm is extended from the centre point.

image

And the math:

image

I wrote a quick script which does this calculation for a desired x,y,z coordinate (as usual its on my github).

 

Hopefully my progress in the coming weeks is a little more exciting.

  • Sign in to reply

Top Comments

  • crackedpepper
    crackedpepper over 7 years ago in reply to genebren +2
    The maths side of the arm control was actually one of the parts I was most excited about. I initially came up with a matricie of trig equations which I didn't want to have to solve so I started again and…
  • genebren
    genebren over 7 years ago +1
    Adrian, Even a little progress is a step in the right direction. Math like that makes my brain hurt. All those math courses have trickled out of my brain through the years. Keep up the good work! Gene
  • DAB
    DAB over 7 years ago +1
    Nice update. I like the arm design you chose and the servo should make it responsive. Good progress. DAB
  • crackedpepper
    crackedpepper over 7 years ago in reply to DAB

    I'm starting to get excited about this robot arm. The only problem is it requires bearings which would take 4 weeks to ship to me. I'm going to try and find some of the same size locally over the next couple of days.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • crackedpepper
    crackedpepper over 7 years ago in reply to genebren

    The maths side of the arm control was actually one of the parts I was most excited about. I initially came up with a matricie of trig equations which I didn't want to have to solve so I started again and got to what I posted. Thanks for the feedback

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 7 years ago

    Nice update.

    I like the arm design you chose and the servo should make it responsive.

     

    Good progress.

     

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • genebren
    genebren over 7 years ago

    Adrian,

     

    Even a little progress is a step in the right direction.  Math like that makes my brain hurt.  All those math courses have trickled out of my brain through the years.

    Keep up the good work!

    Gene

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

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 © 2025 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

  • X
  • Facebook
  • linkedin
  • YouTube