EJK

Robotics Wing Features?

Recommended Posts

Hi!

 

My research group currently uses an NI cRIO as an FPGA and processor, with a custom breakout board for low-level robot IO: http://cwrucutter.wordpress.com/2012/11/09/cwru-cutter-robot-architecture-low-level/

 

I would like to use a Papilio instead as a customizable, low-cost, all-in-one SOC which interfaces with a higher-level PC. So, I'm putting together a MegaWing for robot I/O based around the Papilio. I'm curious what (if anything) people would like to see on a robotics-oriented MegaWing. 

 

Here's my current list of requirements based on my robot:

  • 4x Serial ports. Not sure if we need RS-232 or TTL. Possibly both.
  • 4x Differential line receives
  • 4x Relay Drivers. Capable of sourcing enough current for a relay (100-300 mA)
  • 8x Analog inputs. Or so.
  • 8x Straight-through GPIOs with pull-up resistors. Used for various switches, indicators, or digital IO (PWM input/output, other SPI or I2C peripherals, etc)
  • 2x H-Bridge motor controller

Are there any other things you'd like to see for robotics (maybe an onboard IMU IC, or something of the sort)? Or things that maybe arent so necessary?

 

Also- 2 spare wing slots (as in the Retrocade) would be really great for a robotics application because we could add smaller wings if it turns out we need more IOs based on the specific application. 

 

Thanks for any input!

 

EJ

Share this post


Link to post
Share on other sites

Hi, my answers are based on ZPUino on Papilio boards:

  • 4x Serial ports. Not sure if we need RS-232 or TTL. Possibly both.

TTL out of the box with ZPUino, add level transceivers for RS232.

  • 4x Differential line receives

Depends on signaling. Check the specific FPGA datasheet for common ones, like LVDS12. See UG381 for Spartan6 architecture of IO blocks. Note that Papilio is, however, not optimized for diff inputs/outputs. Can you be more specific ?

  • 4x Relay Drivers. Capable of sourcing enough current for a relay (100-300 mA)

Not without a driver. FPGA are usually only able to source/sink about 14mA. So an external driver is needed.

  • 8x Analog inputs. Or so.

ADC like those present in the Logicstart megawing can do 8 channels at a decent speed.

  • 8x Straight-through GPIOs with pull-up resistors. Used for various switches, indicators, or digital IO (PWM input/output, other SPI or I2C peripherals, etc)

Out of the box. We can configure each with either pull-up, pull-down or straight output.

  • 2x H-Bridge motor controller

Choose a driver for this. Any that can handle 3.3V TTL/CMOS should do it.

 

Alvie

Share this post


Link to post
Share on other sites

4x Differential line receivers:

  • In our case, we're using four differential pairs for quadrature encoders. Sending encoder output directly to the FPGA/ processor/ whatever over a few feet of cable loses encoder counts in our situation. 
  • I can't remember the exact specification off the top of my head.. LVDS12 or LVDS33? Not sure right now
  • Not sure if it would be better (aka easier) to try to use the built-in differential receiver in the Spartan 6, or to use a dedicated IC.

  • I'd be looking for four receivers only (no transmitters needed in my application)... Would differential transmitters be a common use case?? I cant really think of too many small-scale situations where they would be necessary

  • I may add the differential receivers to a smaller 8-bit wing without taking up I/Os on the larger MegaWing

     

FPGA are usually only able to source/sink about 14mA. So an external driver is needed

 Yes- definitely planning on external circuitry for the relay drivers. I will also want a separate voltage input (5V-12V) which directly drives the higher-current relay outputs

 

We can configure each with either pull-up, pull-down or straight output

Great to hear. I saw something about this in a document note... To be specific, are pull-ups/pull-downs declared in the .ucf file? 

 

ADC like those present in the Logicstart megawing can do 8 channels at a decent speed.

Currently planning to use the same ADC from the logicstart. Might as well reuse components since the VHDL already exists.

 

How about a RTC? 

That's a possibility. I havent worked with RTCs before since most of the robotics I've done has been a "soft" real time, and I haven't worried too much about the absolute time. I'll take a look. Any idea about the benefits of adding RTC?

