I'm a big fan of DukeNukem, so your screen name "dukenukeit" is awesome. as for your project, I'd like to eventually use my shield which is Identical to your to do 2 motors controlled thru my com with xbox360 controller. your video is very informative. KUDOS man.
@roofy2k Mostly cost, and I'm not sure about the speed/power of a stepper motor vs a gear reduction DC motor. It's just easier for me to stick with what I know.
hey i have a question i want to control a motor like a servo it must go left if u say lef and right wen u say right(with a pot)could ya give me a schematic to build a servo or anything like it????
@francisroan If you want to control a motor within limits (say 90 degrees + and -) you need some sort of feedback to the microcontroller (It's called a closed loop). This way the microcontroller knows the position of the motor-shaft at any point in time.. A easy way to obtain this type of control is using a stepper motor. the Stepper motor will not continuesly run as it's powered, but move one step at the time(hense the name :) ). Stepper motors are easyer than to make a servo motor :)
This is perfect. Do you have a schematic, pictorial diagram and code by chance? Awesome post. Just what I'm looking for. will save me a ton of time. Thanks!
Thanks! This is a nice tutorial for beginners. Actually I tried to make something similar, but it seems to me that I have a too powerfull motor. (Connected to 3V battery it consumes more than 2A). But in fact I wanted to use it with 8-9V+ battery. Couldn't you propose the idea how to do it?
Thanks! This is a nice tutorial for beginners. Actually I tried to make something similar, but it seems to me that I have a too powerfull motor. (Connected to 3V battery it consumes more than 2A). But in fact I wanted to use it with 8-9V+ battery. Couldn't you propose the idea how to do it?
@Ixanezis First, find out what the actual voltage rating for your motor is. If you use to little voltage then the motor will draw way to much current. To much voltage and you can start a small fire :@
Once you have the correct voltage rating, and then use an H-bridge motor driver that can output the correct voltage and amperage your motor uses. Just guessing at these things can cause major problems and will not be reliable.
@DukeNukeIt Hey I have an arduino and I have been struggling just to find a decent code just to control the speed of a dc motor with one pot maybe you could help I am just using a half bridge right now. There is a simple code that is used to fade an led with a pot but when used to control a motor and amplified through a fet driver there are glaring motor control flaws. It has almost no ramp the motor just turns on after turning the pot about halfway.
Actually this is a portion of my wireless pan and tilt system I'm building for my video camera. I needed very smooth motor control using only one joystick of an RC transmitter for two different axis of rotation. DPDT switches are nice simple little devices that can easily reverse a motor, but they have no control over speed. If I did use a DPDT switch with a motor controller, then I would have two different actions to perform to reverse the motor instead of just one.
@DukeNukeIt but this would work nicely for my mega laser lightshow i am designing- I indend to to make it so just about every trick and effect possible is in one unit.
@DukeNukeIt I might post a video of the contoller once I get some motors (besides the little hobby ones I used for testing...) and a three small mirrors....
@flacodirector It's a little USB power source you charge off of your USB port on your computer, then you can run other items like external hard drives with it. I got it at Microcenter for about $25.00. It works great for the Arduino, but in my final setting I'll run the Arduino off an external battery pack instead of the USB thingie.
@minisled Sounds like you have to get your motor up to a higher voltage and current before you get an adequate amount of torque. Using a reduction gearbox will help, but that would limit the speed you can obtain. Stepper motors are a good option. The torque is based on the motor windings, so you can get good results from lower speed. Cost is an issue as steppers can get quite expensive. Good luck!
The Arduino is the brains of the unit, it takes the analog signal from the pot and turns it into a digital number, then with that number it maps out the position of the servo and outputs the signal. You could probably get away with some kind of circuit using only digital IC chips and 555 timers, but with the Arduino it is much more simple.
The H-bridge that controls the motor is of course made up of transistors. You can build one with discrete components without problems other then the current limit of the transistors that you use.
no but what im saying is, would i be able to use an ouput from the arduino, and go thru some transistors instead of the motor driver. to get the required amperage for the motor.
If you don't want to use the digital output of the Arduino, you can use the PWM outputs to drive discrete components, but I've never tried that, so you would be on your own. The motor controller is quite cheap, it's only $20.00 and can handle quite a bit of power, maybe that would be enough for your project??
@DukeNukeIt Ya I agree, the chip makes many chips nearly obsolete with that little CPU. Arduino is all about getting creative with your programming to eliminate the need for hard wiring components.
I'm a big fan of DukeNukem, so your screen name "dukenukeit" is awesome. as for your project, I'd like to eventually use my shield which is Identical to your to do 2 motors controlled thru my com with xbox360 controller. your video is very informative. KUDOS man.
alien200049655 1 month ago
tome em del cuso
igorsipp 7 months ago
can i get code for this setup please ?? its really imp..
sadprince12345 8 months ago
@roofy2k Mostly cost, and I'm not sure about the speed/power of a stepper motor vs a gear reduction DC motor. It's just easier for me to stick with what I know.
DukeNukeIt 9 months ago
Hola! Me podria sacar programa para control de motor inversa y tambien me podriar dar los datos y esquematico?saludo!
GENARO6200 1 year ago
hey i have a question i want to control a motor like a servo it must go left if u say lef and right wen u say right(with a pot)could ya give me a schematic to build a servo or anything like it????
francisroan 1 year ago
@francisroan I dont do much with servo motors so I cant help you. Good luck!
DukeNukeIt 1 year ago
@francisroan You can use a rotary encoder.
egeseatr35 2 months ago
@francisroan If you want to control a motor within limits (say 90 degrees + and -) you need some sort of feedback to the microcontroller (It's called a closed loop). This way the microcontroller knows the position of the motor-shaft at any point in time.. A easy way to obtain this type of control is using a stepper motor. the Stepper motor will not continuesly run as it's powered, but move one step at the time(hense the name :) ). Stepper motors are easyer than to make a servo motor :)
-Kriss
MrKrilars1 2 weeks ago
This is perfect. Do you have a schematic, pictorial diagram and code by chance? Awesome post. Just what I'm looking for. will save me a ton of time. Thanks!
TheArkhamAngel 1 year ago
Thanks! This is a nice tutorial for beginners. Actually I tried to make something similar, but it seems to me that I have a too powerfull motor. (Connected to 3V battery it consumes more than 2A). But in fact I wanted to use it with 8-9V+ battery. Couldn't you propose the idea how to do it?
Ixanezis 1 year ago
Thanks! This is a nice tutorial for beginners. Actually I tried to make something similar, but it seems to me that I have a too powerfull motor. (Connected to 3V battery it consumes more than 2A). But in fact I wanted to use it with 8-9V+ battery. Couldn't you propose the idea how to do it?
Ixanezis 1 year ago
@Ixanezis First, find out what the actual voltage rating for your motor is. If you use to little voltage then the motor will draw way to much current. To much voltage and you can start a small fire :@
Once you have the correct voltage rating, and then use an H-bridge motor driver that can output the correct voltage and amperage your motor uses. Just guessing at these things can cause major problems and will not be reliable.
Good luck!
DukeNukeIt 1 year ago
@DukeNukeIt Hey I have an arduino and I have been struggling just to find a decent code just to control the speed of a dc motor with one pot maybe you could help I am just using a half bridge right now. There is a simple code that is used to fade an led with a pot but when used to control a motor and amplified through a fet driver there are glaring motor control flaws. It has almost no ramp the motor just turns on after turning the pot about halfway.
anewlow23 1 year ago
So the L298 motor driver is an HBridge? I need to change polarities on a motor, this will do this?
robodeath 1 year ago
So the L298 motor driver is an HBridge? I need to change polarities on a motor, this will do this?
robodeath 1 year ago
@robodeath Yes, the H-bridge design reverses polarity to a DC motor. That is the only way to get a DC motor to go both forward and reverse.
DukeNukeIt 1 year ago
@DukeNukeIt well you could wire it up to an DPDT (6 pins)switch like I did for may laser spyrograph controller...
DJelectfire 1 year ago
Actually this is a portion of my wireless pan and tilt system I'm building for my video camera. I needed very smooth motor control using only one joystick of an RC transmitter for two different axis of rotation. DPDT switches are nice simple little devices that can easily reverse a motor, but they have no control over speed. If I did use a DPDT switch with a motor controller, then I would have two different actions to perform to reverse the motor instead of just one.
DukeNukeIt 1 year ago
@DukeNukeIt I have potimeters for a very simple speed control
DJelectfire 1 year ago
@DukeNukeIt but this would work nicely for my mega laser lightshow i am designing- I indend to to make it so just about every trick and effect possible is in one unit.
DJelectfire 1 year ago
@DukeNukeIt I might post a video of the contoller once I get some motors (besides the little hobby ones I used for testing...) and a three small mirrors....
DJelectfire 1 year ago
Nice video,
Could you please give me more info about the usb power source you used?
Thanks a lot
flacodirector 1 year ago
@flacodirector It's a little USB power source you charge off of your USB port on your computer, then you can run other items like external hard drives with it. I got it at Microcenter for about $25.00. It works great for the Arduino, but in my final setting I'll run the Arduino off an external battery pack instead of the USB thingie.
DukeNukeIt 1 year ago
Hi DukeNukeIt, nice video.
I tried to do the same experiment but my main problem is in LOW TORQUE at lower speed.
Tested with many differents motors => same phenomenon: from 0 start could not be progressive with load.
Do you think the only solution is using step motors please?
minisled 1 year ago
@minisled Sounds like you have to get your motor up to a higher voltage and current before you get an adequate amount of torque. Using a reduction gearbox will help, but that would limit the speed you can obtain. Stepper motors are a good option. The torque is based on the motor windings, so you can get good results from lower speed. Cost is an issue as steppers can get quite expensive. Good luck!
DukeNukeIt 1 year ago
@DukeNukeIt Tried to put a higher voltage (6 to 9v) but i don't know if the motor will continue to survive ;-)
I just putted a video to show the behaviour of the motor at lowest speed.
I noticed the same symptoms for all the motors i tried.
Thanks.
minisled 1 year ago
could you post the code for this ? I am interested in using the solorbotic H bridge component with arduino...
cippo65 1 year ago
could you post the code for this ? I am interested in using the solorbotic H bridge component with arduino...
cippo65 1 year ago
@cippo65 I'd like to see some code for this too.
alt5productions 1 year ago
would i be able to do the same with just some transistors? and maybe another out pin?
or would i need some driver ic?
skierplaterandy 2 years ago
The Arduino is the brains of the unit, it takes the analog signal from the pot and turns it into a digital number, then with that number it maps out the position of the servo and outputs the signal. You could probably get away with some kind of circuit using only digital IC chips and 555 timers, but with the Arduino it is much more simple.
DukeNukeIt 2 years ago
The H-bridge that controls the motor is of course made up of transistors. You can build one with discrete components without problems other then the current limit of the transistors that you use.
Good luck!
Dave
DukeNukeIt 2 years ago
no but what im saying is, would i be able to use an ouput from the arduino, and go thru some transistors instead of the motor driver. to get the required amperage for the motor.
skierplaterandy 2 years ago
If you don't want to use the digital output of the Arduino, you can use the PWM outputs to drive discrete components, but I've never tried that, so you would be on your own. The motor controller is quite cheap, it's only $20.00 and can handle quite a bit of power, maybe that would be enough for your project??
Good luck again!
Dave
DukeNukeIt 2 years ago
well, i just went on ebay and bought a pack of 20 mosfet transistors for 10 bucks.
half the pack has a max current of 10 amps, the other half is 6.5 amps
i think these are all i will need, but thanks fr the suggestion anyway.
if these dont work as planned i will consider buying this.
skierplaterandy 2 years ago
@DukeNukeIt Ya I agree, the chip makes many chips nearly obsolete with that little CPU. Arduino is all about getting creative with your programming to eliminate the need for hard wiring components.
SickKnowledge82 1 year ago
Excellent work and explanations. Thanks Dave.
TheOnlyKingArthur 2 years ago
excelent
enter6969 2 years ago
Nice video, great
myozone 2 years ago