Welcome to Synthiam!

Program robots using technologies created by industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation, and artificial intelligence easy.

Get Started
Asked — Edited

Micro Dc Motor With Position Control

Hello,

I have searched and searched and searched trying to find a way to do this can someone please help me or provide a link with instructions on how to connect a micro geared dc motor with encoder and use it with either ezb4 or arduino with an hbridge. I have designed a prosthetic (several all previous just using servo motors) that I want to utililize the micro dc motors to open and close the prosthetic getting a signal from a myo sensor. I am even willing to pay someone to instruct me through this process as I can not find this info anywhere. I have all necessary components motors w/encoders already on, h bridges, ezb4's and if not possible with the ezb i have arduino's as well. Please someone help with this.

PRO
USA
#1  
Sometime ago you asked a similar question:
https://synthiam.com/Question/Mini-Electric-Metal-Gear-Motor-4858

Motor Encoders provide relative position, you can count steps back and forward but you can't get an absolute position without extra addons:

1) limit switches 
You need to add two limit switches, when you connect the motor you rotate the motor to one the sides until hits the limit switch (home position) then you can use the encoder to count steps.

2) linear potentiometer or  absolute encoder (e.g. AS6500)  

OR 

you use a micro servo.
#2  
Thanks for the reply
Yes I did ask a while back as well. However I have found 3 other projects using almost the same motors if not the same motors on prosthetic design and it doesnt seem as if they are using limit switches ( I could be wrong) I am very new to dc motors as I have only ever used servo motors but I will share some links of projects where people used a similar set up, I have reached out to those people as well asking for help but no response. I now have my own design that has been designed for these specific DC motors which I went ahead and made due to the fact that I know it is possible to achieve but still can not find any information on how to do it and I just dont personally have enough experience with DC motors or arduino to figure it out so some stuff that I do read I also dont fully understand everything either.

https://www.instructables.com/id/Tact-Low-cost-Advanced-Prosthetic-Hand/    (this project is not using the motor in which I am but still the same concept)

https://github.com/Alvipe/Dextra
https://hackaday.io/project/9890-dextra     ( these 2 links, this project is using the same kind of motors as I am trying to incorporate)

https://www.instructables.com/id/Compliant-Prosthetic-Hand-With-Sensorimotor-Contro/  (this project is using the same kind of motors as well but build their own pcb and soldered their own encoders which is more than i know at this time, but all are doing what I am trying to achieve)
PRO
USA
#4  
All the motor encoder solutions use relative position, this means you can move back and forth and return to the initial relative position. 

the link: 
https://hackaday.io/project/9890-dextra/details
provides clear details:

1) positioning

Quote:

Each finger is controlled by a PID loop that takes a position setpoint as the input and uses the feedback position measured by a magnetic quadrature encoder to adjust the real position of the DC motor driving the finger.
They use a position setpoint as the input, this means you need to flat the fingers (initial setpoint) and then you can use a PID closed loop algorithm to control velocity and relative position from the initial setpoint, you need to count the number of steps to reach the max position then you know when to stop.

2) Joint Angles   

Quote:

Since the finger is underactuated, the angular position of each phalanx cannot be controlled independently. Instead, the total angular position of the finger, that is, the sum of the three joint angles
You don't control the angles, the system provides a position value between 0 (initial setpoint = flat finger) and a X number of encoder steps = Finger closed. Using some kinematics math and using the joints Axis you can guess the phalanx's angles  although you can't control them independently.

3) Pressure control

Quote:

the force exerted when grasping objects must also be controlled in order not break them and to avoid damaging the hand. For this reason, a force controller is being developed to operate alongside the position controller.
 You need a feedback sensor to stop the movement.

3.1) Measure current (Amps)

Quote:

For this reason, a force controller is being developed to operate alongside the position controller. This controller uses the current drawn by the motor to obtain an estimate of the total force exerted by the finger.
available sensors (per finger):
https://www.pololu.com/product/1185 (Requires ADC port)
https://www.adafruit.com/product/904 (Requires I2C port)
and you will need an I2C Multiplexer (multiple sensors):
https://www.adafruit.com/product/2717
 
3.2) Barometric pressure (MPL115A2)
You will need to fit the sensor inside a gel case to emulate the finger tip
https://www.adafruit.com/product/992 (Sensor with pcb) 

You can use the Arduino framework but you need a powerful micro-controller Teensy 3.2 is a good fit.

The Dextra project is well documented why are reinventing the wheel ? 

This is only one part of the solution, then you need to integrate the myo sensors data.

This is not a task for an EZB or ARC script programming, you will need some low level programming skills, although once you have sort out the low level stuff you can integrate with ARC for other high level stuff e.g. voice control etc etc.
#5  
I guess what im trying to say is I want to apply what the dextra hand uses to my design but my lack of experience in this field with the little bit of info it gives on the dextra link is not enough info for me to hook up the electronics and get them functioning if that makes sense. I want to use basically what the dextra hand is using on my project but need a tutorial or someone to explain to me how to do that in a more detailed manner. (again willing to pay for this instruction) I know i would have to tweak a few settings to work with my design but even getting it set to work off the dextra set up I could then tweak what i needed to from there. Im really needing more of a step by step tutorial to teach me how to achieve the dextra electronics side which then I could advance/make changes from there to get to work with my particular design.
PRO
USA
#6  
Hi,
Controlling a motor with an encoder is a fairly straightforward process. I have worked a bit with this and I am no electrical or programming guru. you will need the following;
1. A motor with a quadrature encoder
2. Something to drive the motor - an H Bridge is common. There are tutorials on this site that show how to do that. 
3. A controller to read the encoder. I would recommend an arduino as it has the interrupt pins you need.

Here is a good video to watch. It may not be your motor or controller but it lists the step to setup and read an encoder. James Bruton is a good resource.

https://www.youtube.com/watch?v=WJkf264yxTU&t=1s
#7  
Hi, you wanted to know how they can make a hand with a motor that only have two wires.

This is how it can be done:

A low value resistor is put in line with the power line going to each motor.

The ADC on the computer is use to find out what the voltage is on the resistor.

The more work the motor has to do the higher the voltage will be on the resistor.
From this you can tell if the motor has stop. It may have stop because it is holding an object or because it is closed. Do a timing test to see how long it takes for the hand to go from open to close. Using this data you can set up the computer to know if the hand was closed or holding an object.

If you are looking to save some money use a PIC 16F887 or something like that. They cost less than $3 and have all the I/o you need and the ADC's  to be able to run 1 hand.