Society of Robots - Robot Forum

Software => Software => Topic started by: Webbot on March 24, 2010, 11:24:42 AM

Title: WebbotLib with Dynamixel AX-12
Post by: Webbot on March 24, 2010, 11:24:42 AM
Anyone interested in testing out a pre-release of WebbotLib for controlling Dynamixel AX-12 servos?

NB You will need to make a small circuit (as shown in the AX-12 manual - just has 2 x ICs so very simple and could be done on a breadboard).

Give me a shout if you are interested and I'll send you some code
Title: Re: WebbotLib with Dynamixel AX-12
Post by: Pototo on August 25, 2010, 02:19:02 AM
alright...send me the code

lets do this!!!!
Title: Re: WebbotLib with Dynamixel AX-12
Post by: Webbot on August 25, 2010, 07:54:49 AM
Its actually released now in WebbotLib http://sourceforge.net/projects/webbotavrclib/ (http://sourceforge.net/projects/webbotavrclib/)

Don't forget to read the manual pages for this device. And you may also want to use my Project Designer to help create your project: http://webbot.org.uk/iPoint/37.page (http://webbot.org.uk/iPoint/37.page)


Title: Re: WebbotLib with Dynamixel AX-12
Post by: Pototo on August 25, 2010, 10:25:47 AM
so what about the circuit in the manual???
so you know what kind of chips am I suppose to get???? like, the name of the device????



thanks
Title: Re: WebbotLib with Dynamixel AX-12
Post by: Pototo on August 25, 2010, 10:26:57 AM
never mind...I think it says there in the manual
Title: Re: WebbotLib with Dynamixel AX-12
Post by: Webbot on August 25, 2010, 10:40:17 AM
Yep, you need:
1 x 10k resistor (value is not critical as its just a pullup). Low power ie 0.25W or SMD even.
1 x 74HC126 of which 2 gates are used
1 x 74HC04 hex inverter  - of which only one gate is used - so you could always use a transistor and 2 resistors instead if you prefer

Title: Re: WebbotLib with Dynamixel AX-12
Post by: Gertlex on July 20, 2012, 06:45:42 PM
(Figured I'd append to this topic)

I've been working on controlling the AX-12 servos with Pololu's Wixel board.  I've been combining my understanding gleaned from Webbotlib's libraries with the (relatively) standalong libraries written by a friend (github project here (https://github.com/RyanLowerr/Dynamixel-AVR)).  I've not fully succeeded in this, but that's besides the point.

The main thing that is done differently in the libraries linked is that instead of having one direction pin, routed to an inverter for the RX signal, two direction pins are used, thereby avoiding the need for an inverter.

What I'm wondering is: would it be possible to add an option in ProjectDesigner/WebbotLib for using two pins to send separate direction signals?  This would reduce the circuitry needed. (and would allow both my Webbotlib boards and the Wixel to use the same interface boards, since I'm coding for the two-direction-pin approach)

Another observation that may be of interest: The Wixel is a 3.3V board, like the Axon Mote, for example.  The 74HCN126 Tristate buffer powered with 5V does work with 3.3V signals to the buffer input.  Thus, at most, a level shifter should only be needed for the TX/RX pins on the Axon Mote.  I'm using the level converter from Sparkfun (http://www.sparkfun.com/products/8745) with the Wixel.

Thanks, Webbot!
Title: Re: WebbotLib with Dynamixel AX-12
Post by: Webbot on July 25, 2012, 04:49:17 PM
I have a gut reaction to doing it in software - one mistake ie enabling both Tx and Rx at the same time means you get a hardware short circuit and 'bang- out go he lights'. It just needs someone trying to play with either of the IO pins themselves directly for things to go wrong,
Yes its possible - but I don't like it.
Better - I think its possible to replace the Hex converter chip by replicating it with some of the unused gates of the 74x126 - ie you need one less chip but its all happening in hardware and no 'bang'.
Just need time to look at it.
Title: Re: WebbotLib with Dynamixel AX-12
Post by: Gertlex on July 25, 2012, 05:12:40 PM
I understand where you're coming from on that.

I've talked to others about getting rid of the inverter by using one of the unused gates.  I got instructions, that I think I followed correctly... and ended up photoshopping a diagram you did for me last year.  Result is attached.  I've built it, it didn't work (keep reading), and then switched the same circuit to the dual-direction pin approach, and then noticed that I had swapped tx and rx wires on my board.  So I don't know if it actually works or not.
Title: Re: WebbotLib with Dynamixel AX-12
Post by: Webbot on July 25, 2012, 05:39:28 PM
Just need some time to read the data sheets.....
Title: Re: WebbotLib with Dynamixel AX-12
Post by: KurtEck on July 26, 2012, 06:48:04 AM
FYI - I know that Arbotix board, used at Trossen Robotics (http://www.vanadiumlabs.com/arbotix.html (http://www.vanadiumlabs.com/arbotix.html)), which uses an Atmega644 does not have any special hardware.  They simply have a shunt to connect RX to Tx on Serial1.  They use software to know when to enable or disable the RX or TX pin.   This works as the servos do not send any unsolicited packets, they only respond when told/asked something.  They also have source code up on Google (http://code.google.com/p/arbotix/source/checkout (http://code.google.com/p/arbotix/source/checkout))

Kurt
Title: Re: WebbotLib with Dynamixel AX-12
Post by: Webbot on July 26, 2012, 12:02:58 PM
Yep - I've seen lots of code variants that require no extra hardware and rely on shorting the Tx and Rx wires together as you mention.

I could have adopted that approach as well but I purposely decided not to. Assuming most people are like me and constantly re-using the same board for different prototyping purposes then I deemed it as just too risky...ie if you've got your AX-12 project working but then program the chip for a different project which uses the UART then its very easy to blow up your UART/chip if you forget to remove the 'short circuit'. My 'recommended' additional hardware approach safe guards this from happening - and by including the hardware inverter (rather than doing it software with 2xIO pins) then it guarantees that you cannot have any mishaps.

Given that a lot of the WebbotLib users are hobbyists I didn't want to take the blame for blowing up their hardware. I guess I could implement it as an alternative in the future with a 6 feet high danger warning sign.

The other 'simple' approach is to say that if you never want to read any info back from the servos then you don't need a receive pin at all - just a transmit pin.

Thanks for the input though.