An interesting week... not a huge amount of progress in any
direction but fun anyway.
Some highlights:
- Received a CNC unit and got it set up, but haven't had much
time to play with it yet. Sigh, it appears that I have to
write yet more custom software as the stuff I've seen doesn't
work in a way that is at all intuitive to me. So I think I
will write a program to help me deal with doing CNC work.
As soon as it is minimally functional I will post it in case
somebody else has a use for it.
- Designed my first from-scratch PCB, a simple thing to read
input from the user-input switches and foot contact sensors that
Bing will have. Not constructed yet. I want to use
the CNC to engrave PCBs but it will probably be a few weeks
before it is working.
- Have almost gotten interrupts working on the MPC555
- Decided to go back to the dedicated gameboy circuit for
vision, which adds back a bunch of work, but I got concerned
about the processing overhead.
The biggest effort this week was on getting the servo current
sensor to work properly, but finally it seems to be working right,
thanks to the advice from HarryWLewis on the yahoo TRCY
forum. Thanks Harry, you're the best!
I'll put up a circuit design once I am truly happy with it, but
in the meantime, I have done some initial research on my sensor
circuit.. First, I wanted to measure the current use of a
loaded stationary servo with different loads. The voltmeter
showed nice stable responses, but the A/D converter seemed to be
behaving erratically so I decided to start capturing some time
series and discovered the following very interesting data (in all
cases, I am using a Hitec 425BB servo, with a roughly 21ms cycle
time for control pulses):

Well! Current use is not constant for these servos!
When stationary, the servo's current use is very interesting as can
be seen in Fig 1. What about pulling a load, though? In
the following test, I pulled loads of varying sizes through 160
degrees of travel from vertical through horizontal (maximum load)
and almost back to vertical but not quite. As Fig 2
shows, the current use is not so constant when in
motion. There are other interesting features in Fig 2 as
well: the large current use as the servo starts up, and spikes
when it is done. This is probably because of inertia.

So to smooth out the current measurement, I integrated the
current use over the 21ms cycle time. This gave the kind of
response I was looking for. The cycles that remain may be due
to aliasing problems or else something in the circuit itself:

And Fig 4 shows the similarly integrated current use when pulling
a load. Again, these curves are more easily dealt with.

As a sanity check, I wanted to see how repeatable the
measurements were, so I plotted six runs in Fig 5. I am
satisfied with the repeatability shown here.

Still to do:
Try making the servo control series an even multiple of the
sampling frequency to reduce aliasing errors
Try reducing the cycle time to 15ms or even 10ms to see what the
effects are. If it works out, I'll have to plot curves for
each of the servo models that Bing uses to provide data that will
hopefully be useful in controlling the robot.
Still over six months to go! Sounds like a lot, but we'll
see!
|