Controlling a Stepper Motor with a Remote Control and Arduino
Жүктеу.....
Пікірлер: 46
@Chris-bk8mc4 ай бұрын
Please share the code
@TheBoredRobotLLC
4 ай бұрын
github.com/TheBoredRobot/KZread-Code
@maurodrone79311 ай бұрын
hello my friend, how are you going to help me? I need a program like yours, but I'm going to use the Wotiom WD56 driver
@TheBoredRobotLLC
11 ай бұрын
That driver works pretty similarly to the one in the video. You'll just have to adjust wiring and make sure your DIP switches are in the correct configuration.
@maurodrone793
8 ай бұрын
@@TheBoredRobotLLC Hello, everything is fine, the program worked, but how can I make it run faster?
@TheBoredRobotLLC
8 ай бұрын
@@maurodrone793 Make sure the DIP switches are set to full step mode. Then reduce the pulse length to as small as possible to increase the speed.
@oljobo8 ай бұрын
Brilliant! Thanks! 👍😊
@TheBoredRobotLLC
8 ай бұрын
I'm glad you liked the video!
@stevefox37632 ай бұрын
In this video and on your blog you show schematics and a PCB for two modules to control two motors but the Arduino code provided is only for one, I understand enough to see its only for one but don't have the knowledge to modify it myself for two and would likely just break the code, could you provide the code for the two modules please? I want to use this to control zoom and focus on a motorised lens for a HD FPV system on a Rc plane!
@TheBoredRobotLLC
2 ай бұрын
My suggestions is to use the AccelStepper library. See video below. The code from this video you're commenting on can get a bit clunky when you start adding more motors. kzread.info/dash/bejne/g4Z32KVuqMuwc9o.html&lc=UgzrPGWk_RqfpmJ7d-d4AaABAg If you add an additional channel from you remote control, then you can have it correspond with the additional motor.
@stevefox3763
2 ай бұрын
@@TheBoredRobotLLC I got your email, yes it was me! I had no idea you had messaged me here, for some reason youtube turned off all notifications for comment reply's so I didn't know. Had a look at the linked video and that looks better, especially the position control which might be better for lens control than moving a motor then needing to return the control to 0 to halt it in that position but the video only talks about using Pots for control and not using Rc PWM. I want to use the Pots on my transmitter so I can use either continuous movement or position control as I would not be using Sticks. I am very comfortable with wiring but coding is not something I have been able to absorb and my limit is being able to inspect code and sometimes duplicate existing parameters for more of the same, 95% of attempts to modify further than that results in broken code :( How would I go about using the Accelstepper example but with RC pwm input instead of standard pots please?
@TheBoredRobotLLC
2 ай бұрын
If you're able to read signals from the remote control, you can map that to another variable that would directly drive the variable that is responsible for the movement of the stepper motor.
@Noake26124 ай бұрын
Hi ! I am working on a project and i have everything that i need for this exact setup but the stepper motor driver i use is an BT6600. Is this possible to use this setup or do i need to use a different driver?
@TheBoredRobotLLC
4 ай бұрын
Fundamentally this motor driver should work the same. You just need to confirm the pin assignments.
@Noake2612
4 ай бұрын
@@TheBoredRobotLLC thanks for the help !
@Noake2612
4 ай бұрын
@@TheBoredRobotLLC The system works effectively with my driver. I also noted that in your configuration, one microcontroller can be utilized for two drivers. Could you please clarify if the code differs alot in this setup? I have been trying to implement this but have encountered challenges.
@asdfghjkl773573 ай бұрын
ı am usinf fly sky FS-İ6x can ı used ıt wıth the same circiut and code
@TheBoredRobotLLC
3 ай бұрын
Yes, this should work, if you have a receiver that uses the I-Bus protocol.
@asdfghjkl77357
3 ай бұрын
@@TheBoredRobotLLC ı don’t know about that but ı will take a look at it thanks 🙏
@galizakeithd.25796 ай бұрын
Hello! I'm new to microcontrollers and i was wondering if the CNC Shield used for the arduino can be powered by a LiPo battery instead of a power supply unit?
@TheBoredRobotLLC
6 ай бұрын
I think it should be fine. You should have something to let you know if the voltage drops too low on the battery. You also need to make sure the battery voltage is appropriate to run the motor controllers.
@andrewjamez10 ай бұрын
Hi Im needing a setup like this for a project however I need the stepper to rotate to a certain angle then back again with a high/low rc switch. How much different would the code have to be to achieve this? Thanks
@TheBoredRobotLLC
10 ай бұрын
I don't think it would be too much different. The difference is that you'll need to keep track of the steps to get to a specific angle. I have another video that covers this: kzread.info/dash/bejne/g4Z32KVuqMuwc9o.htmlsi=KyVg_lC3tNivcTqr
@mujahidmdrosli8839 ай бұрын
hi, my friend, i tried to use Radiolink controller and R1DS but still not working. what are your suggestion?
@TheBoredRobotLLC
9 ай бұрын
It's pretty hard to answer that without more information. My first step would to check the signal with the pulsein() command and see if you get anything.
@MohamadAlifDanial9 ай бұрын
is this gonna work with different motor driver such as (CNC 2DM860H Digital Two Phase Stepper Motor Driver)??
@TheBoredRobotLLC
9 ай бұрын
Yes, this should work with these types of drivers, as long as you set up your pin assignments correctly.
@ObserverChat11 ай бұрын
Thank you very much for this great video. i have it running now using nano and nema23 but for some reason the motor runs very slowly and stalls at like 1700 or 1100ms pwm. this nano works flawlessly with this motor and grbl fw/gcode but with your code the motor stalls. i don't know yet why. i am using a digital servo tester. might test with a receiver but before i take it out from my plane i want to understand what is going on.
@TheBoredRobotLLC
10 ай бұрын
Could you try using a library instead? A lot of times it's much cleaner than what I demonstrated in this particular video. Here's a more recent video I did on stepper motors: kzread.info/dash/bejne/g4Z32KVuqMuwc9o.html&lc=Ugxyodf6jKO0uOF9O6t4AaABAg
@ObserverChat
10 ай бұрын
@@TheBoredRobotLLC Thank you. How hard would it be for you to fuse the RC PWM code with a single stepper using the AccelStepper library? I am a noob and learning as i go. i was searching the entire web back and forth for such a code to no avail. I am puzzled as for why this simple code is not in the accelstepper library examples - it should be. I am twaeking your RC code but no matter what my settings are, i managed to speed up the motor but not more than mapping PWM to 30:1 ration max and that is not even 1/4th the speed i am after. i learned that nano/uno can go up to like 4000 steps/sec but i am not getting close to that. my GRBL code running on this same nano runs the motor just great but i wish to try out PWM instead of GCODE. thank you so much for reading and answering my posts. much obliged.
@TheBoredRobotLLC
10 ай бұрын
@@ObserverChat My initial approach would be to take the example from the AccelStepper video and replace the variable from the potentiometer signal with the value you record from the RC receiver.
@mariuschirita20173 ай бұрын
Hi, is this working with elrs transmitters ?
@TheBoredRobotLLC
3 ай бұрын
I believe this protocol may be unique to this brand or transmitter/receiver. I haven't taken a look into other models though.
@AChi__ Жыл бұрын
Hi. Could you please do the same thing, but this time with an arduino? 😊
@TheBoredRobotLLC
Жыл бұрын
I am using an Arduino for this example. It happens to be a Nano, but it'll work the same on an Uno as well.
@steveg2277 Жыл бұрын
excellent video! How any steppers could you control this way? As many pins as the arduino has I suppose? Can this be used to control 3 - 5 steppers with level of speed control you have? If so, please teach us!! I'm desperate haha! I've been researching like crazy but this stuff takes time to really figure out. Many thanks, and keep up the fantastic work!
@TheBoredRobotLLC
Жыл бұрын
As soon as you go beyond 2 motors, you'll quickly run out of pins on the Uno. You'll have to use something like the Mega to get more pins. For 3-5 motors, that is certainly possible, but I haven't gotten a chance to test it out yet. I would most likely use a stepper library to make things easier.
@MultiGregor11
10 ай бұрын
@@TheBoredRobotLLC i have a similar issue where i need to control 3 steppers. Its a 1:6 scale forklift project. Could you make a tutorial for 3+ steppers please? 😅😅
@TheOldKid Жыл бұрын
I started getting an interest in microcontrollers last year and pretty much stayed in the beginner kit area since then. 6 months ago I got the desire to build a rover type vehicle. Since I'm in the fabrication field designing and building the vehicle is fairly simple. I had no idea the complexity of using a microcontroller to control the motors. I could've simplified life by buying a driver that didn't require a microcontroller but what fun would that be? I feel like I've been studying for final exams for a couple months. Codes I've come across wouldn't work including github. Most drivers I've seen have En, Speed and Dir. Mine has Speed and Dir. I thought that was the problem but what you said in your last video could be why I'm not getting any feedback from my outputs. Every code I've seen puts the reciever signal pins to 10 and 11. Sounds like those should be pin 2 and 3. I'll move my pins and edit code to see. I think my code is a bigger issue but I may be able to check it today. I started my own from scratch but it's based off what I've learned from others and sounds like I've been in a blind leading blind scenario
@TheBoredRobotLLC
Жыл бұрын
I teach a course at a university where the students build a rover. Generally speaking, if this is you're first go at it, a brushed DC motor (direct drive or with a gearbox) might be easier start with. Stepper motors are generally used for applications where high precision and holding torque is needed.
@TheOldKid
Жыл бұрын
@TheBoredRobotLLC I started off with hoverboard motors. I finally got a code to drive a motor fwd and back. All I had to do was build the steering for another motor but work started pouring in and Toys went on hold. Evidently during the on hold time I used the arduino for something else and I think I deleted that file. It doesn't bother me having a hard time figuring it out. What bothers me is I had a code that worked, deleted it and don't remember hw I did it. After a week I pulled out the hub motor and now using a wiper motor and wheelchair motor. Yesterday I decided to stop trying to force learning programming, build the vehicle and in the meantime go back to start with the basic starter kit and work my way back up. Thanks for the videos they are helpful
@TheBoredRobotLLC
Жыл бұрын
@@TheOldKid I'm glad the videos are helpful. Good luck with you learning journey and your project.
@selimhandogan66937 ай бұрын
Do you have github?
@TheBoredRobotLLC
7 ай бұрын
github.com/TheBoredRobot/KZread-Code
@selimhandogan6693
7 ай бұрын
Also I use a motor driver bus, and don't have some of the pins, how would you modify that ? @@TheBoredRobotLLC
@TheBoredRobotLLC
7 ай бұрын
That's a difficult question to answer without more information. What pins are missing? @@selimhandogan6693
Пікірлер: 46
Please share the code
@TheBoredRobotLLC
4 ай бұрын
github.com/TheBoredRobot/KZread-Code
hello my friend, how are you going to help me? I need a program like yours, but I'm going to use the Wotiom WD56 driver
@TheBoredRobotLLC
11 ай бұрын
That driver works pretty similarly to the one in the video. You'll just have to adjust wiring and make sure your DIP switches are in the correct configuration.
@maurodrone793
8 ай бұрын
@@TheBoredRobotLLC Hello, everything is fine, the program worked, but how can I make it run faster?
@TheBoredRobotLLC
8 ай бұрын
@@maurodrone793 Make sure the DIP switches are set to full step mode. Then reduce the pulse length to as small as possible to increase the speed.
Brilliant! Thanks! 👍😊
@TheBoredRobotLLC
8 ай бұрын
I'm glad you liked the video!
In this video and on your blog you show schematics and a PCB for two modules to control two motors but the Arduino code provided is only for one, I understand enough to see its only for one but don't have the knowledge to modify it myself for two and would likely just break the code, could you provide the code for the two modules please? I want to use this to control zoom and focus on a motorised lens for a HD FPV system on a Rc plane!
@TheBoredRobotLLC
2 ай бұрын
My suggestions is to use the AccelStepper library. See video below. The code from this video you're commenting on can get a bit clunky when you start adding more motors. kzread.info/dash/bejne/g4Z32KVuqMuwc9o.html&lc=UgzrPGWk_RqfpmJ7d-d4AaABAg If you add an additional channel from you remote control, then you can have it correspond with the additional motor.
@stevefox3763
2 ай бұрын
@@TheBoredRobotLLC I got your email, yes it was me! I had no idea you had messaged me here, for some reason youtube turned off all notifications for comment reply's so I didn't know. Had a look at the linked video and that looks better, especially the position control which might be better for lens control than moving a motor then needing to return the control to 0 to halt it in that position but the video only talks about using Pots for control and not using Rc PWM. I want to use the Pots on my transmitter so I can use either continuous movement or position control as I would not be using Sticks. I am very comfortable with wiring but coding is not something I have been able to absorb and my limit is being able to inspect code and sometimes duplicate existing parameters for more of the same, 95% of attempts to modify further than that results in broken code :( How would I go about using the Accelstepper example but with RC pwm input instead of standard pots please?
@TheBoredRobotLLC
2 ай бұрын
If you're able to read signals from the remote control, you can map that to another variable that would directly drive the variable that is responsible for the movement of the stepper motor.
Hi ! I am working on a project and i have everything that i need for this exact setup but the stepper motor driver i use is an BT6600. Is this possible to use this setup or do i need to use a different driver?
@TheBoredRobotLLC
4 ай бұрын
Fundamentally this motor driver should work the same. You just need to confirm the pin assignments.
@Noake2612
4 ай бұрын
@@TheBoredRobotLLC thanks for the help !
@Noake2612
4 ай бұрын
@@TheBoredRobotLLC The system works effectively with my driver. I also noted that in your configuration, one microcontroller can be utilized for two drivers. Could you please clarify if the code differs alot in this setup? I have been trying to implement this but have encountered challenges.
ı am usinf fly sky FS-İ6x can ı used ıt wıth the same circiut and code
@TheBoredRobotLLC
3 ай бұрын
Yes, this should work, if you have a receiver that uses the I-Bus protocol.
@asdfghjkl77357
3 ай бұрын
@@TheBoredRobotLLC ı don’t know about that but ı will take a look at it thanks 🙏
Hello! I'm new to microcontrollers and i was wondering if the CNC Shield used for the arduino can be powered by a LiPo battery instead of a power supply unit?
@TheBoredRobotLLC
6 ай бұрын
I think it should be fine. You should have something to let you know if the voltage drops too low on the battery. You also need to make sure the battery voltage is appropriate to run the motor controllers.
Hi Im needing a setup like this for a project however I need the stepper to rotate to a certain angle then back again with a high/low rc switch. How much different would the code have to be to achieve this? Thanks
@TheBoredRobotLLC
10 ай бұрын
I don't think it would be too much different. The difference is that you'll need to keep track of the steps to get to a specific angle. I have another video that covers this: kzread.info/dash/bejne/g4Z32KVuqMuwc9o.htmlsi=KyVg_lC3tNivcTqr
hi, my friend, i tried to use Radiolink controller and R1DS but still not working. what are your suggestion?
@TheBoredRobotLLC
9 ай бұрын
It's pretty hard to answer that without more information. My first step would to check the signal with the pulsein() command and see if you get anything.
is this gonna work with different motor driver such as (CNC 2DM860H Digital Two Phase Stepper Motor Driver)??
@TheBoredRobotLLC
9 ай бұрын
Yes, this should work with these types of drivers, as long as you set up your pin assignments correctly.
Thank you very much for this great video. i have it running now using nano and nema23 but for some reason the motor runs very slowly and stalls at like 1700 or 1100ms pwm. this nano works flawlessly with this motor and grbl fw/gcode but with your code the motor stalls. i don't know yet why. i am using a digital servo tester. might test with a receiver but before i take it out from my plane i want to understand what is going on.
@TheBoredRobotLLC
10 ай бұрын
Could you try using a library instead? A lot of times it's much cleaner than what I demonstrated in this particular video. Here's a more recent video I did on stepper motors: kzread.info/dash/bejne/g4Z32KVuqMuwc9o.html&lc=Ugxyodf6jKO0uOF9O6t4AaABAg
@ObserverChat
10 ай бұрын
@@TheBoredRobotLLC Thank you. How hard would it be for you to fuse the RC PWM code with a single stepper using the AccelStepper library? I am a noob and learning as i go. i was searching the entire web back and forth for such a code to no avail. I am puzzled as for why this simple code is not in the accelstepper library examples - it should be. I am twaeking your RC code but no matter what my settings are, i managed to speed up the motor but not more than mapping PWM to 30:1 ration max and that is not even 1/4th the speed i am after. i learned that nano/uno can go up to like 4000 steps/sec but i am not getting close to that. my GRBL code running on this same nano runs the motor just great but i wish to try out PWM instead of GCODE. thank you so much for reading and answering my posts. much obliged.
@TheBoredRobotLLC
10 ай бұрын
@@ObserverChat My initial approach would be to take the example from the AccelStepper video and replace the variable from the potentiometer signal with the value you record from the RC receiver.
Hi, is this working with elrs transmitters ?
@TheBoredRobotLLC
3 ай бұрын
I believe this protocol may be unique to this brand or transmitter/receiver. I haven't taken a look into other models though.
Hi. Could you please do the same thing, but this time with an arduino? 😊
@TheBoredRobotLLC
Жыл бұрын
I am using an Arduino for this example. It happens to be a Nano, but it'll work the same on an Uno as well.
excellent video! How any steppers could you control this way? As many pins as the arduino has I suppose? Can this be used to control 3 - 5 steppers with level of speed control you have? If so, please teach us!! I'm desperate haha! I've been researching like crazy but this stuff takes time to really figure out. Many thanks, and keep up the fantastic work!
@TheBoredRobotLLC
Жыл бұрын
As soon as you go beyond 2 motors, you'll quickly run out of pins on the Uno. You'll have to use something like the Mega to get more pins. For 3-5 motors, that is certainly possible, but I haven't gotten a chance to test it out yet. I would most likely use a stepper library to make things easier.
@MultiGregor11
10 ай бұрын
@@TheBoredRobotLLC i have a similar issue where i need to control 3 steppers. Its a 1:6 scale forklift project. Could you make a tutorial for 3+ steppers please? 😅😅
I started getting an interest in microcontrollers last year and pretty much stayed in the beginner kit area since then. 6 months ago I got the desire to build a rover type vehicle. Since I'm in the fabrication field designing and building the vehicle is fairly simple. I had no idea the complexity of using a microcontroller to control the motors. I could've simplified life by buying a driver that didn't require a microcontroller but what fun would that be? I feel like I've been studying for final exams for a couple months. Codes I've come across wouldn't work including github. Most drivers I've seen have En, Speed and Dir. Mine has Speed and Dir. I thought that was the problem but what you said in your last video could be why I'm not getting any feedback from my outputs. Every code I've seen puts the reciever signal pins to 10 and 11. Sounds like those should be pin 2 and 3. I'll move my pins and edit code to see. I think my code is a bigger issue but I may be able to check it today. I started my own from scratch but it's based off what I've learned from others and sounds like I've been in a blind leading blind scenario
@TheBoredRobotLLC
Жыл бұрын
I teach a course at a university where the students build a rover. Generally speaking, if this is you're first go at it, a brushed DC motor (direct drive or with a gearbox) might be easier start with. Stepper motors are generally used for applications where high precision and holding torque is needed.
@TheOldKid
Жыл бұрын
@TheBoredRobotLLC I started off with hoverboard motors. I finally got a code to drive a motor fwd and back. All I had to do was build the steering for another motor but work started pouring in and Toys went on hold. Evidently during the on hold time I used the arduino for something else and I think I deleted that file. It doesn't bother me having a hard time figuring it out. What bothers me is I had a code that worked, deleted it and don't remember hw I did it. After a week I pulled out the hub motor and now using a wiper motor and wheelchair motor. Yesterday I decided to stop trying to force learning programming, build the vehicle and in the meantime go back to start with the basic starter kit and work my way back up. Thanks for the videos they are helpful
@TheBoredRobotLLC
Жыл бұрын
@@TheOldKid I'm glad the videos are helpful. Good luck with you learning journey and your project.
Do you have github?
@TheBoredRobotLLC
7 ай бұрын
github.com/TheBoredRobot/KZread-Code
@selimhandogan6693
7 ай бұрын
Also I use a motor driver bus, and don't have some of the pins, how would you modify that ? @@TheBoredRobotLLC
@TheBoredRobotLLC
7 ай бұрын
That's a difficult question to answer without more information. What pins are missing? @@selimhandogan6693