IMPORTANT: If you find this video helpful then please leave a LIKE, SHARE and SUBSCRIBE to support me in making more videos like this. 👍 CODE and SCHEMATICS ARE AVAILABLE HERE geekeeceebee.com/DCMotor%20Position%20Tracking.html More Videos: DC Motor Speed Control: kzbin.info/www/bejne/h4SsnKaGgNOXe9U
@hoangkhuong92 жыл бұрын
Same system, Could you pls change dc motor by stepper? Thanks
@naboulsikhalid77632 жыл бұрын
this the king of tutor whom we should support for the outstanding explanation and sharing knowledge. thank you
@GeeKeeCeeBee2 жыл бұрын
Thank you, that's very kind of you to say that. Im glad my videos are helping.
@onlooker251 Жыл бұрын
Thank you for explaining the PID feed back loop and the conversation into code. 👍🙂
@chameeraabhishek2969 Жыл бұрын
Thank you very much ❤ I used this method for control Doosan 225 excavator throttle 🤘🤘
@prashantgautam8983 Жыл бұрын
Thank you, this video has helped me understand the basics of PID and the arduino implementation was awsome. The same code worked for my feedback motor.
@amirhusseinqolami3593 Жыл бұрын
Your project is very perfect. Thnaks🙏
@qozia1370 Жыл бұрын
thank you, good video, would be good if you go into the details of the math behind the Transfer function.
@ekaggrat Жыл бұрын
How do you keep the position of the motor same on startup? for example if it is in a robot arm then how do you know the absolute location of the arm on startup. Wont the position be different every time the robot boots up?
@kishor_VU2MZT Жыл бұрын
Very exellent , can this be replicate with dc motor with reduced gear box of about 7 rpm ???
@codelery41411 ай бұрын
Good job! How did you get 360-degree rotation? Because the rotation of potentiometer is less than 360-degree.
@obotech17429 ай бұрын
Thank you very much for the tutorial that you have made, it really helped me to solve the steering ruder control problem.😇😇
@Jim_One-wl4ke7 ай бұрын
That’s a cool setup! Maybe I can try 10turns VR so with a 10:1 gearing can we get a more precise position? Possible to use as feedback for steppers too? Thanks for sharing ❤
@JoaoVitor-wj2ki2 жыл бұрын
Outstanding job you did. I'm in a project, which consist in control a DC motor, most specifically the position of the DC motor. For this, I'll not use other potentiometer coupled in the motor, just the motor DC. I want to control the motor directly with one potentiometer (reference potentiometer). In this case, can you explain me how can I do that? what connections I have to do from your assembly? Thanks.
@GeeKeeCeeBee2 жыл бұрын
You need some sort of feedback sensor on the motor to control its position. If can't use a pot then other option is to use an optical encoder. Then map the angular range of ref pot to that optical encoder.
@easy_3d4 ай бұрын
Instead of using reference potentiometer , can i directly use values from a oled display to turn the motor to a specific position?
@rohitbhandari98793 жыл бұрын
Best video
@bobjames9946 ай бұрын
Please help, I’ve uploaded code to the board and wired everything identical to the diagram, but when I power everything the motor just spins without control, any way to fix this?
@marksoderberg6283 жыл бұрын
This PID tracker with the 2 POTs is awesome! Small thing-you diagram shows using A2 and A3 and the code is A3 and A4. Also, I’m having a little trouble. Turning on the serial monitor makes the loop much slower than 10ms. It works but it is a little jerky with irrregular timing that seems to be due to the serial communication. When I turn serial off, the timing is then right but it no longer seems to be tuneable…. Strange…. Should I try to monitor some other way??
@GeeKeeCeeBee3 жыл бұрын
Thanks for pointing that out. I'll update the code to reflect correct pin assignments. Have you tried using "Serial Plotter" instead of serial monitor? I'm not exactly sure but couple of things to try - increase the delay time or use timer interrupts instead of delay() command. I have another video on my channel about PID DC motor speed tracking where I implement Timer interrupts. Advantage of timer interrupt is that Arduino is free to do other things while waiting for 10ms. Unlike in delay(10) command, arduino is stuck for 10ms.
@abdulmomenbhuian75303 жыл бұрын
Thankful sir.
@arthurknevitz31513 жыл бұрын
Amazing video, just what I was looking for! Just asking to know if I got it correctly: you used "encoder_pot" for the feedback when declaring the variables, but used the reading (in the main loop) of the potPin as the feedback. Was it a typo or did I get the whole idea backwards? Great project and one of the best takes on the PID workings btw best regards from Brasil !!!
@GeeKeeCeeBee3 жыл бұрын
You got it right. There's a typo when defining the encoder pot. Glad video was helpful. Thanks for watching 👍
@badisouahab6582 Жыл бұрын
@@GeeKeeCeeBee when you read analog potentiometer you get angle ??
@GeeKeeCeeBee Жыл бұрын
It is technically angular position mapped to potentiometers resistance value. However, I do not necessarily read it as angle. I simply use the resistance value as feedback signal and PI controller compensates the voltage by comparing feedback with reference potentiometer value. Hope that's helpful.
@arduinomaquinas10 ай бұрын
Loved video ❤👏👏👏
@kritancreations64712 жыл бұрын
Nice you are life saver. How can is use a mobile phone instead of potentiometer?
@MrShaneSunshine Жыл бұрын
Yes!
@Leitoc9578 ай бұрын
felicitaciones maestro
@nadirsert82352 жыл бұрын
good job thank you
@nuwanamarasingha1982 Жыл бұрын
wow great !
@kifahzaidan45052 жыл бұрын
THANKS A LOT CAN YOU PLEASE POST VIDEO FOR THE (CONTROLLING OF DC MOTOR 'ACTUATOR ' PROGRAMABLE POSITION WITH MEMORY BUTTONS USING ARDUINO. BEST WISHES
@nikobles8285 Жыл бұрын
Hello, if i'm going to use BTS7960, where should I tap the 6,7,8 pins fron arduino to bts7960 pins? Thank you
@GeeKeeCeeBee Жыл бұрын
Looks like Bts7960 needs atleast 4 wires. It needs 2 separate pwm output from arduino for left and right rotation. My code won't transfer over without modifications
@kritancreations64712 жыл бұрын
How can is limit the rotation to 90 degrees only?
@niboonboonprakob22092 жыл бұрын
How robot line tracking using PID controll?
@ВиталяАльбатрос-к3т11 ай бұрын
Отлично!
@ravmanoskid8192 Жыл бұрын
Im trying to replicate this but have a small problem. I can hear the motor buzz but it wont move. My motor has a built in potentiometer and its value is different than the input potentiometer. Also, starting resistance is from max to min. Does this matter? And can it be fixed with code. Thanks!
@GeeKeeCeeBee Жыл бұрын
Pot resistance value should not matter. You can try flipping Vcc and Gnd pin of your potentiometer. Resitance max-min should flip. Hope that helps.
@ravmanoskid8192 Жыл бұрын
Hey man thanks for the tip! I tried flipping the cables and saw improvement, but playing with kp and kd values solved my problem completely! Hoping to see more electronics videos from you soon. Cheers!!
@jrmichel2 жыл бұрын
excelent! It´s possible to do this same with the ESP-32?
@GeeKeeCeeBee2 жыл бұрын
Yes, absolutely. Technically, you can use any microcontroller to do this.
@jeffclark86812 жыл бұрын
Paypal , done. Great write up and video. Where are you defining the khz rate of the driver (sorry im new). I have a project, im needing a PWM motor controller that runs @ 20khz and can handle max of 10amps (12 volts). I would like to use your code and set it up the same way. What do you recommend??.
@GeeKeeCeeBee2 жыл бұрын
Thank you, Jeff. Much appreciated 🙏 I have responded to your questions via email. Hope that's helpful. Thanks again
@zezoalbendary85283 жыл бұрын
Can i use Rotary encoders instead of potentiometers for this project ?
@GeeKeeCeeBee3 жыл бұрын
You absolutely can. You would need a somewhat high resolution rotary encoder. Most inexpensive encoders can be around 24pulses per revolution which is 360/24 = 15deg for each pulse. Not nearly acceptable for any kind position controlled application. If you are interested, there's another video on my channel with encoder and speed/position control. But I feed a pre-defined speed ans position profile and get feedback from rotary encoder. kzbin.info/www/bejne/h4SsnKaGgNOXe9U
@arthurilyuts7575 Жыл бұрын
Seems like there’s no second encoder in the link you shared. I really like that you did with two Potentiometers in this video and I also want to make same thing but with two Rotary Encoders instead of using Potentiometers. Will be very appreciative if you can direct me in that.
@GeeKeeCeeBee Жыл бұрын
There's another video on my channel where I use two encoders but not like in this video. You can probably use that as guide in terms of wiring and getting encoder values and combine that with this pot project by replacing pots with encoders. Hope that helps. "Anti Backlash Dual Encoder" video
@yldrmozer15982 жыл бұрын
is it 100% possible for precision work
@s.h.a.g.g.60722 жыл бұрын
Good video, and very helpful, at school we are doing something kinda similar, what steps did you follow to calculate the P, I and D values?
@GeeKeeCeeBee2 жыл бұрын
Please check out "PID tuning" video on my channel. I have shown my approach about empirically determining PID gain values. Hope that's helpful.
@primescienceprojects2 жыл бұрын
What is the value of potentiometer
@GeeKeeCeeBee2 жыл бұрын
Potentiometer is 10K Ohms. However, pot value does not really matter when it comes to Arduino reading analog voltage in 0-1023 range because of its voltage divider circuit. But, one should consider pot value if power dissipation is a concern. 10k pot at 5V only dissipates few milliWatts of power. It may or may not be significant if you're running your system on battery. Hope this is helpful.
@primescienceprojects2 жыл бұрын
@@GeeKeeCeeBee thank you so much But I'm facing another problem that is my motor moves only in one direction and not the other direction even after rotating the potentiometer, why is it so
@GeeKeeCeeBee2 жыл бұрын
I suspect your setup is not reversing the voltage to spin the motor in other direction. Check your direction pin wiring (pin7 and 8). Other than that I can't really say without looking at the setup and code.
@primescienceprojects2 жыл бұрын
@@GeeKeeCeeBee I've cross checked the wiring and it was wiring problem. Thank you so much for this idea. You have done a great job. It's running successfully now. Thank you so much ❤️
@YILDIRIM-e6u3 жыл бұрын
how for mega 2560 diagram
@arduinomaquinas10 ай бұрын
Like full 607
@isotechpapertech13303 жыл бұрын
Sir add 0to100 position show lcd this project plz send me code n etc
@farihaarif29737 ай бұрын
this circuit is not working
@arduinomaquinas10 ай бұрын
Great video's 👏👏👏 subscribed 🇧🇷😉👍 very useful, awesome, @arduinomaquinas thank you man !