Connect Up To 992 Servos To An Arduino, Using I2C

Sdílet
Vložit
  • čas přidán 3. 05. 2020
  • 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-life.com/connect-...
    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.
  • Jak na to + styl

Komentáře • 185

  • @AbdulRahman-jz3px
    @AbdulRahman-jz3px Před 2 lety +1

    Thank you for sharing, I hope you discuss the PID of the Arduino program servo motor using this PCA9685!!!

  • @ShreksSpliff
    @ShreksSpliff Před rokem +1

    Cat door. Got rust hooked up to an atmega I have lying around.
    Thanka for the information :) great video, keep it up.

  • @zerorusher
    @zerorusher Před rokem

    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.

  • @rosslahive
    @rosslahive Před 4 lety +3

    This is great. Thanks a lot.

  • @rmturner0681
    @rmturner0681 Před 3 lety +1

    This is a second piece of the puzzle youve provided for'm researching for my smart dust collection system. Lots of good ideas on CZcams, 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  Před 3 lety +1

      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 Před 3 lety

      @@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  Před 3 lety

      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 Před 4 měsíci

      @@MichaelKlements hi can u driver dc motors with it?

  • @jacocoetzee762
    @jacocoetzee762 Před 2 lety +4

    Great video! 6 DOF Robot Arm is the plan for this board.

  • @abhijitbhoir692
    @abhijitbhoir692 Před 2 lety

    Can you show us same example with millis over the delay to control individual servo at different time

  • @ghaithferjaoui1896
    @ghaithferjaoui1896 Před rokem

    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

  • @shushruthmg4630
    @shushruthmg4630 Před 10 měsíci +1

    How do you build a transmitter to control 992 servos?

  • @jamesssydney
    @jamesssydney Před 7 měsíci

    I'm looking at similar setup for stepper motors, any ideas on which cards to use?

  • @rogerhancock5834
    @rogerhancock5834 Před rokem

    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

  • @petesmith3234
    @petesmith3234 Před 4 měsíci

    Great video thanks

  • @dumcatu
    @dumcatu Před rokem

    Since you are using scl and sdl what pins can I use to hook up my mpu6050 to control the servos

  • @galagatron5319
    @galagatron5319 Před rokem

    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 Před 10 měsíci

    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?

  • @goesintite
    @goesintite Před rokem

    Is it as easy to run steppers at the same time as several servos?

  • @ThebusWay76
    @ThebusWay76 Před 7 měsíci

    Hi, would this work for a sim racing GSeat application, thanks in advance

  • @user-io1mh9hz3k
    @user-io1mh9hz3k Před 5 měsíci

    If i were to use 5 mg996r servos what is my recommended power supply rating?

  • @yeshacroe9354
    @yeshacroe9354 Před 3 lety

    hello sir, im new to this . but in power supply for pca9685. is like this right?
    jumper wire

  • @taj455
    @taj455 Před rokem

    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

  • @shivamangaira
    @shivamangaira Před rokem

    can i control small solenoid actuators using pwm ?

  • @kavorka8855
    @kavorka8855 Před rokem

    Did you try them simultaneously? I didn't see it in the video.

  • @that_weird_vtuber
    @that_weird_vtuber Před 2 lety

    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.

  • @withmyself9040
    @withmyself9040 Před 5 měsíci

    thank u so much ♥♥♥♥

  • @johnfan4348
    @johnfan4348 Před 3 lety +1

    Cool thx!

  • @ZX7ROB
    @ZX7ROB Před 2 lety

    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  Před 2 lety +1

      I'm sure you could make something like this work for that application, it sounds like the right sort of board for it.

  • @kaushlendrapandey5404
    @kaushlendrapandey5404 Před měsícem +1

    Hi michael, can u help me with a project??, how can i reach out to u

  • @ezzatluqman
    @ezzatluqman Před 2 lety

    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  Před 2 lety

      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.

  • @z1531
    @z1531 Před rokem

    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  Před rokem

      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

  • @normwright5018
    @normwright5018 Před 2 lety +1

    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  Před 2 lety +1

      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.

  • @DIYRobotGirl
    @DIYRobotGirl Před 2 lety

    Planning on using them on my robot

  • @madslorentzen2138
    @madslorentzen2138 Před 2 lety

    I love this! Is there a way to hook an esp32 up to this setup instead of an Arduino?

    • @MichaelKlements
      @MichaelKlements  Před 2 lety

      Yes this would run fine with an ESP32 instead of an Arduino.

  • @skillsrobles
    @skillsrobles Před 10 měsíci

    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  Před 10 měsíci

      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.

  • @SkynetGen
    @SkynetGen Před rokem

    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  Před rokem

      You'd need a battery that can do around 2A current draw - 4 x good quality AA's in a pack would probably work.

  • @nilugajjar182
    @nilugajjar182 Před rokem

    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

  • @sataddrumukherjee9013

    I want to build a bipedal humanoid robot,can I do this by this process?

  • @brucewoods9377
    @brucewoods9377 Před 2 lety

    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  Před 2 lety +3

      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.

  • @PKP510
    @PKP510 Před 3 lety

    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  Před 3 lety

      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.

  • @K1Vernon
    @K1Vernon Před 3 lety

    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  Před 3 lety

      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?

  • @danielbijmolen6003
    @danielbijmolen6003 Před 2 lety +1

    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  Před 2 lety +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 Před 2 lety

      @@MichaelKlements Thank you so much, this clears up things a lot :)

  • @richardcox6637
    @richardcox6637 Před 2 lety

    Just found this video. Would this work to control 20 water valves and 20 moisture sensors?

    • @MichaelKlements
      @MichaelKlements  Před 2 lety

      This only controls PWM based devices, so possibly the valves if they're PWM driven, but it won't work with your moisture sensors.

  • @giostechnologygiovannyv.ri489

    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  Před 2 lety +1

      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 Před 2 lety

      @@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!!

  • @icebluscorpion
    @icebluscorpion Před 2 lety

    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  Před 2 lety

      The interconnecting wiring between the two PCA9685 boards delivers power to the second one.

  • @krishnaprasad5699
    @krishnaprasad5699 Před rokem

    In this video each two servo from each board works similar. Can I controll each servo individually from each board ??

    • @MichaelKlements
      @MichaelKlements  Před rokem +1

      It's just a duplicated section of code, all of the servos are individually controllable

  • @ricardo6257
    @ricardo6257 Před 2 lety

    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  Před 2 lety +3

      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 Před 2 lety

      @@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  Před 2 lety +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!

  • @md.furkansamad948
    @md.furkansamad948 Před 2 lety

    Nice

  • @ashleyarizmendi4901
    @ashleyarizmendi4901 Před 2 lety

    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  Před 2 lety

      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.

  • @Matthew-fs9tv
    @Matthew-fs9tv Před 2 lety +1

    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  Před 2 lety

      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 Před 2 lety

      @@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  Před 2 lety

      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.

  • @coucheese8950
    @coucheese8950 Před 3 lety

    Can all the servos move at the same time ? Or does it need more intensity ?

    • @MichaelKlements
      @MichaelKlements  Před 3 lety +1

      You can stagger the movement commands so that they're pretty much moving at the same time.

  • @ikerez7367
    @ikerez7367 Před rokem

    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  Před rokem

      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.

  • @muhammadhaziqyosri5765

    how much the voltage that you connect to the pwm servo driver?

    • @MichaelKlements
      @MichaelKlements  Před 3 lety +1

      5V for servos. If you are running LEDs then you can do 3.3V - 6V if the LEDs can handle the voltage.

  • @rzv5059
    @rzv5059 Před 3 lety

    What Voltage and Amper do i need on a battery to power supply the arduino uno/nano board ?

    • @MichaelKlements
      @MichaelKlements  Před 3 lety

      An Arduino doesn’t use much, 12V 1A adaptor should be fine. The servos draw a lot more current, especially when loaded

    • @rzv5059
      @rzv5059 Před 3 lety

      9V alkaline battery is ok ?

  • @hiraeth_s
    @hiraeth_s Před 3 lety +1

    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  Před 3 lety

      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 Před 3 lety

      @@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 Před 2 lety

      @@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 Před 2 lety

      @@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 Před 3 lety

    Can they be hooked up to an I2C multiplexer for thousands of leds or servos?

    • @MichaelKlements
      @MichaelKlements  Před 3 lety +1

      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.

  • @tmcshane6566
    @tmcshane6566 Před 4 měsíci

    Could this work with stepper motors?

    • @MichaelKlements
      @MichaelKlements  Před 4 měsíci +1

      No, these are PWM adaptors. You could use them with DC motor controllers but most stepper motor controllers require a different interface.

  • @poultrysoundsmusicstudio3105
    @poultrysoundsmusicstudio3105 Před 10 měsíci

    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!!!!🥲🙏

  • @fernandopalacio4026
    @fernandopalacio4026 Před rokem

    Great video!!!!! what about gearmotors with encoder?? can control it too??

    • @MichaelKlements
      @MichaelKlements  Před rokem

      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 Před rokem

      @@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  Před rokem

      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.

  • @fatcatpoppy
    @fatcatpoppy Před rokem

    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  Před rokem

      They're a commonly available board made by a couple of brands - amzn.to/3fnQ6ZG

    • @fatcatpoppy
      @fatcatpoppy Před rokem

      @@MichaelKlements Thanks!

  • @silly_humor_memes2907
    @silly_humor_memes2907 Před 11 měsíci

    Hi, can i use node mcu instead of Arduino? Because my Arduino uno no longer works after corrosion

    • @MichaelKlements
      @MichaelKlements  Před 11 měsíci +1

      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 Před 11 měsíci +1

      @@MichaelKlements thank you so much for the reply. You just earn one more subscriber🙏

  • @GregKeane
    @GregKeane Před 3 lety

    nice video. I would like to know if PCA9685 can control hoverboard motors?

    • @MichaelKlements
      @MichaelKlements  Před 3 lety +1

      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 Před 3 lety

      @@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  Před 3 lety +1

      Yes that's correct, the boards can only manage up to 6V. That sounds like a good solution. Enjoy your project!

  • @jacobew2000
    @jacobew2000 Před rokem

    Wish they put jumpers on the address pins. Sheesh.

  • @jeremyrivera9085
    @jeremyrivera9085 Před 2 lety

    How would add a 2 pin push button to this setup to control the servos going up and down?

    • @MichaelKlements
      @MichaelKlements  Před 2 lety

      Just add a pushbutton to one of the Arduino's free digital inputs as you normally would.

    • @jeremyrivera9085
      @jeremyrivera9085 Před 2 lety

      @@MichaelKlements wouldn’t that require a new code for the push button?

    • @MichaelKlements
      @MichaelKlements  Před 2 lety

      @@jeremyrivera9085 yes you would need to revise the code to respond according to your button push

  • @balasubramanianganesh944

    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  Před 3 lety +1

      No. Each servo has a unique ID and can be controlled completely independently of the other servos

  • @2schae_808
    @2schae_808 Před rokem

    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 Před rokem

      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.

  • @MaxMax-wy7bi
    @MaxMax-wy7bi Před 3 lety +1

    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  Před 3 lety

      Yes you can, just remove the 5V power supply wiring between the boards and you can power them individually.

    • @MaxMax-wy7bi
      @MaxMax-wy7bi Před 3 lety

      Nice thx.
      Is it possible to use the PCAs after soldering without the other one?

    • @MichaelKlements
      @MichaelKlements  Před 3 lety

      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 Před 3 lety

      @@MichaelKlements so this means yes?

    • @MichaelKlements
      @MichaelKlements  Před 3 lety

      Yes.

  • @elijahbyrd3370
    @elijahbyrd3370 Před 3 lety

    Can you use pixel lights on those?

    • @MichaelKlements
      @MichaelKlements  Před 3 lety

      Pixel lights are already individually addressable, so there isn’t really any point in doing that

  • @delta22471
    @delta22471 Před 3 lety

    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  Před 3 lety

      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 Před 3 lety

      @@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  Před 3 lety

      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 Před 3 lety

      @@MichaelKlements Is there a way to make the servo copy what the potentiometer is doing?

  • @unnion2892
    @unnion2892 Před 2 lety

    If me use power supply 10v to pwm its safe?

    • @MichaelKlements
      @MichaelKlements  Před 2 lety

      The servos require 5V, so 10V will most likely damage them and/or the controller.

  • @icebluscorpion
    @icebluscorpion Před 2 lety

    Can it drive ESCs with integrated BEC as well?

    • @MichaelKlements
      @MichaelKlements  Před 2 lety

      Yes you can, they also use a PWM signal to drive them.

  • @albertroswell
    @albertroswell Před rokem

    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  Před rokem

      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 Před rokem

      @@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  Před rokem

      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 Před rokem

      @@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  Před rokem +1

      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.

  • @andreavacirca3059
    @andreavacirca3059 Před 3 lety

    hello I would like to activate 15 motors with pca9685 can you help me please?

    • @MichaelKlements
      @MichaelKlements  Před 3 lety

      What do you mean by activate the motors?

    • @andreavacirca3059
      @andreavacirca3059 Před 3 lety

      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?

  • @etstudio1790
    @etstudio1790 Před rokem

    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 Před rokem

      displays the number of laps on the displey. counts as one every 20 laps

    • @MichaelKlements
      @MichaelKlements  Před rokem +1

      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 Před rokem +1

      @@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.

  • @normwright5018
    @normwright5018 Před 2 lety

    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  Před 2 lety +1

      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 Před 2 lety

      @@MichaelKlements thank you very much for your help 🙏

    • @normwright5018
      @normwright5018 Před 2 lety

      @@MichaelKlements I will need all the help I can get, I just subscribed to your channel

  • @troyyanda6896
    @troyyanda6896 Před rokem

    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  Před rokem

      Just to demonstrate the possibility of running two boards

  • @diederickb1806
    @diederickb1806 Před 2 lety

    Can it move multiple servo's on one board at once?

    • @MichaelKlements
      @MichaelKlements  Před 2 lety

      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 Před 2 lety

      @@MichaelKlements *can it move all 16 servos within 10ms? Is there any known latency?

    • @MichaelKlements
      @MichaelKlements  Před 2 lety +1

      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.

  • @vaibhavshah6289
    @vaibhavshah6289 Před 2 lety

    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  Před 2 lety +1

      You'll need a spectrum analyser chip or something similar, but can definitely get a project like that running on an Arduino.

    • @vaibhavshah6289
      @vaibhavshah6289 Před 2 lety

      @@MichaelKlements thanks

  • @BossTweed69
    @BossTweed69 Před 3 lety

    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  Před 3 lety

      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 Před 3 lety

      @@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  Před 3 lety

      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 Před 3 lety

      @@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

  • @TheTime2222
    @TheTime2222 Před 3 lety

    Sir why are you used 2 16 channel servo controller instead 1

  • @rj26manrajdevrithalla51

    What this ardunio use
    I am use 12v dc moter rc jcb

    • @MichaelKlements
      @MichaelKlements  Před 3 lety

      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 Před rokem

      @@MichaelKlements : Then please let me know how can I manage to run 40 12v DC servo motors . Thanks in advance.

  • @felixavshalom2015
    @felixavshalom2015 Před 4 měsíci

    Hi!
    Why cant you supply power from Arduino UNO?

    • @MichaelKlements
      @MichaelKlements  Před 4 měsíci

      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 Před 4 měsíci

      @@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  Před 4 měsíci

      Yes you should be able to use an Arduino for that.

    • @felixavshalom2015
      @felixavshalom2015 Před 4 měsíci

      Can I supply 12 Volts?@@MichaelKlements

  • @kennethd.bryant9279
    @kennethd.bryant9279 Před 2 lety +1

    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  Před 2 lety

      It seems like a lot of people either use an Arduino or would like to use an Arduino on an HO Train layout!

  • @marios_ideas
    @marios_ideas Před 4 lety

    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  Před 4 lety

      Hey Mario, thanks for the sub. I'll definitely look out for your servo clock video.

  • @taku2586
    @taku2586 Před rokem

    3:48....