element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • 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
Attack of the Drones
  • Challenges & Projects
  • Project14
  • Attack of the Drones
  • More
  • Cancel
Attack of the Drones
Blog Alpha Rover - Interrupted
  • Blog
  • Forum
  • Documents
  • Events
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Attack of the Drones requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
Author: ralphjy
Date Created: 24 Apr 2021 1:08 AM
Views: 140
Likes: 4
Comments: 2
  • alphabot
  • optical_rotation_sensors
  • speed_control
  • arduino_uno_plus
  • attackofthedronesch
Related
Recommended

Alpha Rover - Interrupted

ralphjy
ralphjy
24 Apr 2021

I'd previously written about the poor performance of my AlphaBot Alpha Rover - Out of Control and how I was surprised that the wheel optical encoders had not been incorporated into the AlphaBot library.  fmilburn had written a blog post about implementing encoder feedback using a PID controller Simple Arduino DC Motor Control with Encoder, Part 2 .

 

I decided that before trying to implement a PID controller that I'd just try some first order feedback trying to balance the encoder counts between the two wheels.  I was amazed that the performance got worse.  So, I did a simple open loop test where I swept the PWM value to both motors and measured the equivalent RPM at each step.  The Blue trace is the step count (0-255).  The Red trace is the Left motor and the Green trace is the Right motor.  Two things are apparent - the Right motor takes more voltage to start and there is a huge difference between the two motors in terms of RPM.  At first glance, I suspected that I had a bad motor.

 

Then I checked the output of the optical encoder.  Ch1 is the Left motor and Ch2 is the Right motor.

 

So, besides any issues with motor mismatch, I'm also having encoder issues - most of the apparent RPM mismatch is probably due to this.  It would explain why trying to add feedback would make things worse.

 

The encoder is pretty simple.  A slotted disk interrupts the light path between a photo diode and a photo detector.  And the signal gets cleaned up by an inverting buffer.

 

Looking at the output of the photo detector shows the problem - some of the output pulses are not reaching 3V and the spec on the buffer is 0.7 x VCC = 3.5 (VCC is 5V).  So, the output is intermittent.

 

 

Unfortunately this could be a number of issues - maybe even mechanical alignment.  It probably will require taking things apart and verifying everything.  The Left wheel sensor looks similar, I think that buffer might have a bit more input margin.

 

Anyway, I barely had time to try to finish the Alpha Rover if there hadn't been any issues.  So, I won't get done for the AttackoftheDrones contest, but I'll finish this off when I get the other projects out of the way.  And maybe the Arduino RP2040 Connect will be available by then...

 

Good luck to all the participants!  I'm sure I'll learn stuff from your projects that I can use .

Anonymous

Top Comments

  • fmilburn
    fmilburn over 1 year ago +3

    That is too bad - but interesting too.  Hope you get it fixed soon.  I set up my DIY encoders with the opto-interrupter output going straight to the interrupt pins on the microcontroller.  I can see how it…

  • DAB
    DAB over 1 year ago +1

    Nice job of identifying the problems.

     

    DAB

  • DAB
    DAB over 1 year ago

    Nice job of identifying the problems.

     

    DAB

    • Cancel
    • Up +1 Down
    • Reply
    • More
    • Cancel
  • fmilburn
    fmilburn over 1 year ago

    That is too bad - but interesting too.  Hope you get it fixed soon.  I set up my DIY encoders with the opto-interrupter output going straight to the interrupt pins on the microcontroller.  I can see how it might be better to have something in between to clean up the signal but so far no problems.  I have been working on it this week on the bench with a power supply and made a new motor control board.  With PID both motors can be controlled to less than 1% of the set point, probably 0.5 % without a problem but it is slower than desired to settle.  I should be able to get it going with batteries this weekend, see how well it runs on the ground, and write something up.

    • Cancel
    • Up +3 Down
    • Reply
    • More
    • Cancel
Element14

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

  • Facebook
  • Twitter
  • linkedin
  • YouTube