Share this post


Link to post
Share on other sites

Well, we have been working on a Robotics Megawing - with 2~4 stepper, 2~4 servo, 4~6 sensors (both in analog and digital mode) and a camera interface. The final specs were a bit fuzzy as there are too many options to fit within the 48 IOs and limited physical space available. This is the status of the board I left unfinished (see attached image). It used 4x DRV8833 motor controller (2 H-bridges, capable of 1.5A current, supports low voltage motors 2.7~10.8V typically used in simple robotics projects) which are driven by PWM - could be configured for 4 stepper motors or 8 DC/servo motors or combinations of them.

 

It also has a OV7670 VGA camera interface on the front and 6 sensor interfaces on front and back, which feed into a 74LVC14 schmitt trigger buffer and also a 8-channel SPI ADC, so all the sensors could be used either way. The sensor connectors have a VCC, GND, 1206 footprints for series emitter limiter and parallel load resistors that were intended to be left unpopulated for the user.

 

There was also a version planned for high voltage motors (8~35V) but that might have been classified as a CNC Megawing and been a entirely different product.

 

One of the issues here was possible requirement of a 4-layer board (with thermal pad on the motor driver devices and the continuous copper area it requires, there is not much room for routing the sensor and other connections, especially through two kinds of signal conditioners). Nevertheless, if there is enough interest, we can go ahead and finish this up, with inputs from you guys.

 

Girish

 

 

 

post-32023-0-79776000-1366262928_thumb.g

Share this post


Link to post
Share on other sites

BTW, as for the requirements for differential lines and relay drivers, I suppose we can leave the camera part (which uses 14 IOs) and in favor of LVDS interface and any other interfaces required (RS232, SPI etc), perhaps another 8-bit SPI based ADC os such. Or simple leave the group of those 14-pins as GPIOs to use with another daughter card.

Share this post


Link to post
Share on other sites

It also has a OV7670 VGA camera interface on the front and 6 sensor interfaces on front and back

Can you specify the sensor interface? Are these just arbitrary analog/digital inputs, or are they designed with a specific sensor in mind?

In my opinion, I wouldn't see a robotics wing needing a camera interface. For my purposes at least, the papilio would serve as a reconfigurable I/O board, where the main responsibilities are analog/digital input/output, and lots of communication (to other sensors, to a high voltage motor driver, to a higher level PC, etc). Hence the focus on RS-232/ TTL serial. A camera is the responsibility of the higher-level computer (or a separate papilio megawing).

In the same idea, I see it being beneficial to develop a common robotics baseline on the MegaWing, while still leaving two 8-bit wing slots open- One of the main benefits of the papilio over any other open source microcontroller board is that WE have the flexibility to add whatever else we need. A robotics-based series of wings could then fill in the gaps. In my case, I also need a differential receiver (could go on 1 wing), and maybe some extra serial ports. Another option is a 16-bit camera wing, if desired.

Another thought about analog inputs- Would it be useful to have an op-amp buffer with a low pass filter to drive the analog inputs? Or, I suppose we could assume that all analog voltage sources are low-impedance and low-frequency?

Share this post


Link to post
Share on other sites

I did mention the sensor interface, but mixed it up with camera, my bad.

 

- which feed into a 74LVC14 schmitt trigger buffer and also a 8-channel SPI ADC, so all the sensors could be used either way. The sensor connectors have a VCC, GND, 1206 footprints for series emitter limiter and parallel load resistors that were intended to be left unpopulated for the user.

 

BTW, the camera interface is meant for the cheap $10 camera used by Voelker, in his SpartCam project. The board has a 300mA 2.8V LDO to supply the camera. The camera interface on the right hand side of the image (supposed to be front for the robot) has the same pinout as that of the camera.

 

The board has 4 sensors interfaces in the front to assist in obstacle detection and two in the rear. The connectors (J2~J7) used are JST 2mm pitch PH type 4-pin vertical connectors. The emitter output (that has the onboard series limiting resistor) can be ignored and it may be used as a 3-wire interface (VCC, GND, Signal) compatible with many analog sensors.

 

