Having trouble with Hightec servos

I have been trying to get the hightec servos I got to work with my PICAX-28X1 but nothing is working. I have tried everything. I have even tried hooking up diffrent power sorces but I wont even get a small twitch out of it. Can some one tell me how to get those servose to work with the PICAX-28X1?

Thanks in advance for all your help :slight_smile:

I have been working with the servo example on page 177 of the PICAX manual but nothing seems to be making my Hitec HS-311 servo to even flinch. I have also read through the section on servos several times and looked up the Hitec HS-311 servo’s manual. I hop it is not because the Hitec servos run at 50Hz. :frowning:

Unfortunately no but I have seen the servos flinch when the signal wire briefly came into contact with the 5v pin but I also have three of these servos and all of them do not work with the PICAX.

I do have all the grounds connected together as for power I have been using a 6v heavy duty battery and a smaller 9v battery with a 5v 1a regulator. I also have a led connected to pin 6 but I only use that so I know the microcontroller is working. As for code I haven’t really deviated from the servo example in the PICAX manual on p. 177 (I think it was p.177) the only thing I changed on it was changing pin 4 to pin 7 and adding code to make pin 6 high so the led will turn on but I have also tried the original code.

I have also attached three pictures of the bread board prototype that I have been working with. The one you will see is the one that uses a small 9v battery but keep in mind that I have also used a 6v Heavy Duty battery with it.

Thank you for all the help so far :slight_smile:

PS Sorry for the low quality I only had my webcam to take these shots with.

Ok thanks for the sujestion but there are some problems.

  1. I have tried it without the led before. The only reson I added the led was when I first tried to control the servo it didn’t move so I wanted to make sure I didn’t fry the microcontroller.

  2. I can’t hook the 9VDC battery on the microcontroller clip becouse in the PICAX manual they say to not do that becouse they don’t put voltage regulators ont that board and that you will fry the chip if you do that.

  3. I only used the 6VDC battery to power the servo I just remove the voltage regulator.

If it helps you help me I can provied some schamaticts of a servo sheild (or something like that) that I have been designing to provide a seprate power sorce to the servos.

PS In the PICAX manual it says only certian PICAX microcontrolers work with servos of differnt frequences. Do you think that would be the problem?

Thanks agin for all your help :slight_smile:

We will check with the manufacturer if the PICAXE-28X1 is sufficient to drive a servo :rolleyes:

PICAXE did confirm that the clock frequency needs to be 4/16 Mhz, as suggested in the servo command in part 2 of the manual. Beyond that, this should work.

4 or 16 Mhz is the frequency of the processor. It is more then sufficient to control servos but since timing is critical in servo control, any important fluctuation may cause problems.

Check out the PICAXE manual, page 176 (Servo command):

At this point it would be a good idea to use a servo tester to make sure the HS-311 you are working with is not broken. Do you have a R/C system, servo tester or known good serial servo controller to test with?

This should work, so you will need to troubleshoot this:

1- Are you connecting all grounds together (common ground).
2- Are you providing enough power for your system, a servo motor can easily draw 250mA.
3- Is there anything else connected to the PICAXE that could be interfering, try getting the servo motor working alone.

Can you post your code and some pictures of your setup?

A few suggestions:

-Try the 9VDC battery on the microcontroller clip, the regulator is overkill.
-Use the 6VDC for powering the servo only, connect the grounds of the different systems together though.
-Remove the LED (once you know the microcontroller works) and attempt to control the servo only for now.

Hi Pttn40,

It sounds like a classic timing issue. To get a servo to move to a desired location, you need to update its position every 20-30ms. If you only send the command once, the servo will barely flinch. You need to loop the command. Servo motor controllers take the burden off the microcontroller by constantly updating all the servos’ positions. If you are using a digital I/O pin, you need to send a 5V pulse to the servo between 500 and 2500 microseconds long, updated every 20-30 milliseconds. If the servo position is not updated, it will not hold its position and may even move.

Hope this helps,

Thanks for looking at that for me. I will keep toying with it and try to get it to work. But in the manual it says “On X1 parts servo will only function at 4MHz or 16MHz” and the Hitec servos pulse refreshes at 50Hz (0.00005 MHz). Does that mean the servos wont work with it?

Thanks again for all the help :slight_smile:

PS If I was to make a seperate servo controller what microcontroller would you sugest and how do those Parallax Propeller microcontrollers work with servos?

Thanks for all the help I will just keep playing with it till it works.