Four SMC03A on single serial line

I’m planning to run four SMC03A off single serial line. Can Pololu USB 16-servo controller or USB to serial adapter handle the load of four devices?

Paul.

Hello,

It will probably be okay. You can try it, and if it doesn’t work well, you can buffer the signal coming out of the CP2102.

- Jan

Hi Jan,

Thank you for a prompt response. Do you know what is the approximate load of single SMC03A serial input line? I would like to have some quantitative data before I start ordering parts.

Paul.

The current should be below 0.5 mA per pin.

- Jan

This isn’t an entirely scientific approach, but I have two SMC03A motor controllers connected to a single Pololu USB to Serial Adapter, and it works great.

I have the serial line split and going through jumpers so I can program the two controllers separately. Looking at the signal on an oscilloscope, scaled so that I can see whole eight-bit bytes go by, there is no visible difference in the signal when I have none, one, or both of the motor controllers connected. The edges of the bits look very sharp.

To keep the the USB to Serial adapter from powering the PICs on the SMC03As I run the TX line through a single 1Kohm resistor before splitting it to the two motor controllers. With AVR microcontrollers, I usually use a 10Kohm resistor for this, but I found that to be a little too much resistance for these PICs (even just talking to one at a time).

So, what are your plans for four feedback-controlled motors?

-Adam

Hi Adam,

I’m planning to use Lynxmotion A4WD1 rover http://www.lynxmotion.com/Category.aspx?CategoryID=111 with their motors with encoders http://www.lynxmotion.com/Product.aspx?productID=653&CategoryID=11. I will post a progress report (or link to it) in a few days.

Paul.

Adam,

can you explain necessity of putting a resistor between CP2102 output and PIC input?

Thank you,
Paul.

A resistor is not required, but it might help you avoid problems later.

The Pololu USB to Serial adapter is powered from the USB bus, which is very useful in most situations. The problem is that, since it’s separately powered from the rest of your system, it’s going to be powered on while your motor controllers are off. The TX line of the adapter is normally high, and most microcontrollers (PICs like the one that runs the SMC03A included) will draw a minuscule amount of current from a high I/O pin while they’re off. In this weakly-powered state they can execute their programming, or do odd unintended things, and might not start up properly when you give them full power. Putting a small resistor (1Kohm in this case) between the adapter’s TX line and a microcontroller is an easy way to avoid this potential problem altogether.

You might also be interested in two other tricks in my two-controller setup. I ended up putting a big fat 10watt 1ohm wirewound resistor (from Radio Shack) in line with each motor to limit their peak startup current, which was otherwise tripping the SMC03A driver chip’s over-current protection at startup. I also used a 74ls04 hex-inverter (sadly not available at Radio Shack) to source extra current to use the USB to Serial Adapter’s RTS line to reset all of the motor controllers on command. I happened to have the inverter lying around, you could probably do the exact same thing with just a PNP transistor.

-Adam

Adam,

In normal use, TX line draws 0.5 mA according to Jan. That is 0.5 V drop on 1K resistor. The current draw should be even smaller in weakly-powered state, therefore voltage drop on resistor would be even smaller. How is 1K resistor preventing small current to flow to PIC? Have you ever observed undesirable behavior in weakly-powered state?

I did some motion control tests and I don’t have startup current problem. I will use modem control lines to reset SMC03A and read green LED status.

Paul.

I haven’t measured the current drawn in this situation directly, but since the voltage on the pin is higher than the MCU’s VCC bus, current will flow through the I/0 pin’s protection diode to the VCC bus, powering the chip up to the pin voltage (in this case 3.3V) minus the diode drop. In this way, current isn’t limited by the normal input impedance of the pin. The resistor isn’t just limiting the current drawn by the chip, it’s also dropping the voltage applied to the I/O pin (in series with the protection diode) to the point where the MCU won’t actually do anything.

There’s a lot going on here (probably more than I’m aware of) and manufacturer’s don’t usually give specs on these diodes, so my evidence is purely empirical. I’ve had 3.3V usb-to-serial adapters (the Pololu model and others) power AVR microcontrollers (and other peripheral ICs connected to the AVR) in this way with minor unintended results. I’ve never had the controller ‘misfire’ when I power it up from this state, but I’ve heard other people raise this as a concern.

Adding a 10Kohm resistor in all my AVR-based boards stops this from happening. When I first wired up my SMC03As to a usb-to-serial adapter with no other power source I saw its LEDs come on dimly. I found that a 10Kohm resistor was too much in this case, as it interfered with normal serial communication, but a 1Kohm did the trick without causing any other problems.

It’s also probably unnecessary extra precaution for most projects.

-Adam