Neat demonstration of proportional and PID control systems

Spotted in the MAKE Forums:

Liam built this impressive robot, then used it to demonstrate the difference between proportional and PID control. The robot is designed to stay a certain distance from an object, and uses two Sharp IR distance sensors to track it's position. The system looks like it is working great, however he is noticing some variability in the output of the distance sensors he is using- anyone have any ideas?

This is the GBOT with a PID controller using the ZX-40A microcontroller from http://www.zbasic.net. ZX-40A is based on the ATMEGA644 AVR chip. Inputs include 2 IR range sensors (GP2D12). Outputs include 2 PWM signals to the Pololu motor driver (VNH2SP30).

The GBOT maintains a setpoint distance of 10-inches from a target and maintains that distance, no matter what. The control system was originally coded with P-control only and resulted in excessive overshoot and oscillations. So then I added PID control. See video to observe P-control vs. PID control.

Had trouble with IR sensor noise. Issue mitigated with hardware and software. Hardware... added low ESR 1,000uF capacitors on VIN and VOUT of the LM2940T voltage regulator. Software includes an 8th order butterworth filter to clean IR sensor position and velocity. I did have issues with a fire, probably caused by a short or the motor driver. Not sure yet. Since isolating the regulator with the filters and after adding a large heatsink to the voltage regulator, no more fires. See picture below of "incident".

Anyone have experience or information on GP2D12 IR sensor distance variability? I have the noise reduced to 0.025" amplitude. Can this be reduced further? Thanks.


Recent Entries

Comments

Oldest comments listed first.

Posted by: machright on March 9, 2010 at 3:51 PM

Optics

would a better optical setup work?

Maybe a set of lenses would help. How narrow is the wavelength detection. Maybe further isolating the optical input to a specific IR wavelength would help.

Sorry I could not be of much help.


Posted by: Matt Mets on March 10, 2010 at 11:23 AM

Those are actually some good suggestions. I don't know what the manufacturing tolerances on the Sharp sensors are (I've only used them in simple open-loop controllers), but if they could use help, checking the filter would be a good idea.


Leave a comment


Subscribe to MAKE!Subscribe to MAKE Magazine!

Subscribe today, save 42% and get web access to MAKE free. MAKE Digital Edition is available only to subscribers.

$34.95 / 1 year
(4 Quarterly Issues)

Subscribe now


Void your warranty, violate a user agreement, fry a circuit, blow a fuse, poke an eye out. Make: The risk-takers, the doers, the makers of things... Welcome to Make: Online!


CRAFT Maker Shed Maker Faire Makers Market




Check out more videos from MAKE.



MZ_MakingDetroit-RR.gif

MZ_MakeProjectsLibrary-RR.gif

Makezine: July is for Kids!


Connect with MAKE

Be a MAKE fan on Facebook MAKE on Facebook
Visit our Facebook page and become a fan of MAKE!
MAKE on Twitter MAKE on Twitter
Follow our MAKE tweets!
MAKE Flickr Pool MAKE on Flickr
Join our MAKE Flickr Pool!
    make_tips on Twitter



    MAKE Archives

    Makers Market
    Maker SHED
    Make: Science Room

    Subscribe to MAKE Magazine!

    Make: Online editors and authors!

    Gareth BranwynGareth Branwyn
    Editor-in-Chief


    Phillip TorronePhillip Torrone
    Senior Editor
    | Web | Twitter


    Becky SternBecky Stern
    Associate Editor
    | AIM | Twitter


    Marc de VinckMarc de Vinck
    Contributing Writer
    | AIM | Twitter


    John ParkJohn Park
    Contributing Writer
    | Twitter


    Sean RaganSean Ragan
    Contributing Writer
    | Twitter


    Matt MetsMatt Mets
    Contributing Writer
    | AIM | Twitter


    Dale DoughertyDale Dougherty
    Editor & Publisher
    | Twitter


    Shawn ConnallyShawn Connally
    Director of
    Digital Media
    | Twitter


    Goli MohammadiGoli Mohammadi
    Senior Editor


    Kip KayKip Kay
    Weekend Projects
    | AIM | Twitter


    Collin CunninghamCollin Cunningham
    Contributing Writer
    | AIM | Twitter

    Adam FlahertyAdam Flaherty
    Contributing Writer
    | AIM | Twitter


    John BaichtalJohn Baichtal
    Contributing Writer
    | AIM | Twitter



    More contributors: Mark Frauenfelder (Editor-in-Chief, MAKE magazine), Kipp Bradford (Technical Consultant/Writer), Chris Connors (Education), Diana Eng (Guest Author), Peter Horvath (Intern), Brian Jepson (O'Reilly Media), Robert Bruce Thompson (Science Room)

    Suggest a Site!

    Advertise here with FM.

    Why advertise on MAKE?
    Read what folks are saying about us!

    Click here to advertise on MAKE!



    Current Podcast

    itunesdl.gif Industrial Sound Controllers Tristan Shone rolled out the 'big guns' for Maker Faire Bay Area 2010. His Industrial Sound Controllers are a musical force to be reckoned with and their sheer size and weight demand considerable attention upon seeing them firsthand. Tristan... More...

    Get the Make: Online sent via email
    Enter your email to receive Make: Online each day:



    Sign up for the Make: Newsletter

    Our Make: Newsletter covers news from maker Media, has original columns, Shed deals, and more! You can also read the archives of past issues.


     



    Make: Education
    MAKE: en Español MAKE: Japan
    Important please read


    Subscribe to MAKE Magazine!

    Recent Posts from the Craft: Blog