Well the camera wing does use 14 IOs. We can indeed simply have those IOs on a open 16-bit (or 2x 8-bit) slot, which can be used by a VGA camera or any other module. The ADC used is the TI ADC088S022 (8 channel, 8-bit, 250ksps but pin compatible with 12-bit, 1Msps part in a family of 9 variants), none of the inputs have any signal conditioning as most analog optical sensors working at the same voltage will not need it when properly tuned, OR the most probably sensor module itself has conditioned outputs. The same sensor signals also goes into the Schmitt trigger buffer, so they may be used as a digital signal as well.

 

The Megawing was designed for a basic robotics projects, to be mounted on a mobile platform. Most advanced projects would need many interfaces, both in terms of numbers and types that would be beyond a simple Megawing with limited IOs and physical space. Yet it also attempts to be as flexible as possible to be usable for a wider range of projects. Provision of open wing slots certainly adds to the flexibility of the board.

 

Girish

 

Share this post


Link to post
Share on other sites

So I've decided to go in a bit of a different direction... I like the idea of having some capabilities built in, but for a robotics research prototype platform it just makes sense to me to keep as many spare wings slots available as possible, and have many different wing options available.

 

My current idea is a megawing that uses just 16 IOs and keeps a full 4x 8-bit wing slots available. The MegaWing will support a higher voltage (3V-11V ish) for motor drivers, relay drivers, and analog input. For me, analog input is desirable to have on the same wing as the motor drivers because that will give us built-in current monitoring. 

 

All other robotics features will be incorporated into separate wings, because basically everything else is a standalone feature that could be added or removed easily for different robotics projects (differential line receivers, buffered IO, serial RS232 or TTL, Camera interface, etc). 

Share this post


Link to post
Share on other sites

Its difficult to manage things with just 16 IOs. Currently the IO usage on the board is as follows:

 

Motor control: 24 (4 PWM inputs, sleep control and fault ouput on each of the 4 drivers)

   - both sleep and fault could be removed, making it 16 IOs for motor control alone

ADC SPI interface: 4

Sensor digital inputs: 6

 

This makes a total of 34 IOs for motor control (8 half-bridges in all which can be used for DC/servo motors, stepper motors or even used in parallel (in the same device) to make one full bridge with current capacity upto 3A) and 6 sensors (both analog and digital)

 

Removing the sleep and fault signals gets us 8 more IOs, making it 22 free IOs onboard. Using 16 of them to a wing slot still leaves 6 odd IOs free which may be used for some onboard features like buzzer, audio output, blinking LEDs, headlights etc. Maybe just a simple power driver with a transistor on 5V brought out on a connector will be ok. It could be used to drive LEDs, a small speaker etc. Also, the ADC has 8 inputs and only 6 are used, the other 2 can be used for dedicated analog sensors or even used to monitor the battery voltage.

 

The supported motor voltage range with DRV8833 is 2.7~10.8V

Share this post


Link to post
Share on other sites

Ah! I should specify: I am already moving ahead with my own robotics megawing. I have a schematic down for the main wing and will be working on layout/ finalizations for the next week or so. I'm also making a few robotics-oriented wings which I'll print along with the megawing. I would love to share schematics and results once I'm done, and anyone is obviously free to adapt the board as desired.

 

The megawing schematic currently uses:

  • 4 PWM outputs: Goes to 2x DRV8833. So there are 4 motor outputs total, or 2 parallel outputs
  • 2 DRV8833 shutdown outputs: Goes to each DRV8833
  • 1 Fault input: OR-ed output from each DRV8833
  • 2 Relay outputs: MOSFET buffer to the Vmotor line
  • SCLK, DOUT, DIN for main SPI bus
  • CS1 to analog inputs (2 analog inputs motor current going to each DRV8833)
  • CS2 to a GPIO expander, MCP23S08 (2 digital outputs used for onboard LEDs)
  • Interrupt input from the GPIO expander
  • A Buzzer for annoying noises :)

