Xevelabs

To content | To menu | To search

Tuesday, December 6 2011

The shape of things to come

USB2AXv3_with_heat_shrink.JPG

The USB2AX PCB will be a little wider so that the Dynamixel connector will completely sit on it, and also a little longer to let some room between the connector casing and the MCU.

Also the OSHW logo will finally get where it needs to be!

It's getting closer :)

Thursday, November 24 2011

USB2AX: the early days...

And now for a small lesson in ghetto prototyping, I present you the first two USB2AX!

v0.1

USB2AXv0.1_a.jpg
When you don't want to bother with a PCB...

The very very first proto was a horrible mess. I had bought two ATMega32u2 in TQFP package, but without any idea on how to make the first version of the board. And suddenly, the idea to just not make one crossed my mind. All the wiring is done using Teflon-coated 36awg multi-strand found on a popular RC hobby website (I love this stuff, so thin!).

A few hours later I inserted this monster into an USB port of my computer, only to be greeted with... nothing. I thought the internal 8MHz oscillator of the ATMega would be enough to program it with the USB bootloader, but I was wrong, as I could have known had I RTFM a little more carefully.

USB2AXv0.1_b.jpg
After adding the crystal...

So I installed a big through-hole 16MHz quartz I had lying around and began to look for pump capacitors I had not even thought of ordering. I finally unsoldered two from a nondescript board I had in my "electronic stuff" box, where I put all the scavenged treasures I always dream of making something from, and hardly ever do. The values might not be right, but it did the trick and I could witness for the first time the apparition of an "Atmel DFU" device in the device manager of my WinXP laptop! (At the time, Win7 64bits did not recognize the signature of the drivers provided by Atmel. This has been corrected.) That was enough to motivate me to continue working on the project, hopefully with some hardware that does not threaten to break just by looking at it!

v0.2

A few days later, JLG made the first version of the (2-sided) PCB, and I went to have some made with the good old etching method. One problem with that was the vias. The board had to have a few of them, and I could not find a suitable drill to bore them... so I had to improvise again. Meet the Punk USB2AX!

USB2AXv0.2_a.jpg USB2AXv0.2_c.jpg USB2AXv0.2_b.jpg USB2AXv0.2_d.jpg USB2AXv0.2_e.jpg USB2AXv0.2_f.jpg USB2AXv0.2_g.jpg
When you have a 2-sided PCB and no drill small enough to make the vias... let's just say "A man's gotta do what a man's gotta do" ;)

Some simplifications were made, again, when assembling it. The two 22ohm resistors on the USB lines are omitted (saves a few vias, and even if it's baaaaaad, it works...), and I did not put the LED and its resistor. Each remaining via is replaced by a ring made from through-hole component leads (these are always useful!), placed so that it would not touch any other of these "external via", or any component. For a small board like this one, it works surprisingly well. Once this board gave sign of life and had been tested with the USB to Serial example of LUFA, I could safely order professionally-made ones on BatchPCB.

That's it for today! Next time, I think I will talk about all the tribulations involved in turning the USB2AX into a commercial product! ^^

USB2AX

It's about time I talked about this one. This post has been a work in progress for more than 6 months!

The idea behind the USB2AX

The USB2AX board is the small programmable USB to AX and MX-series Dynamixel adapter we designed with my friend JLG, in the early stages of developing the Xachikoma.

Basically, it's a gizmo you plug into an USB port that creates a virtual COM port on your computer, through which you can communicate to Dynamixel servos. It behaves much like the USB2Dynamixel made by Robotis (in most cases, it's a drop-in replacement), but is limited to AX and MX series servos. It does not provide power to the servos, this has to be done by other means like using a SMPS2Dynamixel Adapter or a home-made power cable.

I made the design (mostly from things I learned from the Arduino Uno and Adafruit ATmega32u4 Breakout Board+, but adding my own n00b mistakes), and he made the first versions PCB, under the constant pressure of me asking to make the board smaller, SMALLER, SMALLER!

USB2AXv1_top.jpg
USB2AXv1_bot.jpg
Version 1

Making such a beast is far from being a new idea, yet my version is the smallest of the "clean" ones I know of, and it's more versatile than most. I would not have made it if I did not have a real need of it: I use 4 of them in the Xachikoma.

The core of the project is an ATmega32u2, a 8 bits micro-controller from ATMEL without much bells and whistles, but with a full-speed USB device port and an UART. Its little brother, the ATmega8u2, is used to replace the FTDI in the Arduino Uno, and its bigger cousin the ATmega32u4 will be the heart of the upcoming Arduino Leonardo. Having a micro-controller do the bridge between USB and the half-duplex serial bus used by Dynamixel actuators is interesting for two reasons: you can use software tricks to create the half-duplex line instead of having multiple components, and you can create more complex firmwares which not only channels bytes from one side to the other, but can perform treatments on them.

