Go Down

Topic: Controlling PQ12-P Linear Actuators with Arduino Pro Mini (Read 3133 times) previous topic - next topic

DrDog

Hello everyone!

I'm trying to develop a prosthetic hand, and the linear actuator I'm using to drive the finger actuation is the PQ12-P from Actuonix.

Datasheet:
https://s3-us-west-1.amazonaws.com/firgellidownloads/PQ12+Datasheet.pdf

I want to be able to contain all of the electronics within the hand, so I've been looking into the smallest possible microcontrollers and motor shields. So far, I've found that the Arduino Pro Mini and the Pololu DVR8835 Dual Motor Driver Carrier would fit well in the palm.

Product page:
https://www.pololu.com/product/2135

The problem is that I need to drive four of these actuators (one per finger), as well as two other motors for actuation and opposition of the thumb. I've been looking at the schematics for both of the boards, but I can't make heads or tails of how they should be connected.


The question is:
Is there some way that I can connect three DRV8835 motor shields to the Arduino Pro Mini? If not, is there a combination of a small MCU and motor shields that I can use to drive these six motors (4 linear actuators and 2 others, likely brushed DC gearmotors)?

Additionally, if I have these three components (MCU, motor shield, motor/actuator), is that all the hardware needed to drive them bidirectionally based on feedback from the potentiometer included in the actuator?


Thank you in advance for your time, and please let me know if I should do some more research before posting about something like this. I have very limited microcontroller experience, so don't be afraid to point me towards something basic that I've missed.

rpt007

Hi and welcome,

Quote
Is there some way that I can connect three DRV8835 motor shields to the Arduino Pro Mini?
YES, Sir!

-> each stepper driver (drv8825) needs 2 pins to get controlled: Step and Direction.
So you can go with "number of digital output pins of an Arduino" divided by 2 = number of motors you can attach theoretically.

But you also have to control the movements as such by sensors or at least by communicating with another microcontroller - that will also require some pins.

The Pro Mini comes with 14 digital I/O pins plus 4 external (8 in total) analog input pins; 2 of the analog pins (A6, A7) can be used as analog inputs only, but the remaining 6 analog pins can be used as digital I/O!
(4 analog pins are at the edge of the board, 4 can be found on the board close to the Atmel chip incl. A6, A7, which both might not be of importance for your application anyway - provided you are not going to use analog signals, but pure digital ones).

So I think you got plenty of input/output pins for your project, as the stepper drivers just will occupy 3 * 2 = 6 pins. You got a leftover of (14+6)-6 = 14 input pins.

Be aware that this Pro Mini comes in 2 versions: 5V/16MHz and 3.3V/8MHz and there are some Chinese clones with slightly different pinout on the market.

Find attached a pinout diagram of the Pro Mini:

Before you ask:
Did you really read and understand How to use this forum ?
AND:
Do you have already some solution or is a part of the problem sitting in front of the screen?  :)

DrDog

Fantastic, thank you so much!

I've looked more into it, and I believe that I'll need to use two DRV8835 drivers to run the DC motors in the four actuators for the fingers, and a TB6612FNG driver to run two other motors for the thumb.

I believe each actuator uses an analog pin for the potentiometer feedback, and from the information in your post I presume two pins per DC motor. Therefore, the Arduino would have 6 digital I/O pins and 4 analog or digital pins left over for the TB6612FNG, which to my knowledge uses 7 pins to function. Would it be optimistic to think that I could add position feedback in the form of an encoder to the two motors controlled by the TB6612FNG?

For example, the magnetic encoder from Pololu:
https://www.pololu.com/product/3081


I just wanted to confirm that the information above is correct, and that I'll be able to connect two DRV8835 drivers and one TB6612FNG driver to the Pro Mini. If the encoders will fit in on top of all that, that would be optimal.

Thanks again for all your help.

rpt007

Pls wait a second.
Are we talking about DC motors or Steppers, or would you need servos?
The drv8825 are stepper drivers only, while the TB6612fng can handle either 1 stepper or two DC motors.

