Author Topic: Custom Arduino board - schematic review  (Read 855 times)

0 Members and 1 Guest are viewing this topic.

Offline CodeBreaker

  • Contributor
  • Posts: 9
  • Country: hr
Custom Arduino board - schematic review
« on: February 14, 2018, 12:11:29 am »
I'm working on a custom board what would include the following components.
  • Arduino programmable ATMega328P 32-pin TQFP (using arduino as a ISP)
  • FT232RL for USB to serial for communication as well as programming
  • MAX485 for RS485 communication using arduino software serial
  • LM2940 Voltage regulator (Constant 6V DC in)


I need a second set of eyes to see whether I've made any glaring mistakes. I also have a few questions:
  • Can I power the MFRC552 with the FT232 3v3 output? The specs say that the FT232 can give up tp 50mA and the MFRC552 should use less.
  • Can MFRC522 and ISP header be wired like that? Will the MFRC552 interfere with the burning of the bootloader of the ATMega328?
  • I can leave the USB VCC floating like that? 

Thank you in advance!

 

Offline cowasaki

  • Frequent Contributor
  • **
  • Posts: 250
  • Country: gb
Re: Custom Arduino board - schematic review
« Reply #1 on: February 14, 2018, 07:34:53 am »
There are a few things missing from your schematic if you look at the reference circuit. 

Attached is my last circuit using a 1284P rather than a 328P but they are basically the same although the 1284P has more IO and memory.

Note the 47pF caps on the data lines, the 100nF cap on the reset line from the program port and the decoupling caps generally.

You might want to add the transfer IO LEDs too as they can be very useful, on my board the power LEDs and the transfer LEDs are attached to option switches (you could just use links)

« Last Edit: February 14, 2018, 07:39:32 am by cowasaki »
 

Online llkiwi2006

  • Regular Contributor
  • *
  • Posts: 97
  • Country: nz
Re: Custom Arduino board - schematic review
« Reply #2 on: February 14, 2018, 08:21:16 am »
Your crystal loading cap values are way too high (100nF!). They are usually in the tens of pF range. Check here for how to calculate a value for your crystal: https://blog.adafruit.com/2012/01/24/choosing-the-right-crystal-and-caps-for-your-design/

You also need more decoupling caps, usually a small one (~100nF) for each power pin, and a bulk (~1uF-10uF) cap for each chip. The 3V3OUT on the FT232R also needs to be decoupled. Check the reference design for each chip for the recommended decoupling configuration.

The reset pin on the FT232R is internally pulled up. You can either leave it unconnected or use a resistor to pull up to vcc. Shorting it to vcc could interfere with the chip's internal reset generation.

The reset pin on the atmega could tolerate up to 13V, do you need D1? You need a series resistor anyway if you want to use D1 for clamping, like this:


@cowasaki you don't need the 47pF decoupling caps on the usb data lines
 

Offline cowasaki

  • Frequent Contributor
  • **
  • Posts: 250
  • Country: gb
Re: Custom Arduino board - schematic review
« Reply #3 on: February 14, 2018, 08:34:49 am »

@cowasaki you don't need the 47pF decoupling caps on the usb data lines

Yes I've seen numerous circuits without them but I included them from the reference design then as the circuit worked faultlessly I have kept them in (I've seen discussions where people have had problems on some machines when not having them - I had them from the start so can't really comment).  For the price of them though I thought it best to stay with the reference (unless of course they've changed the reference design over the years and they have dropped them)

I agree re the crystal and find 22pF works best for them.
 

Online llkiwi2006

  • Regular Contributor
  • *
  • Posts: 97
  • Country: nz
Re: Custom Arduino board - schematic review
« Reply #4 on: February 14, 2018, 09:04:53 am »

@cowasaki you don't need the 47pF decoupling caps on the usb data lines

Yes I've seen numerous circuits without them but I included them from the reference design then as the circuit worked faultlessly I have kept them in (I've seen discussions where people have had problems on some machines when not having them - I had them from the start so can't really comment).  For the price of them though I thought it best to stay with the reference (unless of course they've changed the reference design over the years and they have dropped them)

Seems like the capacitors are there for EMI reasons. From FTDI AN_146:
Quote
2.3 Edge rate control
Capacitors may be placed on each of the USB DP and DM signals to ground. Note that the capacitance of any ESD suppressor must also be included in these values. Designers should take caution that adding too much capacitance may cause the USB transceiver to increase the drive strength, effectively defeating the intent of adding the capacitors.
o 47pF / NPO/C0G dielectric for USB 2.0 Full-speed products (FT2xxB, FT2xxR, FT2xxX, FT2232D, VNC1L, VNC2)
o 0 to 10pF / NPO/C0G dielectric for USB 2.0 Hi-speed products (FTx232H)
 

Offline cowasaki

  • Frequent Contributor
  • **
  • Posts: 250
  • Country: gb
Re: Custom Arduino board - schematic review
« Reply #5 on: February 14, 2018, 09:20:33 am »

@cowasaki you don't need the 47pF decoupling caps on the usb data lines

Yes I've seen numerous circuits without them but I included them from the reference design then as the circuit worked faultlessly I have kept them in (I've seen discussions where people have had problems on some machines when not having them - I had them from the start so can't really comment).  For the price of them though I thought it best to stay with the reference (unless of course they've changed the reference design over the years and they have dropped them)

