I'm making my own Arduino Mega board with ATmega2560-16AU and CH340G. Jump to the end of the post to find the real question.

I have already ordered a PCB before and it didn't work when I soldered everything in place. I have already asked why that board didn't work on another post here: Programming custom Arduino Mega with Arduino Uno

But I was not satisfied with the answers and started suspecting whether or not the capacitor values were right on my board.

I'm trying to make my own version of RobotDyn's Arduino Mega 2560 Pro so I tried taking the already programmed ch340g and soldering it on my own board and still failed. When I put a previously not programmed ch340g on the RobotDyn board and programmed it using Arduino UNO (Arduino as ISP) the board would work.

So now I ordered a new PCB but haven't ordered any of the passive components yet.

If any of you could tell me where I could find the values from the schematic below I would really appreciate that.


  • 1
    Most capacitors are decoupling capacitors, so 100nF. C1 is from the original Arduino schematic - also 100nF. As is C12. All the others depend on the components they are supporting - the load capacitance of the crystals, the required input and output capacitance for the voltage regulators, etc. – Majenko Mar 3 at 13:40
  • Just a dumb question, the processor chip is programmed with the bootloader? – Dorian Mar 3 at 16:02
  • @Majenko Oh yeah sorry forgot to tell about the regulators, I don't need the values for that but I believe I'm having trouble with CH340G capacitors. – Exclose Mar 3 at 18:35
  • @Dorian Uhhh.. yeah. I want to be able to program my Arduino via USB so I have CH340G there to translate the program to the MCU. – Exclose Mar 3 at 18:36
  • 1
    C3/4 are dependent on whatever crystal you're using. C2 is for the internal 3.3V regulator in the Ch340G. No idea what it needs, but probably 1uF is more than adequate. – Majenko Mar 3 at 18:40

The values can be easy found for generic CH340g and ATmega2560 implementations:

C1,C2 = 100nF, C3,C4 = 22pf but depends on the crystal you use, all others excepting C12 are decoupling capacitors.

C12 has no sense where it's placed, it seems that the schematic is a bad combination of schematics, this capacitor should reset the board at power on but it breaks the reset pulse from CH340g so you cannot program the board without pressing manually the reset pushbutton. Don't place C12 at all.

Also place a short instead of R5 and R6 that are not in the CH340g manual (there is a special mention to connect the pins straight to USB bus), remove R8, is not needed for the same reason, R3 makes no sense, don't place-it.

R2,R4 = 1K, R7,R9 = 10K, R10,R11,R12,R13 = 1K, R14 = 10K , R15 = 1M.

Y1 = 12Mhz, Y2 = 16Mhz

A 22 ohm resistor is missing in your schematic between Y2 XTAL1 and ATMEGA XTAL2 but I don't think it's important.

I hope I didn't missed something

The bare minimum is to remove c12 and maybe R3 and check the values you used for R2, R4 against the above values.

If something would be wrong with CH340g the USB connection would fail but I see no mention about that in your post.

  • 1
    "C4 has no sense where it's placed". I'm guessing you didn't mean C4 there, because you mention C4 above that point. So, perhaps C5?. But it is connected to AREF (for decoupling) rather than RESET. Anyway, something for you to check. – timemage Mar 4 at 13:57
  • @timemage you're right, sorry, it's C12. Fixed. – Dorian Mar 4 at 14:07
  • 1
    I think the "all others excepting C4" may be caught up in that as well. Referring to C12 as well? Regarding C12, you can see it represented in AVR042 figure 3-1, along with the reason for it a few paragraphs above. That said, it's probably not needed here. – timemage Mar 4 at 14:38
  • 1
    Scratching my above comment. You're right, it likely is counter-productive to have it there. Before, I'd throught the pulse might make it through okay. But, assuming two caps around equal value, the pulse will stop quite short of being adequate for reset. – timemage Mar 4 at 15:26
  • 1
    We're in violent agreement. – timemage Mar 4 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.