Before we go on you should specify exactly how the whole configuration is planned to work.
A schematic, handwritten is ok, showing all components, drivers, actuators incl. feedback mechanism and a description, how the whole thing shall be controlled, is essential to give you the right assistance.

Plus: did you already have thought about powering the whole configuration?
Before you ask:
Did you really read and understand How to use this forum ?
AND:
Do you have already some solution or is a part of the problem sitting in front of the screen?  :)

rpt007

Sorry, I was overlooking that we are talking about DC motors, drv8835 for dc and steppers, drv8825 for steppers only. Currently I am a bit in a hurry. Will come back to you later today with more information.
Before you ask:
Did you really read and understand How to use this forum ?
AND:
Do you have already some solution or is a part of the problem sitting in front of the screen?  :)

rpt007

I try to summarize what I understood so far, if assumptions are not ok, then pls correct me:
  • you want to develop a prosthetic hand with 4 fingers and a thumb
  • the fingers will be driven by linear actuators
  • the thumb will be driven by two other motors for actuation and opposition of the thumb
  • the linear actuators come with feedback of their position (potentiometer)
  • for the thumb you need feedback of the two motors by attaching encoders to the two motors
  • the fingers shall be driven by drv8835 (can drive 2 DC motors with 2 control inputs each)
  • the drv8835 will be set to "drive/brake" mode by permanently connecting a logical HIGH to the mode input
  • one TB6612FNG driver to run two other motors for the thumb
  • the whole set should be small enough to be put into the palm of the prosthetis
  • the "brain" will be an Arduino Pro Mini

My calculations so far:
  • The Pro Mini comes with 14 pure digital I/O, 6 analogue pins which can be used as digital I/O and 2 analogue input only pins (A6 and A7).
  • Your configuration so far needs:
  • 12 digital input pins to control the 6 motors (2 pins/motor)
  • 4  analogue input pins to deal with the actuators' potentiometer feedback
  • At this moment you got:
  • 2 digital I/O plus 4 analogue/digital I/O as left overs (I assume you will use A6 and A7 for analogue inputs)
  • If I understood you right, you need a feedback from the "thumb motors" and want to go with magnetic encoders (like the ones you mentioned in reply #2).
  • If I understood the datasheet correctly these encoders will feedback through 2 output pins per motor, which means, you will need 4 digital input pins on the Pro Mini.

Assuming that this calculation is ok, you end up with two analogue or digital I/O left.

My questions so far:
1. why not staying with just one driver type for all motors/actuators?
2. how do want to power the application?
3. how do you want to control the whole setup by a human being -> which means: up to this point you could write a sketch which is able to automatically move your hand to all possible positions, which the actuators/motors allow. But I guess you want to have a human brain? control these movements, e.g. open the hand, stretch all fingers, close the thumb and forefinger etc. -> so how is that controlled? Keep in mind, at the current point in project you got only 2 inputs left ...
Before you ask:
Did you really read and understand How to use this forum ?
AND:
Do you have already some solution or is a part of the problem sitting in front of the screen?  :)

MarkT

