Connect Up To 992 Servos To An Arduino, Using I2C

  Рет қаралды 69,569

Michael Klements

Michael Klements

Күн бұрын

In this tutorial, I’m going to be showing you how to connect up to 992 servos to an Arduino by using these 16 channel PCA9685 PWM drivers which are controlled over I2C. Each one of these boards can drive up to 16 servos or PWM outputs and you can chain up to 62 of them together, meaning that you could drive up to 992 servos - all controlled by two pins on a single Arduino.
Written Tutorial With Code & Circuits - www.the-diy-li...
Components Required
Arduino Uno - amzn.to/3dbmMyZ
16 Channel PWM Driver - amzn.to/3fnQ6ZG
Micro Servos - amzn.to/3d9YAgf
5V 5A Power Supply - amzn.to/2ynEgJH
Ribbon Cable - amzn.to/3bbX78I
Female Pin Header - amzn.to/3b9TO1N
Male Pin Header - amzn.to/2VrQvML
If you've got any Tutorial requests or suggestions, let me know in the comments section below. I'm always looking for suggestions.

Пікірлер: 190
@ShreksSpliff
@ShreksSpliff Жыл бұрын
Cat door. Got rust hooked up to an atmega I have lying around. Thanka for the information :) great video, keep it up.
@allinonegamingchannel8669
@allinonegamingchannel8669 2 ай бұрын
it's a great upgrade to my 6 axis robotic arm
@jacocoetzee762
@jacocoetzee762 3 жыл бұрын
Great video! 6 DOF Robot Arm is the plan for this board.
@MichaelKlements
@MichaelKlements 3 жыл бұрын
Awesome!
@rmturner0681
@rmturner0681 4 жыл бұрын
This is a second piece of the puzzle youve provided for'm researching for my smart dust collection system. Lots of good ideas on KZbin, but nobkdy is doing quite what i want. I want the arduino to sense which tool I turn on, close all the gates not between the tool and the dust collector, verify the gate configuration is correct, then turn on the dust collector. That means inputs from current sensors and magnet sensors on the gates. Outputs for servos (or steppers...havent decided) and a relay for the collector. I'd also like to catlure position information and illustrate on a dashboard so I can see the status of the system on a monitor with any errors.
@MichaelKlements
@MichaelKlements 4 жыл бұрын
This sounds like a pretty cool project. How many tools and how many gates do you want to use/move? It all sounds perfectly do-able and should be relatively simple with an Arduino. As for servos or steppers, if your gates don’t take much force to move or to hold in position then go for servos, if you want them to be stronger and more reliable then use steppers. You can also use smaller 5V stepper motors which are much cheaper for actuating smaller parts accurately and usually come with a driver. I’ve used these recently in the hanging gear weather station project if you’re interested in those.
@rmturner0681
@rmturner0681 4 жыл бұрын
@@MichaelKlements, I'm not completely sure. For the sake of discussion, let's say 10. 3 branches of air ducting, 4 tools and gates on the outer branches and 2 down the middle. I am hoping to use servos. Plan to print some gates to minimize the effort required to move them. I have the logic figured out, just not sure how to execute. Ideally, I would create a blast gate module that has the magnetic switch, servo, and lead to detect tool current all in one piece so i can add or subtract tools as I want....just update the code based on the location and amperage needed to sense which tool is in use....definitely could use some help if you want to work on it together. Thought about prototyping on a big board with just the arduino, servos, and maybe some light bulbs to simulate the current change. The magenetic switches could be replaced by other contact switches or something else. Really just want to turn the tool on, gates open, feedback goes to the program that says the configuration is correct, and fire up the dust collector.
@MichaelKlements
@MichaelKlements 4 жыл бұрын
I think you'd have better success prototyping by breaking the project up into smaller sections first. Perhaps first try getting the branches actuating with the servos and no reed switch feedback, just responding to some push-button inputs. Then try get the current sensing working and just display the tool your code thinks is being used on the Serial monitor. Once these are both working then you can work on merging them together and adding the feedback. Just out of curiosity, what do you want to include feedback? Do you expect the gates to jam a lot?
@harshalachooa4185
@harshalachooa4185 7 ай бұрын
@@MichaelKlements hi can u driver dc motors with it?
@AbdulRahman-jz3px
@AbdulRahman-jz3px 2 жыл бұрын
Thank you for sharing, I hope you discuss the PID of the Arduino program servo motor using this PCA9685!!!
@zerorusher
@zerorusher Жыл бұрын
Very clear explanation! I'll build a project with 60+ servos and this simplifies everything a lot! A question: how fast can I push the latency between messages? I'll be controlling the motors from a almost raw stream of data, so latency will play an important role.
@shushruthmg4630
@shushruthmg4630 Жыл бұрын
How do you build a transmitter to control 992 servos?
@ChampouinetCharente-yt3uo
@ChampouinetCharente-yt3uo Ай бұрын
hello, fot the power supply cans it work whit a 5V 2A DC Power Supply?
@kaushlendrapandey5404
@kaushlendrapandey5404 4 ай бұрын
Hi michael, can u help me with a project??, how can i reach out to u
@ghaithferjaoui1896
@ghaithferjaoui1896 Жыл бұрын
hello Michael thank you for this precious tutorial .i build a similar project using servo motors. but i have a question .what if I want to connect over 100-step motor 28 BYJ-44 5v.i heard about the multi-drive board that can fit to 16-step motors but well ...i am still confused. have you an answer? thank you
@rosslahive
@rosslahive 4 жыл бұрын
This is great. Thanks a lot.
@kavorka8855
@kavorka8855 Жыл бұрын
Did you try them simultaneously? I didn't see it in the video.
@jamesssydney
@jamesssydney 10 ай бұрын
I'm looking at similar setup for stepper motors, any ideas on which cards to use?
@abhijitbhoir692
@abhijitbhoir692 3 жыл бұрын
Can you show us same example with millis over the delay to control individual servo at different time
@z1531
@z1531 Жыл бұрын
Thank you for a great video! What is a good off-the-grid option to power the servo boards? Would a 3.7v battery suffice?
@MichaelKlements
@MichaelKlements Жыл бұрын
These servos run on 5V, so you'd need a 2 cell battery (7.4V) along with a regulator. Have a look at RC aircraft parts, they have loads of options for powering multiple servos from a battery pack
@mariamsal8531
@mariamsal8531 10 күн бұрын
Hi im having trouble moving 5 servo motors at once, can the arduino supply the required current or do i need an external power source?
@MichaelKlements
@MichaelKlements 7 күн бұрын
You need an external power source if you're powering more than 2 servos.
@taj455
@taj455 Жыл бұрын
I am working on a project that would require 60 12v DC Servo motors how can you manage to run those motors . As in this video we saw these servo motors run with 5v . How to run 60 12v DC servo motors with 12v . If you have any idea please let me know it would be a great help
@FarhanNasir-b9s
@FarhanNasir-b9s 8 ай бұрын
If i were to use 5 mg996r servos what is my recommended power supply rating?
@galagatron5319
@galagatron5319 Жыл бұрын
Hi. With this setup you have, can a pre recorded mp3 be added and in sync with these motors? How? What do I need. Im new so please explain the simplest way. Thanks all.
@acidhead1001
@acidhead1001 Жыл бұрын
i'm going to to use several winchservos(continous turns) and i need them to turn to diferent posisions is this posibile with that setup? and do the servos need to be digital?
@rogerhancock5834
@rogerhancock5834 Жыл бұрын
Great video. I know nothing about Arduino but am considering using this type of system to operate the points (turnouts) on a 00 gauge model railway. Just need to find the right advice and information re set up, compnents and programming. Any advise you can offer would be appreciated. Roger
@slimecat_lol
@slimecat_lol Жыл бұрын
Since you are using scl and sdl what pins can I use to hook up my mpu6050 to control the servos
@krishnaprasad5699
@krishnaprasad5699 2 жыл бұрын
In this video each two servo from each board works similar. Can I controll each servo individually from each board ??
@MichaelKlements
@MichaelKlements 2 жыл бұрын
It's just a duplicated section of code, all of the servos are individually controllable
@ezzatluqman
@ezzatluqman 2 жыл бұрын
great tutorial! thankyou so much Michael. Im wondering if this driver can be use to act as Electronic Speed Controller (ESC) ? Im planning to DIY a ROV for myself. So each thruster motor will be needed to be controlled individually (speed and rotating direction) any advice and recommendation would be great and much appreaciate.
@MichaelKlements
@MichaelKlements 2 жыл бұрын
A PWM driver is usually used to drive the ESC - most ESCs require a PWM signal to tell them what to do. So you could use this to drive multiple ESCs but the driver itself can't be used as an ESC.
@ThebusWay76
@ThebusWay76 10 ай бұрын
Hi, would this work for a sim racing GSeat application, thanks in advance
@madslorentzen2138
@madslorentzen2138 2 жыл бұрын
I love this! Is there a way to hook an esp32 up to this setup instead of an Arduino?
@MichaelKlements
@MichaelKlements 2 жыл бұрын
Yes this would run fine with an ESP32 instead of an Arduino.
@goesintite
@goesintite Жыл бұрын
Is it as easy to run steppers at the same time as several servos?
@icebluscorpion
@icebluscorpion 2 жыл бұрын
Aren't you drawing high current on the second one as well? Why didn't you connect the second PCA9685 on the power supply too?
@MichaelKlements
@MichaelKlements 2 жыл бұрын
The interconnecting wiring between the two PCA9685 boards delivers power to the second one.
@shivamangaira
@shivamangaira Жыл бұрын
can i control small solenoid actuators using pwm ?
@sataddrumukherjee9013
@sataddrumukherjee9013 Жыл бұрын
I want to build a bipedal humanoid robot,can I do this by this process?
@normwright5018
@normwright5018 2 жыл бұрын
Hello! Your channel has helped me a great deal. I'm currently working on my first arduino project, a 36 servo headpiece. 6 arms per side,3 servos per arm. Currently I have the arduino uno r3 connected to 3 pca9685s. I have as my power supply an 11v lipo battery. I have added the necessary buck converter to step down the voltage to 5v. The first time I connected the arduino to the battery and disconnected the USB I lost power,so I then connected a wire to the v+ pin on the pca9685 then connected it to the 3.3v pin on the arduino. This works beautifully, my problem now is that as I try to install the Bluetooth module to the arduino, I don't know where to connect it, Is there another pin on the arduino uno r3 that can power the Bluetooth module?
@MichaelKlements
@MichaelKlements 2 жыл бұрын
Maybe try run a lead from the battery (or output from the buck converter) to your Arduino's Vin pin, that'll free up the 3.3V one.
@ZX7ROB
@ZX7ROB 2 жыл бұрын
Great vid, do you think I could implement this in a home cockpit simulator as a replacement for mux and create an i2c bus for the various panels? I’d need buttons and leds, mainly. Thanks
@MichaelKlements
@MichaelKlements 2 жыл бұрын
I'm sure you could make something like this work for that application, it sounds like the right sort of board for it.
@danielbijmolen6003
@danielbijmolen6003 2 жыл бұрын
Hi Micheal, Thanks for this tutorial! I am currently building a project in which I want to use 10 sg90 servo motors. I got a PCA9685 board, and by the looks of it, it is the same as the one you are using in this video. I have a little question I hope you might be able to anwser: When I look up de datasheet of the PCA9685 board it states: "The LED output driver is programmed to be either open-drain with a 25 mA current sink capability at 5 V or totem pole with a 25 mA sink, 10 mA source capability at 5 V." How is the board able to control these servo's, considering sa95 servo's use about 500+ mA? Is it because LED's operate at 1khz PWM frequency and most servo's around 50-60hz? Kind regards, Daniël
@MichaelKlements
@MichaelKlements 2 жыл бұрын
Hi Daniël, Controlling servos and LEDs is quite different, although done with the same driver. LEDs only have two pins, an anode and cathode, so the driver supplies "power" to the LED using the PWM signal and is therefore limited to 25mA by the board. Servos have three pins, they get power from 5V and GND and the PWM signal is just a refernece that it uses for the servo position. No power is transferred to the servo through the PWM signal. The board supplies 5V power to the servos through the power input pins at the top.
@danielbijmolen6003
@danielbijmolen6003 2 жыл бұрын
@@MichaelKlements Thank you so much, this clears up things a lot :)
@SkynetGen
@SkynetGen Жыл бұрын
If i want to power 4 sg90 servos to run at the same time what battery would be good as the power supply for this?
@MichaelKlements
@MichaelKlements Жыл бұрын
You'd need a battery that can do around 2A current draw - 4 x good quality AA's in a pack would probably work.
@brucewoods9377
@brucewoods9377 2 жыл бұрын
This is all well and good, but I would like to drive the servos individually by the use of separate digital input pins connected to toggle switches. I.e. on = rotate right 45 degrees… off = rotate left 45 degrees. Every where I look it seems no one shows the independent control of individual servos. I want to use them to throw the turnouts on a model railroad layout so they would be “commanded” by their own related toggle switch on a control panel. I believe I would be required to use an Arduino Mega. I need to control at least 16 servos.
@MichaelKlements
@MichaelKlements 2 жыл бұрын
You probably won't find exactly what you're looking for because this is quite a unique use case. Most projects use a number of servos to respond to a few command inputs (2-4 typically) or sensors. What you have described can be quite easily implemented with this same setup by just adding a typical pushbutton input to the Arduino for each - tutorials for this are widely available.
@richardcox6637
@richardcox6637 3 жыл бұрын
Just found this video. Would this work to control 20 water valves and 20 moisture sensors?
@MichaelKlements
@MichaelKlements 3 жыл бұрын
This only controls PWM based devices, so possibly the valves if they're PWM driven, but it won't work with your moisture sensors.
@Matthew-fs9tv
@Matthew-fs9tv 3 жыл бұрын
Hello I'm only using one servo driver and a elegoo uno r3 can I use the same wire assortment as you have and use 16 servos on one board. I was also planning on using a 9 volt battery to plug into the servo driver using it to also power the servo's is this ok? Edit: also I plan on hooking up a controller to this setup and control the servo's from this I'm fairly knew to this and would like any advice. Thanks
@MichaelKlements
@MichaelKlements 3 жыл бұрын
Hi Matthew, Yes, you can run all 16 servos off a single board. You can't use a 9V battery though, you need a regulated 5V power source and this needs to be able to supply around 10A for 16 of these servos. 9V batteries are really poor at providing current, they usually have a limit of around 150-200mA (so 50 times less than you need) and with 16 servos it'll only last a couple of minutes before being dead/empty.
@Matthew-fs9tv
@Matthew-fs9tv 3 жыл бұрын
@@MichaelKlements could I possibly use let's say 4 double A batteries. I just don't know how to do this without having a giant power supply I'd like to have this setup be portable it's for a small robot project.
@MichaelKlements
@MichaelKlements 3 жыл бұрын
You'll need to use a high current battery, like a 2200 to 5000mAh 3 Cell LiPo battery with some sort of regulator to bring the voltage down to a steady 5V. Unfortunately you can't do what you are wanting to do with standard "supermarket" batteries and you'll still need a voltage regulator as well.
@yeshacroe9354
@yeshacroe9354 3 жыл бұрын
hello sir, im new to this . but in power supply for pca9685. is like this right? jumper wire
@poultrysoundsmusicstudio3105
@poultrysoundsmusicstudio3105 Жыл бұрын
Hi Michael, I'm using these boards for a project related to my master degree. I'm controling 200 servos with 13 boards connected together. I followed the instructions in Adafruit documentation on how to set the address of each board (0x40 to 0x52) but it looks like my last 3 boards (0x50 to 0x52) are not receiving data. I wonder if I soldered the right pads to get these addresses (001010, 001011, 001100). Can you confirm that I followed the right logic? Thank you!!!!🥲🙏
@skillsrobles
@skillsrobles Жыл бұрын
how does it power all that without heating up? power wires look small to me. Im trying to figure out how to just turn on and off 30 solenoids at specific a specific time using an arduino to create a water show. Im getting closer but its hard to find what im looking for that actually makes sense.
@MichaelKlements
@MichaelKlements Жыл бұрын
It depends on how many of the servos are running at the same time and how loaded they are, in this example there is almost no load on them and they're not all moving at once. You'd need to increase the gauge of the wiring if you're running a large number of servos at the same time.
@tmcshane6566
@tmcshane6566 7 ай бұрын
Could this work with stepper motors?
@MichaelKlements
@MichaelKlements 7 ай бұрын
No, these are PWM adaptors. You could use them with DC motor controllers but most stepper motor controllers require a different interface.
@troyyanda6896
@troyyanda6896 2 жыл бұрын
Why didn't you utilize all of the PWM pins on the first board, instead of using two PWM boards? Or was it simply for demo purposes?
@MichaelKlements
@MichaelKlements 2 жыл бұрын
Just to demonstrate the possibility of running two boards
@fatcatpoppy
@fatcatpoppy 2 жыл бұрын
The 16 channel pwm driver you linked is unavailable on Amazon, do you know of any alternatives? It would be perfect for my project.
@MichaelKlements
@MichaelKlements 2 жыл бұрын
They're a commonly available board made by a couple of brands - amzn.to/3fnQ6ZG
@fatcatpoppy
@fatcatpoppy Жыл бұрын
@@MichaelKlements Thanks!
@ikerez7367
@ikerez7367 Жыл бұрын
Hey, very cool and inspiring video. Im new to Arduino and electronics, but I am currently working on building a quadruped robot where I need 8 servos(DS3115) 20kgcm trq. My (maybe stupid) questions is 1. If i need the servos to go on 5v and stall current is 1,8A, what power supply do I need? Or more in general, how do i know what pwr supply is nedd? 2. can these things in the video be used instead of other power supplies?
@MichaelKlements
@MichaelKlements Жыл бұрын
The simplist was to ensure that your power supply is able to drive all of the servos at once (which may be required for a robot) is to just find a 5V supply than can do 1.8A x 8 = 14.4A in total or around 75W. I'm not sure what your second question means - these boards are controllers for the servos, you'll still need to power the servos throughsome form of 5V power supply.
@fernandopalacio4026
@fernandopalacio4026 2 жыл бұрын
Great video!!!!! what about gearmotors with encoder?? can control it too??
@MichaelKlements
@MichaelKlements 2 жыл бұрын
You'd need still to use motor drivers, this board just provides the additional PWM channels which would be used to provide the speed reference.
@fernandopalacio4026
@fernandopalacio4026 2 жыл бұрын
@@MichaelKlements Hi Michael, so for a 20 0r 30 units system we will need : 2 units 16 channel PCA9685 PWM conected,+20 L298N drivers+20 gaer motors with encoder.....will work?? Perhaps you could give us a video with explanation, i looking a lot on youtube but cant find nothing about with several encoder motors.. Thanks for all , fantastic work!!!!
@MichaelKlements
@MichaelKlements 2 жыл бұрын
Yes you'd be able to drive the motors with that setup. I'm not sure what you're wanting to do, but you wouldn't be able to use motors with encoders as you'd then need 30 interupt pins on the Arduino to sense the encoder inputs.
@MaxMax-wy7bi
@MaxMax-wy7bi 3 жыл бұрын
Can I use a second powersupply with the screws in the second Pca? Because I will run Servos on each Pca which runs at 4A each PCA. Please reply....
@MichaelKlements
@MichaelKlements 3 жыл бұрын
Yes you can, just remove the 5V power supply wiring between the boards and you can power them individually.
@MaxMax-wy7bi
@MaxMax-wy7bi 3 жыл бұрын
Nice thx. Is it possible to use the PCAs after soldering without the other one?
@MichaelKlements
@MichaelKlements 3 жыл бұрын
You're not modifying the PCBs, you're just not connecting one of the wires between the inputs/outputs on the sides of the controllers.
@MaxMax-wy7bi
@MaxMax-wy7bi 3 жыл бұрын
@@MichaelKlements so this means yes?
@MichaelKlements
@MichaelKlements 3 жыл бұрын
Yes.
@petesmith3234
@petesmith3234 7 ай бұрын
Great video thanks
@icebluscorpion
@icebluscorpion 2 жыл бұрын
Can it drive ESCs with integrated BEC as well?
@MichaelKlements
@MichaelKlements 2 жыл бұрын
Yes you can, they also use a PWM signal to drive them.
@albertroswell
@albertroswell 2 жыл бұрын
nice video!, one question, in order to reduce the amount of cables, can I just connect the data line of the servos and then connect the power lines of the servos directly from a battery?
@MichaelKlements
@MichaelKlements 2 жыл бұрын
Yes you could do that. I'm not sure how that would reduce the number of cables though, if anything that seems like it would be more complicated than just plugging them into these boards?
@albertroswell
@albertroswell 2 жыл бұрын
@@MichaelKlements the thing is, I am making a helmet that contains 15 servos and I don't want 15 GND cables and 15 VCC cables going down through my back to the battery backpack in the waist, instead I figure you can just connect all GND together between all the servos (same as for VCC) therefore now the cables going to the microcontroller are just 15 + 2
@MichaelKlements
@MichaelKlements 2 жыл бұрын
I'd probably look at a way to move the servo controllers to your helmet, that way you only have the communication and power wires running to the backpack and you don't need to make up additional adaptors for the servos to plug into. But yes, your idea to connect all of the 5V's together and all of the GNDs together will work, just make sure that your cable is large enough to handle the current.
@albertroswell
@albertroswell 2 жыл бұрын
@@MichaelKlements thank you for the advice!, I will consider that, but assuming I will keep the controller in the waist pack, how much current can 15 servos draw?, In order to also select a good cable thickness
@MichaelKlements
@MichaelKlements 2 жыл бұрын
It really depends on the servo and whether they're working together or not. Micro servos typically have a peak draw of around 500-1200mA, so if you've got 15 servos that are all moving at the same time and are somewhat loaded then you could be looking at almost 20A current draw. If they're moving individually and/or aren't particularly loaded then you'd probably be ok with 5-8A.
@PKP510
@PKP510 3 жыл бұрын
Can i plug a 12v 2 amp uk plug charger into the terminal block? if have a 12v 2 amp power on the arduino uno will this transfer on to the driver board through the 5v pin?
@MichaelKlements
@MichaelKlements 3 жыл бұрын
No, you need to supply the driver boards with 5V. If you plug the 2A power into the Arduino, you'll get 5V to the driver board, but not the full 2A as the Arduino's regulator can't handle the +-4.5A at 5V.
@GregKeane
@GregKeane 3 жыл бұрын
nice video. I would like to know if PCA9685 can control hoverboard motors?
@MichaelKlements
@MichaelKlements 3 жыл бұрын
It's not a motor driver board, if you mean can it supply a PWM signal to a motor driver then yes it probably would work.
@GregKeane
@GregKeane 3 жыл бұрын
@@MichaelKlements thanks I figured it out that this won't work as my motor are brushless and sending a PWM signal would but but my motors are 36v and from what I see this board can only supply 5v. I am purchasing 4 BLDC controllers that seem to be able to do the job. Thanks for the response, it's Great to see people take the time to help out the noobs.
@MichaelKlements
@MichaelKlements 3 жыл бұрын
Yes that's correct, the boards can only manage up to 6V. That sounds like a good solution. Enjoy your project!
@coucheese8950
@coucheese8950 3 жыл бұрын
Can all the servos move at the same time ? Or does it need more intensity ?
@MichaelKlements
@MichaelKlements 3 жыл бұрын
You can stagger the movement commands so that they're pretty much moving at the same time.
@silly_humor_memes2907
@silly_humor_memes2907 Жыл бұрын
Hi, can i use node mcu instead of Arduino? Because my Arduino uno no longer works after corrosion
@MichaelKlements
@MichaelKlements Жыл бұрын
Yes you can use these with any microcontroller with an I2C interface - on the node mcu these are pins D1 and D2
@silly_humor_memes2907
@silly_humor_memes2907 Жыл бұрын
@@MichaelKlements thank you so much for the reply. You just earn one more subscriber🙏
@hiraeth_s
@hiraeth_s 3 жыл бұрын
Hey! I'm a newbie to arduino and I was wondering if it would be possible for me to use a 9v battery instead of a power supply and connect it to the arduino & 16 channel shield? I want to control four servos. If this would work, where would I connect the battery? Thanks!
@MichaelKlements
@MichaelKlements 3 жыл бұрын
If you’re talking about the typical 9V block type alkaline batteries then probably not. They aren’t usually able to supply enough current to drive more than a single servo.
@delta22471
@delta22471 3 жыл бұрын
@@MichaelKlements IIRC my power adapter outputs 12 V, so it should work if I provide that much voltage through battery connecter to the plug of said adapter?
@Matthew-fs9tv
@Matthew-fs9tv 3 жыл бұрын
@@delta22471 did you ever figure this out I'm trying to power 16 servos and don't know how much power to input to the servo board or the Arduino?
@delta22471
@delta22471 3 жыл бұрын
@@Matthew-fs9tv I never pursued this thing. I just use the USB plug with a powerbank powering it. If you have a cheap powerbank you maybe able to see if there is any way to make the outer shell smaller for a smaller "battery".
@FPChris
@FPChris 3 жыл бұрын
Can they be hooked up to an I2C multiplexer for thousands of leds or servos?
@MichaelKlements
@MichaelKlements 3 жыл бұрын
You'd probably start running into issues in how quickly the Arduino can issue commands to the LEDs and servos if you start going over 1000, so there would probably start being an noticeable delay in the updates. Other than that its probably possible.
@ashleyarizmendi4901
@ashleyarizmendi4901 2 жыл бұрын
Hey I’m pretty much a beginner when it comes to arduino but is it possible to move the servos at the same time and how can you do it ….I am currently working on a project for class and I have been trying to get the four servos moving at the same time but there’s been no success
@MichaelKlements
@MichaelKlements 2 жыл бұрын
It depends on what you mean by "at the same time". If you want them to move at the same speed, same direction and to the same point then simply connecting them to one PWM output would work. If you want them to move independently then you'll need to incrementally change the PWM signal to each. A microcontroller can only run through code/instructions one by one, so it can't give a different signal to each servo at the same time, there will be milliseconds between the signals being given but this is usually not noticeable if the code is well written.
@nilugajjar182
@nilugajjar182 Жыл бұрын
Hello Michael i am from Canada I need to contact 5 motor in Android and one by one motor need to on please tell me how to do
@ganesh-Chennai
@ganesh-Chennai 3 жыл бұрын
But aren't any 2 servos from seperate drivers actually following the same commands at the same time and moving simultaneously?? Please reply......
@MichaelKlements
@MichaelKlements 3 жыл бұрын
No. Each servo has a unique ID and can be controlled completely independently of the other servos
@normwright5018
@normwright5018 2 жыл бұрын
Hello! Very new to arduino, I've 3d printed 2 robotic headpieces ,1 requires 36 servos, the other requires 20. They will both be running off a 3s 11.1 v RC Lipo battery. I have the buck converters,do I connect them from battery to buck converter to pca9685? Or does the power need to go through the arduino r3? P.S. I've subscribed to your channel, it's been very helpful, thank you
@MichaelKlements
@MichaelKlements 2 жыл бұрын
You'll need to route the power through the buck converters and then directly to the PCA9685s. An Arduino can't handle that amount of current (depending on how many of the 36 servos are required to run simultaneously).
@normwright5018
@normwright5018 2 жыл бұрын
@@MichaelKlements thank you very much for your help 🙏
@normwright5018
@normwright5018 2 жыл бұрын
@@MichaelKlements I will need all the help I can get, I just subscribed to your channel
@that_weird_vtuber
@that_weird_vtuber 2 жыл бұрын
I have a super unique problem. I'm trying to control a bonkers 75 servos for a extrealy large robotic challenge inspired by fnaf but I have no code experience and I'm trying to make it work with the dmx standard using a arduino as a converter but I'm completely stuck.
@etstudio1790
@etstudio1790 2 жыл бұрын
greeting. I'm a beginner. I can't find an example of how to connect 3 servo, one stepper 5v, one display.. all this to connect on two buttons. the first button = 1 circle . the second button (switch) = repeats the circles... Can you help me?
@etstudio1790
@etstudio1790 2 жыл бұрын
displays the number of laps on the displey. counts as one every 20 laps
@MichaelKlements
@MichaelKlements 2 жыл бұрын
With these sorts of projects its best to try get the components working indiviudally first, then you can work on connecting them together. First try get your Arduino to recognise your button inputs, then display some text, then work on getting a servo to move and then a stepper motor. Once you've got them all working by themselves then you should understand them well enough to combine them into a single project.
@etstudio1790
@etstudio1790 2 жыл бұрын
@@MichaelKlements thank you for your quick reply. I'm still going to do it over shield engine v2 with two stepper and two servo engines. I think it's my best option. and you too could help by doing the video:) there is no such example on youtube. put a display that counts the series of engine movements.
@unnion2892
@unnion2892 2 жыл бұрын
If me use power supply 10v to pwm its safe?
@MichaelKlements
@MichaelKlements 2 жыл бұрын
The servos require 5V, so 10V will most likely damage them and/or the controller.
@jeremyrivera9085
@jeremyrivera9085 3 жыл бұрын
How would add a 2 pin push button to this setup to control the servos going up and down?
@MichaelKlements
@MichaelKlements 3 жыл бұрын
Just add a pushbutton to one of the Arduino's free digital inputs as you normally would.
@jeremyrivera9085
@jeremyrivera9085 3 жыл бұрын
@@MichaelKlements wouldn’t that require a new code for the push button?
@MichaelKlements
@MichaelKlements 3 жыл бұрын
@@jeremyrivera9085 yes you would need to revise the code to respond according to your button push
@elijahbyrd3370
@elijahbyrd3370 3 жыл бұрын
Can you use pixel lights on those?
@MichaelKlements
@MichaelKlements 3 жыл бұрын
Pixel lights are already individually addressable, so there isn’t really any point in doing that
@TheTime2222
@TheTime2222 3 жыл бұрын
Sir why are you used 2 16 channel servo controller instead 1
@MichaelKlements
@MichaelKlements 3 жыл бұрын
To demonstrate that they can be chained together
@giostechnologygiovannyv.ri489
@giostechnologygiovannyv.ri489 2 жыл бұрын
Hii Michael nice video thanks ^^! I'm planning to use at least 1 of the PCA9685 board in a matrix of fans (Coolers how you prefer to call them) of 3x3 (explaining that can be scalable to 4x4, or 5x5 with 2 boards and so on) to control them by PWM, I'm just wondering which coolers would be the best, I'm thinking about using the 4 wired ones, better at low voltage 5Volts, or max. 12 V, but as the board supplies 6 V, I think I'm going for the 5V, but I would like to know which ones should I choose (coolers) I mean by current because I want to be able to use the 9 (or 16 if they were 4x4) at the same time, not just individually, any suggestions? I need to get them as fast as possible for a project, that's why I'm asking directly, at the U will only provide me some of the materials, and for example the coolers they told me to find by myself XD, and I'm not sure if I'm going to find a store where they have them as I'm new to Belgium :3 I will ask, but I would like to know about this before going and implementing.
@MichaelKlements
@MichaelKlements 2 жыл бұрын
Aliexpress have a range of 5V PWM fans that would probably work for this, most stores offer express delivery through DHL or Fedex. If you need them faster than this then you'd probably need to visit a local electronics or computer store.
@giostechnologygiovannyv.ri489
@giostechnologygiovannyv.ri489 2 жыл бұрын
@@MichaelKlements Thank you so much for the reply Michael! Ok, perfect, and one more thing I was checking the Adafruit board in its website and the datasheet for the PCA9685, I didn't read it deeply, so I'm not sure, how much current should it support to connect up to 9 (or maybe 16) DC motors? Because I found the value of voltage that it is required to work and the voltage it delivers, because I want to know if the coolers I'm going to buy are with a current consumption not too elevated (for example I found a cooler with 4 wires with these specs: 9GA0405P6H001. FAN, AXIAL, 40MM X 40MM X 20MM, 5VDC, 350mA; I want to make sure that driving 9 of them is not too much current for the board). I hope to be clear with this question. Thanks again :D!!
@ricardo6257
@ricardo6257 2 жыл бұрын
Thank you very much for explaining very well about servo motors. I was wondering if you know why when controlling several servos there is no homogeneous operation. I am trying to control 42 servos and they just go crazy. Without respecting the angles from 0 to 180 degrees. Thank you :)
@MichaelKlements
@MichaelKlements 2 жыл бұрын
I'm not entirely sure what you mean by not homogenous - but servo's are actually quite intricate devices and since the primary manufacturing objective is almost always price, there is is a lot of variation in their characteristics. Even the same brand/model of servos can have slightly different travel limits and centre positions. Another significant issue is often power consumption. Servos can maintain their position with a few milliamps, but typically require around 0.5A to 1A of power to move quickly. So if you're trying to power 42 servos at once then you probably need somewhere around a 30-50A power supply - which you're unlikely to be using. When they draw more power than the power supply can handle then the voltage dips and this causes further erratic behavior in the servos and the microcontroller.
@ricardo6257
@ricardo6257 2 жыл бұрын
@@MichaelKlements Thank you very much for your response. I was just referring to that kind of behavior. I am using an Arduino Mega and indeed I am not using any external power supply. As you mentioned, my mistake is in that matter. I was planning to use an Adjustable Step-up Module. Thank you very much for your help. I'm hoping to figure out the servo madness :P
@MichaelKlements
@MichaelKlements 2 жыл бұрын
Yeah if you're not using an external power supply then that's most likely your problem. No problem at all, good luck with your project!
@K1Vernon
@K1Vernon 4 жыл бұрын
Hi i want to connect 2 arduino leonardos which both have the same sketch on, they are 2 gamepad HID controllers the reason i would want to do it is to make them pick up as 2 seperate HID devices with 1 USB connection how would i code that?
@MichaelKlements
@MichaelKlements 4 жыл бұрын
Hi Wurminator. I'm not sure that you'd be able to get the computer/console/device to pick them up as two separate HID controllers on one USB connection. Why do they need to be connected through one USB connection? Would it not be possible to connect both Arduinos to the device through a USB hub?
@kennethd.bryant9279
@kennethd.bryant9279 2 жыл бұрын
two project ideas: 1) First project; controlling multi Turnouts on an Arduino 2560 HO Train layout. also planning to use Wifi to control them, 2) project to automate one of Santa's Reindeer with servos to control movement (Roller Feet) and eyes, ears, nose, etc.......... befor next Christmas! Ha! Ha!
@MichaelKlements
@MichaelKlements 2 жыл бұрын
It seems like a lot of people either use an Arduino or would like to use an Arduino on an HO Train layout!
@rzv5059
@rzv5059 3 жыл бұрын
What Voltage and Amper do i need on a battery to power supply the arduino uno/nano board ?
@MichaelKlements
@MichaelKlements 3 жыл бұрын
An Arduino doesn’t use much, 12V 1A adaptor should be fine. The servos draw a lot more current, especially when loaded
@rzv5059
@rzv5059 3 жыл бұрын
9V alkaline battery is ok ?
@jacobew2000
@jacobew2000 Жыл бұрын
Wish they put jumpers on the address pins. Sheesh.
@diederickb1806
@diederickb1806 2 жыл бұрын
Can it move multiple servo's on one board at once?
@MichaelKlements
@MichaelKlements 2 жыл бұрын
A microcontroller can only issue instructions one at a time, but in doing it really quickly there are ways to make it look like they're all moving at the same time.
@diederickb1806
@diederickb1806 2 жыл бұрын
@@MichaelKlements *can it move all 16 servos within 10ms? Is there any known latency?
@MichaelKlements
@MichaelKlements 2 жыл бұрын
A servos PWM frequency is typically 50Hz, so they would only respond in a minimum of 20ms. If you're looking at response times in the tens of milliseconds then servos are probably not the correct actuator for your application. But I don't see any reason why the driver wouldn't be able to receive the signal and change it's PWM output to the servos in 10ms.
@withmyself9040
@withmyself9040 8 ай бұрын
thank u so much ♥♥♥♥
@johnfan4348
@johnfan4348 3 жыл бұрын
Cool thx!
@2schae_808
@2schae_808 Жыл бұрын
Hi Michael thank you so much for such a video🙏🏽❤️, I'm gonna create a DIY Vending Machine with this idea. I want to control 12 servos using an LCD TFT display and 3 IR sensors to act as a coin machine, Can you please give me some tips on how I can do that?🙏🏽
@taj455
@taj455 Жыл бұрын
If you creating vending machine that would require 12v motors have can you manage to run those motors . As in this video we saw these servo motors run with 5v . How to run 90 12v . If you have any idea please let me know it would a great help.
@delta22471
@delta22471 3 жыл бұрын
Does this work the same way on an arduino leonardo? And what is the 0 in the code when you were setting the "i" servo up?
@MichaelKlements
@MichaelKlements 3 жыл бұрын
Yes it would be the same for the Leonardo, you'd just need to use the dedicated SCL and SDA pins on it. The 0 and i are the two pulse limits, for servos you'd probably always want the lower limit to be 0.
@delta22471
@delta22471 3 жыл бұрын
@@MichaelKlements OK. But I didn't see any code that would move the servos independently. I feel like it would be good material for a tutorial, since there are people like me who don't have any idea how to do it.
@MichaelKlements
@MichaelKlements 3 жыл бұрын
The code in this example moves them independently. The counter i selects which servo to move and then give it a position reference - pulseLength.
@delta22471
@delta22471 3 жыл бұрын
@@MichaelKlements Is there a way to make the servo copy what the potentiometer is doing?
@felixavshalom2015
@felixavshalom2015 7 ай бұрын
Hi! Why cant you supply power from Arduino UNO?
@MichaelKlements
@MichaelKlements 7 ай бұрын
The servos require too much current for them to be powered through the Arduino, the onboard regulator can't handle more than a few hundred milliamps and each servo by itself can draw more than this.
@felixavshalom2015
@felixavshalom2015 7 ай бұрын
@@MichaelKlements Understand! Thank you! I planning to start a project to build some device for flight simulator, device that will read data from shared memory and will connect to pc via USB. Is Arduino Uno is OK for that? Thanks.
@MichaelKlements
@MichaelKlements 7 ай бұрын
Yes you should be able to use an Arduino for that.
@felixavshalom2015
@felixavshalom2015 7 ай бұрын
Can I supply 12 Volts?@@MichaelKlements
@muhammadhaziqyosri5765
@muhammadhaziqyosri5765 4 жыл бұрын
how much the voltage that you connect to the pwm servo driver?
@MichaelKlements
@MichaelKlements 4 жыл бұрын
5V for servos. If you are running LEDs then you can do 3.3V - 6V if the LEDs can handle the voltage.
@BossTweed69
@BossTweed69 3 жыл бұрын
I'm new to coding so this may sound stupid but can I use the adafruit code if I'm not using a adafruit product? I've got this from amazon "HALJIA 16-Channel 12-bit PWM Servo Motor Driver" and im using it with a uno r3 clone. I want to controll multiple servos with a potentiometer but I'm really struggling with understanding the code and I asked the arduino community and they told me to just go and learn it without actually helping me to learn.
@MichaelKlements
@MichaelKlements 3 жыл бұрын
Yes you can, these boards in the video aren't original Adafruit boards and they work with the Adafruit libraries. Which parts of the code are you struggling with? Yeah the community can be a bit harsh to newbies, but also make sure that you've done some research before asking questions on forum's. They're not very tolerant of questions being asked which are easily solved with a quick Google search.
@BossTweed69
@BossTweed69 3 жыл бұрын
@@MichaelKlements thanks for the reply I really appreciate it. I'm struggling with all of it tbh lol. I have now given up on the idea of making the servos work as I just don't understand
@MichaelKlements
@MichaelKlements 3 жыл бұрын
Maybe try taking a step back and getting one to work directly from an Arduino before attempting to get these boards working. There are examples built into the Arduino IDE for servos.
@BossTweed69
@BossTweed69 3 жыл бұрын
@@MichaelKlements iv managed to get one servo working with a potentiometer but I'm struggling with adding the motor driver so I can plug my other servos directly in
@DIYRobotGirl
@DIYRobotGirl 2 жыл бұрын
Planning on using them on my robot
@andreavacirca3059
@andreavacirca3059 3 жыл бұрын
hello I would like to activate 15 motors with pca9685 can you help me please?
@MichaelKlements
@MichaelKlements 3 жыл бұрын
What do you mean by activate the motors?
@andreavacirca3059
@andreavacirca3059 3 жыл бұрын
hello could you help me please I would like to program 15 engines?you could send me a diagram of how to connect the arduino and joystick... I with the arduino I only activated 2 engines then I bought a shield or a pca9685 how do I program 15 engines?
@rj26manrajdevrithalla51
@rj26manrajdevrithalla51 3 жыл бұрын
What this ardunio use I am use 12v dc moter rc jcb
@MichaelKlements
@MichaelKlements 3 жыл бұрын
I'm not really sure what you're asking here. These drivers need to be supplied with 5-6V, they aren't suitable to drive 12V servos or DC motors.
@taj455
@taj455 Жыл бұрын
@@MichaelKlements : Then please let me know how can I manage to run 40 12v DC servo motors . Thanks in advance.
@laurenbarronisanartist
@laurenbarronisanartist 2 ай бұрын
Ignore this comment but I paused and will continue my project at the 3:05 mark once I get home from work in case KZbin doesn’t mark it
@md.furkansamad948
@md.furkansamad948 2 жыл бұрын
Nice
@vaibhavshah6289
@vaibhavshah6289 2 жыл бұрын
Hi I am doing my Masters in Interior design. I am Designing an interactive art installation. I want to know that how can I control servo motors using as Music equilizer? the idea is that the user can play some digital instruiment on an Ipad or some Song and the multiple servo motors will create pattern responding to the music/Sound. Is there any site where I can find some code for this project? Any help from anyone will be helpful.
@MichaelKlements
@MichaelKlements 2 жыл бұрын
You'll need a spectrum analyser chip or something similar, but can definitely get a project like that running on an Arduino.
@vaibhavshah6289
@vaibhavshah6289 2 жыл бұрын
@@MichaelKlements thanks
@marios_ideas
@marios_ideas 4 жыл бұрын
Hay. Watched some of your movies. Found them usefull. Just subscribed to your channel. I am starting a similar channel.Already have few videos Arduino related. . I will be shorly posting video with a different take on the arduino servo clock. Lets support each other.
@MichaelKlements
@MichaelKlements 4 жыл бұрын
Hey Mario, thanks for the sub. I'll definitely look out for your servo clock video.
@taku2586
@taku2586 Жыл бұрын
3:48....
This mother's baby is too unreliable.
00:13
FUNNY XIAOTING 666
Рет қаралды 40 МЛН
Não sabe esconder Comida
00:20
DUDU e CAROL
Рет қаралды 27 МЛН
How to Use Servo Motors with NO Programming! - Hotwire Servo Tutorial
12:56
Уроки Ардуино. ПИД регулятор
28:57
Заметки Ардуинщика
Рет қаралды 471 М.
Connecting Arduino with multiple I2C devices
6:22
BlueDot
Рет қаралды 192 М.
PCA9685 16-Channel 12-Bit PWM Servo Motor Driver with Arduino.
10:41
Control 16 Servos Using A PCA9685
18:22
Toms Trains and Things
Рет қаралды 74 М.
Mastering Servo Control: PCA9685 PWM Driver with Arduino Tutorial and Demo
7:50
I tried the 3 Cheapest Arduino Alternatives! (That you Suggested)
13:21
Вывод изображения с Arduino и ESP32 на монитор
3:59
Заметки ESPшника
Рет қаралды 35 М.
How to Control a 12V Motor with Arduino: Easy Wiring & Code Examples
44:13
This mother's baby is too unreliable.
00:13
FUNNY XIAOTING 666
Рет қаралды 40 МЛН