And thats 16 pins! It includes 2 user LEDs, a buzzer, 6 free analog inputs, and 6 configurable low-speed GPIOs (maybe 50ish kHz ???). There's also four motor outputs and two relay drivers running off a higher voltage supply. 

 

This leaves four 8-bit wings available for expansion. The wings I'm planning to make in the first revision include:

  • Serial Wing (RS232, TTL)
  • Differential Line Driver/Receiver
  • GPIO expande

I'll provide more updates as I progress. Schematic is 90% done. Board layout hasnt started yet. 

Share this post


Link to post
Share on other sites

Just a note about differential pairs.  The Spartan 6 has differential transceivers however due to the way that the routing is done to keep the board simple for 2 layer fabrication none of the differential input pins on the A or B wing slots are routed to the same wing slot for both signals in the pair, I believe the C wing slot (the one on its own) may have some differential pairs routed to it.  Given this you will either need to use differential transceivers on the wing so that any GPIOs can be used, or either make a wing that takes two 8 bit slots one from A and one from B to get the differential pairs or only use slot C for this, either way I believe which IOs specifically are differential pairs depends on which wing slot you pick so the wing would not be able to be used in any wing slot.

Share this post


Link to post
Share on other sites

Hi!

 

Finishing up a 1st draft layout for a robotics-oriented Wing Set.... So far I have:

- Megawing: Everything listed in the post above, with 4x 8-bit free wing slots

- Serial Wing: 2x DB9 RS232 connectors

- Low Speed GPIO Wing: 16 low speed GPIOs, plus an led

- Differential Receiver Wing: 8x Differential Receivers (not sure anyone would ever need 8x receivers, but, oh well)... Thanks for the diff. pair tip.. I decided the easiest way to go would be a dedicated IC, at least for now. 

 

I'm planning to run a batch of 1-2 boards each for research use... Is there any interest in making these more widely available? Similarly, are there other wings of interest for robotics purposes? It would be great to build up a larger selection of wings, since, in my opinion, reconfigurable IO is a serious motivation for using Papilio vs other dev boards like Arduino or Raspberry Pi for robotics (plus it could be a really great use for the SoC editor!).

 

I'll attach the board images for anyone interested. I strayed from Eagle for this run (sorry!) but I was interested in learning a different tool so, here it is. I could consider converting back to Eagle if there is enough interest and I have enough time. 

post-36612-0-31402200-1368249768_thumb.p

post-36612-0-78726900-1368249771_thumb.p

post-36612-0-32046000-1368249775_thumb.p

post-36612-0-62605200-1368249778_thumb.p

Share this post


Link to post
Share on other sites

Hi EJK, great work!

 

About the RS232 wing - I think DB9 connectors are too bulky to use especially on a mobile robot. I have made a dual RS232 wing (with RTS/CTS handshaking, or can even be used as quad RS232 without handshaking), I already have the PCBs, and waiting for the TSSOP MAX3232s (will arrive by Monday from Digikey). For RS232 connections, I have used two regular 100mil pin headers so as to use inexpensive and easily available cable options. Please see the attached image.

 

For differential recievers, which IC have you used? Its a bit redundant since the FPGA already has differential IOs, maybe a revision of the Papilio board that will route as many differetial pairs as possible, properly will be great, and will solve this problem at no additional cost. Till then, a special wing is probably the way to go. Neverthelss, if speed is not very critical I think even current Papilio boards not routed for differential IO can handle a few tens of Mbits of differential speeds since the pairs are slightly unevenly spaced and mismatched by at the most 100~150mils in most cases which is within recommendations of USB 1.1 standard for 12 Mbps. Maybe we could test that before going for a dedicated wing for the purpose.

post-32023-0-72501400-1368250726_thumb.g

Share this post


Link to post
Share on other sites

I like your rs-232 wing better! Very nice, clean, and better size. 

 

 

I'm currently using the AM26LV32C: http://www.ti.com/lit/ds/symlink/am26lv32.pdf

 

I do agree that using the FPGA lines on the Papilio outputs would be better, but like OmniTechnoMancer said, the differential pairs are routed to different wings. A specialized differential wing is mostly for convenience at this point.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now