The half-duplex trick used here is the same some people use to make an Arduino talk to Dynamixels by just tying TX and RX together. This is also used by the Arbotix controller and others, just to name a few sources you can learn from. The idea is that in the ATmega, you can turn ON and OFF each part of the UART (receive, transmit), and when one is not used, the corresponding pin can be left floating (meaning it does not impose a particular logic level to what it's connected to). This way, you can leave the receiving part ON most of the time, and switch to transmitting mode only when you have bytes going from the computer to the servos.

The ability to update and experiment with the firmware is potentially a great strength: not only can you optimize the inner workings to lower the latency (compared to the usual FTDI chip), but you can also add nifty features by allowing the USB2AX to understand what it receives and to react to it. Instead of only transmitting bytes blindly, you can imagine implementing macro commands, like a SYNC_READ (iBot has done so). Another possibility is to change completely the way the computer sees the board. For example, you could make a joystick with force-feedback based on Dynamixels, and program the USB2AX to appear to the OS as a plug&play joystick, allowing seamless use of your über-joystick in any game!

Some inspirational material around the topic of "stuff speaking with the dynamixel actuators":
http://billyzelsnack-robotics.blogs...
http://billyzelsnack-robotics.blogs...
http://www.siempreaprendiendo.es/pr...
http://www.pablogindel.com/2010/01/...
http://websvn.hylands.org/listing.p...
http://robosavvy.com/forum/viewtopi...

Latest developments

The latest version is the V3.0a (V2 never actually lived :/), and improves durability and reliability while still keeping a small form factor. Basically, this version should be roughly on equal footing with the USB2Dynamixel from Robotis when it comes to communicating with AX-series Dynamixels, just smaller and with slightly lower latency.

USB2AXv3.0a_top.JPG
USB2AXv3.0a_bot.JPG
The latest V3 prototype.

With a real USB plug, the risk of shoddy connection should be reduced close to zero. This causes a problem however, as the standard male Type A USB plugs are 20mm long, more than twice the size previously allocated to the plug and more than two third of the total length of the original board! That's why we remade the PCB from scratch, with better layout, smaller traces and smaller components where possible (0.5mm pitch QFN package for the ATMega32u2, small SMD crystal, 0402 capa and resistors...), even if it means that it can no longer be assembled with the good old soldering iron. That's an opportunity to practice reflow soldering with a hot plate, yeah :D Also added from the first versions are the recommended decoupling caps (!) and ESD protections on both USB and serial lines, to reduce risks of frying the board or any of the costly equipment connected to it.

USB2AXv3.0a_conn_bent_top.JPG
a V3.0a, plugged and connected to an AX-12+.

P1010183.JPG
It took me a few afternoons to make all of these, mostly by hand...

USB2AX documentation, schematics, BOM, code

(and if you may wonder: ParanoidStudio is the name under which we hack robotics stuff with this friend).

I still have a few units of the improved version (better quality and durability). If you are interested in buying one, please say send an email at xevel {at} xevel |dot| fr ! A commercial version will most likely see the light of day in a few weeks/months too.

Some threads with information and discussions about this version: http://forums.trossenrobotics.com/s...
http://robosavvy.com/forum/viewtopi...
http://forums.trossenrobotics.com/s...

Next time, I'll talk a little about the first prototypes of USB2AX, I had some real fun doing this...

Saturday, September 24 2011

Eurobot 2012 Rules

EDIT: The technical annexe as well as the English version of the slides are here : http://www.planete-sciences.org/for...

EDIT2: Rules available here: http://www.planete-sciences.org/rob...

The official file detailing the rules will be available in up to a week, when both English and French versions will be ready. Technical documentation sould be available tomorrow around noon.

See all the slides here : http://wall-y.fr/index.php?post/201...

See rendered video of the playing ground, with elements and stuff : http://www.youtube.com/watch?v=hjiC...

Thread with questions about the rules (in French) : http://www.planete-sciences.org/for...

What do we know for now?

  • Colors are Red and some kind of Purple
  • The table is 2000x3000mm (100mm shorter than all the previous editions) and is the same as the one used in Eurobot Junior. The borders are still 70mm high.
  • Up to two robots per team (1200/1600mm at start/opened for the biggest, 800/1000mm for the small one
  • Actions:
    • uncovering the map (worth 5 coins) : remove a piece of cloth that covers half of the map, which is located outside of the table. Each half of the map is covered with a piece of cloth of the color of the team, and you should remove only the one of your color. It is fastened using velcro, and the robot(s) has to keep the item once it has been removed, it can't leave it on the playing field. It HAS TO be removed from the front.
    • collect treasures that lies on bottom of the see, on the islands and on the totems: get coins (CDs painted white, with a small wooden cube attached) and bullions (wooden bars roughly resembling a... bullion) and put them safely in your ship (zones on your side of the table). The ship is composed of the Captain's Chambers (starting zone), a chest with an openable cover (opposite from the Captain Chambers) and the deck (between the two). Up to 4 coins and an bullion can be put in the Capitain's Chambers and can not be removed by the other team. All other riches put in the rest of the boat can be plundered without mercy. Coins are abviously worth 1 coin each, and bullions are worth 3 coins each. Some coins are replaced at start by black coins, worth 0. Which ones are replaced by black ones is the only random thing in the whole rules.
    • send messages in bottles: messages can be sent by pushing a button. Two messages from each team are available and each one is worth 5 coins. You are forbidden from activating the ones of the other team.

Victory: accumulated coins +10

Draw: accumulated coins +5

Defeat : accumulated coins +2

Scratch/disqualification: no coin.

We'll se more when the rules are released!

Friday, September 23 2011

Eurobot 2012 rules presentation tomorrow

Tomorrow (2011/09/24), I'll attend the presentation of the rules for Eurobot 2012, and will try posting photos and infos on twitter, live. That's a first try for me, so don't be mad if it does not go as planned ;)

In the future, I will continue to use this twitter account to post quick news that does not really require a full blog post.

Here is the address to read it online http://twitter.com/#!/xevel2 (also available on the sidebar, just above the Gallery and Youtube channel links).

Friday, September 9 2011

Featuring XD

If you happen to pass on the website of Robotis, you might notice this familiar robot:

robotis_webite_01.jpg

This advertises this interview of me, in the Meet our Power Users section :D

I'm famous \o/

The last question is about the MX-28, a beast of a servo Robotis released a few weeks ago. You can read a very good review, as well as find links to code to use it on Hizook.

I have been lucky to be asked to beta-test it (full disclosure: they gave me two units in order to evaluate and give feedback prior to official release). Basically, it's a modernized and optimized RX-28 (same body, and it was even referred to as the RX-28M when they began talking about it), with a contactless magnetic encoder and a 32 bit controller inside. I use the same kind of magnetic encoders to detect rotation of the wheels of the Xachikoma, albeit mine are made to detect linear translation or off-center rotation whereas the ones used in the MX-28 are aligned with the rotation axis. The controller is an STM32 running at 72MHz, and this allows a bunch of improvements over the 8bit, 16MHz ATMega8 found in previous models, the best of it being a full PID controller and communication up to 3 times faster than previously.

A nice refreshment of the line, that will hopefully be followed by updated versions of the AX-12A, AX-18A, RX-24F, RX-64 and EX-106 ;)

Friday, July 1 2011

There, done.

Our last match is behind us, and we are now ready to enjoy being 4000+ km from home (honestly, we nearly didn't see anything of Astrakhan since we arrived...)

The results of all matches:

XD - Green Birds (Germany) : 10 - 220

Our first match was with our awesomely cool neighbors from Germany. The configuration was one of the ones we had no time to develop software for, and most of the code was still untested on real tables because most of the time there was none or they were not available. We got out of the starting zone and then the pawn-detection algorithm probably took a reflection on the (glossy) table for a pawn.

XD - Itzamna (Mexico) : 0 - 50

We played the second match with cool guys who made an awfully longer trip than ours to get there. We played blue for the first time, and it should have been a smooth match as we had ironed out and tested the problems we saw during the first match. Unfortunately, 24+h without sleep does impair your judgment, and we thought we could run a data-collecting script in parallel with the match script... big mistake. They both tried to access an unmanaged resource, and the data collecting script won, leaving no access to the match script to do its job. So the robot did not move, and after this round we were in the last position on the scoreboard.

XD - RoBUTE (Hungary) : 70 - 220

The third match went pretty well, all in all. We played with a team from Hungary that had a pit next to ours. Their robot scored a lot of points, and gave us 10 in the process ^^. In the meantime, thanks to all the work done on the image processing algorithms by JLG, Xachi managed to do its funny configuration flawlessly, earning us another 50 points.

XD - M.M.M.Malek (Czech republic) : 60 - 110

With the basic match strategy now functional, we decided it was time to get some serious fun. We had worked the whole first night on the border passing strategy, and it we finished the details like "is there a figure or a pawn directly over the border?" in the morning, so we were ready to give it a try. FLAWLESS VICTORY \o/ As you can hear in the video, the crowd was cheering, a rare sound in all the series of matches until now ;)

XD - UTP Primax (Malaysia) : 10 - 70

For the last match, we tried to renew our prowess, and also crafted a much more interesting show in case a king or a queen happened to be just on the other side of the border, but Murphy decided to come pay us a visit (it had been a long time, after all the robot had been extremely reliable until now). The way was clear to cross the border, and a t first it looked perfectly ok... until the end, when the robot decided to stop 1s earlier than expected when going back home (we suspect an exhaustion-induced typo in the code!). We did not get to show our alternative 'strategy', but that's probably for the best since it was not really polished and could fail more often than not...

That's how we roll

Wednesday, June 29 2011

Approved

We passed the approval phase with flying colors, executing a perfect Funny configuration on the first try!

Now we have to continue working on scoring real points in a real match, that is to say having a system that works in all configurations!

Photos to come!

Добро пожаловать в Астрахани!

We are in Astrakhan!

After some Champagne and a good meal in first class (thanks Aeroflot!) from Moscow, we finally arrived at Astrakhan airport. Airport arrival

We are planning to get a short night, to be able to start working early in the competition arena.

Welcome package

Our hosts are very welcoming (although they mostly don't speak English, funky trip ahead). But we already planned a raid to a good restaurant with some of them :)

Anti-mosquitoes

The mosquitoes seem to like us as well...

- page 3 of 8 -