go away spammer

Author Topic: AX-12 to Axon circuit  (Read 1955 times)

0 Members and 1 Guest are viewing this topic.

Offline GertlexTopic starter

  • Supreme Robot
  • *****
  • Posts: 763
  • Helpful? 24
  • Nuclear Engineer · Roboticist
    • Index of Oddities
AX-12 to Axon circuit
« on: May 06, 2011, 09:14:21 PM »
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) {" )
Code: [Select]
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
I

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: AX-12 to Axon circuit
« Reply #1 on: May 08, 2011, 05:18:50 AM »
Give me a while to get it set up again on my breadboard...and I'll get back to you.
Edit: -- ok --

I've retested everything and it works at 1M baud.
I've attached a quick sketch of how to wire it up.
All the stuff in the bottom right is just to stop the unused gates from flapping around in the breeze due to noise - not needed for quick testing.

One thing that has dawned on me is in your other thread you asked 'Do I need I2C if I am just transmitting' - to which I said no (wasn't sure why you needed the IsquaredC bus anyway). But I guess what you meant to ask was 'IC2' - the inverter. In which case the answer is YES. If you dont have a hex inverter chip to hand you may be able to make one with a transistor and a couple of resistors.

 
« Last Edit: May 08, 2011, 08:04:57 AM by Webbot »
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline GertlexTopic starter

  • Supreme Robot
  • *****
  • Posts: 763
  • Helpful? 24
  • Nuclear Engineer · Roboticist
    • Index of Oddities
Re: AX-12 to Axon circuit
« Reply #2 on: May 08, 2011, 08:54:25 AM »
Thanks, Webbot, I'll look into it this afternoon, hopefully (Mother's day and all).

I was confused earlier when I asked about I2C since Admin had mentioned it in some old posts regarding the AX12 (e.g. pre-webbotlib I think).  Let's just forget I ever asked that question :).  I do have the actual ICs required.

Connecting all of the grounds was one of the things I had wondered about, but forgotten by the time I got around to posting.  I look forward to trying that, and potentially the connections of the unused gates.

Thanks!

Edit: Success! Connecting the two grounds makes the signal go through every time.  (I now return to my more general thread in the Misc forum)
« Last Edit: May 08, 2011, 08:01:03 PM by Gertlex »
I

Offline GertlexTopic starter

  • Supreme Robot
  • *****
  • Posts: 763
  • Helpful? 24
  • Nuclear Engineer · Roboticist
    • Index of Oddities
Re: AX-12 to Axon circuit RX-28 RX-24 EX-106
« Reply #3 on: July 12, 2011, 10:23:04 PM »
Working on my quad, I wanted to redesign the tristate buffer board I wired up... But with a twist: the ability to control either 3pin or 4pin Dynamixel servos with UART by swapping the position of a jumper pin.  I found that I could fit everything I needed on the same size board (1.25"x1.75", found here).

I did the design in Inkscape. This allows me to copy/paste all needed documentation into the document for reference. Design and what the screen looks like with this approach are attached. When I go to wire it, I can just follow this without having to know what each wire is for :P  (though I usually check every connection as I go)

On the circuit, blue lines are ground wiring, red is 11.1 V battery Vcc, pink is 5 V regulated via Axon, and dashed lines are connections under the board... Short grey lines are solder connections between holes. The 3 header pins at a right angle in the center of the board are where the jumper is placed.  I stick to the general rule of having the ground pin of external connectors be along the perimeter of the board (like the Axon does...)
I

Offline GertlexTopic starter

  • Supreme Robot
  • *****
  • Posts: 763
  • Helpful? 24
  • Nuclear Engineer · Roboticist
    • Index of Oddities
Re: AX-12 to Axon circuit
« Reply #4 on: July 29, 2011, 08:18:47 AM »
So I added a few features to the board and have since made the board.  It now features:
-Tristate buffer + hex inverter for 3pin Dynamixels control
-Max 485 for 4pin Dynamixels control
-Communication type is selected by a jumper
-Separate TRD headers fro the two communication protocols (probably unnecessary...)
-5V switching regulator with an output header (in my case I use the output power for a camera)
-LED indicators for the 11.1V LiPo input, and for the 5V supply to the ICs (because of how I will be mounting the board, the LEDs are on the underside of the board.
-ICs are powered by 5V from the axon, or by jumpering an extra 5V output pin from the regulator to the 5V IC input
-Header for LiPo battery monitor

A note on the previous version, the two wires to the Hex inverter were backwards; this prevented data from the servos being sent back to the Axon, but did not fry anything....

I'll play with eagle and have an actual schematic up eventually.

"Design" and pics attached :)
I

 


Get Your Ad Here