New "industrial" Mega clone, design sanity review

OK maybe not industrial stength, but possibly "commercial".

I've been sitting on a design for a Mega clone for a couple of weeks wondering if I should build a couple for myself. I may now have some interest in the board from another party so now I'm thinking I should get off my arse and build something.

The difference between this design and the standard Mega is that the IO is designed to directly plug in three-wire sensors, servos etc, and the IO is reasonably hardened against the real world (I think). Plus there are on-board transceivers for RS-485 (x2) and RS-232, and RTC.

Overview, schematics and preliminary PCB layout (next post) below. Comments about features and bug finds appreciated. Also is there anything else it should have?

Mega 2560 compatable
Accomodates Duemilanove shields
Buffered LED13
Brown out detect and reset chip
Allowance for HV programming in case ISP gets bricked
USB interface on Serial0 using FT232 chip, jumper enabled auto reset, ESD protected
Piezo buzzer
128k x 8 battery-backed SRAM
4D Systems 5-pin interface for LCDs/OLEDs/SD etc

IO
44 hardened IO lines, good for +-30v and over-current protected (I might add ESD protection as well)
IO can be used as GPIO or serial, timers, analogue, PWM etc same as Mega
All IO connected to GVS (GND, Volts, Signal) 3-pin headers or optionally screw terminals
IO connections on two "wings" that can be broken off and mounted elsewhere or on the rear of the board

Mechanical
Not physically compatble with the Mega
Designed to fit inside a 4x3" aluminiun tube (with IO wings mounted on rear of board)
PCB cutouts allow cables to run up or down when PCB mounted in tube.
Mounting holes to match 4D Systems uLCD-32 display

Connectors
ISP header
JTAG header
QUUBmon header (my own monitor)
USB mini B
40 x 3-pin headers for IO
32-way header for GPIO and/or external memory interface, also SPI and I2C on this connector
2x RJ45 sockets for RS-485

RS-485 #1
Solder bridge selectable 2-wire (half duplex) or 4-wire (full duplex)
Solder bridge selectable 120R termination resistors
ESD protection

RS-485 #2
2-wire only
Transceiver with auto direction detect, no control signals needed
ESD protection
560R bias resistors

RS-232
MAX232 chip
4 full spec signals

Serial in general
Screw terminal blocks for all RS-485 and RS-232 signals
Patch panel allows any combination of Serial1-3 and 4 general-purpose control lines to be connected to the serial transceivers

RTC
On-board TCXO, very accurate
Interrupt to MCU
Can turn on power supply
Battery backed

Power supply
Fused
18V varistor protection against over voltage
Polarity independant (schottky diode bridge)
On-board or remote push buttons can turn on
RTC can turn on
MCU can turn off under program control
VCC from reg or USB (no control of PSU if using USB source)
Provision for linear or switching regulators
Switching reg good for 30v input (change varistor to higher value)
VIN monitoring by MCU

PCB in next post, only 4 attachments allowed per post.


Rob

quub-1.pdf (42.5 KB)

quub-2.pdf (38 KB)

quub-3.pdf (35 KB)

quub-4.pdf (40.3 KB)

Here's a 3D pic of the prelimary PCB layout.

Here's a 3D pic of the prelimary PCB layout.

Looks like a 2D pic to me :stuck_out_tongue:

Dang you're right, I'm sure the brochure said it did 3D :slight_smile:


Rob

Looks pretty cool but perhaps rather expensive with all that extra stuff on there...

I'd be a little worried that your 3-pin IO connectors have protection on the signal lines, but nothing on the power/gnd connections... Mind you, I'm not sure how you'd go about protecting those; perhaps just a diode between the IO power and the main cpu power would help?

FRAM? You might be better served by a microSD card connector.

@mowcius
Yes if fully populated it will never match the $70 of a Mega. Of course not everything has to be populated but that's a can of worms as you have different "versions" and adding SMDs later can be a problem. How much it would cost I have no idea at this piont, originally I just wanted a couple for myself in which case it doesn't matter. Maybe I should get a quote from someone to build them.

@westfw
I think what I can do is provide some protection on the "wings" for the power rails along the lines of what you say, possibly with seperate PS connections to provide a low-impedance path for crap to bipass the main board, or local regulator as well. At the least a varistor, diode etc.

FRAM/SD, there's the space issue in that it's quite a tight layout, but also most of the 4DS displays already have SD storage and if not using a display then they have a small SD board that has the same interface.

Thanks for the comments guys, (and those that emailed), more would be appreciated as everyone has a different view of things.


Rob

A couple of ideas that have come up off line.

Screw connectors
While the 3-way headers are good for quick and easy connection of servos etc they aren't as reliable as other types of connector. So maybe an option to use .2" screw terminal strips like the Phoenix pluggable type.

