Strange behavior with MSSC in Absolute mode

I’ve found some strange behavior with the Micro Serial Servo Controller when using the Set Position, Absolute command (code 4). It sure seems like a bug in the controller firmware, but I haven’t fully pinned it down yet, so I’m hoping someone here (or someone at Pololu!) will be familiar with it.

I set a series of positions, all in absolute mode, and all values between 2000 and 4000. At first, a position like 3000 works fine and does what I expect. But then at some point, the command puts the controller into what I’ll call “bug mode,” and the servo does TWO motions: a quick movement through about 60 degrees and then back to a position that is only remotely related to the position I asked for. The yellow LED comes on at this point.

Now here’s the really weird bit: once in bug mode, I can go back to positions that worked before (e.g. 3000), and they do the same thing. This persists until I reset the controller.

No, I take it back; here’s the really weird bit. The servo that goes into bug mode (and does the weird double-motion-ending-in-the-wrong-place thing) isn’t always the same servo as the one receiving the command. For example, I just set servo 6 to position 3250, and it moved properly, but servo 2 went buggy. In fact, so far, it seems to always be servo 2 that goes buggy (but I only have servos plugged into 2, 3, 6, and 7).

Note that when I use command 3 (Set Position, 8-bit), none of these problems seem to occur. So that might serve as a work-around… but I’d really rather use command 4.

I’m communicating with the controller at 38400 bps. And, in case there’s something wrong with my code, the command block I’m sending to set servo 6 to 3250 is (in hex): 80 01 04 06 19 32. So you can double-check that this is correct Pololu serial-speak.

So. Has anyone seen this sort of behavior with the MSSC before? Jan, any ideas?

Thanks,
- Joe

Well, this evening I tried removing the Vcc=Vs jumper and hooking a 9V battery up to the VIN/GND pins. The strange behavior seems to have gone away.

So, my theory now is that when driving both the controller board and the servos from the battery pack (4 AAs – real ones, not rechargeables), some servos would draw enough current to cause a dip in the board power, causing it to reset or otherwise Act Funky.

Though this theory doesn’t explain why moving the same servos in 8-bit Relative mode doesn’t show the same behavior. But I did only limited tests in that mode – perhaps I fooled myself.

Anybody want to comment on the behavior, or this theory about it?

Thanks,
— Joe

Joe,

Four AA alkalines can give you 6V or more, which is definitely outside the limit for the logic voltage, so it’s not surprising for things to misbehave.

- Jan

What? The cover of the User’s Guide says “Supply voltage… 5-16 V”, and on page 3, it says “The servo controller needs its own power, which can be 5-16 volts.” Doesn’t this mean the power can be anywhere from 5 to 16 volts (including 6V)?

Also, if the manual is wrong and the supply voltage really has to be 5V, then why does it seem to be working fine from a 9V battery?

Thanks,
— Joe

Vcc is not VIN, which can be 5-16V. Vcc is the regulated 5V on the board. If you are using the 4 alkaline batteries (why?), you can power everything off of them by connecting them to the servo power and VIN. You might want that capacitor you asked about in the other thread on there since alkalines can have a high internal resistance.

- Jan

Ah, I think I’m starting to get it. This paragraph in the manual seemed self-contradictory to me:

It still seems a little confusing – if the servo battery is under 5 V, then it’s not in the 5-16 volt range which the first sentence says the controller requires. So how can it be valid to use that?

I think what you’re saying is:

  1. You can share a power supply if the servo power is less than 5 V, but at least (???) volts, by connecting the Vcc=Vs jumper.

  2. If the servo power is more than 5V, then you can also share it with the board, but you have to run your own, separate, connection from the batteries to VIN/GND.

  3. If the servo power is less than (???) volts, then it won’t be enough for the controller no matter what you do, and you must supply separate power in the range of 5-16 volts to VIN/GND.

Does that seem accurate?

Thanks,
— Joe

The controller could reset as high as 4.35 V, so that is effectively the real minimum voltage on the Vcc line. The maximum is 5.5 V, so the Vcc=Vs option doesn’t give you much to play with, but it can be handy for someone that has a big 5V supply and nothing else.

- Jan