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

  Рет қаралды 266,751

Robojax

Robojax

Күн бұрын

Пікірлер: 537
@jamesmoon5632
@jamesmoon5632 Жыл бұрын
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.
@benjaminsalasek1611
@benjaminsalasek1611 5 жыл бұрын
Thank you so much! This is one of the most well made tutorials I've seen for Arduino guides.
@robojax
@robojax 5 жыл бұрын
You are very welcome. I am glad you found it useful.
@tbrandx2
@tbrandx2 2 жыл бұрын
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.
@rjinnh3933
@rjinnh3933 4 жыл бұрын
Good info. Lots of detail. You provided a foundation for anyone to start operating servos successfully from day one. Thank you.....
@robojax
@robojax 4 жыл бұрын
You are very welcome.
@christiane321
@christiane321 6 ай бұрын
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 6 ай бұрын
You are so welcome! Thanks for your donation. I appreciate it.❤️
@AkashJadhavIT
@AkashJadhavIT 5 жыл бұрын
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 5 жыл бұрын
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 kzbin.infosearch?query=360
@nachumtwersky7206
@nachumtwersky7206 3 жыл бұрын
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 жыл бұрын
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
@retired_man_about_town
@retired_man_about_town 7 ай бұрын
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.
@timfairfieldAETestandMeasure
@timfairfieldAETestandMeasure 3 жыл бұрын
Nice work Ahmad. The tuning of the servoswas well explained.
@LuigiLorenzi31
@LuigiLorenzi31 5 жыл бұрын
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!
@naeroforceofficial
@naeroforceofficial 4 жыл бұрын
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 жыл бұрын
@@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! :)
@voble
@voble 3 жыл бұрын
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.
@robertrobert5583
@robertrobert5583 5 жыл бұрын
Excellent tutorial - very well prepared and presented. Thank you for making and sharing this video and your code.
@robojax
@robojax 5 жыл бұрын
You are welcome. I am pleased you found it useful.
@klipphahn
@klipphahn 3 жыл бұрын
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 ;)
@leonardcornevin4794
@leonardcornevin4794 3 жыл бұрын
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 3 жыл бұрын
you are welcome. This is Version 1 (V1) and there are V2, V3 and V4 with different examples. Please watch those.
@leonardcornevin4794
@leonardcornevin4794 3 жыл бұрын
@@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)...
@mosaviadel
@mosaviadel 6 жыл бұрын
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 6 жыл бұрын
You are welcome. You can connect 4 boards 4x16= 64 servo I have explained it at 4:42
@dezzodarling
@dezzodarling 6 жыл бұрын
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.
@micheldesgagne75
@micheldesgagne75 7 ай бұрын
Merci. Très apprecié. From Québec, Canada
@briancreekmore9312
@briancreekmore9312 Жыл бұрын
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
@kamrunnahar1607
@kamrunnahar1607 4 жыл бұрын
Is it possible to use a smartphone to wirelesly control (With Bluetooth and Wi-Fi ) 16 servos with this board?
@robojax
@robojax 4 жыл бұрын
Yes. possible. I am working on it, subscribe so you get notification once video is upload.
@LunaofSkyfold
@LunaofSkyfold 5 жыл бұрын
This was an excellent video, exactly what i needed!! Thank you!
@robojax
@robojax 5 жыл бұрын
You are welcome. I am glad you found it useful.
@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. .
@silentroom8486
@silentroom8486 2 жыл бұрын
Wow finally and automated one that you don't have to use a controller to make it move
@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.
@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 жыл бұрын
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 KZbin Video in a channel bit.ly/findKZbinVideo
@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?
@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.
@manishvlogpb
@manishvlogpb 6 жыл бұрын
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 жыл бұрын
those servos are absolutly awful, don't buy them
@tesa4254
@tesa4254 2 жыл бұрын
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 ?
@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 жыл бұрын
You are welcome. Here is my video on how to control servo with push button kzbin.info/www/bejne/bajSooF-lNaVr5Y
@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.
@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 жыл бұрын
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.
@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 жыл бұрын
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.
@argststr
@argststr 4 жыл бұрын
Hey, this video really helping in my project, but I don't understand, why there is 450 address pulse (150-600). But in my imagination, servo work for 180 degree rotation, and I think it has 180 address or multiple by 180 (180, 360, 540, etc), 450 can"t divided by 180.
@robojax
@robojax 4 жыл бұрын
Hi, The value is "pulse width" and it depends on the MCU (Arduino) frequency. so I figured it out what pulse width would work best with Arduino. If you use different MCU, it would be different. By the way I have V2 of this video. The link in the description.
@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.
@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.
@diaaessam5540
@diaaessam5540 10 ай бұрын
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 10 ай бұрын
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.
@kaabilece4385
@kaabilece4385 4 жыл бұрын
thats a wonderful explanation. but with the original servo example, only one servo is moving but others are not, why is that so?
@robojax
@robojax 4 жыл бұрын
I don't have the code with me know, please use provided code or check latest videos on this kzbin.info/door/kcBSig_Iu4ZnAIeCeG1TVgsearch?query=pca9685
@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.
@dodgeledesma5889
@dodgeledesma5889 5 жыл бұрын
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 5 жыл бұрын
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 5 жыл бұрын
@@robojax Great! Thank you:)
@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.
@adipurnama_workshop
@adipurnama_workshop Жыл бұрын
thank you, the experiment in the video teach me slowly and easy to understand.
@robojax
@robojax Жыл бұрын
You are welcome!
@1biker4life
@1biker4life 5 жыл бұрын
Thanks for the great video! Will the same make and model servos have the same settings?
@robojax
@robojax 5 жыл бұрын
You are welcome. Yes. they do.
@PirateZomby
@PirateZomby 4 жыл бұрын
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 жыл бұрын
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.
@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?
@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
@activechaos128
@activechaos128 6 жыл бұрын
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 жыл бұрын
Yes you can.
@activechaos128
@activechaos128 6 жыл бұрын
Robojax awesome. Thanks for the reply.
@ChampouinetCharente-yt3uo
@ChampouinetCharente-yt3uo Ай бұрын
I’m working with an Arduino Uno R4 WiFi and a PCA9685 PWM driver module to control a servo motor. Although the Arduino IDE indicates that the code is running correctly and attempts to move the servo, the servo motor itself does not respond or move. This issue persists even though the code is properly uploaded and the Serial Monitor shows that the IDE is executing the code. Here’s what I’ve checked: I2C Connections: I have connected SDA and SCL from the PCA9685 to the corresponding SDA and SCL pins on the Arduino Uno R4 WiFi. I’m unsure if SDA and SCL should be connected to pins A4 and A5, respectively, but I’m using the dedicated SDA and SCL pins on the Uno R4 WiFi. I2C Device Detection: I used an I2C scanner code to detect devices on the bus, but nothing appears in the Serial Monitor. This suggests that the PCA9685 may not be detected on the I2C bus. Power Supply: I’m concerned about whether the PCA9685 and the servo motor are receiving sufficient power. Code Functionality: The code is designed to control the servo motor via the PCA9685 module. The code seems to be working as expected when run manually, but the servo motor does not move.
@TheFalconJetDriver
@TheFalconJetDriver 5 жыл бұрын
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 5 жыл бұрын
You are welcome. Good to hear that. Please share.
@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
@aalaal171
@aalaal171 3 жыл бұрын
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?
@AndyCurle-m3b
@AndyCurle-m3b 7 ай бұрын
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 7 ай бұрын
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.
@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
@SATODEN
@SATODEN 4 жыл бұрын
*** Update: The issue was that I am using MEGA. For MEGA SCL and SDA have designated pins It works now*** Firstly great video. I am running into a problem. My servos are not moving at all when they are connected to PCA9685. I tested it by directly connecting to Arduino and it works. I also have 5v outside power supply for PCA. I did trouble shoot everything that I can think of but running out of ideas. What could it be? Any input is appreciated.
@robojax
@robojax 4 жыл бұрын
hi, here are the pins for Arduino Mega. www.arduino.cc/en/reference/wire
@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!
@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 жыл бұрын
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 kzbin.info/www/bejne/bYO0aYSlf7ybprs or this kzbin.info/www/bejne/gmfInJ9odqeWq7s
@atmega64
@atmega64 5 жыл бұрын
thank you so much! only one question - question about speed control is still relevant - how to do it?
@robojax
@robojax 5 жыл бұрын
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 жыл бұрын
@@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?
@GaryMcKinnonUFO
@GaryMcKinnonUFO 3 жыл бұрын
I'm following this, using a bench PSU to power via the central power inputs, but even just raising the PSU to 2 volts starts to feed 250mA current, if i head toward 5V the PSU maxes out at 2 amps. What could be wrong, i've triple-checked wiring etc ?
@GaryMcKinnonUFO
@GaryMcKinnonUFO 3 жыл бұрын
My PCA9685 is dead, problem solved!
@robojax
@robojax 3 жыл бұрын
the amount of current depends on number of servo motors and types. some servo motors need more and some less. measure current of ONE servo motor while running and connected to the load or word it does. then multiply it to the number of servo motors. if you still get higher current, then either one or more servo motor is damaged or the servo motor has lower rated voltage.
@GaryMcKinnonUFO
@GaryMcKinnonUFO 3 жыл бұрын
@@robojax Thanks for taking the time to respond Ahmad, have a good weekend :)
@robojax
@robojax 3 жыл бұрын
you are welcome. Stay safe.
@GaryMcKinnonUFO
@GaryMcKinnonUFO 3 жыл бұрын
@@robojax You too sir, i don't know how it is in Canada, but the live data from the UK is in complete disagreement with government policy, which has now killed over 40K old age pensioners in care homes. I am on the war path.
@nhatho1723
@nhatho1723 5 жыл бұрын
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 5 жыл бұрын
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 5 жыл бұрын
Robojax looking forward to it.
@insmrskarllate952
@insmrskarllate952 4 жыл бұрын
@@robojax do it please I love your build 😘 YOU ARE AMAZING MAN
@martinpattison5110
@martinpattison5110 5 жыл бұрын
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 5 жыл бұрын
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.
@stevehunter6059
@stevehunter6059 3 жыл бұрын
Thanks very much for that. I was about to give up on the adafruit library, now it makes sense
@robojax
@robojax 3 жыл бұрын
Glad I could help! This is Version 1. there are V2, V3 and V4. The links are in description.
@benhjertmann
@benhjertmann Жыл бұрын
Can you guve an example of an adequate power source for the module?
@AndyCurle-m3b
@AndyCurle-m3b 7 ай бұрын
Hi, amazing videos loads of details and easy to follow. Was hoping you can help me. I’m using a PCA9685 to control 10servos. I want to be able to control the loop of the 10servos but a voice control module. Using a nano both modules on the i2c. I have the dfrobot offline voice recognition module. I need help with coding and wire diagram. There is nothing on the web. Please can you help.
@robojax
@robojax 7 ай бұрын
Hi, this is Version 1 (V1) and there are 3 more Versions V2, V3 and V4 and I have shown multiple ways to controt them. Links in description. Those might help you.
@AndyCurle-m3b
@AndyCurle-m3b 7 ай бұрын
Cheers I will look at these also.
@danielr5003
@danielr5003 5 жыл бұрын
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 5 жыл бұрын
This board does not change the voltage or current. You would have to use a servo with proper voltage source for it.
@grannysvids
@grannysvids 5 жыл бұрын
I got one of these devices today, I wired it all up but for some reason it burned up my servo, I tried 2 more but each one got damaged. I'm not risking another, any idea how this could have happened? I connected the data lines correctly and used an external power source of 5v so nothing was out of the ordinary. Any suggestions.
@robojax
@robojax 5 жыл бұрын
You might have connected the Positive and negative terminals in revers. Other than very rare but possible that servos are rated for less than 5V may be 3.3V.
@fpvnafret
@fpvnafret 5 жыл бұрын
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.
@Casperdroid5
@Casperdroid5 2 жыл бұрын
Thanks man! you made a lot of things clear!
@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.
@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 kzbin.info/door/kcBSig_Iu4ZnAIeCeG1TVgsearch?query=pca9685
@electricalcontrols4128
@electricalcontrols4128 3 жыл бұрын
This is a gem, keep up the good work sir.
@robojax
@robojax 3 жыл бұрын
Thanks. I will. Make sure to watch v5 which all wireless
@Anowar-Hossain-
@Anowar-Hossain- 4 жыл бұрын
By the way I am a big fan of your channel.
@robojax
@robojax 4 жыл бұрын
Thank you very much for being my fan.
@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 жыл бұрын
the current (amper) has no effect on the device it is higher. Only if motor needs more current it will be problem.
@vonries
@vonries 5 жыл бұрын
Can this be used for voltages higher (such as 12V) on the side input terminals as long as the controlling voltage is 3.3 or 5V? i.e. Can I use a 5V Arduino to control 12V motors, LEDs, etc., as long as the higher voltage is only applied to the side terminals?
@robojax
@robojax 5 жыл бұрын
Yes you can. Servo needs only to signal pin and GND to be shared with the board.
@myetis1990
@myetis1990 5 жыл бұрын
you have to use a mosfet or motor driver to control dc motor etc, because you can use the pwm signal of this ic as only trigger for a motor driver or mosfet this ic only gives 5v pwm, so you must create external circuitry for driving high current elements
@rajukanada1921
@rajukanada1921 4 жыл бұрын
Sir thanks I rechecked the program and saw all 4 video of your I have sucussfully progranmed my bipend robot thanks for the help
@robojax
@robojax 4 жыл бұрын
All the best
@rajukanada1921
@rajukanada1921 4 жыл бұрын
Tq sir
@robojax
@robojax 4 жыл бұрын
you are welcome.
@BasselIssa
@BasselIssa 5 жыл бұрын
Thanks for the tutorial, can you clarify the part of connecting more than modules together, and how we can configure that in the code to reach servo 17,18 ,etc..
@BasselIssa
@BasselIssa 5 жыл бұрын
I think this explains my question learn.adafruit.com/16-channel-pwm-servo-driver/chaining-drivers
@robojax
@robojax 5 жыл бұрын
You are welcome.
@junacalo
@junacalo 5 жыл бұрын
@@BasselIssa Excelente Bassel Issa. Muchas gracias por tu aporte. Saludos.
@sanjaybhatikar
@sanjaybhatikar 4 жыл бұрын
Awesome video, building up from the foundations.
@robojax
@robojax 4 жыл бұрын
Appreciate it!
@PatnaikUC
@PatnaikUC 5 жыл бұрын
Superb explanation in very details. Thank you so much.Excellent job.
@robojax
@robojax 5 жыл бұрын
You are welcome.
@ramakalyani9113
@ramakalyani9113 6 жыл бұрын
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 6 жыл бұрын
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 6 жыл бұрын
Thank you sir. And also, is using pwm important ?
@digvijaynathyadav6722
@digvijaynathyadav6722 4 жыл бұрын
I am using 16 mg996r servo motor with pca9685 will you please tell me what is the best power supply for it..??
@robojax
@robojax 4 жыл бұрын
run of servo. measure the current or find the datasheet and see what is the maximum current, then multiply it by 16 and get a power supply equal or greater that . for example if you found that the current is 0.5A,, then 0.5x16=8A so use 8.5A or higher power supply with 5V output.
@khstechno8783
@khstechno8783 4 жыл бұрын
Can we control 2 or more servo at a time plz answer my question it will be very helpful to me
@robojax
@robojax 4 жыл бұрын
Hello, yes we can. please see the link in the description to V2, V3 and V4 of this video. I have tones of examples.
@khstechno8783
@khstechno8783 4 жыл бұрын
Ok sir thank you very much for your response sir
@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. kzbin.info/www/bejne/bajSooF-lNaVr5Y
@MegaFun000
@MegaFun000 3 жыл бұрын
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 3 жыл бұрын
Of course you can adjust it. This video is version 2 , you may watch V1 videos o see how I have done it.
@planker
@planker 2 жыл бұрын
I'm thinking I want to build a servo madness bot. Good video
@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 KZbin 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) kzbin.info/www/bejne/o4OkmIZjeMmIiLc
@willytwo53072
@willytwo53072 5 ай бұрын
Well done! Thanks!
@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 жыл бұрын
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
@Anowar-Hossain-
@Anowar-Hossain- 4 жыл бұрын
Can you tell me when the video about it will come out? I am hoping that you release the video before February 22.
@robojax
@robojax 4 жыл бұрын
which video? This video is Version V1. I have released V2 and V3.
@sameerbaigmohammad6343
@sameerbaigmohammad6343 6 жыл бұрын
I want to connect 8*MG996r servo motors, I have 12V DC battery and voltage regulator U7805 which gives 5v and 1 Amp.... Can I use this regulator to connect the servo driver......?
@robojax
@robojax 6 жыл бұрын
The module works with 5V. The amount of current depends on the type and number of servos you connect. if the total current does not exceed 1A, it should be okay.
@sameerbaigmohammad6343
@sameerbaigmohammad6343 6 жыл бұрын
Robojax Tq sir
@SATYAJEETMASURKAR
@SATYAJEETMASURKAR 5 жыл бұрын
Dear sir, Very nice video 👌!!! How to link these PCA 9685 driver s together?.there is learning resource on adafruit.But in my case,I am getting problems.I tried many ways.Pls help me with this.Thank you
@robojax
@robojax 5 жыл бұрын
I have mentioned in video briefly. Watch it. If not, I would have to make video on that. Can't be explained with text.
@SATYAJEETMASURKAR
@SATYAJEETMASURKAR 5 жыл бұрын
@@robojax I watched your video ...I did all these things...for single driver it's working....But for chaining I am getting difficulties!!
@robojax
@robojax 5 жыл бұрын
I will try to make a video. But not sure when.
@SATYAJEETMASURKAR
@SATYAJEETMASURKAR 5 жыл бұрын
@@robojax thank you sir for consideration!!
@robojax
@robojax 5 жыл бұрын
Youa re welcome.
@electricalcontrols4128
@electricalcontrols4128 3 жыл бұрын
It was worth every minute now I can built my robot
@robojax
@robojax 3 жыл бұрын
Good luck
@mazatrolmultiplex1113
@mazatrolmultiplex1113 3 жыл бұрын
Very good instruction. Thanks
@robojax
@robojax 3 жыл бұрын
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
@driversteve9345
@driversteve9345 5 жыл бұрын
Can you move multiple servos with this extension board at the same time?
@robojax
@robojax 5 жыл бұрын
Yes. I have explained that in the video. Please watch it again.
@Anowar-Hossain-
@Anowar-Hossain- 4 жыл бұрын
Is it possible to Bluetooth control 16 servo motor with the PCA9685 module? If it is possible than which free app should I use? I was thinking of App like Blynk that lets you customize your app, RemoteXY is also a good choice but it is not free.
@robojax
@robojax 4 жыл бұрын
I will soon make video on this to be controlled via Bluetooth and ESP32 (which has bluetooth and I have a lot of videos on thatw).
@rcmikefpv7883
@rcmikefpv7883 4 жыл бұрын
Hi! Very amazing tuto! Can you control speed of each servo? Thanks you
@robojax
@robojax 4 жыл бұрын
this is V1 of this series. I have V2, V3 and V4. I believe I mentioned it somewhere. This code is with maximum speed. Simply add delay to slow it down.
@rcmikefpv7883
@rcmikefpv7883 4 жыл бұрын
@@robojax i didn't use boucle for but pwm set Pwm (), can usé it in it?
@lucaspacheco3631
@lucaspacheco3631 3 жыл бұрын
Hey man, will this work with Arduino nano? I will be running 9 servos and need audio input. Anyway I can do that? Thanks in advance.
@robojax
@robojax 3 жыл бұрын
This module just needs I2C communication and does not matter which Arduino you use it should work
@ownage3523
@ownage3523 Жыл бұрын
Do you have to solder the pins onto the 16 channel board?
@robojax
@robojax Жыл бұрын
there is no soldering in this project. do exactly as I have shown. Unless your project is somewhere which is shaken a lot to solder it.
@atharvnagaonkar658
@atharvnagaonkar658 5 жыл бұрын
Video is very nice! but I am getting a problem,If i connect servo more than 4 then they are rotating any how? Please answer my question.
@robojax
@robojax 5 жыл бұрын
How do you power them? I have explained that you should be using external power.
@atharvnagaonkar658
@atharvnagaonkar658 5 жыл бұрын
Yes,I have given external power. I think that there is problem in code. Can you send me code you used for driving all 16 servo? Please send it's important for my project.
@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 жыл бұрын
yes you can. As long as array is defined after the pwm.....
@grabber289
@grabber289 4 жыл бұрын
Hi, how are you? I am having problems, with my pca9685, when adding a ninth servomotor it became slow and as it is difficult for it, I have a transformer for gamers, so that the amperage would not be a problem, when removing the ninth servomotor, the motors will be blocked, the pca9658 damaged?
@robojax
@robojax 4 жыл бұрын
Hi, if you use Serial.print, that makes it slow. remove all printing via serial. adding or removing servo motor should not affect this.
@carsonfoster7160
@carsonfoster7160 3 жыл бұрын
I set the PWM for a servo to 90, and it started to continuously spin around, do you have any explanation for this? I was trying to find the minimum PWM value.
@robojax
@robojax 3 жыл бұрын
please watch V2 of the video for more examples you may find the reason. the code itself is not doing it, you must have modified the code.
@R.S.CINEMATIC
@R.S.CINEMATIC 4 жыл бұрын
One more help please tell me can i provide power through battery in servo motor controller if we used then please tell which type of battery i used
@robojax
@robojax 4 жыл бұрын
Please watch V2 and V3 of this video. I have mentioned extra details there and the amount of current for my servos.
@shahadatshishir3816
@shahadatshishir3816 5 жыл бұрын
Can you show, how we can control servo motors using PCA 9685 servo driver and a Radio Controller(Flysky CT6B)...? We are facing so much problems on this issue..😥😣
@robojax
@robojax 5 жыл бұрын
Why do you need to use this with Flysky? The input for this is totally different. FlySky has its own receiver and depending on the number of channel you can control devices. I am not sure if you can find 16 channel TX and RX.
Control 16 Servo motors using PCA9685 Module and Arduino V2
21:51
Mastering Servo Control: PCA9685 PWM Driver with Arduino Tutorial and Demo
7:50
Миллионер | 2 - серия
16:04
Million Show
Рет қаралды 1,2 МЛН
Стойкость Фёдора поразила всех!
00:58
МИНУС БАЛЛ
Рет қаралды 7 МЛН
Which One Is The Best - From Small To Giant #katebrush #shorts
00:17
Control 16 Servos Using A PCA9685
18:22
Toms Trains and Things
Рет қаралды 74 М.
I tried the 3 Cheapest Arduino Alternatives! (That you Suggested)
13:21
Using Servo Motors with Arduino
43:06
DroneBot Workshop
Рет қаралды 1,4 МЛН
Using the Raspberry Pi Pico, PCA9685 and MicroPython for Robotics
1:10:35
Controlling 32 Servo Using  PCA9685 and Arduino: V3
27:19
Robojax
Рет қаралды 23 М.
Connect Up To 992 Servos To An Arduino, Using I2C
7:47
Michael Klements
Рет қаралды 69 М.
How to use PCA9685 16-Channel 12-bit servo drive | Hash Robotics
19:07
How to Use Millis to Master Arduino Multi-tasking
50:17
Rachel De Barros
Рет қаралды 56 М.
Миллионер | 2 - серия
16:04
Million Show
Рет қаралды 1,2 МЛН