chipKIT® Development Platform

Inspired by Arduino™

Building a fiber Uno32 to Uno32 device for a robot.

Created Thu, 31 May 2012 00:56:30 +0000 by Demolishun


Demolishun

Thu, 31 May 2012 00:56:30 +0000

Hello,

I am currently working on building a fiber Uno32 to Uno32 device for a robotics application. We need to be able to control some equipment with microsecond timing. I was using an AVR Atmega8u2 and while it works I wanted more speed and to be able to communicate at highers speeds.

The AVR to AVR version maxed out just under 1Mbps. The Uno32s can handle 20Mbps, but the best I can get out of the UART with the Uno32 is ~6Mbps before errors start kicking in. That is sufficient for our needs so we are running at 5Mbps for some margin. I can take those directly to 5Mbps fiber modules. Round trip without a whole lot of difficulty I can send 2 bytes of data between the 2 Uno32s in 16 microseconds. I am shooting to make the interface work within 50 microseconds. With the 80Mhz speed of the Uno32 it helps a lot compared to the 16Mhz of the AVRs I was using.

I will be creating a shield (prototype for now) for the fiber interface. However, I think a fiber shield could be a nice addition for Uno32 or Uno users as well. So at some point I may put together a fiber shield. Fiber RX/TX modules are a bit spendy ($20 to $30 for a Tx/Rx pair that can handle TTL) so a shield would cost about $40 just to build. Now you could do it cheaper and use a TOS link, but I needed to use SC/ST fiber connectors. Also, I am not sure TOS links would handle 5Mbps.


Demolishun

Wed, 06 Jun 2012 03:03:03 +0000

14uS

  1. Trigger fed to input using rising edge interrupt and call interrupt.
  2. Grab 1 byte of data and pack into 2 byte transmission.
  3. Send across 5Mbps connection.
  4. Trigger equipment on the other end of the serial connection.
  5. Pulse sensor and read response.
  6. Computer that originated the pulse gets the front of the pulse 14uS from initial trigger.

This processor is dang fast!

Next steps:

  1. Test over fiber tx and rx devices. Might add a few hundred nanoseconds.
  2. Integrate USB host and USB device to grab and send serial data over fiber for non time critical data.
  3. Our robot will be able to go into service!

Thanks for developing this platform. It took me 1 week to change from and AVR platform using LUFA to the Uno32 platform. This means your libraries really are up to speed! I have programmed PICs before, but never even touched a PIC32 until now. The MPIDE and libraries saved me a LOT of time.