I know you think I could be great with just a few adjustments

by Ivan Hamilton 4/27/2008 3:15:00 PM

Tuning the PID values for the servo controller is going to mean getting an easier method of communication with the device.

At the moment, to adjust anything, I change a variable in the source code, recompile, and reflash the controller chip. Not easy for quick testing of a minor change. Especially, since it means removing the chip from the prototyping breadboard, inserting it into the development board for programming, and moving it back again for testing. Argh!

I am going to need data coming out to judge the performance of the controller (measure errors, etc). I am also going to need data going in to quickly adjust parameters. I had added some simple serial output (for a quick debug), but this will need better management as the system is quite timing critical (the current serial output routine blocks signal processing while it waits to send the bytes out).

A few quick adjustments saw the outbound data buffered and dispatched only when the UART is ready to accept it. An inbound buffer was also created for inbound commands. A simple set of commands were implemented, and now pressing "A" & "S" in a terminal window rotates the motor forward or backward 1 revolution (1/6th revolution for lower case). "Z" will return the motor to its "zero" position.

The controller now regularly outputs the current position, desired position, and output value. Before launching into PID tuning, I might run a few tests to check that the encoder decoding routines function accurately, etc. I'd like to test the control decoding, but I've just realised... I don't have a system with a parallel port!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Electronics | Mechanics | CNC

Related posts

Comments

Add comment


 

biuquote
Loading



Powered by BlogEngine.NET 1.3.1.30
Original theme by Mads Kristensen

About the author

Name of author Ivan Hamilton
"My inner nerd can beat up your inner nerd."

E-mail me Send mail

Adsense

Calendar

<<  January 2018  >>
MoTuWeThFrSaSu
25262728293031
1234567
891011121314
15161718192021
22232425262728
2930311234

View posts in large calendar

Recent comments

Tags

None

    Entropy

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2018

    Sign in