ATMega 2560 + CP2102

After A LOT of searching, reading and so, I'm really lost at this point so I decided to ask you directly. First of all, I'm a newbie! Thank you for your help in advance.

I have a raw ATMega 2560 and a Cp2102 module which came with a chinese Arduino Pro Mini. I wanted to have "a functional Arduino Mega" (not the complete board but the minimal parts to be able to upload sketches with the Arduino IDE). But I don't know what extra components I need to do that (I'm going to design my own PCB like this one http://jkdevices.com/ATMEGA2560 and then add those extra components).

Is it possible to do this? I thought that having this Cp2102 could maybe be a good thing in this case.

Thank you.

This may help:

http://www.gammon.com.au/forum/?id=11637

I haven't done a Mega2560 bare-bones board because of the SMD soldering issue, but in principle it would be similar to the Atmega328 one. You would need a few decoupling capacitors, maybe a reset pull-up, a crystal (with caps) or resonator, and that would be about it. I would add an ICSP header for programming. The CP2102 would be handy for programming directly from the IDE.

Thank you for your reply, Nick.

I'm checking your site right now. So I'm going to design the PCB with the components you said. I'll post the schematic here before insolating the pcb to avoid stupid errors!

Thank you again.

Nick!

Searching on the internet I found a schematic which I think is exactly what I’m looking for. Could you please tell me if there’s something not needed or missing? If I’m not wrong it has everything you said (and your site explains), but just to make sure!

Thank you in advance!

ATMega2560_Schematic.pdf (85.2 KB)

I don’t consider that the easiest to read, due to the use of the PINBUS lines.

I notice that S1, the Reset Switch, doesn’t have any connection to Pin 1 & 3. This should pull the reset line down to Gnd, so those two pins should connect the other side of the switch to Gnd. As it is that schematic shows the Reset switch doing nothing.

I think you can omit Inductor L1. Nick will probably confirm but I’ve only ever seen mention of the 0.1uF cap C12 on AVCC. I understand the theory of why it’s there, to block any high frequency noise on VCC reaching AVCC, but I’m sure making sure you have a good trace from AVCC direct to the power supply, rather than Teeing onto the same VCC line, would move the PCC back and prevent this, with suitable decoupling caps in place.

The schematic doesn’t make it clear that all the 0.1uF caps C3 to C10 are intended to go next to all your supply pins as decoupling caps.

The pin headers can obviously be adapted to suit however you want to get particular pin line to particular input/output headers, components or devices.

You don’t have any provision on that diagram for connecting your CP2102 directly. I would bring out VCC, RX0, TX0, Gnd, Reset to a 6 pin female header (the CP2102 will have a 3V3 pin), in the right order to just plug in your CP2102. Remember to add in a 0.1uF capacitor in series with the Reset line from your header if you want Auto Reset functionality.

From your mention of CP2102 I assume you intend to bootload the 2560 and program via UART. EVen if programming via ICSP it would still be a good idea so that you could use this for serial output to terminal for debugging.

I'd put a diode across the Reset resistor also, keep any spikes from starting a High Voltage programming sequence and making the uC look like its locked up.

I agree with the comments of both posters above me. Apart from that it looks fine. You could probably omit the JTAG header, I've never used it. In its place put the FTDI header tack mentioned.

If you have any spare room, test points are always helpful, although the headers could double up as that (for example, bring out the 5v and Gnd lines to somewhere you can attach probes to).

Also an idea I've seen on the RBBB board is to incorporate reverse polarity protection. Instead of the usual technique of putting a diode in series with 5v (and suffering the diode voltage drop) they put a diode wired between 5v and Gnd (with the cathode to 5v). That therefore conducts and shorts out the supply (like a crowbar protection) if you happen to connect the supply backwards. Of course the diode would eventually blow, but it could protect you against a few seconds of absent-mindedness.

Expanding on the 'crowbar' diode Nick mentioned, if you have a series vcc polyfuse first, with the reverse biased vcc-gnd diode afterwards, then you get short circuit and reverse polarity protection. If you connect reverse polarity then the diode acts as a short and the polyfuse goes high-Z to protect.

tack: Expanding on the 'crowbar' diode Nick mentioned, if you have a series vcc polyfuse first, with the reverse biased vcc-gnd diode afterwards, then you get short circuit and reverse polarity protection. If you connect reverse polarity then the diode acts as a short and the polyfuse goes high-Z to protect.

Thanks Tack - that combo makes a great deal of sense.

Geoff