Arduino Forum

Using Arduino => Microcontrollers => Topic started by: CrossRoads on Aug 27, 2011, 07:41 am

Title: New Dual ATMega Design
Post by: CrossRoads on Aug 27, 2011, 07:41 am
Check it out!
Dual ATMega 1284 (can be 324, 644, 1284)
ICSP Interface each device
JTAG Interface each device
2 RS232 Ports with 3-pin headers to go to DB9 connector for each device - 4 RS232 ports!
Can select via jumper to use port as TTL Serial, or connect to USB/Serial
USB Programmer Header each device
Activity LED each device
+5 Regulator Power on LED
+5 Power selectable for each device - USB Programmer, Regulator, off Board
Reset Enable each device
Reset switch each device
Up to 128K Memory each device
Up to 16K SRAM each device
Up to 4 EEPROM each device
32 IO pins each device, plus Aref, brought to edge connector with Ground pin each device.
Add jumpers from headers to have Serial, SPI, I2C comm's between the devices - Set up Real Dual-Core Processing!
Imagine the possibilities: 12 channels of PWM - 16 channels of Analog inputs - 4 serial ports - 2 SPI ports - 2 I2C ports - what could you make?
All in a handy 80x100mm card with removable processors in case they get damaged.
These screen shots hardly do the design justice!
(okay, maybe I should get to bed sooner ...)
Title: Re: New Dual ATMega Design
Post by: Aviator on Aug 27, 2011, 02:47 pm
Awsome!


However, I fail to see the purpose of the post. Are you selling this board? Are you about to produce it? What do you want the community to do?

Aviator
Title: Re: New Dual ATMega Design
Post by: liuzengqiang on Aug 27, 2011, 05:21 pm
tow mcus sharing one crystal? I have npt seen this before.
Title: Re: New Dual ATMega Design
Post by: retrolefty on Aug 27, 2011, 05:24 pm

Awsome!


However, I fail to see the purpose of the post. Are you selling this board? Are you about to produce it? What do you want the community to do?

Aviator


CrossRoads is just showing off his circuit layout skills, while waiting for the pending hurricane.  ;)
Title: Re: New Dual ATMega Design
Post by: CrossRoads on Aug 27, 2011, 06:00 pm
Well, I thought I'd build one up & see how it goes!

"The pins XTAL1 and XTAL2 are input and output, respectively, of an inverting amplifier which
can be configured for use as an On-chip Oscillator, as shown in Figure 8-2 on page 32. Either a
quartz crystal or a ceramic resonator may be used."

"This Crystal Oscillator is a full swing oscillator, with rail-to-rail swing on the XTAL2 output. This is
useful for driving other clock inputs and in noisy environments. The current consumption is
higher than the "Low Power Crystal Oscillator" on page 33. Note that the Full Swing Crystal
Oscillator will only operate for Vcc = 2.7 - 5.5 volts."

I got the idea from an older post where 2 '168s shared a crystal. Gonna put a couple on a breadboard and try it before I order boards to make sure.

I am really happy with the layout. Minimal # of vias, .016-.024-.032" traces throughout, .05" for power.   Good user configurability too.
I didn't put an FTDI chip on the board, just the header to connect one to each device.
I figure with CP2102 based  USB to serial adapters available for just $2-3 dollars, why put a hard to solder $4.50 FTDI chip on the board that is only used for downloading sketches? Plug on one, or connect via a header cable, unplug & go!

And having some fun, as Lefty recognized 8)
Title: Re: New Dual ATMega Design
Post by: liuzengqiang on Aug 27, 2011, 06:34 pm
So one mcu drives the crystal to oscillate and the other receives the oscillation? I saw the solder jumper this time.
Title: Re: New Dual ATMega Design
Post by: JoeO on Aug 27, 2011, 10:19 pm
Nice design Bob:  3 questions

What about some screw holes for mounting?

Are the "top" and "bottom" rows of I/O pins on 0.1 inch centers so that it can be inserted into a proto Board?
  If so, Can you put some ground pins inline so that they can be brought onto the proto board?

Thanks
Title: Re: New Dual ATMega Design
Post by: retrolefty on Aug 27, 2011, 10:55 pm
Quote
I didn't put an FTDI chip on the board, just the header to connect one to each device.
I figure with CP2102 based  USB to serial adapters available for just $2-3 dollars, why put a hard to solder $4.50 FTDI chip on the board that is only used for downloading sketches? Plug on one, or connect via a header cable, unplug & go!


