Running 15 servos on Teensy 4.1 - Too much current draw?

Status
Not open for further replies.

Mano1979

Active member
I want to drive 15 servos (+ some sensors) on the Teensy 4.1 but i'm afraid im exceeding the max current draw.

The servos are powered by a separate supply, so my question only applies to the signal pins for the servos.

I know the max current draw per pin is 25mA, but if there is 15 servos that would make 375mA + 100mA for the microcontroller chip itself and not counting any other attached sensors.

The last time i attached all servos (12 of them) the teensy stopped working and had a short circuit between 3.3V and GND. so i wonder if i need to limit the current of the signal pins with a resistor.

Any help is appreciated!!
 
Most logic inputs don't pull DC current(*), only transient spikes for a few nanoseconds.

Some servos may not be using standard logic gates though, and might take some current - this is something
it is possible to measure, but I doubt its anything like 25mA, that would cause all sort of issues with servos that
aren't typically seen.

A problem that may be of concern is that its not guaranteed that all servos will work reliably with only 3.3V signals.

Boosting to 5V logic using 74HCTxx series buffers might be wise to finesse this issue, or at least do some testing and stick
to one brand of servos.

The last time i attached all servos (12 of them) the teensy stopped working and had a short circuit between 3.3V and GND. so i wonder if i need to limit the current of the signal pins with a resistor.
So one of the servos had a short I guess. Adding 1k in series with each signal would prevent this affecting
the Teensy.

(*) well, only a tiny amount measured in nA
 
The servos work reliable on 3.3V logic. i added the resistors allready in my design. i just wanted to check if they were needed. so thank you. also thank you for the clearification on the pins current. I hope i don't blow up any more teensy's now ;)
 
Indeed - the resistors also serve as protection should a servo fail with its supply shorted to the input pin. Somewhat higher value like 4k7 might be
even better for this.
 
Some cheap servos are pretty "spikey" and can cause glitches on the power rail. Motors and digital logic don't exactly go together well. I usually try to power them from a separate source.

The logic circuits in your servos shouldn't be pulling anywhere near 25mA and since it uses PWM with a fairly low duty cycle (1:10 at most) it's very unlikely you reached anything close to full logic draw. Good multiservo code should spread the actual positioning of the pulses around so they don't all coincide. But, the motors are probably going to be drawing that current under load. That's why I would follow Luni's advice. That should separate the servo power from the teensy. Resistors on the control lines won't change the overall current draw (well, much anyway).

But that shouldn't have killed your teensy. Look for wiring or design errors. I would not power up before a full evaluation of your circuits.
 
@luni I started out with those servo controllers, but they are not up to the task. Besides from being glitchy, the power rail is not able to cary enough current for all the servos. That board is actually meant to drive LED's. That is why i made my own servo controller. Also, these exact same servo controllers are on ebay for 2 bucks. adafruit is selling them for sky high prices. Never buy from adafruit! you'll always pay too much.
The high speed of the teensy 4.1 makes that movements are very smooth with interpolated movements.

@PhilB I am not powering the servos from the same source as the teensy. They got their own supply from a battery pack specifically made for these servos. My servos are high voltage ones that run at 8.4V.


Thank you for yor help!
 
You can also use a ready to go, multi channel servo driver like this one https://www.adafruit.com/product/815. Besides not having to care about pin protection, voltage translation etc you can directly plug in your servos on the driver board which is very convenient. A couple of months ago I did a project using two of those drivers. They "just worked" without issues.

That is an amazing project though!!! For those small servos the PCA96XX servo controllers work fine!
 
Don't buy knock-offs!

Also, these exact same servo controllers are on ebay for 2 bucks. adafruit is selling them for sky high prices. Never buy from adafruit! you'll always pay too much.

I disagree! Yes, Adafruit is expensive, but they put in the engineering time and the software development costs to create boards and libraries that a lot of us use. And this doesn't even include support costs such as documentation, education and forum management. Who pays for all that if what we do is buy the cheap Chinese knock-offs? Where do you think those $2 eBay units come from? The only engineering time the 'thieves' put in is the time it takes to copy original Adafruit, Sparkfun or Arduino designs. And where do you go if you want to find out how to use the $2 knock-off product? I'll bet to the Adafruit web site to check out their application pages.

I wouldn't buy a Teensy knock-off either. I value the time that Paul and crew put into the development of the hardware and software I use. I've also gotten away from companies who steal and distribute device libraries (e.g. TFT) from others without attribution or compensation. I avoid AliExpress as much as possible. Even on Amazon and eBay I try to find the originator of the products I want, but it isn't always easy to find the actual source.

If we only buy because of price we are rewarding those who can sell at low prices without regard to mode or method. And it's even more expensive here in Europe where I pay 'Adafruit prices' PLUS 16% VAT. The result of 'price-only' buying is we get suppliers without scruples, which kills off companies who invest in research and innovation. In other words, "We stock the water we swim in with sharks!"

Yes, it's hard to bite the bullet and pay more, but I think it pays off in the long run.
 
There's a fine line here. Some companies do have an excessive markup on generic stuff but this race to the bottom (line) causes some real problems for electronic products. The whole "Blue Pill" for $2 thing has lead to 8 or 9 different counterfeit STM32F104s. It's gotten so bad you can hardly find a Blue Pill with a real ST Micro Chip on it. And recently the Arduino Nano has been shown to have a counterfeit ATMEGA328P on it. It's looking like all the Nanos you buy on eBay, Amazon, etc have the counterfeit chip on them. (It mostly works ok but was caught because it has a much higher sleep current than the genuine 328P.)

