Shop OBEX P1 Docs P2 Docs Learn Events
increasing low speed resolution of palallax position controller — Parallax Forums

increasing low speed resolution of palallax position controller

Matteo_MMatteo_M Posts: 3
edited 2012-01-09 14:29 in General Discussion
Hi all

I have a Motor Mount and Wheel kit (#27971) which I am driving with an HB-25 motor controller (#29144)

the kit includes the Position Controller kit (#27906) - this is an optical encoder mounted on the wheel shaft.

I am currently testing the position controller by sending serial messages directly from the computer's USB port. The wheel is responding correctly, but I am noticing that the low speeds I need are not achievable. The manual states:
"Note that at very low speeds (around 1 position/0.5 second) motion may not be as smooth"

if I go below 5 positions/0.5 half second the wheel starts to jump between positions in an undesired way. I am building a robot for a theatrical perfomance where motion needs to be very slow and very smooth. Does anyone know if it is possible to change the code on the position controller chip so that lower speeds could be reached more smoothly? The two wheeled robot should be able to spin on itself in a time of around 2 minutes, I'm not sure what that means in terms of position/0.5 sec but it's much lower than the current limit. If I could get access to the code on the chip I could probably fix this but I don't know how to do that...

thanks!

Matteo

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2012-01-06 06:34
    The problem in your situation is that you're trying to use an encoder / motor / controller for a task that it was not designed for. The motor gearing and particularly the optical encoder with its 36 "flags" are not capable of doing the smooth slow movement you want. Changing the Position Controller's code won't fix your problem. You'll have to use smaller wheels or a different motor with a higher gear ratio. You might be able to use a different optical encoder with a larger number of and smaller "flags", but I don't know if you'd get an adequate response from the HB-25 and motor.
  • LawsonLawson Posts: 870
    edited 2012-01-06 11:46
    Like Mike said, you need more counts per wheel revolution. The DC motor and worm gear box should work well enough. I'd either modify the motor to fit the current encoder to the motor shaft (instead of the wheel) or fit a new encoder to the wheel with more than a thousand counts per revolution. If you're clever with analog circuits, you may also be able to get the speed information you need by looking at the motor's back emf, or counting noise bursts from the commutator segments of the motor.

    Lawson
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-01-06 13:11
    Matteo,

    A lot of printers have encoders like the one discussed on this thread.

    I recently took about a scanner/printer that had several of these disks. There where two different sizes of the encoder disks used the printer.

    Maybe these type of encoders would help you?

    By the way, welcome to the forum!
  • Matteo_MMatteo_M Posts: 3
    edited 2012-01-08 13:54
    Many thanks for the suggestions, it looks like I have several interesting alternatives to look into

    Responding to Mike: If I bypass the position controller and drive the HB-25 directly from my microcotroller with a servo pulse, the motor can achieve much lower speeds, at least with no load, so I think this harware should be good enough for my project - that is if I can increase the resolution of the control system at low speeds.

    I took apart the motor to see if it would be possible to move the encoder from the wheel shaft to the rear of the motor shaft, this is not possible because of how it's designed - the magnets around the rotor are built into the motor's casing, which is a sigle piece completely enclosing it.

    Using a high resolution optical disk from a printer seems like it could be a good idea, but by reading the thread Duane suggests, I get the impression that the sensor built into the position controller would not be able to read such a disk, because of the reduced spacing between the lines. Perhaps I could try to make my own encoder disk, I don't need thousands of lines, I think a few hundred would be more then enough (certainly a big improvement over 36), do you have any tips on how to make a disk from scratch? I'm thinking I could run over to the local Fab Lab and print one, but perhaps there is a simpler way...

    Finally the idea of measuring noise bursts on the motor leads to calculate the revolutions sounds fascinating, but I've no clue how I would go about filtering out the signal properly before reading it with an A/D converter...

    thanks again

    Matteo
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-01-08 15:35
    Matteo_M wrote: »
    Using a high resolution optical disk from a printer seems like it could be a good idea, but by reading the thread Duane suggests, I get the impression that the sensor built into the position controller would not be able to read such a disk, because of the reduced spacing between the lines.

    Matteo,

    Yes, you would need to use a sensor made to read the high resolution disk.

    I was having similar trouble trying to control a robot at slow speed. I tried increasing the number of lines on the encoder disk (the robot came with built in encoders) without any luck. The higher resolution disk worked at low speed but not at higher speeds. I'm guessing the manufacturers of encoder/sensor combos generally try to get as many lines as can be reliably read on the disk to begin with.

    I'd be surprised if you could increase the resolution of your current system without replacing both the encoder and the sensor. But don't let that stop you from trying. I'm hope I'm wrong.
  • LawsonLawson Posts: 870
    edited 2012-01-08 21:59
    Matteo_M wrote: »
    I took apart the motor to see if it would be possible to move the encoder from the wheel shaft to the rear of the motor shaft, this is not possible because of how it's designed - the magnets around the rotor are built into the motor's casing, which is a sigle piece completely enclosing it.

    Yea, I figured that from the pictures. I should have stated this, but the idea I had in my head was to cut off the tip of the rounded nub on the motor case that covers the end of the motor shaft. With the end of the motor shaft exposed, an extension could be glued on to the motor shaft and the encoder disk mounted to that.

    Lawson
  • Matteo_MMatteo_M Posts: 3
    edited 2012-01-09 14:29
    the idea I had in my head was to cut off the tip of the rounded nub on the motor case that covers the end of the motor shaft. With the end of the motor shaft exposed, an extension could be glued on to the motor shaft and the encoder disk mounted to that.

    I also was thinking about this, but the motor is held in place by pressure applied to the rear of the shat by the casing. The rounded nub you see in the picture contains a metal sphere that acts as a bearing between the case and the shaft.

    I'll let you know if I have any luck with changing the encoder disc.

    Matteo
Sign In or Register to comment.