Re: Motor output At 12:34 PM 10/28/98 , Keith - Lui wrote:
>Hi!
>
>When I work with the motor outputs, I found that the outputs are not linear.
>
>The "motor(m,p)" changes the output only in an increment 10 of p.
>
>Is there anyway I can get a more presiced output?
>
The motor controls in the Handy Board library supports only 8 levels of power.

Upgrade!

Get the Smooth PWM version made by Julian Skidmore  in the software contributed page on the Handy board web site (http://el.www.media.mit.edu/groups/el/projects/handy-board/).

You will have to do multiple things:

1- Get the new pcode_hb.s19, install it on your board
2- Merge the differences between the latest HB libraries and the ones from Julian. It's fairly easy to do and you end up with the latest changes from Fred Martin and the smooth PWM code from Julian in one neat package. Just get the two lib_hb.c and compare them, it's fairly evident what the changes are (Fred changed a function from IC to native and Julian changed the motor controls to match the changes in the pcode).

I did that for my board and I can now control my motors with great precision. It's really appreciable when you are trying to use the feedback from your shaft encoders to regulate the motors at the same speed. Before installing the smooth PWM my 'bot was always over correcting and basically never ran on a straight line, swerving right and left. Now it's smoothly correcting and it's running (almost) in straight line

Is there any chance for the smooth PWM algorithm to make their way into the supported release of the pcode and libraries? This is a real improvement over the standard one...

-- Eric