Do this as a shield
While I like this idea, really what do you get (in this context) by using the existing Mega, a CPU, power supply and USB interface. The PSU and USB aren't hardened at all so you can't really count them. That leaves a CPU. On the negative you have two boards and many more connectors.

Wireless
I like the idea of adding an Xbee interface, do any of the Xbee modules allow for an external antenna? Is this of interest?


Rob

I like the idea of adding an Xbee interface, do any of the Xbee modules allow for an external antenna?

Each of the XBees are available in 3 antenna variations - chip, whip, and external.

do any of the Xbee modules allow for an external antenna?

Well the RP-SMA versions allow an external SMA antenna (typically mounted directly on the XBee board though) or the UFL version allows for an external antenna with the UFL connection (typically used on mini PCI wireless cards in laptops) and you can then get a UFL to RP-SMA adaptor to extend the connection by (normally about 6" or so) to an SMA antenna on the side of some casing for example (many wireless routers do this)

to an SMA antenna on the side of some casing for example

Exactly what I'm thinking.

Thanks guys.


Rob

Thanks guys.

No problem :slight_smile:

Any chance of having a proper (separate) analog ground and supply?

@westfw
I've added cap, varistor and TVS diode protection to the power rails on the IO wings. Also screw terminals to allow a seperate power supply or at least a low-impedance connection to an GND point.

@MarkT
I admit I haven't thought too much about the analog side of things apart from the standard decoupling. The following are possiblilities if I have the room

On main board
AVCC - cap and inductor (large) or even seperate regulator (small)
AREF - dedicated 5v voltage reference chip and solder bridge to isolate the signal from the Arduino headers
Try to keep 16 analog signals away from digital signals (may not be practical as the PCB will be fairly packed)

On left IO wing
Makes this wing analog only, move digital signals to right IO wing
Provide local 5v regulator
Provide a seperate GND directly from input point

Is all this to much for a 10-bit ADC?, or should the on-board ADC be used for low end work and get a proper 12/14/16-bit external ADC for serious work?


Rob

Is all this to much for a 10-bit ADC?

Well you have a point - but a separate AVcc regulator would be a good idea, a high-accuracy one would serve as voltage ref too and keep the noise from the other 80 pins or so off the ADC's supply.

For an "industrial" controller I really do like reliable wired Ethernet -- not as hacakble for security issues.

I use UDP for sending temp, pressure accelerometer data etc...

XBEE is WAYYYYYY toooo slooowwwwww.

Wireless - can often be fussy.

The Current Ethernet shield and software is way too unreliable.

If you had an industrial grade Mega2560 with Ethernet and RTC built in I would order today...

The screw terminals are far more reliable than "push-in" pins.

A mounting system is essential. A connector system for outboard sensors (I2C/TWI) connector with power is essential.

Generally Ethernet connects to SPI so I use only TWI/I2C sensors.

A ready-to use 12-22 bit (or whatever) ADC add-on is good -- either a socket or wired right in -- or choose one that can be soldered after the fact.

As a matter of fact putting in "solder pads" that can be populated later is a good idea -- you just have to set them up so they take breakout boards or can be wired in after words -- not as tough as it may sound... Or even solder in certain types of IC's or surface mount later -- designed to take specific ships that you choose.

Level shifters built in...

@MarkT
I'll look into the dedicated regulator for AVCC/AREF. Another option is to use an accurate 4.096v reference for AREF (no rounding errors) and 5v reg for AVCC. Both are small SOT23 packs so I should be able to find the room.

@WillR
So many options :slight_smile:

I agree about Ethernet but know exactly 0 about it and therefore it would take me too long to come up to speed. + I don't have the PCB real estate. Likewise for some of your other suggestions so what I'm thinking is that's that the expansion header (or indeed the Arduino shield headers) can be used for that sort of thing. I know nothing about the Ethernet shield but there are several versions I think, surely they can't all be unreliable.

Xbee is slow by comparison but usefull in many situations I think.

A mounting system is essential.

As in DIN rails, just mounting holes ??

The screw terminals are far more reliable than "push-in" pins.

Yes I think I'll have optional IO "wings" with different connectors. Normal headers are good for many applications and playing around, screw terminals better for reliability.

A connector system for outboard sensors (I2C/TWI) connector with power is essential.

Connector type? Buffered? Isolated? What distance are you getting from I2C?

Level shifters built in...

For what?


Rob

Component placement is about complete and I'll start running traces soon so it will be too late to make changes. Last call for bugs or ideas.

@WillR
Any answers to the above?


Rob

Thanks to some offline input from interested people I have made the following changes

removed
Expansion header
FRAM chip

added
128k x 8 battery-backed RAM
2x RJ45 sockets for RS-485


Rob