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
      •  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
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Legacy Personal Blogs Tobbie #3 : DC Motor Control
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: dubbie
  • Date Created: 28 Jan 2019 11:49 AM Date Created
  • Views 724 views
  • Likes 2 likes
  • Comments 0 comments
  • toibbie
  • mytobbie
  • arduino
  • drv8833
Related
Recommended

Tobbie #3 : DC Motor Control

dubbie
dubbie
28 Jan 2019

Now that the existing control PCB has been removed from Tobbie I can replace it an Arduino. I have decided to use an Arduino Nano, mainly because it is small and I have one. It might even be possible to fit it all inside the available head cavity in Tobbie. So far all I have done is to use a low cost dual H bridge driver PCB (DRV8833) which is widely available and just use one channel to drive the motor for walking. This initial programme just turns the motor on for one second and then turns it off again. The main loop of this programme is shown below:

 

 

allstop();

// Being used to test motors in Tobbie

while (1)
  {
    forwards();
  } /* while */

 

The functions used are simple ones:

 

void allstop(void)

{
   digitalWrite(leftforward, stop);
   digitalWrite(rightforward, stop);
   digitalWrite(leftbackward, stop);
   digitalWrite(rightbackward, stop);
   delay(100);
} /* allstop */

void forwards(void)

{

  digitalWrite(leftforward, go);
  digitalWrite(leftbackward, stop);
  delay(1000);          
  allstop();  
  delay(1000);
} /* forwards */

Being H-bridge drivers there are two signals used to control each motor, which control the direction of current flow to obtain forwards and backwards and also on or off. Pulse width modulation can be used to control the speed of the DC motor although I have not yet implemented that.

 

I used a plug-in protoboard to hold the Nano and DRV8833 PCBs and wired it up with jumpers. The result is as shown in the video below.

 

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

 

Next step is to control both motors for forwards and backwards and then implement some form of remote control or self-intelligent control. I wonder if I could use an Artificial Neural Network to do that. I would have to add some sensors first though.

 

Dubbie

  • Sign in to reply
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