I sure agree with that. With the avaliblity of these super cheap USB TTL serial cable modules, why would anyone want to waste their valuble board space and added costs to place a USB serial chip or any kind onto their standalone PCB? That space if avalible could be put to much better use IMHO. Just put the needed pins to a header and move on to something more cool.  ;)

Lefty
Title: Re: New Dual ATMega Design
Post by: CrossRoads on Aug 28, 2011, 01:50 am
Ok,
Screw holes added on 0.1" grid. Got the 2 rows of edge connectors on 0.1" grid. Added 4 ground hole pads near the end of each row of connectors.
Tweaked traces to let ground plane fill in more. Cleaned up nameplacements.
Any other suggestions? I'm all ears.
Title: Re: New Dual ATMega Design
Post by: Coding Badly on Aug 28, 2011, 03:08 am

These dual processor boards have me wondering if anyone uses AVR processors in applications that need symmetric redundancy.
Title: Re: New Dual ATMega Design
Post by: CrossRoads on Aug 28, 2011, 03:13 am
Not that I am aware - but I am betting that having one processor do high speed data capture and writing to memory and having the 2nd move it to an SD card will be a lot easier!
Title: Re: New Dual ATMega Design
Post by: retrolefty on Aug 28, 2011, 03:18 am


These dual processor boards have me wondering if anyone uses AVR processors in applications that need symmetric redundancy.



No, two processors could never decide which one of them is the insane one. You need triple redundancy and then just vote on who is the insane one, 2 out 3. The highest security PLC system we used in the refinery were made by Triconex, used triple redundant processor boards, dual redundant I/O boards, dual redundant and battery backed up power supply modules. It was a beast, looked like something you would mount on a aircraft carrier and boy was it expensive! Made to mil spec standards. Funny thing is that 'baby sitting' one for ten years in my plant area I never saw a single failure alarm signifying a loss of redundancy, so all the redundacy were never called into practice.

Lefty

Title: Re: New Dual ATMega Design
Post by: JoeO on Aug 28, 2011, 03:52 am
Is there enough room to use solder tail sockets on the 232s ?
Title: Re: New Dual ATMega Design
Post by: CrossRoads on Aug 28, 2011, 04:08 am
I believe so. Take a look:
http://www.crossroadsfencing.com/DualATMega1284.brd
right-click, save-target-as, rename to .brd
Title: Re: New Dual ATMega Design
Post by: JoeO on Aug 28, 2011, 04:36 am

I believe so. Take a look:
http://www.crossroadsfencing.com/DualATMega1284.brd
right-click, save-target-as, rename to .brd

Bob: I can't tell by looking.  You board layout and EAGLE skills far exceed mine. 
I am just looking at your design as a user.  The question I ask myself is "what features would I want".  Having the option to socket all of the chips is one of them.
Title: Re: New Dual ATMega Design
Post by: JChristensen on Aug 28, 2011, 05:14 am

With the avaliblity of these super cheap USB TTL serial cable modules...


@Lefty, I'm not aware of these, would you provide a link or two please?
Title: Re: New Dual ATMega Design
Post by: CrossRoads on Aug 28, 2011, 05:19 am
I do the same as I design it.
Unless you are usin parts with excessive plastic, things should fit.
I spread that are out a little more just in case.
Title: Re: New Dual ATMega Design
Post by: CrossRoads on Aug 28, 2011, 05:25 am
Jack,
search for cp2102 on e-bay, there are tons of them.

The ones Lefty posted about last time  came in bags marked BU2001-020, also 214661-01N13d03.

These are nice because the pin marked RST can be cut easily and rewired to DTR.  I bought 3 of them, all were recognized by Windows Vista and it took care of downloading the driver. 
Seems to be marked www.betemcu.cn, cp2102 module, B75937
Title: Re: New Dual ATMega Design
Post by: CrossRoads on Aug 28, 2011, 05:28 am
This one

http://www.ebay.com/itm/USB-2-0-TTL-6PIN-Module-Serial-Converter-CP2102-/190570265131?pt=LH_DefaultDomain_0&hash=item2c5edf7a2b

