Robotics StackExchange | Archived questions

Control DC Motor with arduino

I want to control DCMotor with arduino and ROS but i am beginning in programmation. can you give me example of code?

Asked by Emilien on 2016-03-18 06:16:31 UTC

Comments

did you solve this problem? ı have a dc motor with encoder .and ı want to communicate this with ros . please if you did it .tell me

Asked by Mekateng on 2017-10-29 15:19:02 UTC

Answers

It depends of your application, What kind of control do you want to apply? speed, direction, etc... However that kind of control over a DC motor it's more related to control circuits, I guess that the only control trough a ROS node with Arduino implementation is a On/Off control. Please give us more info about what exactly you want to do.

Asked by jcardenasc93 on 2016-03-18 19:06:10 UTC

Comments

I want to make a robot with 2 wheels, but i want on first time just know how i control a dc motor ( on/off, speed)

Asked by Emilien on 2016-03-19 02:44:06 UTC

If you know how to write code to control DC Motor in Arduino (which I am assuming you can) you can use these tutorials to understand how to integrate it with ROS. http://wiki.ros.org/rosserial_arduino/Tutorials

Asked by HybridX on 2016-03-20 13:29:14 UTC

Comments

I would take a look at the roboclaw, it is a little more expensive than the arduino but it will do everything you need including PID for velosicty and position with an auto tuner. I have a ROS driver for it. http://www.ionmc.com/RoboClaw-2x15A-Motor-Controller_p_10.html https://github.com/sonyccd/roboclaw_ros

Asked by sonyccd on 2016-03-21 07:53:02 UTC

Comments