Question about connexion servo and motor controller

Looks like this is a custom setup - your microcontroller should always be reading the value of the potentiometer and if it reaches the desired position, it needs to stop. Instead of troubleshooting the complete setup, try to troubleshoot each section:

  1. Assign a desired position, and slowly rotate the motor’s shaft by hand until it reaches that position - have the LED next to pin 13 light up when the position is reached.
  2. Next, include direction - the microcontroller should read the current value and then the desired value and know which way to turn the motor
  3. Have the microcontroller operate the motor controller
  4. etc…

Not sure what the issue is. Can you explain a bit more? Provide a video?

Hi fredos16 and welcome to the RobotShop Community forum.

We are not sure to understand what you are exactly trying to achieve. In any case, the DC motor controller is used to power the brushed DC motors and the servo controller controls the servos.

Also, know that you can ask you question in French or in Spanish as well, should you be more comfortable in those languages.

This is a very common question that we will try to address here once and for all.

How to convert a DC motor into a servo motor?

A servo motor is a motor that has a controller and positional feedback. The controller uses this feedback to turn the motor shaft a certain number of times and keep it in a certain position.

If you want to convert a large DC motor into a servo motor, you will need to have positional feedback to the output shaft and use a control algorithm. Making a PID control system, for instance, can be complex.

There is a way of avoiding this by using the control algorithm already present in a servomotor internal controller. The picture below summarizes the method. Of course this method is not as flexible and as elegant as devising a PID control system.

Version française:
Il s’agit d’une question très fréquente que nous allons tenter de répondre ici une fois pour toutes.

Comment convertir un moteur à courant continu en un servomoteur?

Un servomoteur est un moteur qui a un contrôleur et de la rétroaction de position. Le contrôleur utilise cette rétroaction pour faire tourner l’arbre moteur d’un certain nombre de fois et de le conserver dans une certaine position.

Si vous voulez convertir un gros moteur DC en un servomoteur, vous aurez besoin d’avoir un retour de position de l’arbre de sortie et d’utiliser un algorithme de contrôle. Faire un système de régulation PID, par exemple, peut être complexe.

Il y a une façon d’éviter cela en utilisant l’algorithme de contrôle déjà présent dans un contrôleur de servomoteur interne. L’image ci-haut résume la méthode. Bien sûr, cette méthode n’est pas aussi flexible et aussi élégant que l’élaboration d’un système de de contrôle PID.

@ fredos16,

La méthode que vous décrivez devrait fonctionner, cependant, il faut noter que le potentiomètre du servomoteur ne permettra pas une rotation continue de l’arbre des moteurs.

Les connections sont décrites dans l’image du poste #4. L’équipement que vous avez choisi devrait fonctionner.

Il faudra brancher les bornes qui allaient anciennement au petit moteur DC à l’entrée PWM du grand contrôleur de moteur. Il faudra aussi vous assurer que les signaux PWM n’excèdent pas le voltage accepté par l’entre du grand contrôleur de moteurs.

Votre diagramme est très bon et semble correct. En effet, votre utilisation des diodes est très ingénieuse et devrait faire marcher le gros contrôleur tel que vous le désirez.

Le jumper doit en effet estre mis en EXT.

Ceci est très expérimental et n’est pas garanti, mais si vous ajoute des diodes devant CW et CCW ça devrait aider.

Dommage que ça n’ai pas marché. Ce dont vous avez besoin est un détecteur de polarité. Vous pouvez voir ici comment en créer un simple:
www.aaroncake.net/circuits/polarity.asp

Si votre circuit marche bien avec les relais, alors vous pourriez utiliser des relais solides qui ne devraient pas avoir de problème à s’activer plusieurs fois très rapidement: Module à Double Relais SSR Phidgets

Glad it could help Ross! It is also important to note that, as fredos16 found out, you might need a polarity detector in order to set the rotation to CW or CCW. You can find instructions on how to make one here:
www.aaroncake.net/circuits/polarity.asp

He also improved the circuit diagram by adding diodes that prevent back flowing current into the electronic components.

Well, only fredos16 knows it the setup worked for him.

You are indeed right about my drawing, it only works in the forward direction. In order to make it work in both directions , you need to connect the motor signals from the servo to the same PWM input on the motor controller (like it is done in attachment 227) trough opposed diodes. Also, the text explaining what the signals do is more reliable that the positioning of the wires in the picture, the main controller image might have shifted.

The only thing missing in the drawing 227 is the polarity detector that would feed the CW and CCW input.

Before remaking a diagram we will need to test it in our own setup in order to make it 100% accurate.

I think the confusion arose when I said "…we will need to test it in our own setup …". What I really meant was "…we **would **need to test it in our own setup …"

AFAWK, the setup should work although it is subject to your choices or motors, motor controller and controlling signals. This will require some experimentation on your part. For the moment we will not make our own super powerful servo although there are plans to release a tutorial in the coming moths. We do not have a Specific ETA though.

In the meantime, you can consult with other forums users that completed this project.

You have a custom setup and many things can go wrong, but we see mainly two things that are easy to oversee:

]It is possible that your potentiometer is not used in the original 9g servo circuit in its full range. Perhaps the small circuit uses some values of the resistor. Please verify this by checking the values generated by the small pot in the 9g servo as the horn turns./:m]
]It is possible that the voltage reference in your small servo controller are not the same as the ones from your potentiometer./:m]

Also, you might want to remove the middle man and get rid of the 9g controller all together. using the small controller is only to make things easier. if it does not work, you might want to implement your own PID control loop as shown here:

]arduino.cc/playground/Code/PIDLibrary/:m]
]blog.makezine.com/2008/11/04/using-a-dc-motor-as-a-ser//:m]
]arduino.cc/forum/index.php/topic,8652.0.html/:m]