I’m making my first electronics project that will (hopefully) end up as a PCB. It’s a Serial to Ethernet Gateway that uses an Atmega328p (Arduino) and a WizNet WIZ811MJ (W5100) Ethernet board. I was hoping to get some review and critique of my circuit before I go and buy parts.
Here is some info on it…
I expect about 12VDC as input with regulators providing 5V and 3.3V on the board. The Atmega will have a dip switch for config settings and LED’s for status. There is also a MAX232 for RS-232 level conversion.
I believe that I have everything wired and selected correctly, but since this is my first try at producing a PCB, I’d like a review.
I’m a little concerned that I might have selected the wrong cap values or types, so please let me know.
Also, for the WIZ811MJ board, there are 3 4.7k resistors pulling up unused inputs. Could I take the three unused inputs, tie them together, and then connect them to a single 10k resistor and then to 3.3V? Would that also work?
Finally, I wasn’t sure, but do I need to add some kind of cap from the Atmega chip’s reset pin to ground? I believe that this might be unneeded, but I wasn’t sure.
Hopefully someone else is willing to do a thorough review for you but I just noticed one red-flag. The serial interface between U5 and U3 are using different supply voltages, can U5 handle 5V inputs? You may need to do some level shifting there.
Why do you need +5V? There are plenty of RS232 level shifters that work directly off 3.3V (eg. MAX3232), and the microcontroller will work at 3.3V too. Could you not save yourself a voltage regulator?
Then according to that page it: “Operates 3.3V with 5V I/O signal tolerance”, so you wouldn’t need to level shift the serial signals.
One thing I would suggest is that instead of tieing the data pins to ground for the ethernet module, tie them to ground through a 10k resistor (or similar size, 1k to 47k would be fine). That way, should the IC end up switching to read mode and make the data pins outputs, it wont short out the drivers if it tries to output a logic 1.
Are you planning on using the Arduino Bootloader? If so, then how will you be programming it (Through the RS232 chip, or JP2)? If you are planning to use JP2, then you will need 1k resistors between the MAX232 R1Out and the Arduino RX pin (with JP2 connecting directly to the Arduino Rx pin), otherwise, the MAX232 will drive the pin high and you wont be able to communicate with JP2.
Watch the caps on U1. I don’t know that regulator, but on a 7805, that’s a potential problem, because disconnecting the power supply can cause the regulator to become reverse biased (the cap on the output may hold charge longer than the little one on the input) and blow the chip.
I know this may not be necessary, but I always like putting a small capacitor on Reset to make sure the device doesn’t randomly reset in case of noise.
@AndyC_772: Good point with the 3.3V. I checked on it and you are right that the Atmega works on 3.3V. But, at 3.3V it only works to 10MHz. I’d like to keep it 16MHz to be arduino compatable.
@TCWORLD: Great catch on the RX & TX resistors (You only mentioned the RX pin, but I assume you meant the TX also). I’ve made the changes you mentioned as well as connected the active low inputs though a single 10k resistor. One question though… Will I have a similar type problem with the ISP header since it’s also used with the WIZ chip? Do I need 1k resistors there so that programming with JP3 works? If I don’t need them, why not? What makes this different than the RS-232?
@Joeisi: I looked into the design guide and the chip has a built in low pass filter. It states that the external cap would be extra, so I’ve left it off. Just for reference though. If I did ad it, would it be something like a 0.1uF ceramic cap?
If you guys think it looks good, I’ll order some parts.
lyndon has a good point about the regulator output backfeeding into the regulator on power-down. A diode connected from output (anode) to input (cathode) also solves the issue. I usually use a schottky for this purpose since it will conduct before any base-emitter junctions, protecting the regulator. This is actually recommended in a lot of linear regulator datasheets.
I don’t think you need them. The data sheet would most likely tell you to include them if they were needed, and a 10uF cap just doesn’t store that much energy anyway.
If you want an SMD diode simlar to 1N4001, try an S2A:
I wouldn’t have though you would need a diode, there are enough components in the circuit which would discharge the capacitors. If you have a look at Figure9 in the datasheet, the top regulator would conduct in reverse when the power was off, so make of that what you will.
As for the SPI, that wont need resistors. The WIZ chip is a slave device, so all of its SPI pins are inputs except the MISO pin, which will be at High Z unless it recieves a command which tells it to output something. If you are worried about that, a weak pullup on the /SCS pin will insure it is at High Z when the arduino is off or being programmed.
What diode should I use? Should I put one on each regulator?
I would and do for every linear regulator I plop down. For 18 cents, its some cheap protection. Try the BAT54, just about every diode manufacturer makes one.
Since I’ll probably get an S2A diode already, could I get 2 more and use those in place of the BAT54’s for the regulators? I’m not to familiar on the different types of diodes. (i.e. schottky).
steve1515:
Since I’ll probably get an S2A diode already, could I get 2 more and use those in place of the BAT54’s for the regulators? I’m not to familiar on the different types of diodes. (i.e. schottky).
The S2A is a silicon diode which means it will have a forward voltage similar to the base-emitter junction which may be found in the regulator. Since you’re trying to protect that device it would be beneficial to use a diode with a lower forward voltage so that it conducts first. A schottky type diode such as the BAT54 will conduct at a few hundred millivolts (this highly depends on forward current, see the datasheet curves). Its your design so its your choice, I’m just giving you some information.
Make sure your LED series resistors are ok.Other than that, you are looking good from here. You may want to design a board and post it too. I know on some of my boards I’ve made dumb mistakes that could’ve been fixed had I looked over it again.