Servo controller example

hello

i tried using the servo controller example in pololu.com/docs/0J20/3.i the first example.
i copied it exactly from the page but when i try to compile it it gives me this error. how do i solve this.
Error 2 in based_loc_descr, at dwarf2out.c:13586 Line 66

Hello. What are you trying to program and what programming environment are you using? That error message sounds pretty unusual. What piece of software is giving you that error? Could you provide more details about what you are doing? Screenshots would be helpful.

–David

i amusing the AVR studio 6, i have windows 7 operating system, an i just copied the example and tried to compile.
i downloaded the polulu library bundle from the site.
i think the problem is somewhere here

     const unsigned char demuxPins[] = {};
 servos_init(demuxPins, sizeof(demuxPins));

What makes you think the problem is on those lines?

You did not give any details about how you created the Atmel Studio project, so that could be causing problems. Instead of doing what you were doing before, please try the following and let us know if that works:

  1. Navigate to C:\libpololu-avr\examples\atmega1284p\svp-one-servo
  2. Double-click on svp-one-servo.cproj to open it in Atmel Studio 6.
  3. Select “Build Solution” from the “Build” menu.
  4. If there are any errors, please post a screenshot showing the entire “Output” pane here; you should resize it so we can see all of the output too. You can use the “Upload attachment” tab.

I just did that using Atmel Studio 6.0.1996 and it worked fine for me.

–David

i need help with the “Power HD High-Torque Servo 1501MG” . i tried the example given in the website, although the program gave me successful build with no error or warning, when i started the robot controller ( SVP- 1284) it did not work it started like vibrating in its place like it wanted to move but could not. please help

Hello. You have provided very little information about what code you are running and how you configured Atmel Studio. In order to do thorough troubleshooting, I would need to know all the details about how you did those steps. You should provide enough detail so that another person would be able to exactly reproduce your work without any guessing.

However, in this case, I think it might be a hardware issue instead of a code issue. How are you powering the servo and the SVP? If you are using the SVP’s adjustable regulator, what voltage has you set it to? Could you show us some pictures of your connections? Does this servo work properly in other contexts (e.g. with an RC receiver)?

–David

i used 4 AA batteries that supply about 6V to the Robot controller, you can see the robot controller i bought at
(pololu.com/catalog/product/1327), i followed the instruction for downloading the Atmel Studio 6 on
windows 7. i used the USB connection to the computer and programmed the robot controller, i am sure that the program
works fine and the connection is also fine.
the Problem is that when i used the example for servo control in page (pololu.com/docs/0J20/3.i) example
"svp-one-servo" to control the servo i bought, you can see the servo at this page(pololu.com/catalog/product/1057), it did not work properly the servo kept shaking and did not move
like it is supposed to. i connected the servo directly to the robot controller in the first (0) port for the servos.

note : i did not add anything on the example and this is the first time i am working with this equipment. and i am sure if you use the mentioned servo with the example and robot controller you will get the same results.

regards

The positions of jumpers on the Orangutan SVP affect how your servo is powered. Could you post a picture, using the Upload Attachment tab, so we can see what you are doing? If your servo is powered from VADJ, could you measure the voltage on the servo’s power pin with a multimeter?

–David

this picture contains the robot controller


OK, it looks like you are indeed powering your servo from VADJ. Again, could you measure the voltage on your servo’s power pin with a multimeter and let me know what it is?

Could you also try switching the jumper to power it from VCC instead of VADJ?

You might need to refer to the Orangutan SVP reference diagram to do that:

pololu.com/file/0J244/orangu … iagram.pdf

–David

i measured the voltage on the servo pins and its 2.38V.
regards

the voltage when the Avdj is turned on the maximum sitting is approximately 5 Volts, i tried with this voltage but the servo only moved once and when i put the jumper on VCC it did not move at all just gave noises like vibration.

regards

Thank you for measuring the voltage on VADJ. The 2.38V reading you got indicates that you were not providing enough voltage to your servo. Do you have access to an oscilloscope so we can make sure the right signals are coming from the SVP? Again, does this servo work properly in other contexts (e.g. with an RC receiver)? Do you have other servos you can try?

–David

hello

i tried controlling more then one servo and it did not work only PD0 from the servo pin worked even when i tried using
PD1, can you explain how i can control more then one servo together. i even tried using this example “https://www.pololu.com/docs/0J20/3.i” (eight servo control) but only one moved, please respond as soon as possible.

regards

If you want to control more than one servo, I recommend trying the svp-eight-servo demo from the page you linked to. You will need to add three wires to the board, so be sure to carefully following the instructions at the top of that demo.

–David

yes i read the explanation before the example but i did not understand. i mean there is a Pin D5 (servo PWM) and next to it about three servo mux selection pins, so we just connect them with a wire or something. ad if i want to control more then 1 servo do i connect them all.

thanks for your help
best regards

To use the svp-eight-servo demo, you will need to use three wires to make the three connections listed in the comment at the top of the example. Yes, you should make all the connections. If you describe more specifically what part you don’t understand, I should be able to explain it.

–David

i want to know were the connections are, in the picture of the robot controller there is only one pin dedicated for
Pin D5 and it has three connections if front of it how am i suppose to connect all of them (if they are the ones connected to it) it would really help me if you could show me the connections.
thanks for your efforts

best regards

The comment in the svp-eight-servo example refers to six pins:

  • PB3
  • SA
  • PB4
  • SB
  • PC0
  • SC

Which of these six pins are you unable to locate? You should be able to locate all of them by looking at the white letters on the bottom of the Orangutan SVP. However, note that the letter “P” in the pins names will not be present on in the white letters, so instead of looking for “PB3” you would look for “B3”.

You can also find these pins in the Orangutan SVP reference diagram:
pololu.com/file/0J244/orangu … iagram.pdf

–David