The following is supplied in the Webbotlib manual. The basic circuit is adapted from that presented in the AX-12 servos'
documentation.
(* See first pic *)
I've built this circuit on a breadboard. I'm not supplying that picture, since no one wants to decipher wiring in such a manner... Instead I've illustrated the unspecified connections assumed by the circuit diagram as follows:
(* See second pic *)
The main points are that for the 5V to which the resistor is connected, and and the 5V and GNDs supplied to the ICs, the VCC and GND pins on the Axon (ADC 10) are used. The power supplies for my Axon and for the servos are different, currently (Axon's power supply is ~6 V to power analog servos; 8.4V for the AX-12s).
Is there a problem with the above approach?
I'm having problems controlling the AX-12s, and this is just one of the things on my list of things to check. The symptoms are that the AX-12 does not appear to always receive the signal.
Using this code: (contained within the Webbotlib default "TICK_COUNT appControl(LOOP_COUNT loopCount, TICK_COUNT loopStart) {" )
if(SWITCH_pressed(&button)){
if(light == 1){
//
LED_on(&statusLED);
// act_setSpeed(&servo1,100);
delay_ms(10);
ax12SetLED(&servo1,1);
rprintf("on\n");
light = 0;
}
else{
// LED
LED_off(&statusLED);
// act_setSpeed(&servo1,200);
delay_ms(10);
ax12SetLED(&servo1,0);
rprintf("off\n");
light = 1;
}
delay_ms(500);
}
Toggling the LED on the Axon works every time, but toggling the LED on the AX12 does not.... But it does work. Haven't had success with the act_setSpeed commands and the RX12s. Is my approach to interpreting the circuit a potential problem here?
Like I said, multiple things I need to try to further investigate this (baud rate, other servo commands, setting ID, diff UART, etc.), so this post is primarily me verifying that I interpreted the circuit correctly.
Thanks,
-Gert