36v9 with 30 V Batt and logic +5, neg pwrd by USB to serial

I have a USB serial adapter providing 5V power to a JRKerr Pic-servo chip and my 36V9 motor driver.

Before I connect the battery and start attempting to power up the motor, is there any possibility that the battery connections could fry my USB port on my MacBook Pro?

I have the GND, DIR, and PWM signals coming from the USB powered side. Does the + and - from the input battery power (Ni-Cad Pack) essentially put the battery ground to the ground of my USB port? Is there any danger to this?


Yes, the grounds are all connected together, but you should be okay as long as you’re not connecting things at different voltages to the same ground (e.g. if you used another USB port and connected its ground to the positive side of the same battery whose negative terminal you already have connected to ground).

- Jan


As for your questions about whether you could destroy anything this way, of course you could! You are connecting your own circuit with several different components to your USB port, so there are all kinds of ways for you to break things. USB ports are generally tolerant of mistreatment, but I doubt that yours would survive if you, for example, shorted the +5V line to +30V from your battery. In particular, from a quick look at the picture, I see that the pins of blue terminal blocks where your 30V is connected are extremely close to what I think is your +5V line; you are depending mostly on luck for those pins not to poke into the holes in the breadboard and cause a short, right?


Good catch there… There are no pins poking down, however, I will be sure to move it.

My question was basically… if it’s hooked up right, the neg on my Battery really has no reference to cause any current to flow adversely through the USB bus.

Now… if my Battery were replaced with a bench power supply… there could be more to worry about, right?

Why do you think there would be more to worry about with the bench supply? There are definitely different issues to consider with each, but I don’t know if I would say that one kind of power supply is universally more prone to problems than another.

- Jan

I say that because, my bench power supplies ground, could differ from my USB ports ground (hence causing adverse current to flow). They are plugged into two different outlets, conceivably, there can be differences, right? Am I being paranoid?

Probably paranoid… electronics lab from high school is a long way off. :slight_smile:

Incidentally… I did hook it up last night to the battery and started running motor commands…

Let the PID tuning begin!


Most power supplies I’ve seen have the output floating relative to ground, and most laptops I’ve seen aren’t grounded, either. It’s good to be paranoid, though, and it can be an issue if you have a desktop and something like an oscilloscope probe, in which case you could start having current flowing from the USB port even if you only have the 5V line connected to your board (ground would go through the scope probe, the scope, the wiring in your wall, and then back through the computer).

- Jan