In fact, one of the reasons I based my products on the Teensy is that it works in a predictable way. I don't have to worry about which variant the customer is using. These counterfeits have random differences and may or may not work with my products. I considered using a Blue Pill but decided against it - I don't want people having a bad experience because some clown in china made an extra $0.30.

And, for small parts like connectors and such - a lot, if not most, of them are counterfeit too. That 10A power switch that sells at 5 for $9 can't handle 10A continuous and probably not even 5A. I derate anything from eBay et al by 50%, at least. And random semiconductors are often remarked. Highspeed op amp? Probably a cheap one with the top ground down and reprinted with a fake part number. Obsolete replacement parts for that 70s amp you have? You can find them - good luck getting the actual component.

That's what the cheap culture gets us.

Sorry for the rant. My button got pushed.
 
@PhillB - I second that!

For example you can get cheaper ILI9341 displays than the one Paul or Adafruit sell, but you also pay for them to test them first to make sure they might actually work.

I also used to get mad at Clones of Saleae Logic Analyzers, where the clone manufactures would actually blatantly direct the buyers to go to Saleae website to get the firmware.

As for RC Servo controller. I have rolled my own, earlier but that was with T3.2 where it was 5v tolerant. Did not run into +5v versus 3.3v logic with the servos. But I also stuck with Hitec servos and not some of the cheap ones. Except the one time I was building a hexapod and was three servos short and went and bought a couple cheap ones... During the several years I did stuff with Lynxmotion with RC servos, for the most part I never had a hitec servo fail. Maybe a few gears busted... But all of the clone ones died...

Again if the Adafruit ones are too expensive, than the Lynxmotion one is outrageous: https://www.robotshop.com/en/lynxmotion-ssc-32u-usb-servo-controller.html
But they do have some nice features, like tell all 15 servos to go to a new position and get there in N milliseconds and it takes care of figuring out how much each servo should move per servo time period such that they all arrive to their new desired position at the right time...
 
I disagree! Yes, Adafruit is expensive, but they put in the engineering time and the software development costs to create boards and libraries that a lot of us use. And this doesn't even include support costs such as documentation, education and forum management. Who pays for all that if what we do is buy the cheap Chinese knock-offs? Where do you think those $2 eBay units come from? The only engineering time the 'thieves' put in is the time it takes to copy original Adafruit, Sparkfun or Arduino designs. And where do you go if you want to find out how to use the $2 knock-off product? I'll bet to the Adafruit web site to check out their application pages.

I wouldn't buy a Teensy knock-off either. I value the time that Paul and crew put into the development of the hardware and software I use. I've also gotten away from companies who steal and distribute device libraries (e.g. TFT) from others without attribution or compensation. I avoid AliExpress as much as possible. Even on Amazon and eBay I try to find the originator of the products I want, but it isn't always easy to find the actual source.

If we only buy because of price we are rewarding those who can sell at low prices without regard to mode or method. And it's even more expensive here in Europe where I pay 'Adafruit prices' PLUS 16% VAT. The result of 'price-only' buying is we get suppliers without scruples, which kills off companies who invest in research and innovation. In other words, "We stock the water we swim in with sharks!"

Yes, it's hard to bite the bullet and pay more, but I think it pays off in the long run.

Wow! Someone has got a hardon for Adafruit!

I agree with you partly, but Adafruit is the knockoff seller here! Do you know where the Adafruit Trinket came from? ME!!! It was my design. I asked adafruit for some help with the software side of it, and they stole it!
And that is how it mostly goes there. They see something cheap that they can sell, or they see a project of one of their "community members" and they just steal it and sell it for ridiculous prices.

Yes their support is great and their knowledge base too. indeed if i need some library to get something working, i often en up o their site. but that is not because i choose too, but because google sends me there. They have the most traffic, because they're "smart". adn the sites with the most traffic have the highest ranking in google.
 
Are you saying they took your exact layout and used that to build their product line? Then you may have a copyright claim against them. If you are saying they liked your idea and built a product that is very similar then that's different. It is the reason why this industry is so vibrant. People build on other's ideas. And then others build on that. Standing on the shoulders of giants, so to speak. And making a successful product line takes a whole lot more than just an idea.

Should they credit you for coming up with the idea? Maybe. But once spoken (or otherwise publicly presented), your idea is no longer yours alone. And if you don't have at least someplace (like github, blog, forum,...) where you showed the idea, you probably are going to be hard pressed to make the claim.
 
Wow! Someone has got a hardon for Adafruit!

I agree with you partly, but Adafruit is the knockoff seller here! Do you know where the Adafruit Trinket came from? ME!!! It was my design. I asked adafruit for some help with the software side of it, and they stole it!

Ha! That first line is kinda funny. I wish it were that easy these days, but unfortunately it takes a little more than that for me.

Sorry to hear about the Trinket. As PhilB said, if you've got some proof get after them. I'm sure the community would support you.

I was speaking about Adafruit as an example. There are others. The thing for me is that I will even pay extra to support a company I like. For instance if I need a UNO board or Mega2560 for some reason, I'll buy an original just to keep some money coming their way. I also will occasionally send a PayPal payment to them or another software developer (e.g. Rinky-Dink) if I use one of his libraries.

Bottom line - I like our industry and community, and I'm willing to throw some money around to support people doing good work. I know how hard it is for a little guy to make ANY kind of living with hardware and software. The thing that does get me PO'd (NOT saying this is you - don't know ya.) is when entitled folks complain and complain about prices, but who are unwilling to support, or even recognize, the people doing the hard work that buoys all of our interests.
 
Status
Not open for further replies.
Back
Top