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
A Question of Scale
  • Challenges & Projects
  • Project14
  • A Question of Scale
  • More
  • Cancel
A Question of Scale
Blog Tiny24hourMoBot #4 : The 24 hours is almost up
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join A Question of Scale to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: dubbie
  • Date Created: 8 Feb 2019 11:16 AM Date Created
  • Views 2805 views
  • Likes 13 likes
  • Comments 15 comments
  • mobile robots
  • tiny24hourmobot
  • hc-sr04
  • morobotsch
  • robotics projects
  • questionofscalech
  • arduino
Related
Recommended

Tiny24hourMoBot #4 : The 24 hours is almost up

dubbie
dubbie
8 Feb 2019

After a late night last night with a test assembly of my Tiny Mobile Robot I wasn't quite so chipper this morning as I usually am. Still, I did have time to think about how to connect everything together so it would fit inside the shell. I used a bit of stripboard to make connections for the two 360 degree continuous rotation servo motors and the HC-SR04 ultrasonic rangefinder, plus power. There were surprisingly few connections once I had removed it from the proto-plugin board to a small stripboard and then connected the Arduino Nano using Dupont inter-connection wires.

 

The connections are as follows (Arduino to peripheral)

 

D3     servo motor 1

D4     servo motor 2

D5     Echo signal for HC-SR04

D6     Trigger signal for HC-SR04

 

All the other connections are just ground and power. Only a few connections. One of my original possible ideas had been to use a ATtiny85 for the controller for this but this would have required creating a programmer using an Uno and in the end I decided this was a complication too far for 24 hours. Still, I will create my ATtiny85 programmer soon and then I might revisit this mobile robot.

 

Once I had done all this connecting I was able to stuff it all inside the bodyshell. Regretfully I haven't yet managed to fit the batteries inside (there is enough space inside for 4xAAA batteries although not in a normal holder - if there was a smaller Arduino and fewer wires). Also I wasn't able to fit the batteries and the HC-SR04 ultrasonic rangefinder, yet. I think it would only require a couple more hours to do this so I might have a good.

 

The programme is pretty simple at present, all it does is to take one distance reading from the ultrasonic rangefinder and then moves to a while loop that just runs the servo motors from maximum forward speed all the way to zero and then to maximum backwards speed. With a bit more time then a much better programme could be produced.

 

digitalWrite(ustrigger, LOW);
delayMicroseconds(pretriggerdelay);
duration = 0;
distance = 0;

digitalWrite(ustrigger, HIGH);
delayMicroseconds(trigdelay);  
digitalWrite(ustrigger, LOW);
duration = pulseIn(usecho, HIGH);
distance = duration/onecmdelay;     // Conver to centimetres
Serial.println(distance);

 

while(1)
{ 
  for (leftspeed = start; leftspeed <= end; leftspeed++)
    {
      leftwheel.write(leftspeed); 
      rightwheel.write(180 - leftspeed);                                     
      delay(stepdelay);                      
    } /* for */


  for (leftspeed = end; leftspeed >= start; leftspeed--)
    {
      leftwheel.write(leftspeed);
      rightwheel.write(180 - leftspeed);                                                         
      delay(stepdelay);                      
    } /* for */
  } /* while */

 

Once put back together and the batteries added and turned on the Tiny24hourMobot springs into life. Well, maybe wombles about a bit anyway, see video below:

 

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

 

I did print a top to fit onto the body shell as well, but at present the wires get in the way so here it is without the batteries, or the wires or the HC-SR04 to show what it could have looked like. The first photograph shows the rather chaotic inside and the next one with the lid on showing a much more streamlined view.

 

image

 

image

 

I think this final photograph shows that if I could get it all to fit inside the shell I might have quite a nice looking mobile robot. I also think that with the experience

I now have I should be able to make it even smaller. The sensors need more thinking about though. The HC-SR04 is really too big so something much smaller is needed.

 

Dubbie

  • Sign in to reply

Top Comments

  • nobble
    nobble over 6 years ago +4
    It's like Roomba's younger party-phase cousin. I LOVE IT!
  • jomoenginer
    jomoenginer over 6 years ago +4
    Nice! But what happened to the spray can tops? To save space, you may look at IR sensors which would basically look like eyes on the tiny bot.
  • Workshopshed
    Workshopshed over 6 years ago +4
    Great little robot. Could you power this from a tiny Lipo or even a super cap?
Parents
  • nobble
    nobble over 6 years ago

    It's like Roomba's younger party-phase cousin. I LOVE IT!

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • nobble
    nobble over 6 years ago

    It's like Roomba's younger party-phase cousin. I LOVE IT!

    • Cancel
    • Vote Up +4 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