These things have 0.5A stall current at 6V (assuming you don't go for 12V model), not too demanding.

How about:https://www.pololu.com/product/2990

I'd personally consider using beefy MOSFET driver chips in a bridge configuration as a motor driver.  MIC4422
is available through hole and surface mount (8 pin SOIC), and can handle several amps.  Two of
them in a bridge would only need two pins to drive each motor, and the SOIC8 package is pretty
compact but not impossible to hand-solder.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

DrDog

@rpt007

Your assumptions are all correct. With regards to your questions:

1. The motors that I've been looking at are the micro metal gearmotors from Pololu, for example:

https://www.pololu.com/product/3078

These require 1.6A at stall, and the DRV8835 drivers only provide a peak of 1.5A. However, I've been looking at the DRV8833 drivers which are similar but provide a peak of 2A, which would fit the criteria.

I am open to using three DRV8833 drivers if it would be a significant difference over using two DRV8835 and one DRV8833 drivers. Please advise on which configuration would be preferable. A link to the DRV8833 drivers can be found below:

https://www.pololu.com/product/2130


2. For testing and programming purposes I will be using a 6V 1A wall plug, though I'd like to move to a battery pack or something equally portable for the final version. I assume that the typical duty cycle for all six motors will draw roughly 1.5A, so a high mAh and high current source will be needed. I'm not sure if I can find a battery pack capable of this.


3. For testing purposes and some practical implementation, I would prefer a myoelectric signal for input, from an EMG electrode. One signal would likely be required for each motor, so six inputs in total. I assume this would be very difficult to implement, so I'm open to other controllers that would work for this purpose as long as it's within the dimensions of roughly 2"x1" or so.

Would this A-Star 32U4 microcontroller be a potential solution? It seems to have 26 pins, 7 of which can be used for PWM, and 12 that can be used as analog.

https://www.pololu.com/product/3103


On a side note, the reason that I wanted the encoders on the motors was only so that I could tell when the thumb was fully opposed/actuated. If there is a better way to accomplish this, that would be preferable. For example, reading the current and if the motor is stalled or the current jumps up, stopping the movement. I only need the motors to stop when the thumb reaches its endpoints i.e. fully opposed or fully bent for each respective motor.



@MarkT

I would prefer to use as few motor drivers as possible, which is why I'm going for the dual models. This is from space limitations in the palm, as the actuators already take up a great deal of space as it is, and I haven't even tried to fit a battery pack in yet.

I'm open to trying my hand at surface-mount soldering, however would making my own motor drivers provide a tangible benefit over using the DRV8835 or 8833? I would preferably like to keep build time to a minimum if possible, but if there is a large benefit I would be willing to do it.


Thanks again for both of your inputs, it's always greatly appreciated.

rpt007

1. Looking at the current data - you will be better off with the drv8833 (in addition to higher current delivery this driver doesn't need extra logical voltage from the Arduino = one connection per driver saved).

2. To understand you right: you will test with a 6V 1A wall plug: is this just to test one motor, than the next one etc. or do you want to power the whole test configuration with this power supply?

For the whole set this is too less when you assume that the typical duty cycle will go with 1.5A -> so I would recommend to test it under expected real life conditions - this will either verify your assumption or trigger to go for another power supply.

My recommendation: I would use a laboratory power supply, which can supply up to 5A, adjust 6V, test, test, test and measure the peak current -> after that you will exactly know what can happen in real life and you will go for the right battery pack, and get an idea how big the battery capacity shall be. After these tests you can start the selection process for the suitable battery.

Quote
Would this A-Star 32U4 microcontroller be a potential solution?
I can't really tell you if this MCU is the right solution for you; it all depends how many control pins will be needed at the end of a day. If the number of pins are sufficient for the final solution, this MCU might be the right one for you. Another solution would be to use two Pro Minis which could then share the task; maybe one is dealing with all inputs and functions as master controller and the second one is the slave and deals with the motor outputs. Just a rough idea, not yet thought through.

Quote
so that I could tell when the thumb was fully opposed/actuated. If there is a better way to accomplish this, that would be preferable.
Your idea to check the "stall current" might be the best solution, as the current difference between "running" and "stall" is high enough to read and distinguish the values (you will need a resistor as current sense). Alternatively you would need two limit switches or equivalent sensors which detect and report the limit positions.
Before you ask:
Did you really read and understand How to use this forum ?
AND:
Do you have already some solution or is a part of the problem sitting in front of the screen?  :)

DrDog

Thank you very much for your input!

Reading through your responses to the questions, that pretty much covers most of the points I needed answered.

I'll probably go with three DRV8833 drivers, and I'll find some way to get my hands on a lab power supply. I'll spend some more time thinking on the microcontroller selection, your info has been a huge help in that regard. With the "stall current" solution, I may be able to get away with the Arduino Pro Mini, or potentially an Arduino Micro, due to the lack of encoder inputs.

Again, I really appreciate all the help you've given me. Best wishes!

Go Up