element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • 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 Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Multiple servo control...setting expectations
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 36 replies
  • Subscribers 383 subscribers
  • Views 4047 views
  • Users 0 members are here
  • arduino_code
  • code
  • servo_motor_control
Related

Multiple servo control...setting expectations

colporteur
colporteur over 1 year ago

image

Can six servos all operate independent using and Arduino and PCA9685 PWM driver?

I am creating an model railroad barn yard animation scene. Six different animal perform movements using SG90 servos.

The cows in ellipse A tails moves left to right.

The cow in ellipse B moves its head left to right

The cow in ellipse C moves its head up and down

The pig in ellipse D moves it head up and down

The pig in ellipse E moves its head from left to right.

The modeller has asked that all animals perform motion at the same time. Cow tails swing. Cow heads move and pigs heads move. Each animal would complete a pattern. i.e. Cow C dips it head to gather feed and then raises it head to chew. 

I'm confident I can create the servo action to simulate the motion individually. I'm not so sure if this is possible simultaneously.

I stuck on the concept of a thread. If the cows tails are moving that has to stop for the other animals to move.

Can some Arduino aficionados provide me some guidance? Is it possible to do this all with one Arduino or does it have to be broken down to be done by one or more Arduino?

  • Sign in to reply
  • Cancel

Top Replies

  • colporteur
    colporteur over 1 year ago +11
    community.element14.com/.../IMG_5F00_2571.MOV Here is a short video using the code shabaz provided. I made a few tweaks in array values to get the desired effect.
  • shabaz
    shabaz over 1 year ago +7
    Hi Sean, It can certainly be done with a single Arduino as mentioned by others, but it takes a different code structure than just the basic loop. The luxury method would be to use a real-time operating…
  • michaelkellett
    michaelkellett over 1 year ago in reply to colporteur +6
    Slightly scary - I keep expecting one to take its first step ! MK
Parents
  • colporteur
    colporteur over 1 year ago

    You don't have permission to edit metadata of this video.
    Edit media
    x
    image
    Upload Preview
    image

    Here is a short video using the code shabaz provided. I made a few tweaks in array values to get the desired effect.

    • Cancel
    • Vote Up +11 Vote Down
    • Sign in to reply
    • Cancel
  • genebren
    genebren over 1 year ago in reply to colporteur

    Pretty cool! The animals sound a little noisy, maybe they need a little oil. Slight smile

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
  • colporteur
    colporteur over 1 year ago in reply to genebren

    I agree the plastic servo motors chatter. I did a whole replacement to metal ones.

    Just sitting on the bench the six metal servos were quite. Mounting them and having them running the noise is higher. Less than the plastic servos.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • colporteur
    colporteur over 1 year ago in reply to genebren

    I agree the plastic servo motors chatter. I did a whole replacement to metal ones.

    Just sitting on the bench the six metal servos were quite. Mounting them and having them running the noise is higher. Less than the plastic servos.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
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