I should fire up a board and make sure sketches actually download.
Title: Re: New Dual ATMega Design
Post by: JChristensen on Aug 28, 2011, 05:32 am
CrossRoads, thanx!  I also found some based on a Prolific PL2303, but they only seem to have four connections, power, ground, rx and tx.
Title: Re: New Dual ATMega Design
Post by: CrossRoads on Aug 28, 2011, 05:44 am
I have one of the smaller red ones also,

http://www.ebay.com/itm/USB-TTL-Converter-Module-buildin-in-CP2102-NEW-/230664868141?pt=LH_DefaultDomain_0&hash=item35b4b2912d

doesn't look to be very usable regarding changing Reset to DTR. Would be fine for building into something needing standard comm's tho. Came with a mini-CD, didn't need it after Windows had updated for the others.

Neither is pin compatible with FTDI basic, so a pin to pin adpapter cable wlll be needed using these kinds of parts
http://www.pololu.com/catalog/product/1905  holds the wires in the needed arrangement
http://www.pololu.com/catalog/product/1806  or
http://www.pololu.com/catalog/product/1930 and make your own.
I bought 50-packs of a bunch of these and bags of different size housings, this stuff has come on real handy for projects.

For example, adapting AVR ISP to ICSP on my Bobuino:
(http://www.crossroadsfencing.com/bootload_no_file.jpg)

The Prolific parts are only USB1 I think. I think the CP2102 will do USB2. May not make a difference.
Title: Re: New Dual ATMega Design
Post by: JChristensen on Aug 28, 2011, 05:45 am
So the CP2102 is similar to an FTDI FT232RL?
Title: Re: New Dual ATMega Design
Post by: CrossRoads on Aug 28, 2011, 05:48 am
Yes. Both are microcontrollers custom programmed to do USB to Serial using internal oscillator so no crystal.  Some models do use a crystal.
Like Arduino folks did with ATMega8U2 parts, using a crystal.
Title: Re: New Dual ATMega Design
Post by: JChristensen on Aug 28, 2011, 05:51 am
Cool, thanks again. I do have some of those crimp connector housings and pins, but no crimp tool. Can make them work, usually, but is slow an tedious. Looks like the pre-made wires would be a good way to go.
Title: Re: New Dual ATMega Design
Post by: CrossRoads on Aug 28, 2011, 06:02 am
I bought pins too, have not tried hand crimping them. Got a lot of use from the 50-packs.
Title: Re: New Dual ATMega Design
Post by: bilbo on Aug 28, 2011, 06:12 am
Neat board design! Hunkering down for a hurricane really does get the brain juices flowing. I'll be bringing my electronics to the basement tomorrow, should the need arise...

A while ago I designed a shield that had a second atmega on it, basically another arduino but in shield form, minus the FTDI. It had all of the headers from the bottom arduino broken out as well, and there was a jumper to select which arduino's serial port the FTDI was connected to. Essentially the same as yours, but modular. I imagine it could even be made stackable. A tower of arduinos! I suggested the idea and sent my design to sparkfun but they said they tried to avoid "arduinos on arduinos", which makes sense, I guess. It was worth a try! Im sure I have the schematic somewhere...

Stay safe,
Title: Re: New Dual ATMega Design
Post by: CrossRoads on Aug 28, 2011, 06:42 am
Thanks :)
With the low prices of boards from iteadstudio, I'm willing to take a shot at building some of these things up just to play with.
Where as before, I would only build something if I had a specific project in mind, outside of that was just occasional playing on solderless breadboard.

Between the IDE, the uCs, and cheap prices, its like a breath of fresh air in my hobbying.
Title: Re: New Dual ATMega Design
Post by: bubulindo on Aug 28, 2011, 07:08 am

No, two processors could never decide which one of them is the insane one.

True, Siemens H-PLC system will only notify if one of the PLCs went bad, but the one running as master will keep doing so. If the master stop,s the other will take over (almost) immediately, but with careful programming no problems arise.


You need triple redundancy and then just vote on who is the insane one, 2 out 3. The highest security PLC system we used in the refinery were made by Triconex, used triple redundant processor boards, dual redundant I/O boards, dual redundant and battery backed up power supply modules. It was a beast, looked like something you would mount on a aircraft carrier and boy was it expensive! Made to mil spec standards. Funny thing is that 'baby sitting' one for ten years in my plant area I never saw a single failure alarm signifying a loss of redundancy, so all the redundacy were never called into practice.


