Confused with Xbee and Arduino

I am working on a project for a team at school that involves communicating with a computer to a car. On the car is an Arduino mega 2560 and multiple sensors. Although I am rather new at this, I understand how to use the few sensors we plan on and have done simple sketches on the Arduino. I also would like to design and fab a shield, more for learning than practical purposes. I am confused because i do not know whether the xbee shields that exist are Arduino mega compatible. Also, if I was to design my own shield, what pins would xbee connect with the arduino.I know the mega has separate communications pins that the UNO does not. Also, what circuitry is required, I know a 3.3v power and were to put it, but everything else I am confused about. And third, I am very new to eagle cad and have used Fritzing before but it has its limitations. How do I get the correct spacing for the pins and other components?

Here is a Tinycad generalization of what I want, correct me if I am wrong.

http://dl.dropbox.com/u/21442974/EVT%20electrics.png

Tom

The XBee needs only

3.3V power, gnd.

serial TX, serial RX

Optionally hardware handshake line like CTS

Note that the XBee’s are 3.3V and some Arduinos are not.

I’d think you could get most any hardware you need commercially - there’s so much out there. And not have to design.

If you must, look also at http://www.diptrace.com/ far better, and there’s a low-end free version.

ExpressPCB is what I’ve used for quick low volume.

In general, you need to think through power issues for your design.

Max DC current for the 3.3V pin on the arduino mega 2560 is 50 mA. I think the 1 mW xbee pulls 50 mA but the higher power ones can be as high as 340 mA. I’d suggest your shield provide an additional regulator. But even if you use the low power xbee, I’d add the regulator - in general don’t push up to the limit of specifications plus you probably have other 3.3V draws.

I’d be worried about those relay coils for three reason: a) being directly driven off of an arduino pin (it’s max is 40mA), b) back emf from the magnetic field collapsing when you shut off the current and c) general power rail disruption due to inrush current. If the relay connections are on your shield, I’d put driver transistors on your shield as well as some sort of power supply isolation. With your design as posted, both relays going off at the same time could cause your arduino to reset.

Thanks for the replies.

I have read a little on inductive current spikes but didn’t realize how that would effect this. Could you draw up a small schematic of what you would do instead? I know what you thinking but what driver transistor do you think would be big or small enough?

Thanks, Tom