Complete guide to PCA9685 16 channel Servo controller for Arduino with code Version of 5 ( V1)

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 มิ.ย. 2024
  • This video is complete guide to using PCA9685 16 channel Servo controller for Arduino.
    This is Version 1. I have created V2 for 16 servo and V3 for 32 Servo. the links are below here.
    Get this 360 Amazing Rotating Dashcam : bit.ly/360Dashcam
    Subscribe To my channel now bit.ly/rj-subscribe
    ** Purchase Arduino Start Kit **
    Amazon USA: amzn.to/3z88F9G or just UNO board amzn.to/3aY7KOL
    Amazon Canada: amzn.to/31an88J or just UNO board amzn.to/3pYxSNN
    Amazon Europe (all Europe): amzn.to/3pMCHge or Just UNO board amzn.to/2PgGItD
    AliExpress: s.click.aliexpress.com/e/_9uc7Xe
    Banggood: www.banggood.com/custlink/3GD... or UNO board www.banggood.com/custlink/vKm...
    eBay: ebay.us/B1JWLi
    ***** Purchase Authentic Arduino Uno from ***
    Amazon USA: amzn.to/2KApAwK
    Amazon Canada: amzn.to/37LZ8sW
    All Europe Amazon: amzn.to/36YDSzn
    *** Free Course ***
    Arduino Step by Step Course (over 100 lectures) Starts here • Lesson 00 What is Ardu...
    The best thank you for me is to not skipping ads and Subscribing 🔔 to my channel, and liking 👍 the video. It is greatly appreciated. 🔔 😊.
    I will reply to all Subscriber's 🔔 questions. So make sure to Subscribe.😊 .
    Download the code, the manual and the library for this video: robojax.com/L/?id=269
    ** Buy PCA9685 from **
    Amazon USA: amzn.to/3iHSrfr
    Amazon Canada: amzn.to/36bimXF
    Amazon Europe (All) : amzn.to/32h71DB or amzn.to/2Mk78sT
    Banggood www.banggood.com/custlink/Km3...
    ** Buy Servo Motor from **
    Amazon USA: amzn.to/3m6Cmkr
    Amazon Canada: amzn.to/2JdM5GK
    All Europe Amazon: amzn.to/36YDSzn
    AliExpress (single servo): s.click.aliexpress.com/e/_ApIWoQ
    AliExpress (4/5/20pcs metal gear): s.click.aliexpress.com/e/_AFMrG
    *** Purchase Authentic Arduino UNO from ***:
    Amazon USA: amzn.to/36YDSzn
    Amazon Canada: amzn.to/3jxw4JW
    All Europe Amazon: amzn.to/36YDSzn
    Related videos:
    V5 Video Controlling 32 servo using ESP32 with WiFi • Control 32 Servo over ...
    V4 Video Controlling 32 servo using ESP32 (no WiFi) • Complete guide to PCA...
    V3 video of PCA9685 how to control 32 Servo motors • Controlling 32 Servo U...
    V2 Video of PCA9685 different ways to control Servo motors: • Control 16 Servo motor...
    V1 Video introduction to PCA9685 to control 16 Servo • Complete guide to PCA...
    Jump to different section of this video
    00:00 Details of the module with chip PCA9685
    06:14 Adding library needed for the PCA9685
    07:14 Loading the example code
    07:35 Code explained
    11:31 Simplified Arduino code for PCA9685
    12:00 Finding minimum and maximum value for your servo
    18:27 Mapping pulse angle to pulse width
    20:05 Creating separate method for mapping
    20:55 Using for loop to test all angles for mapping
    If you found this tutorial helpful, please support me so I can continue creating content like this. You can support me via PayPal: bit.ly/rj-paypal
    How to use a breadboard (video) : robojax.com/L/?id=121
    Tutorial by Ahmad Shamshiri form Canada
    ****************************
    Arduino Step by Step Course (over 100 lectures) Starts here • Lesson 00 What is Ardu...
    Learn Arduino in 30 Minutes (video): robojax.com/L/?id=135
    ****************************
    If you found this tutorial helpful, please support me so I can continue creating contents like this. Here is PayPal link paypal.me/robojaxTV
    Follow me on Facebook robojaxTV
    Follow me on Twitter: / robojaxtv
    Follow me on Instagram: / robojax
    Tutorial by Robojax.com
    Get other projects code and learn Arduino
    robojax.com/learn/arduino
    #robojax #robojaxPCA9685 #robojaxEXP32
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @benjaminsalasek1611
    @benjaminsalasek1611 5 ปีที่แล้ว +26

    Thank you so much! This is one of the most well made tutorials I've seen for Arduino guides.

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

      You are very welcome. I am glad you found it useful.

  • @rjinnh3933
    @rjinnh3933 4 ปีที่แล้ว +10

    Good info. Lots of detail. You provided a foundation for anyone to start operating servos successfully from day one.
    Thank you.....

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

      You are very welcome.

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

    This is the best video on this subject.. everybody else just uses the example and does not explain how to break it down and use it for your own project… subbed and like your teaching method

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

      Glad it was helpful! Thanks.

  • @tbrandx2
    @tbrandx2 2 ปีที่แล้ว +7

    I see that you made this a while ago but I want you to know it's still of great value. I love being able to follow your coding and by producing the same results I'm finally figuring out how to best use the PCA9685 for my robot project.

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

      I hope it is useful to you. this video is Version 1 (V1) but this series goes up to V5 and in each I have shown different tips, codes and tricks that might be useful to you. The inks to those videos should be in the description. good luck.

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

    Many thanks dude! I was going to become desperate :D I wanted to build servo controled points for my model railroad and every tutorial I found was way to complex. Your explanation was easy and the bare minimum to understand the shit :D Again many many thanks. You saved my night sleep ;)

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

    Nice work Ahmad. The tuning of the servoswas well explained.

  • @robertrobert5583
    @robertrobert5583 5 ปีที่แล้ว +9

    Excellent tutorial - very well prepared and presented. Thank you for making and sharing this video and your code.

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

      You are welcome. I am pleased you found it useful.

  • @christiane321
    @christiane321 2 หลายเดือนก่อน +1

    Aloha RJ, I know this is video is awhile back and just watched it today 2024 and I have learned a lot! Thank you so much for sharing your video. I have donated to support you.

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

      You are so welcome! Thanks for your donation. I appreciate it.❤️

  • @LunaofSkyfold
    @LunaofSkyfold 4 ปีที่แล้ว +6

    This was an excellent video, exactly what i needed!! Thank you!

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

      You are welcome. I am glad you found it useful.

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

    Thanks man! you made a lot of things clear!

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

    this the most detailed PCA9685 video out there, which also explains what each pin to beginners like me. thank you so much.
    1. would it possible for you to make a video of how to control multiple servos at once rather than running one at a time using PCA9685?
    2. how to mod this same servo for 360-degree rotation so we can control using PCA9685

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

      You are welcome. I am glad you found it useful.
      1-I have the request from so many people. I will make it when time permits
      2-the 360 servo is totally different kind of servo. This module can't be used for that purpose. You may watch my videos on 360 servos here th-cam.com/users/robojaxTVsearch?query=360

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

    Wow thank you so such for this video, I am new to the world of the Ardrunio and I am trying to build automatic blast gate control system for my wood shop. This video has helped me with the servo shield.

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

      You are welcome. Good to hear that. Please share.

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

    This is a gem, keep up the good work sir.

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

      Thanks. I will. Make sure to watch v5 which all wireless

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

    Thanks very much for that. I was about to give up on the adafruit library, now it makes sense

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

      Glad I could help! This is Version 1. there are V2, V3 and V4. The links are in description.

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

    Awesome video, building up from the foundations.

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

      Appreciate it!

  • @micheldesgagne75
    @micheldesgagne75 3 หลายเดือนก่อน +1

    Merci. Très apprecié. From Québec, Canada

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

    Superb explanation in very details. Thank you so much.Excellent job.

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

      You are welcome.

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

    I'm thinking I want to build a servo madness bot. Good video

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

    Hello, thanks for your help !
    I just have one question: How could I combine the Arduino librairy of the PCA 9685 and the librairy StandardFirmata since my code is written in Python ?

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

    thank you, the experiment in the video teach me slowly and easy to understand.

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

      You are welcome!

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

    Sir thanks I rechecked the program and saw all 4 video of your I have sucussfully progranmed my bipend robot thanks for the help

  • @AngryRamboShow
    @AngryRamboShow 5 ปีที่แล้ว

    Papa Robojax, you can add the _adafruit pwn servo driver lib_ through the *Arduino IDE.*
    Within Arduino IDE add .zip libraries to your included libraries by going to the menu bar: _Sketch/Include Library/Add .ZIP Library..._ and then navigating to the folder you have the _.zip driver lib._ Makes things a bit easier, when you just drop the .zip file on the desktop, and add it thru the IDE, instead of digging through the IDE folders manually.

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

      thank you mama 1085243, I prefer putting it manually becuase it would be in the same folder as the "arduino" and in the future you can copy all together. but if you use the menu, it will go under the "my document" which I don't prefer. I have mentioned that from time to included it using the menu like this video th-cam.com/video/7RQ8QoJWhpY/w-d-xo.html or this th-cam.com/video/L6ekl2ABcuY/w-d-xo.html

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

    fantastic video, Super Helpful!

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

      Thank you.

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

    lovely organized, cheers!

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

      Thanks. you have question or needed custom code, this is Version 1 or V1, there are 4 more versions of this module. link is below this video or just search my channel . Cheers. and yes, your subscription is great help. Thanks

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

      @@robojax I am having issues with the Hiletgo PCA9685 servo controller. I have checked everything with the multimeter, have the proper external power, checked the wiring, and checked each servo, so I believe the issues to be related to software. I have used both the HCPCA9685, PCA9685, and the Adafruit version, but neither seem to be working. Is there any that you suggest for this brand?

  • @dezzodarling
    @dezzodarling 6 ปีที่แล้ว +2

    Thank you for your explanation. I am curious as to why you used "delay" instead of "millis" as this only allows one servo sequentially. Is the power enough for multiple servo operations??

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

      millis is number of milliseconds since the program started. I just needed the program to give certain time delay to show movement and then start another one.
      The servos I used were without load and it was enough. But if you make all servos do something, then the load will increase.

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

    Wow finally and automated one that you don't have to use a controller to make it move

  • @nachumtwersky7206
    @nachumtwersky7206 3 ปีที่แล้ว +2

    Thank you so much for this amazing video. What would you recommend one do if he wanted to connect 18 servos. Is there anyway to connect two of these boards together for the extra channels?

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

      you are welcome. this is just version 1 V!, I 've V2, V3 and V4 of this up showing you everything you many options. check the link in the description

  • @Anowar-Hossain-
    @Anowar-Hossain- 4 ปีที่แล้ว +1

    By the way I am a big fan of your channel.

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

      Thank you very much for being my fan.

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

    Very informative, thank you!

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

      You are welcome.

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

    Great video! Thank you ❤

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

    This is a great tutorial! Thank you for being so thorough!
    Can you do a video tutorial on powering multiple pwm boards with one power source? Using your 4 board example, how to power 64 servos, 4 pwm boards with one power source.

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

      You are welcome. I have in my "to do list" to make video with 32 servo which viewer learn to add more. I am not sure when.

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

      Robojax looking forward to it.

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

      @@robojax do it please I love your build 😘 YOU ARE AMAZING MAN

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

    Well done! Thanks!

  • @retired_man_about_town
    @retired_man_about_town 3 หลายเดือนก่อน

    Sir, I have watched this video several times now and it really helps. I'm using a nano connected to the pca9685, is there any way of smoothing out the movement of the servo arm? Thank you.

  • @kkrazius
    @kkrazius 6 ปีที่แล้ว

    Great video. Thank you!

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

      You are welcome.

  • @DungNguyen-qy3yz
    @DungNguyen-qy3yz 5 ปีที่แล้ว

    I have a hexapod with Tiva C-TM4C123GH6PM controller. It has 18 servos so I will connect 2 PCA9685 with 18 servos and the controller, the controller will send a {[6];[3]} matrix of "pulselen" to PCA through I2C connection and PCA will convert each element to separate PWM signals right? Is it the right way?

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

    Very good instruction. Thanks

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

      you are welcome. Few weeks back I published my Arduino course worth $200 on Udemy. Arduino Step by Step Course (over 100 lectures) Starts here robojax.com/L/?id=338

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

    Thanks for the video. How do you turn more than 1 servo at the same time?
    Edit: Oops didn't see the video where you controlled more than 1 servo at the same time. Thanks, keep it up.

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

    amazing video....very well explained !!I'll be chaining 20ish of these guys together.... however (correct me if i'm wrong ) i've heard you can't run Led's and servos at the same time on this board ( one or the other) ... as all channels share a common frequency...

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

      I am glad you found it useful. Thank you

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

    Great job!

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

    Hi, Thanks for your great video . Im just wondering whats the maximum number of servos can you control using multiple of this board (PCA9685)? for example can I control 600 servos? Thanks.

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

      You are welcome. You can connect 4 boards 4x16= 64 servo I have explained it at 4:42

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

    Having a peculiar problem with my recently bought PCA9685 (same as the one you demo with low power mosfet). WITHOUT connecting to any external controller yet, i plug ext power 4.8V (from fully charged 4 NiMH AAA batteries holder) to the green block. No servo connected yet. Tested with multimeter ON ALL the V+ ... only getting 1.7V and not 5V. Then using multitester.. tested on the MOSFET and capacitor, but got about 5V.
    Any reason why?

  • @LuigiLorenzi31
    @LuigiLorenzi31 5 ปีที่แล้ว +2

    Thank you it was very useful! I still can't figure out how to reduce the speed of the rotation because the delay() function is not effecting it.. Can you help me out? Thank you very much!

    • @RoboW123_
      @RoboW123_ 5 ปีที่แล้ว +2

      Is it possible that you placed the delay() function outside of the for loop for controlling the servo motor? If you are trying to alter the speed at which the servo rotates the delay needs to be inside the loop so that each time the for loop iterates it delays for a certain amount of time, thus slowing or speeding up the rotation speed.

  • @Marcel-cr7vy
    @Marcel-cr7vy 5 ปีที่แล้ว

    Very interesting video, Robojax.
    I have an application with servos driving delicate mechanisms. After a shutdown, my servos (all of them as a matter of fact) jerk briefly when resuming power. The movement is brief, but its amplitude is enough to damage my system. Is there a way to overcome the phenomenon by tweaking your program ?

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

      Thank you Marcel. Very interesting issue. Does this happen when powering up or does this happen also when you press the reset button Arduino?
      If you don't see the issue when you press reset, then add 2 second delay in the setup() just after setup so the motors don't get any power.
      let me know.

  • @m.figueiredo4388
    @m.figueiredo4388 5 ปีที่แล้ว

    Hello! Thank you for the video. If I use 12 servos simultaneously, how should be the supply charge of amperes?

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

      You are welcome. If you wanted the amount of current, first measure the current using Ampermeter for one servo and multiply it by 12.

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

    Thank You for the great tutorial. I just subscribed to your YT channel, I will be watching every one of your tutorials.. Please, keep feeding us your knowledge and expertise

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

      Thanks for subbing!

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

      @@robojax The code doesn't work in PlatformIO, but I'll adjust it to work,
      Has to do with: for( int angle =0; angle

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

      Never head of PlatformIO

  • @manishvlogpb
    @manishvlogpb 6 ปีที่แล้ว +3

    Very good... Impressed... Good job... If i want add same 9g servo 4 pc for my rc plane how much current i have to supply to the board?

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

      Thank you. For each servo the idle current at 5V is 100mA and 500mA in stall mode. Read more here: www.addicore.com/FS90R-Servo-p/ad314.htm

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

      those servos are absolutly awful, don't buy them

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

    Like they say - excellent, thanks

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

      You are welcome.

  • @slimfaidy
    @slimfaidy 5 ปีที่แล้ว

    thank you so much this video helps alot

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

      You are welcome Fadi. Ahmad from Canada.

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

    سلام
    ممنون اقای مشیری بابت ویدئو تون
    من دنبال کنندتونم

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

      وعلیکم السلام. تشکر از اینکه از مشترکین مجرایم (کانالم) هستید. خوشحالم که ویدیو را مفید یافتید.

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

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

  • @emjds
    @emjds 5 ปีที่แล้ว

    Very interesting. Now I beginning to like building one robot.

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

      Happy robot building.

  • @infinytower3317
    @infinytower3317 5 ปีที่แล้ว

    Very nice! Now it’s clear to me how SERVOMIN/SERVOMAX works! Thanks a lot!
    One question; I am trying to control 9-10 servo’s individually through a 3x4 matrix numeric keypad. Will there be a way to [toggle] control of a servo state, e.g. press ‘1’ to get the servo to s designated angle then press ‘1’ again to get the servo back to angle zero? You advice would be much appreciated!
    In Arduino only situation, I could use the sketch to achieve his,
    e.g. case PRESSED:
    if key==‘1’ {
    digitalWrite (ledPin, !digitalRead (ledPin));
    - - -
    I am looking for an equivalent code...

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

      You are welcome. Here is my video on how to control servo with push button th-cam.com/video/7woqNH_qby4/w-d-xo.html

    • @infinytower3317
      @infinytower3317 5 ปีที่แล้ว

      Robojax Thanks for your kind reply. I think, however, I already watched your video you recommended. In that video, you demonstrated two-button control of a servo with an Arduino board. But I need to control 8-9 servo’s so it would exceed Arduino’s PWM capacity. That’s why I am planning to use 16-ch PCA9685 based shield.

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

    Thanks for the great video! Will the same make and model servos have the same settings?

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

      You are welcome. Yes. they do.

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

    Hey very good video, but I have a question. Do you know why the board has a capacitor? Or could you explain for which situation I would need one? My board came without one.

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

      when servos STARTs and stop this sudden start causes the power supply voltage to drop a little and if you have capacitor connected to the power supply which is already charged, it resists the voltage drop by supplying power to the board. .

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

    Thank you for your videos! It's clear and useful! Good work! I'm working on a project with 27 servo, all works! I would like to run all the servo at the same time but with different speed and degrees (random sweep)... I've no solution for the moment with the Loop fonction "for"... Any ideas?

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

      you are welcome. This is Version 1 (V1) and there are V2, V3 and V4 with different examples. Please watch those.

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

      @@robojax Thanks for your reply! I saw all the videos, but I don't find easy solution for running all motors in random programmation (degrees and speed)...

  • @romds9876
    @romds9876 6 ปีที่แล้ว

    Enjoyed your tutorial! Do you happen to have Arduino sample code, to use potentiometers, to control the servo's, that you can share? Using the same I2C setup, that is in the tutorial above?

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

      Thank you very much. I will try to make a video and post the code. I have to test it and make sure it works before posting it.

  • @pierrevanovermeire
    @pierrevanovermeire 5 ปีที่แล้ว

    Thought to have seen somewhere by Adafruit that this Board may be connected at 5V 10A . Is this correct?
    My servo's use each max 510mA , so 12 pieces = 6120mA = 6A. In this case I have still enough to LEDs and DF player.

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

      the current (amper) has no effect on the device it is higher. Only if motor needs more current it will be problem.

  • @RaviMeena-xf5ks
    @RaviMeena-xf5ks 5 ปีที่แล้ว +1

    i am trying to connect 4 pwm boards and 1 bluetooth module to arduino mega
    if possible can you help me with code

  •  4 ปีที่แล้ว

    thx very much, helpfull in year 2020 too.

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

      you are welcome.

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

    Is it possible to only connect the pwm signal wire and power the motor with seperate higher current power source (for larger motors)?

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

      Yes you can.

    • @activechaos128
      @activechaos128 6 ปีที่แล้ว

      Robojax awesome. Thanks for the reply.

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

    This tutorial was AMAZING!! Do you know how to trigger the loop with a button press? I can't figure it out!

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

      Thank you. I would have to make tutorial video on that.

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

      Use a control variable to do that.
      You could use something like this:
      boolean running = false; // this is the control variable
      if(button == LOW){ // this is the way to start the loop with the click of the button
      if(running == false){
      running = true;
      }
      }
      delay(200);
      while(running == true){ // this only triggers once you've pressed the button, because once you've done it, the running variable is going to be set as true.
      if(button == LOW){
      running = false; // this is the way to stop the loop with the same button once it has started
      }
      put the loop here
      }
      what happens here is:
      the first time you click the button the loop will start and it will run continuously until you press the button again. Notice: this method does not stop the for() loop itself, it just keeps it from repeating. Ex: You press the button, the for loop starts to run, and if you press the button again, while the for() loop is running, the program will wait until the for() loop ends, and then, it is not going to repeat the for() loop again until you press the button again. If you just press the button once, the for() loop will just repeat itself forever(or at least until you press the button again);
      Idk if my explanation was very clear, in case it wasn't, just reply to this comment with your question and you'll try to help you. Obs: Once you've learned how the code above works, you can use the main idea of it to control any and how many loops you want. At least, that's the way I do it. It might not be the best way to do it, but for me, it is the most simple one.

  • @user-ef6hm4mw5u
    @user-ef6hm4mw5u 3 หลายเดือนก่อน

    Hi, I have watched the other servo videos. Nothing shows how to control the pca board with a voice module. I thought If I removed the code for the push button switch (v3 video) I could code it using the OE Pin. Or am I looking at the problem all wrong. Confused myself.

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

      Hi, of course I don't have any video related to voice control. But I have shown how to control with a signal or push button. just use the method and use the singal from voice module.

  • @AhmadBaniRamadian
    @AhmadBaniRamadian 6 ปีที่แล้ว +3

    helpful, thanks

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

      you are welcome. Salam

  • @doktordinkel8864
    @doktordinkel8864 6 ปีที่แล้ว

    Fantastic! I want to connect 4x mg995 servos to the Pca9685, and they draw 1200mA in stall mode, what kind of power source should I use? Could I just connect batteries in parallel? Thanks! Great tutorial!
    Edit: I have a pretty limited budget...

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

      so you should connect 1.3A or 1.5A power adaptor. Battery would be expensive but doable.

    • @gauravkale9753
      @gauravkale9753 5 ปีที่แล้ว

      Can i drive a 60kg cm servo which requires 7.7v input on this board i want to drive 12 such motors will the module get burned or something else

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

    Hello ! Really nice tutorial ! I was thinking, can I use this driver to drive multiple high torque servos, which usually operate at 7.4V ?

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

      Hello, if you paid attention to the video, it should be no problem. just power the board with 5V and power up your servo with the 7.4 or any other different power.

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

    Thank you for this video, it's great! May I ask, is it ok to feed different voltage value to each PCA9685 when using multiple PCA9685's that is daisy chained? Because I will be using different servo sizes and grouped similar servos together in different PCA9685's. That would mean, I would be supplying one PCA9685 with 5volts, and the next PCA9685 with 7.5 volts, and the next PCA9685 with 12 volts. Is this ok? Thank you again:)

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

      You are welcome. Yes each servo can be powered up directly from different source as long you connect the GND of your power to the board and the signal signal pin of servo the board.

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

      @@robojax Great! Thank you:)

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

    Great work thank you so much! I have a project that needs 100 servo and need to somehow chain these

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

      you are welcome. This video is Version 1. I've got V2 with different code demonstration, V3 with 32 servo and V4 to control them over WiFi the link is under the description of the video.

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

      @@robojax amazing I'm subscribing :D 1. can I use a raspberry pi to send signals instead? 2. Is there something that goes up down instead of rotating like those servo?

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

      PCA9685 has registers that can communicate using I2C protocol. 1-you have to look at datasheet to know how to read and write using raspberry pi. 2-I am not sure if I understood it correctly, but if you want up and down, isn't that you just rotate to the left or right and it will go up and down? thank you for subscribing.

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

      @@robojax oh hey thank you very much for the reply. I'll look into that. What I needed was an actuator. I am learning from scratch. :)

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

    love u, the best

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

      ❤ you too

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

    Hi, I have a question: If I have 4 servos that needs 7.2V and 1A, and I use a power supply of 10V 6A (V+), the board will give to each servo the voltage and current that it needs, or I have to use resistances than reduce 10V to 7.2V?

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

      This board does not change the voltage or current. You would have to use a servo with proper voltage source for it.

  • @xzevious69
    @xzevious69 5 ปีที่แล้ว

    Great tutorial

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

      Thanks.

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

    Great video! Thank you.
    Questions:
    1. What do you use to supply power to the servos (current)?
    2. Can I use the same code on ESP32?
    Cheers!

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

      Hello,
      1-measure the total current for your servos and connected a power supply accordingly. this I have connected a 5V power supply that could up to 60A but you don't need that. you need whatever you measure when the servos are running under the load.
      2-You are watching Version 1 (V1), I have 3 more versions of videos of this module link is in description. Always check description I have it it for ESP32. Or search my channel for more cool projects. Here is how to find Specific TH-cam Video in a channel bit.ly/findTH-camVideo

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

      @@robojax Thank you!
      For powering a couple of servos (not too much load), can I used like 4 C batteries, at least to start with?
      Maybe use something like a buck converter to increase current, if needed?

  • @LMGRedacted
    @LMGRedacted 5 ปีที่แล้ว

    Im curious, how do you code it to where you can toggle the servo actions on and off? Like I have it running continuously but I don’t know how to make it start and stop when I want it to.

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

      Hi, watch my video on how to control servo with push button. th-cam.com/video/7woqNH_qby4/w-d-xo.html

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

    Thank you so much sir.

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

      You are very welcome. Please subscribe. It is appreciated.

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

    Thank you for an interesting video. I am building a Model Railway in OO scale. I want to control the 32 points that are in the design for the layout to be controlled by servos mounted under the board. So, I need to be able to control each one separately using a one-touch switch. Two things I need to know, which and how boards do I need and wherein the circuit do I insert the switch. The servos will all have the same amount of travel, left and right. So can just one program be copied to all 32? Regards, Martin (Thailand)

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

      You are welcome. You don't need another Arduino. Just two of this boards and conect only ONE to Arduino. You will connect one board to the other (cascade them). I have explained this in video. watch it again. You will set a value in the code as well.

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

    Do you have any idea on how could i supply the 5V to the PCA9685 board considering the fact that i need it to put it in a portable 3d printed robotic hand....? I hope you cand help me with this. Great video !

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

      Hello (first hello or hi), measure the current for one servo while the servo is motor working and moving the load (under the load). then multiply the amount by the number of servo motors. Then get 5V power module.

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

    Great video! A lot of details and well explained!
    So i will need 2 batteries in order for this to work, one for the UNO and one for the PCA9685 right? Both 5V.
    Thanks!

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

      NO. if you use battery then ONE 5V for both. I mentioned separate 5V because people connect the 5V from Arduino to this.

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

      @@robojax So I need just 1 5V battery and then i connect the battery to which one of the boards? I think i misunderstood... Thanks for the asnwer and for the help! :)

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

      You are welcome. If say anything else, it means I would have to type whatever I said in the video. Please watch it without skipping.

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

      @@robojax I watched it twice man, it's not you it's me :) i get confused when you talk about 2 batteries for 2 boards. Being a beginner in hardware AND english, this is not easy for me. Hope i will find an answer! Thanks for all the learning material! :)

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

    Thanks for the helpful video! Can you provide a link to those wires that you used when connecting the PCA9685 to your Arduino?

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

      This video has 4 versions and this only version 1. I have clearly shown it and explained it . No wiring diagram. If you need it for projects, use fritzing a free software.

  • @av03
    @av03 6 ปีที่แล้ว

    Perfect and thank you

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

      You are welcome.

  • @atmega64
    @atmega64 5 ปีที่แล้ว

    thank you so much!
    only one question - question about speed control is still relevant - how to do it?

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

      You are welcome. Each servo has pre-determined speed (quality and price) and can't be set.

    • @atmega64
      @atmega64 5 ปีที่แล้ว

      @@robojax yes, I know.
      i mean may be that library (or may be you can advice another) have methods for solving that typical issue

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

      @@robojax hey :)
      if I can use loop for pulse increasing? for ex:
      pwm.setPWM(0, 0, cnt++);
      ... or that kind of trick will bring delays?

  • @weerobot
    @weerobot 5 ปีที่แล้ว

    Awesome work...

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

      Thanks

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

    Thank you for a great video! What is the best power source to get 5v?

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

      it depends on the type of servo motor and how many you use. measure the current of one servo motor when load is connected to servo motor for example you measured the current to be 0.5A and you wan to use 10 servo then 0.5x10=5A to be save get a power supply with at least 6A or 7A.

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

    Is there anyway to read the servo position like servo.read() from the servo.h library?

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

      The servo does not send any information back. Until you send another signal, would know the position as "angle" variable. But you can store the position of each servo in an array.

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

    I have wired my arduino Uno R3 the same as you to the PCA9685. I get no power to the either boards but when I put power to the arduino both boards light up. I have also hooked my arduino Mega in the same way and the same happens.

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

      Hi, perhaps you are connecting it incorrectly. Please watch it again or what other version of this module th-cam.com/channels/kcBSig_Iu4ZnAIeCeG1TVg.htmlsearch?query=pca9685

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

    Marvelous explanation with simple language. I just wanted to know whether I can use PCA9685 to control 3 servo motors, 10 LED's (only ON/OFF) with the help of may be 2 or 3 buttons (ON/OFF switches)? If so, could you please give some guide lines as to program (Sketch). Thanks in advance.

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

      Hello, you can connected LED or servo does not matter. You've watched Version 1 (v1) of this series, there are V2 to V4 the link is in the description where you see more options and ON/off push button.

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

      @@robojax Thanks Mr Shamshiri for your help.

  • @xiaohan9634
    @xiaohan9634 5 ปีที่แล้ว

    Thank you very much!

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

      You are welcome.

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

    i see servos move individualy each time. But can be moved all of them at the same time?

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

      I have created V2 of this video where you can control all other once. The link is in the description. I have made V3 with 32 servos.

  • @alvaro.makes.music1
    @alvaro.makes.music1 5 ปีที่แล้ว

    I was wondering... do you need to use any other component to protect the arduino from the "blowback" voltage of the servos? Is this driver already protecting the arduino? Thanks

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

      No you don't need it. There is already components inside the servo.

    • @alvaro.makes.music1
      @alvaro.makes.music1 5 ปีที่แล้ว

      Okey, thank you! And great tutorial

  • @diaaessam5540
    @diaaessam5540 5 หลายเดือนก่อน

    I have two batteries each one is 7.4 V, should I connect one of them to the arduino and the other to the PCA?
    Also is using 3.7 V battery for PCA to control 12 motors enough or not?

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

      For arduino the dc adapter input can accept up to 12V. For the PCA connect power exactly the same as your servo motors voltage. If servo is 9V then connect 9V for example.

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

    thank you!!!

  • @raywaltdecuba5699
    @raywaltdecuba5699 5 ปีที่แล้ว

    Can i put the pwm.setPMW.(0,0,0); variable in a array?
    I'm building a quadruped and was wondering if i can minimize my script for each leg placement by defining each leg placement as an array.

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

      yes you can. As long as array is defined after the pwm.....

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

    It was worth every minute now I can built my robot

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

      Good luck

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

    Hi, thanks for the video. I need to know if there is any way to disable the current on a servo with this librar y after it makes a move. I am using 15 servos and they make a lot of noise and vibrate. I think this would be a way to eliminate it. Thank you

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

      Hi, servos are independent. They just get PWM signal and other than that you can't have any other control. you can have delay between the pulse you send if you add it in the loop. other than that you can't do within Arduino. There should special servos where you could read the current and set the limit. But these servos are very simple.

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

      @@robojax Thanks for your answer. My idea is to do something similar to the dettach function in the servo.h library and stop the servo from receiving voltage.

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

      when sign is turn OFF, the current should be zero. Attached /detach only assigns pin and does not send any signal to servo.

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

    The minimum and maximum I found on my servos causes the rotation to be slightly more than 180 degrees, like around 195. Can I adjust the minimum or maximum so the rotation can be closer to 180? Will it matter that I'm not using absolute minimum or maximum?

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

      Of course you can adjust it. This video is version 2 , you may watch V1 videos o see how I have done it.

  • @ramakalyani9113
    @ramakalyani9113 5 ปีที่แล้ว

    Sir, can you please tell me if I have to connect two controllers, should I supply power to both the controllers ?
    And also, is it important to use only pwm ?

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

      No you don't have to. Just connect power to the first and then from V+ connect it to the next and the next will get the same power as the first module

    • @ramakalyani9113
      @ramakalyani9113 5 ปีที่แล้ว

      Thank you sir.
      And also, is using pwm important ?

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

    also the code that you showed at 17:00 angleToPulse its saying angleToPulse is not declared in this scope where in the video did you declare it and how did you do it please?

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

      it means you have not copied the code fully. Can you see the angleToPulse() at bottom of the code?

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

    Amazing video, however my servo motors are not rotating. I'm using an arduino mega 2560 and the code uploads but nothing happens after. I have ordered an arduino uno in hopes it will work. I'm not sure why my mega 2560 isn't able to control it?

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

      It should work with mega. You have be doing something wrong. I am not sure .

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

      @@robojax Thank you for responding. I followed all the steps you took. The only difference is i'm using a mega 2560 and the adafruit library I downloaded is on 1.8.13 instead of yours which is on 1.8.0. For example you only have 2 #defines in your code but the one i downloaded has 5 #defines. Under #define SERVOMAX 600 it says #define USMIN 600

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

      Please download the library from robojax.com as the library might have been changed.

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

      @@robojax I used robojax code and it still did not work, I also tried retyping it which didn't do anything. I also tried a different set of code but nothing happened. Im starting to think there is something wrong with my pca9685, I guess ill keep trying different things. Thanks again for your help!

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

    Can you move multiple servos with this extension board at the same time?

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

      Yes. I have explained that in the video. Please watch it again.

  • @OspreyLanthrax
    @OspreyLanthrax 5 ปีที่แล้ว

    Hi. Can this board also work with a Wemos D1 mini V3.0.0? Since it does not have A4 and A5 pins, can I just use D4 and D5 (or some other digital pin)?

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

      Sorry I just got your comment due to availability of TH-cam tool that tells me which comments I have not replied. Hi, yes it can work. You can watch this video to connect to SDA and SCL ping of ESP8266 (aka D1 Mini or Nodemcu) th-cam.com/video/mRAgS-CdURU/w-d-xo.html

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

    how would I go about making a number of servos connected with this module, be controlled by two forward and reverse push buttons for each servo.

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

      you can learn from my other videos how to use push button with servo here th-cam.com/users/robojaxTVsearch?query=servo

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

    im trying to figure out how to reverse a servo so that I can use 2 servos for a joint, one will be operating backwards. So its position will be negative to the standard PCA9685 code. Is it really as simple as using negative degrees? like -45 to -135? How would I do it using python/opencv in visual studio code?

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

      I have series of video with many codes. This is version 1 or V1 , please see v2, v3 or v4 yo see if one of them is working for you

  • @benhjertmann
    @benhjertmann 8 หลายเดือนก่อน

    Can you guve an example of an adequate power source for the module?