Any chance I can get a trip to see it? :$ Yes, I'm a geek and would love to see that setup.

Just because the redundancy never came into place, doesn't mean it was/is a waste... give it enough time and eventually it may pop up. :)
Title: Re: New Dual ATMega Design
Post by: mnmis on Aug 28, 2011, 01:45 pm
CrossRoads,

On the schematic it says that one processor supplies the clock to the other processor. I see the single crystal but I don't see the connection between the processors for supplying the clock. That would be a good feature to add.

Mnmis
Title: Re: New Dual ATMega Design
Post by: retrolefty on Aug 28, 2011, 03:44 pm
Any chance I can get a trip to see it? :$ Yes, I'm a geek and would love to see that setup.

No, I retired four years ago and even I can't get back in. Here is a pretty nice document explaining
the design and methods they used to attain the various redundancies:

http://www.dia.uniroma3.it/autom/Reti_e_Sistemi_Automazione/PDFseminari/TRICON%20Fault%20Tolerant%20Systems.pdf

Just because the redundancy never came into place, doesn't mean it was/is a waste... give it enough time and eventually it may pop up.

Certainly, the system was the emergency plant safety shutdown system, it worked independently from the plant process control system. This plant ran 24/7/365 for up to 4 year runs before scheduled shutdowns. A 'false' safety shutdown would be very costly as the plant lost profit could exceed 1 million dollars a day, and it often took 2 days to restart up the plant depending on the cause of the trip. However failure to trip off on say a large compressor failure could result in compressor damage taking months or longer to have critical parts manufactured as compressor was built to order and there is no such thing as a 'shelf spare'. The price of the safety systems was almost inconsequential as long as it performed it's function when called upon.

Lefty
Title: Re: New Dual ATMega Design
Post by: (deleted) on Aug 28, 2011, 04:11 pm
(deleted)
Title: Re: New Dual ATMega Design
Post by: bubulindo on Aug 29, 2011, 12:46 am

Any chance I can get a trip to see it? :$ Yes, I'm a geek and would love to see that setup.

No, I retired four years ago and even I can't get back in. Here is a pretty nice document explaining
the design and methods they used to attain the various redundancies:

http://www.dia.uniroma3.it/autom/Reti_e_Sistemi_Automazione/PDFseminari/TRICON%20Fault%20Tolerant%20Systems.pdf

Just because the redundancy never came into place, doesn't mean it was/is a waste... give it enough time and eventually it may pop up.

Certainly, the system was the emergency plant safety shutdown system, it worked independently from the plant process control system. This plant ran 24/7/365 for up to 4 year runs before scheduled shutdowns. A 'false' safety shutdown would be very costly as the plant lost profit could exceed 1 million dollars a day, and it often took 2 days to restart up the plant depending on the cause of the trip. However failure to trip off on say a large compressor failure could result in compressor damage taking months or longer to have critical parts manufactured as compressor was built to order and there is no such thing as a 'shelf spare'. The price of the safety systems was almost inconsequential as long as it performed it's function when called upon.

Lefty


Thanks for the info.
Title: Re: New Dual ATMega Design
Post by: CrossRoads on Aug 30, 2011, 12:11 am
The clock connections and the solder jumpers can be seen more clearly in this closeup.
Eagle is nice, if you have it on the schematic it shows up on the board.
Missing connections are pretty good too - the DRC will tell you if you have connections that are close but not connected, and tells you about pins with no connections.
When you do the Rats Nest, pins with no connections show up pretty well.
I also like that it warns you when there are overlaps - I check visually that signals aren't connected that I didn't want, but every once in a while I move something & create crossed connections and the DRC caught that. Usually I only have to deal with traces too close to pins or to each other.

Title: Re: New Dual ATMega Design
Post by: liuzengqiang on Sep 21, 2011, 10:25 pm
Hey,

Any update on this dual ATMEGA design? Some people will be interested if you get the word out. Have you checked out inmojo.com yet? It's an electronics hobbyists' ebay.
Title: Re: New Dual ATMega Design
Post by: CrossRoads on Sep 22, 2011, 04:45 am
No updates yet. Latest task was getting the mini-uino's shipped out. Just finished some paid design work and starting another.
Only takes more hours in a day to get the rest done ;)