Controlling 32 Servo Using PCA9685 and Arduino: V3

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ก.ย. 2024

ความคิดเห็น • 114

  • @videotronicmaker
    @videotronicmaker 3 ปีที่แล้ว +4

    I can't believe you set up all of those motors! Ha!!! I respect your hard work and I appreciate it. I have recently begun learning servo motors and the PCA 9685. You have also inspired me to create a convenient way to screw multiple servos to my shelf for testing. I am sure you understand the need to keep them from tipping over while testing. Keep up the great work! I hope you are well during this difficult time.

    • @robojax
      @robojax  3 ปีที่แล้ว +1

      Thank you. LOL. yes. this is V3 which I started with V1 of this series. People wanted to know so I did. Now I also have V4 with you control them over Wifi using ESP32 . I hope you are well too. Thanks to God I am okay so far.

  • @SparkOutUs
    @SparkOutUs 4 ปีที่แล้ว +1

    i hope you have had a great new year, if it wasnt for you i wouldnt have been able to start design my keyboard playing robot, thank you so much you are doing a great job, please never stop :)

    • @robojax
      @robojax  4 ปีที่แล้ว

      You are welcome. I was not sure to do 32 servo because nothing would come to mind that would need 32 servo. I am glad you found it useful. Sure I will not stop.

  • @pentagongaming6543
    @pentagongaming6543 ปีที่แล้ว +1

    Thank you Robojax, it helps me a lot in my projects

    • @robojax
      @robojax  ปีที่แล้ว +1

      My pleasure.

  • @alirezabayat6388
    @alirezabayat6388 6 หลายเดือนก่อน +1

    thank you for making these videos

    • @robojax
      @robojax  6 หลายเดือนก่อน

      My pleasure!

  • @manuelcasellas
    @manuelcasellas ปีที่แล้ว

    Hello Ahmad, first of all thank you for your videos with which I am learning a lot. In this video, you define the maximum and minimum values to control the exact angle of a servo. But how can we do it in each servo of a project with more servos?
    Again, thanks!

  • @MarquiiNatiion
    @MarquiiNatiion 3 ปีที่แล้ว

    Hello, first of all, what a wonderful job, this is amazing & thank you for share to everyone.
    My question is ...
    How many boards we can use in this method ??
    Again congrats & thank you

    • @robojax
      @robojax  3 ปีที่แล้ว

      Thank you and you are welcome. I thought I missed the most important point that you asked. so I watched the video. it has been explained at 5:20 (please click on 5:20). but you have to set the address which I have explained for different number of boards.

  • @SuperSpuddo
    @SuperSpuddo ปีที่แล้ว

    Thank you great video, clearly explained and easy to follow. I would like to use this to control model railroad turnouts. How do I control individual servos using switches please?

    • @robojax
      @robojax  ปีที่แล้ว

      This is version 3 . I have 4 versions . I have so many videos on servo with switches that might help you learn.

    • @SuperSpuddo
      @SuperSpuddo ปีที่แล้ว

      @@robojax Thanks I will look at V4 and see if I can work it out.

    • @SuperSpuddo
      @SuperSpuddo ปีที่แล้ว

      V4 was good, however I want to control PCA9685 using switches for individual servos. I can’t find a video for that?

  • @Randy19888
    @Randy19888 3 ปีที่แล้ว

    Can you do a video on controlling these servos using a PC actively using pyfirmata. PLEASE it would really help. Btw awesome video!!

    • @robojax
      @robojax  3 ปีที่แล้ว

      you will need USB to UAR converter and then from windows you can send commend. but still you need Arduino to control this servo module. Never heard the py... you mentioned. .

  • @PatnaikUC
    @PatnaikUC 3 ปีที่แล้ว

    Sorry to mention here the concept does not work in real-life use while the servo motors are subjected to some work to be done. (9G servos may be ok) but if all the MG 995 work at a time on load ( not like your demo in no lad) the tiny little series MOSFET used for reverse supply protection of the PCA 9685 board for powering the servos from V+, simply smokes. It happened for my case with just 8 nos MG995 used in arm operation against gravity. But I can still use the board by giving VCC 5 volt and driving the servos through power MOSFETs whose gates only receive the PWM signal from PCA9685.

    • @aaaonhi9260
      @aaaonhi9260 3 ปีที่แล้ว

      How much power needed? For 32 Servo

    • @PatnaikUC
      @PatnaikUC 3 ปีที่แล้ว +1

      @@aaaonhi9260 400mA per servo on an average.Usually all the servos are not operated on load hence even if 10 servos operate on load at a time it is 4 A Then PCA 9685 will just smoke Let alone 32 .

    • @aaaonhi9260
      @aaaonhi9260 3 ปีที่แล้ว

      @@PatnaikUC Thank you very much sir, i am use mg995 And power can'T supply

  • @atulkhatavkar6986
    @atulkhatavkar6986 4 ปีที่แล้ว +1

    Thanks for this video

    • @robojax
      @robojax  4 ปีที่แล้ว

      You are welcome.

  • @sohelchakma9879
    @sohelchakma9879 4 ปีที่แล้ว +1

    Its ultimate for servo.

    • @robojax
      @robojax  4 ปีที่แล้ว

      Yes. It has been requested for the past two years and finally I did the video.

  • @gulshan0799
    @gulshan0799 4 ปีที่แล้ว +1

    Thank you sir very helpful

    • @robojax
      @robojax  4 ปีที่แล้ว

      You are welcome.

  • @akshaydhokane4963
    @akshaydhokane4963 ปีที่แล้ว

    Hello sir nice work done by you.
    I also did the same thing I connected 2 pca9685 as per the connection shown, I am getting itc error. Can you pl help

    • @robojax
      @robojax  ปีที่แล้ว

      You can’t just say I am getting erro. Explain the error or post the error here. Read the error as most of the time error is very clear to understand.

  • @johnmarshall2660
    @johnmarshall2660 4 ปีที่แล้ว +1

    I have used the Mega with the PCA9685 to control servo's for points on Model Rail, had problems with code but found one that worked, so very interested to be able to add another PCA9685 for 16 more points, I used Data pins 22 to 37 for SPST switch control so can use 38 to 53 for another 16 but if I wanted to use another PCA9685, 3 in all not sure how I would use Data inputs as running out of input data pins... Great video Regards John

    • @robojax
      @robojax  4 ปีที่แล้ว

      I have explained it in the video how to add the 3rd module. Watch the video I am sure you will understand it.

    • @piotrpiotrowicz6943
      @piotrpiotrowicz6943 4 ปีที่แล้ว

      Hi John, I am interested to use PCA9685 to control servo's for points on Model Rail too. There's only one problem maybe you can help me. I'd like to control the servos from the computer and I'm looking for the right application to control. Do you know one? Can you send a link to the code you're writing about? I would be very grateful.

    • @SuperSpuddo
      @SuperSpuddo ปีที่แล้ว

      John can you provide me wiring and code fro the mega. I wish to do the same.

    • @johnmarshall2660
      @johnmarshall2660 ปีที่แล้ว

      @@piotrpiotrowicz6943 Hi, I just found this messsage it must have gone in spam, not sure if I can help you now, but I did make a lot of upgrades to that section and finished up using a MERG Megapoints Controller will operate 12 servo's and MERG Servo4 boards will operate 4 servo's ...

    • @johnmarshall2660
      @johnmarshall2660 ปีที่แล้ว

      @@SuperSpuddo Hi, I just found this messsage it must have gone in spam, not sure if I can help you now, but I did make a lot of upgrades to that section and finished up using a MERG Megapoints Controller will operate 12 servo's and MERG Servo4 boards will operate 4 servo's ..

  • @canaldaninja7998
    @canaldaninja7998 ปีที่แล้ว

    top , make a video using nema 17 , 23 , 32 pleace

  • @BDB-sz3qb
    @BDB-sz3qb ปีที่แล้ว

    Hi Ahmad, greetings from the NL here. Can you tell me what kind of current all the servos pull through the boards? I have a project with 21 MG996R servos and i hesitate using them on boards like these. Each MG996R use about 170mA in normal activity, so 21 x 170mA is 3-4 amperes. Can a board like this take that amount of current?

  • @normwright5018
    @normwright5018 2 ปีที่แล้ว

    Hello!
    I've 3d printed 2 headpieces and I'm very new to arduino.
    The first headpiece requires 36 servos,the second requires 20.
    I will be connecting them to a 3s 11.1v RC lipo battery.
    I have the buck converters, I have the pca9685 boards, my main boards are mega 2560.
    Every video I've watched has doesn't include information describing how to connect this board to a battery power supply.
    Any advice would be greatly appreciated 🙏
    Thanks very much for your amazing channel!

    • @robojax
      @robojax  2 ปีที่แล้ว +1

      Just connect your batter directly to power adapter connector and it is safe or connect it to VIN pin.

  • @fleckditchburn2494
    @fleckditchburn2494 2 หลายเดือนก่อน

    hello ahmad from canada i watch a lot of your videos i am currently watching v1 v2 v3 v4 on stepper motors what code do i need to slow the servo motor rotation in other words to make it run slower than it does

    • @robojax
      @robojax  2 หลายเดือนก่อน

      The speed it maximum. Simply add delay in the loop where the servo is controlled. delay(100) will add 100 milliseconds delay

  • @emmanuellldejarme5659
    @emmanuellldejarme5659 ปีที่แล้ว

    hi sir robojax, can we a sensor in the arduino while the pca is connected, and before the pca will control the servos the snsor must sense something??

    • @robojax
      @robojax  ปีที่แล้ว

      Hi, you are watching Version 3 (V3), there are V1, V2 before this video. Yes you can use arduino fully for something else like sensor.

  • @RobotAlarabic
    @RobotAlarabic 4 ปีที่แล้ว

    It's really helpful and worthy tutorial video. my question is:
    What is the best way to connect the PCA9685 with MPU6050?
    And is it possible only with different addresses and then just connect them both to the Arduino or that will be signal to noises!?

    • @robojax
      @robojax  4 ปีที่แล้ว +1

      use the same Arduino. You can connect 128 I2C devices to Arduino all in the same pins SDA and SCL Thank you for not skipping the ads and keep watching it. This will help me a lot.

    • @RobotAlarabic
      @RobotAlarabic 4 ปีที่แล้ว

      @@robojax Actually i'm still getting some signal overlap from both devices. Thanks for your reply and i hope you make more great videos, also about I2C addressing. Thanks

    • @robojax
      @robojax  4 ปีที่แล้ว

      You are welcome.

  • @kengkardyoksuvan6641
    @kengkardyoksuvan6641 2 ปีที่แล้ว

    My question is how to connect to ESP8266
    Which pin of the ESP8266 will be connected to OE, SCL, SDA pin from PCA9685 ??? and the code still the same Except the pin number Right?

    • @robojax
      @robojax  2 ปีที่แล้ว +1

      Then what this video to learn about SDA and SCL pins th-cam.com/video/HYMnCUtNMnw/w-d-xo.html

  • @truongtranvan6806
    @truongtranvan6806 4 ปีที่แล้ว +1

    All servos can operate independently by this way? thank you !!

    • @robojax
      @robojax  4 ปีที่แล้ว

      yes. this video is V3, you gotta watch V1, V2 with different code V2 Video of PCA9685 3 different ways to control Servo motors: th-cam.com/video/bal2STaoQ1M/w-d-xo.html

  • @bennykwan
    @bennykwan 3 ปีที่แล้ว

    Hi Sir, thanks so much for your video!
    I would like to power my arduino broad by Vin, but there is no more ground for the power supply. Can I skip the connection from OE to GRD as the introduction you shared?
    Thanks in advance!

    • @robojax
      @robojax  3 ปีที่แล้ว +1

      Hello, we have GND pin for power supply. don't we? I've shown connecting separate power supply connected. You must have skipped V1 videos. please watch that. this video is V3.

  • @noorrahmanaziz2894
    @noorrahmanaziz2894 4 ปีที่แล้ว

    بسیار تشکر هر ودیو شما را میبینم زیاد چیزها را از شما اموختم
    استاد محترم یک پروژه inverter sin wave بسازید که feedback هم داشته باشد البته در اردینو
    تشکر

    • @robojax
      @robojax  4 ปีที่แล้ว +1

      السلام علیکم برادر عزیز، تشکر از نظر لطف تان. مبدل ساین خیلی پیچیده است و اجزای مختلف دارد. در زمینه تجربه دارم و اگر وقت پیدا کردم حتمی یک پروزه تعلیمی ثبت میکنم.

    • @robojax
      @robojax  ปีที่แล้ว

      سلام علیکم. مجرا (کانال) فارسی علم و فن را راه اندازی کردم: لطفا به دوستان تان خبردهید و حمایتم کنید.
      www.youtube.com/@ilmofan

  • @Steven-jf4cs
    @Steven-jf4cs 2 ปีที่แล้ว

    Thank you for your impactful tutorials. I have a question: I would like to run multiple 25kg metal servos but the voltage/current exceeds the PCA9685 threshold. Is it possible to power externally the servos and have the PCA9685/Arduino provide signal only? Thanks in advance if you are able to help me out :)

    • @robojax
      @robojax  2 ปีที่แล้ว

      Hi, yes you can use this for signal control. Just share the GND with pier supply and connect pier directly to each servo motors.

  • @dixiem2139
    @dixiem2139 3 ปีที่แล้ว

    PERFECT

    • @robojax
      @robojax  3 ปีที่แล้ว

      Hello, have you watched V1, V2 and V4 of this module?

  • @lucverbrugghe3443
    @lucverbrugghe3443 3 ปีที่แล้ว

    Hello Ahmad ,
    Thank you very much for the excellent explanation of about anything according to Arduino.
    I do not know very much about programming but I am Learning. :-)
    I have the following question :
    Is there any possibility to control about 20 servo motors independent from each other while using 20 buttons and using the PCA9685?
    I think about a combination of this video and
    Servo_pushbutton2_move_one_direction ?
    So can you give me a clue for this ?
    Thank you very much,
    Kind regards,
    Luc

    • @robojax
      @robojax  3 ปีที่แล้ว

      Hello and you are welcome. in the mention video with push button, we don't use any external module. but PCA9685 iss totally different. But you can do it. you can use the code from push button to use board1.setPWM(i, 0, angleToPulse(angle) ); instead of the servo in that code. it needs work. good luck.

  • @caitlyn8415
    @caitlyn8415 ปีที่แล้ว

    i dont have yet the driver but I'm curious if the angel step is 1, it could run smoothly?

    • @robojax
      @robojax  ปีที่แล้ว

      This is version 3 or V3. I have 4 videos . You can view and learn from them. Start from v1. Link in sway of this video.

  • @user-ww5iv8mn7r
    @user-ww5iv8mn7r 4 ปีที่แล้ว

    Thank you very much for your video!
    It's really helpful video.
    I have a question, can I operate the pca9685 using a RIP sensor?

    • @robojax
      @robojax  4 ปีที่แล้ว +1

      You are welcome. it depends what you want to do. if you want the V1 of this module. I have explained it. if you want to control it with distance or just turn ON and OFF. I am not sure. But yes you can control this.

    • @user-ww5iv8mn7r
      @user-ww5iv8mn7r 4 ปีที่แล้ว

      @@robojax Yes! I will use the "Gravity digital infrared motion sensor". I want to turn it on and off, but I have no idea how to write the code.😭😭
      👉This is only the code that turns on the LED with the sensor, but I'm not sure how to combine it with the pca9685 working code you taught from video.
      ====================
      const int buttonPin = 3;
      const int ledPin = 13;
      void setup() {
      pinMode(ledPin, OUTPUT);
      pinMode(buttonPin, INPUT);
      }
      void loop()
      {
      if (digitalRead(buttonPin) == HIGH)
      {
      digitalWrite(ledPin, HIGH);
      }
      else {
      digitalWrite(ledPin, LOW);
      }
      }

    • @robojax
      @robojax  4 ปีที่แล้ว

      this is just a switch. I don't understand what you want to do.

  • @thebandit1324
    @thebandit1324 2 ปีที่แล้ว

    Hi is there a way to wire say 4 sets of 4 motors using a button for each set. 1 button for each set of 4 servos. Wiring it up that way to do something simple like in your basic servo motor video where it moves from one specified point to another and stops and reverses at the push of a button. ? It’s for controlling lane changers on model railway car system so cars will change lanes.

    • @robojax
      @robojax  2 ปีที่แล้ว

      Hi, yes it is possible. you have to work on it. All my videos and codes are free. but if you pay for custom code, you can contact me via robojax.com contact page. I will charge $100/hour for work. Don't forget your email in the body of message if you contacted me.

  • @normwright5018
    @normwright5018 2 ปีที่แล้ว

    Hello!
    I'm in Toronto, do you do online live tutoring by chance?

    • @robojax
      @robojax  2 ปีที่แล้ว

      Hello, yes I do . Contact me via Robojax.com contact page provide your email in the msg.

  • @wishicouldarduino8880
    @wishicouldarduino8880 2 ปีที่แล้ว

    How can one initiate the servos at 90 degrees instead of sweeping all the way back to 0.

    • @robojax
      @robojax  2 ปีที่แล้ว +1

      Hello, I have tones of videos on servo. Here is how to find Specific TH-cam Video in a channel bit.ly/findTH-camVideo

    • @wishicouldarduino8880
      @wishicouldarduino8880 2 ปีที่แล้ว

      @@robojax awesome video! Thank you so much for making these.

  • @akashmukherjee2405
    @akashmukherjee2405 4 ปีที่แล้ว

    Hello Sir, I have a query. If someone has to connect multiple servo motors with different power voltages in this servo driver, then what should the person do?

    • @robojax
      @robojax  4 ปีที่แล้ว

      then just connect the servo GND and signal pin to this module. Use external power to the servo and it should work.

  • @dijitalkok374
    @dijitalkok374 ปีที่แล้ว

    Hello, I need your help with something. I have 20 servo motors and they move very fast. I have to slow it down.
    very slow. :). can you help me. thank you🙏

    • @robojax
      @robojax  ปีที่แล้ว

      Just add delay in the loop . Start with 100ms, and increase the number:. The higher the number the slower the movement. This video so erosion 3. Watch other version yo learn more

  • @parasyadav7742
    @parasyadav7742 4 ปีที่แล้ว

    Sie please a video on connection of 5 servo motor connected photentiometer please

    • @robojax
      @robojax  4 ปีที่แล้ว

      I have tutorial on how to control servo motors using Potentiometer; but not 5 of them, you can simply add more servos here are my videos on servo th-cam.com/users/robojaxTVsearch?query=servo

  • @bakemonduong6535
    @bakemonduong6535 2 ปีที่แล้ว

    How do I simulate this in Proteus, plz?

    • @robojax
      @robojax  2 ปีที่แล้ว

      that software is very expensive. I never go towards it.

  • @yhpyrl
    @yhpyrl 3 ปีที่แล้ว

    Hi... If I have 8 servo sg90 with pca9685 what power supply (volt and ampere) for these servo?

    • @robojax
      @robojax  3 ปีที่แล้ว

      Hi, in one of the versions I have mentioned the current. Voltage is very clear. whatever your servo needs that is the voltage. you can measure the current for ONE servo and multiply it by 8. Or watch wither V1, 2 or 4 if not mentioned in V3. I don't remember.

  • @dixiem2139
    @dixiem2139 3 ปีที่แล้ว

    Hello, i heard somewhere that it may cause some overheat with the pc. How do i avoid that??

    • @robojax
      @robojax  3 ปีที่แล้ว

      what over heat? you don't need pc to run this.

  • @เด็กช่างเขียนโค้ด

    How many amperes does your current power supply use?

    • @robojax
      @robojax  4 ปีที่แล้ว

      I did not measure it because every servo is different. Perhaps I have mentioned it V2 of this video the amount of current. The link to the video is in the description.

  • @lezbriddon
    @lezbriddon 4 ปีที่แล้ว

    emmm, I'm looking at building my own quadcopter flight controller based on esp32 or 8266 and i thought this would be a way to control the motors, but its so laggy i think it would fly like it was drunk....

    • @robojax
      @robojax  4 ปีที่แล้ว

      LOL. For quadcopter why would you use this PCA9685? both boards have 4 outputs for 4 motors and enough inputs for any 4 or 6 controller. By the way this is not laggy. it is the demonstration and delay that I've added . you can remove the delay.

    • @lezbriddon
      @lezbriddon 4 ปีที่แล้ว

      @@robojax yes sorry typed quad but i only like octo's, 8 flight motors, 3 more motors on camera gimbals for position, camera control motors for focus/zoom, servos for landing gear to retract out of way of camera, theres not enough pins without expanding. obviously the i2c can handle extra input devices because you need all the sensors/gps

    • @robojax
      @robojax  4 ปีที่แล้ว +1

      then use this and it should work. the lagging is due to running 32 servo. in your case 8 servo/motor will make it 4 times faster and you should not notice the delay.

    • @lezbriddon
      @lezbriddon 4 ปีที่แล้ว

      @@robojax yeah I think the mass of the chassis should dampen out the tiny lag and that's after prop mass which will be another damping factor. The quadcopter community has forgotten about heavy lift builds and there all into fast race fpv but I want to get licenced and do building photography and surveys

  • @Askaakash02
    @Askaakash02 4 ปีที่แล้ว

    Can you make 16 channel servo control through wifi web server.esp8266..

    • @robojax
      @robojax  4 ปีที่แล้ว

      Hi, I have on my list. Coming soon

  • @yeshacroe9354
    @yeshacroe9354 3 ปีที่แล้ว

    hello sir, can i use this for power adapter ?AC/DC Adapter Power Supply 30W 3v/4.5v/6v/7.5v/9v/12v Adjustable Voltage, Current: DC 3A

    • @robojax
      @robojax  3 ปีที่แล้ว

      this module needs 5V or whatever your servo voltage is. the current depends on how much servo motor and what kind you have. use multimeter, measure the current of ONE servo motor while it is running, then multiply it by the number of servo motor you have see V1, V2, V4, V5 of this video I have have given different examples there.

    • @yeshacroe9354
      @yeshacroe9354 3 ปีที่แล้ว

      @@robojaxsir thank you, ill follow your suggestion.

  • @Askaakash02
    @Askaakash02 4 ปีที่แล้ว

    Please can you make video pca9685 with esp8266 controller with wifi

    • @robojax
      @robojax  4 ปีที่แล้ว +2

      Hi, yes it is in my list. video is coming soon

    • @Askaakash02
      @Askaakash02 4 ปีที่แล้ว +1

      @@robojax thanks in advance 😘

  • @cliff0weird0
    @cliff0weird0 ปีที่แล้ว

    is there a global setting to adjust the speeds?

    • @robojax
      @robojax  ปีที่แล้ว

      Please watch version 1 or V1 if this video and then watch V2 which I have explained more features. This video is V3. Links in description of Thai video.

    • @cliff0weird0
      @cliff0weird0 ปีที่แล้ว

      @@robojax I watched them, i still dont see an easy way to slow them down.

    • @robojax
      @robojax  ปีที่แล้ว

      simply add delay in the loop like delay(50); or less or more. right now delay is 0 so it is fast then delay(10) will slow it by 10 milliseconds. and delay(50) will slow it by 50ms.

    • @cliff0weird0
      @cliff0weird0 ปีที่แล้ว

      @@robojax i have 40 servos that need to move in unison. If i add delays or loops even, they get too delayed. for example, i need servos 0-4 to move to 90 degrees at the same time. then, i need 0-4 to move to 70 degrees and servos 5-14 on board 1 and 1-15 on board 2 to move to 90, all at exactly the same time. they all get delayed weird if i try loops and delays to slow them. even at full speed they dont move in unison.

    • @cliff0weird0
      @cliff0weird0 ปีที่แล้ว

      also, thank you so much. your videos got me down the right path. I know anything about this till i found your stuff.

  • @kostassomataridis3141
    @kostassomataridis3141 4 ปีที่แล้ว

    Thank you very much for your videos. The only thing I didn't like is your new hair. Have a haircut and continue the good job.

    • @robojax
      @robojax  4 ปีที่แล้ว +1

      LOL. You are welcome. Sure I will.

  • @nifeslikek7613
    @nifeslikek7613 3 ปีที่แล้ว

    எனது சேனலுக்கு குழுசேரவும். ஒரு சந்தா உடனடியாக பதிலளிக்கப்படுகிறது