A Nano of Desperation - Page 1
Forum section: electronics / general

author: profdc9
author_rank: Frequent Contributor
timestamp: October 18, 2021, 06:19:23 am
content: Arduino Nanos are out of stock in many places. As a stopgap measure, I designed an alternative that uses the DIP28 ATMEGA328P-PU which has the same pinout, except it has no 3.3V supply, no ADC6 and ADC7, and is programmed using a serial USB TTL converter (FTDI or CP2102), but it has the reset circuit to control the ATMEGA328P. You can get the gerbers athttps://github.com/profdc9/NanoDIPI have attached an image of the PCB. Hopefully this can be useful to someone. As a side benefit, it makes it really easy to replace the ATMEGA328P chip because it is socketed.

author: fchk
author_rank: Frequent Contributor
timestamp: October 18, 2021, 07:18:07 pm
content: Digikey has got 1813 pieces of ATMEGA328PB-AN (TQFP32) on stock at the time of composing this text.The layout of your PCB shows clear signs of a beginner's work. That's not a bad thing since we all started doing things at some time, but you should be aware of them:1. The bypass caps need to be directly at the VCC-GND pin as near as possible to be effective. Even when using a DIL uC SMD caps would have been much better from an electrical point of view.2. Same is true for the crystal. Although your design may work choosing SMD parts would have made your design more reliable since trace length could have been smaller.3. A LM7805 is really old and has 2 volt dropout voltage. If you would use an MCP1702 your design would still work at 6V input voltage with 5V output voltage.fchk

author: HwAoRrDk
author_rank: Super Contributor
timestamp: October 18, 2021, 11:26:01 pm
content: Quote from: fchk on October 18, 2021, 07:18:07 pmThe '328PB is not directly compatible with the '328P - different peripherals, different pin-out. Not a suitable substitute when trying to make an Arduino-compatible board.

author: Dubbie
author_rank: Unknown
timestamp: October 18, 2021, 11:36:05 pm
content: What are all those funny holes all over your board? Are they huge vias?Where are the component pads?

author: westfw
author_rank: Super Contributor
timestamp: October 20, 2021, 09:46:35 pm
content: QuoteThe 328PB has a proper superset of peripherals, and the pinout changes consist of replacing a set of power pins with GPIO (plus the extra functions on some pins to handle the extra peripherals.)I suspect that many Arduino-compatible 328p boards could have a PB chip dropped onto them, and no one would ever notice. (You have to be sure not to set the GPIO pins now connected to power rails to outputs, and you might have troubles with the crystal oscillator. But in times of shortages, it would be worth a try, IMO.(There are also a couple of designs out there where the Nano has been modified to match the PB pinout changes. It is an open source design, so that's pretty easy. (disconnect a couple pins from the power rail, essentially.) Although actually assembling an SMT NANO isn't so easy, for many of us.)

author: thm_w
author_rank: Super Contributor
timestamp: October 21, 2021, 12:01:02 am
content: Quote from: fchk on October 18, 2021, 07:18:07 pmMCP1702 Vmax = 13V, LM7805 = 35V.

author: george.b
author_rank: Frequent Contributor
timestamp: October 21, 2021, 05:22:26 am
content: Quote from: thm_w on October 21, 2021, 12:01:02 amPlus, the 7805 can be had anywhere for peanuts, or even from scrap. I, for one, can't find the MCP1702 locally. Using the 7805 is the right call IMO.

author: profdc9
author_rank: Frequent Contributor
timestamp: October 22, 2021, 05:42:54 am
content: I can not get the bypass cap closer as it would make the PCB too wide to fit in many places where the Nano does. The PCB is already too wide as it is, because the DIP-28 chip takes up most of the space. I could add a spot on the underside for the bypass cap for those who have the clearance on their PCB for it, but for breadboard use the capacitor would stick out from the bottom. The trace distance between the capacitor terminal and the 5V terminal is about 8 mm which is not ideal but should be OK, about 50 nH or about 15 ohms at the 3rd harmonic of the clock frequency (48 MHz).While it would be better to put the crystal closer to the pins, the inductance of the lines is very small compare to the effective inductance for the high Q crystal, and the capacitance of the extra length of traces is in the sub-pF range. Again, placing it on the bottom side would make it unusable for a breadboard.I stitched up the top and bottom with vias because the vias are basically free when you're ordering small quantity and it helps with EMC/susceptibility. I don't expect the EMC performance to be great but at least I can try.Given that the ATMEGA328P is regularly assembled on a breadboard and generally works, the I am not overly concerned about having a bypass capacitor a few extra mm from the power pin.Quote from: fchk on October 18, 2021, 07:18:07 pm

author: Kleinstein
author_rank: Super Contributor
timestamp: October 22, 2021, 08:48:16 am
content: With a board that is intended to be small it is odd to still use THT caps. With SMD caps there would be no problem to have the capacitors closer to the chip. For manual soldering there is no problem mixing THT and SMD and there is no problem to include both options in parallel.Those 100 nF decoupling caps (e.g. size 0805 or 0603) are a nice part to start with SMD.A low drop regulator like MCP1702 would allow to use a lower supply votlage (e.g. 6 V from 4x AA).

author: cstratton
author_rank: Regular Contributor
timestamp: November 01, 2021, 05:16:16 pm
content: Quote from: profdc9 on October 18, 2021, 06:19:23 amBuilding your own stuff is great for experience, but it looks like you're in the US so if your use isn't too critical nano "clones" are all over the usual eCommerce sites for $5-6 each with prompt delivery.If you're suspicious of the ch340 you could get a hot air station (a tool you want to have anyway) to take those off and program with an offboard USB-UART like you've been doing.Or digikey has a thousand literal Arduino Nano's in stock. They're expensive, but in reality you're not going to beat $21/board for anything through hole hand assembled.

author: james_s
author_rank: Super Contributor
timestamp: November 01, 2021, 05:34:49 pm
content: I've always used the clones, I've never bought an official nano, the clones work perfectly fine.

author: cstratton
author_rank: Regular Contributor
timestamp: November 02, 2021, 02:10:37 am
content: There are now rumors of fake ATmegas that don't sleep quite right, but for most purposes, yes.

author: profdc9
author_rank: Frequent Contributor
timestamp: November 10, 2021, 05:32:35 am
content: Here is the completed NanoDIP which is athttps://github.com/profdc9/NanoDIPIt works, but I had to fix the labels of TX and RX on the pins. You can find the fixed version above.