Seems like the capacitors are there for EMI reasons. From FTDI AN_146:
Quote
2.3 Edge rate control
Capacitors may be placed on each of the USB DP and DM signals to ground. Note that the capacitance of any ESD suppressor must also be included in these values. Designers should take caution that adding too much capacitance may cause the USB transceiver to increase the drive strength, effectively defeating the intent of adding the capacitors.
o 47pF / NPO/C0G dielectric for USB 2.0 Full-speed products (FT2xxB, FT2xxR, FT2xxX, FT2232D, VNC1L, VNC2)
o 0 to 10pF / NPO/C0G dielectric for USB 2.0 Hi-speed products (FTx232H)

Whether they are NEEDED or not is clearly debatable but my circuit above is straight from a working design which I am using on all my home made boards and ones we had made for products.  A couple of 47pF caps costs about 1p so if they have any advantage at all they might as well be left in.  I'm not pretending to be an expert on what they do or why because most of the people on here probably know more than me but I took the reference design and modified it to suit.  I would absolutely agree about the crystal caps being too high and I always use 22pF caps with any of the Arduino ICs.  There are alternatives to the FT232RL but it is a really good solution.  It's worth buying them in 10s from China where I think I paid about £6 inc postage!
 

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 5540
  • Country: gb
Re: Custom Arduino board - schematic review
« Reply #6 on: February 14, 2018, 05:18:34 pm »
There are alternatives to the FT232RL but it is a really good solution.  It's worth buying them in 10s from China where I think I paid about £6 inc postage!

With a very high chance of getting fakes or rejects! Totally worth it.
 

Offline cowasaki

  • Frequent Contributor
  • **
  • Posts: 250
  • Country: gb
Re: Custom Arduino board - schematic review
« Reply #7 on: February 14, 2018, 05:49:18 pm »
There are alternatives to the FT232RL but it is a really good solution.  It's worth buying them in 10s from China where I think I paid about £6 inc postage!

With a very high chance of getting fakes or rejects! Totally worth it.

When you find a good supplier and everything you buy from them arrives on time and works!
 

Offline CodeBreaker

  • Contributor
  • Posts: 9
  • Country: hr
Re: Custom Arduino board - schematic review
« Reply #8 on: February 14, 2018, 11:46:08 pm »
Thank you all for the recommendations!

@cowasaki I see that you've connected USB 5V to VCC which means that you're powering the board form usb?  Since I'm not powering the board from USB I can leave it floating?
Furthermore, will it be a problem for the voltage regulator when I'm powering the board trough Arduino as an ISP for burning bootloader?

I've updated the schematics and attached it bellow.
 

Offline cowasaki

  • Frequent Contributor
  • **
  • Posts: 250
  • Country: gb
Re: Custom Arduino board - schematic review
« Reply #9 on: February 15, 2018, 12:01:30 am »
Thank you all for the recommendations!

@cowasaki I see that you've connected USB 5V to VCC which means that you're powering the board form usb?  Since I'm not powering the board from USB I can leave it floating?
Furthermore, will it be a problem for the voltage regulator when I'm powering the board trough Arduino as an ISP for burning bootloader?

I've updated the schematics and attached it bellow.

How much current does your board use? If it is under USB spec I would just attach usb 5v to vcc anyway. I’ve never had an issue with a voltage veg “seeing the same voltage” from the usb and it give you the option of powering your board via usb anyway. I’m not sure floating is a good idea but at least the ground is tied.
 

Offline CodeBreaker

  • Contributor
  • Posts: 9
  • Country: hr
Re: Custom Arduino board - schematic review
« Reply #10 on: February 15, 2018, 12:52:18 am »
By my calculations it should use around 200 mA when reading and transmitting, so its bellow USB spec. Thanks!
 

Offline NANDBlog

  • Super Contributor
  • ***
  • Posts: 4047
  • Country: nl
Re: Custom Arduino board - schematic review
« Reply #11 on: February 15, 2018, 01:00:51 am »
What the hell are you hacking with that 555 timer for the RS485? You have free pins on the microcontroller, just connect D+R to them.
 

Offline phil from seattle

  • Frequent Contributor
  • **
  • Posts: 394
  • Country: us
Re: Custom Arduino board - schematic review
« Reply #12 on: February 15, 2018, 07:10:00 am »
There are alternatives to the FT232RL but it is a really good solution.  It's worth buying them in 10s from China where I think I paid about £6 inc postage!

With a very high chance of getting fakes or rejects! Totally worth it.
Per several other threads, the SiLabs CP2102N is a good, cost effective solution from a reputable company. I've started using it, seems pretty good. Some might be put off by the QFN package though it does provide a very small footprint USB circuit.
 

Offline anishkgt

  • Frequent Contributor
  • **
  • Posts: 685
  • Country: qa
    • George Hobby
Re: Custom Arduino board - schematic review
« Reply #13 on: February 23, 2018, 08:34:07 pm »
The CP2102N is a very good cost effective solution for USB-UART interface. Ive just used it in my PCB.
https://georgehobby.wordpress.com/
Test Gear: Rigol DS1054z, Hakko Fx88D, Brymen BM869s, Brymen 235
 

Offline paulca

  • Super Contributor
  • ***
  • Posts: 1709
  • Country: gb
Re: Custom Arduino board - schematic review
« Reply #14 on: February 23, 2018, 08:57:39 pm »
I had issues with Software Serial and the MAX485.  I was however using an ESP8266.  Just something to keep in mind.  The MAX485 is very picky about it's serial.
"What could possibly go wrong?"
Current Open Projects:  3 Channel Audio mixer with DAC, BT, pre-amps and h/phone amp, WS281x LED controller Version 2 5V/5A w/Atmega328, FY6600 Power supply, 5A DC Load (Still!)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf