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
Acoustics
  • Challenges & Projects
  • Project14
  • Acoustics
  • More
  • Cancel
Acoustics
Blog 1DUltraBot : Part 2 : The Chassis is Moving
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Acoustics to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: dubbie
  • Date Created: 29 Feb 2020 4:27 PM Date Created
  • Views 1343 views
  • Likes 7 likes
  • Comments 5 comments
  • nano
  • 1dultrabot
  • acousticsch
  • micro servo motor
Related
Recommended

1DUltraBot : Part 2 : The Chassis is Moving

dubbie
dubbie
29 Feb 2020
image

Acoustics

Enter Your Electronics & Design Project for a chance to win an $200 Shopping cart of product!

Back to The Project14 homepage image

Project14 Home
Monthly Themes
Monthly Theme Poll

 

I have been pottering on with the 1DUltraBot for the Acoustics Project14 activity and now having a working chassis. I decided that rather than try to make my own chassis to follow the 5 foot ruler that I would adapt an existing child's small toy car. I was originally just going to use the axles and wheels but on closer inspection of the toy car decided that it would be even better and simpler to just 3D print some parts that fitted onto the base of the toy car without the need for any alterations. After a couple of days of measuring and making mistakes with measuring I managed to produce three printed parts:

 

1) The bottom guide for the ruler

2) The micro servo motor holder,

3) A triangular piece to hold the micro servo motor in place.

 

The challenge with these pieces was to get the servo motor to the correct height. When the chassis is placed over the ruler the wheel on the continuous rotation servo motor must touch the ruler with just enough force to provide the friction so that it will move along but not so low that it lifts the existing chassis wheels away from the ground. After a couple of failed attempts (caused by my inability to read the distance from a ruler thingy) I managed to print out an acceptable set of parts.

 

The picture below shows the guide fixed in place on the bottom of the toy car.

 

image

This is a side view showing the micro servo (just visible) and the triangular fixing plate that holds the battery.

 

image

 

 

The electrical connections are very simple

 

Vbat to Nano Vin and +V of the micro servo motor

Vgnd to Nano GND and ground of the micro servo motor

D2 of the Nano to the PWM connection of the micro servo motor.

 

At the moment I am using my own micro servo motor pulse function, just to have more control, but I plan to move to an interrupt version later if needed.

 

void myservo(int select_servo, int servo_value, int servo_period)

// servo_value must be between 0 and 2000
{

  int index;

  if (servo_value < 0)
    servo_value = 0;
  if (servo_value > 2000)
    servo_value = 2000;
   
  for (index = 0; index < servo_period; index++)
    {
      digitalWrite(select_servo, HIGH);   // Start the servo pulse
      delayMicroseconds(500);             // Basic pulse period part
      delayMicroseconds(servo_value);     // Additional delay for servo position
      digitalWrite(select_servo, LOW);    // End the servo pulse.
      delayMicroseconds(2000 - servo_value);
      delay(18);                          // wait for the pulse space
    } /* for */
}

 

I just put this function into a simple infinite while loop to get it to move forwards and backwards. Nothing complicated, just enough to check everything is working.

 

// Just going forwards and backwards

while (1)

  {

     myservo(fl_shoulder, 0, 300);

     delay(1000);

     myservo(fl_shoulder, 2000, 300);

     delay(2000);

  } /* while */

 

The video below shows the chassis moving as required and is actually better than I was expecting with no wheel slip at all.

 

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

 

Next, adding the ultrasonic rangefinder.

 

Dubbie

  • Sign in to reply

Top Comments

  • genebren
    genebren over 5 years ago +3
    Looking good!
  • genebren
    genebren over 5 years ago in reply to dubbie +3
    I have found with mechanical projects there is a lot of measure, design, test and repeat loops. I find that no matter how precise I measure, there is always room for improvement on a second effort (although…
  • DAB
    DAB over 5 years ago +2
    Good start. DAB
Parents
  • genebren
    genebren over 5 years ago

    Looking good!

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • dubbie
    dubbie over 5 years ago in reply to genebren

    Gene,

     

    I was surprised by how good it looks. I must have done something right somewhere. There is no visible wobble as it moves along the ruler, plus the chassis wheels all seem to be on the floor, as well as the drive wheel being on the top of the ruler! With my mechanical skills this is virtually a micracle.

     

    Dubbie

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • genebren
    genebren over 5 years ago in reply to dubbie

    I have found with mechanical projects there is a lot of measure, design, test and repeat loops.  I find that no matter how precise I measure, there is always room for improvement on a second effort (although I have been lucky one or twice and got it right on the first try).

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • dubbie
    dubbie over 5 years ago in reply to genebren

    Gene,

     

    I think this must be one of those 'lucky first tries' .

     

    Dubbie

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

    Gene,

     

    I think this must be one of those 'lucky first tries' .

     

    Dubbie

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • 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