ARC Pro

Upgrade to ARC Pro

Experience early access to the latest features and updates. You'll have everything that is needed to unleash your robot's potential.

PRO
Canada
#1  

Controlling a DC motor like a servo with position feedback using ARC and an Arduino is possible, but it requires additional hardware and some custom programming. Here's a general approach to achieve this:

  1. Motor Driver: You'll need a motor driver that can interface with the Arduino to control the direction and speed of the DC motor. Common motor drivers include the L298N or L293D.

  2. Encoder for Position Feedback: To get position feedback, you'll need an encoder attached to your DC motor. The encoder will provide pulses as the motor shaft rotates, which can be counted to determine the position.

  3. Arduino Programming: You'll need to write an Arduino sketch that can read the encoder pulses to determine the motor's position and control the motor driver to move the motor to the desired position. This will involve implementing a control loop, such as PID (Proportional-Integral-Derivative), to accurately control the motor's position.

  4. ARC Integration: Once you have the Arduino code working, you can integrate it with ARC by using the "EZB" firmware on the Arduino or by creating a custom ARC skill that communicates with the Arduino over serial. You can send commands from ARC to the Arduino to move the motor to a specific position and receive position feedback.

  5. Custom ARC Skill: If you want to create a custom ARC skill to control your DC motor with position feedback, you can use the NMS Example skill as a starting point and modify it to communicate with your Arduino. You'll need to handle the serial communication in your skill to send motor position commands to the Arduino and read the encoder feedback.

  6. Hardware Connections: Connect the encoder outputs to the Arduino's interrupt pins to count the pulses in real-time. Connect the motor driver inputs to the Arduino's PWM and digital pins to control the motor's speed and direction.

Remember that controlling a DC motor like a servo with position feedback is more complex than controlling a standard servo because you need to implement the feedback loop manually. It requires a good understanding of both the hardware and software aspects of motor control.

If you're looking for a simpler solution, you might consider using a "smart servo" like the Dynamixel, which has built-in position feedback and can be controlled directly from ARC using the appropriate robot skill. However, if you're set on using a DC motor, the steps outlined above will guide you through the process.


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
PRO
Synthiam
#2  
  1. The easiest way is to connect an HBrige to an existing servo PCB. Just use the servo's pcb wires that normally go to the motor to control the hbridge channel

  2. the more expensive option is to use a kangaroo and sabertooth

PRO
Canada
#4  

Quote:

Or funny enough, I asked Open AI to create a diagram for me and it gave me this...
Bwhahaha....that is amazing!! xDxDxD

#5  

That is some kind of device lol!

I just wish I could find hobby priced high torque serial 12v robotic actuators.

PRO
Canada
#6   — Edited

What we really need is Field Orientated Controllers (FOC) drivers for common Brushless DC  (BLDC)  motors.   We had a thread on this somewhere when I was working on my robot dog. There are a bunch of FOC available such as Odrive, Moteus, Tinymovr etc  There is a cheap open source one called simpleFOC from makerbase that works with arduino that I have been meaning to order and test but haven’t gotten around to it yet.