Author Topic: A Nano of Desperation  (Read 1652 times)

0 Members and 1 Guest are viewing this topic.

Offline profdc9

  • Frequent Contributor
  • **
  • Posts: 250
  • Country: us
A Nano of Desperation
« on: October 18, 2021, 06:19:23 am »
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 at

https://github.com/profdc9/NanoDIP

I 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.
 
The following users thanked this post: mikerj

Offline fchk

  • Regular Contributor
  • *
  • Posts: 140
  • Country: de
Re: A Nano of Desperation
« Reply #1 on: October 18, 2021, 07:18:07 pm »
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

 

Offline HwAoRrDk

  • Frequent Contributor
  • **
  • Posts: 914
  • Country: gb
Re: A Nano of Desperation
« Reply #2 on: October 18, 2021, 11:26:01 pm »
Digikey has got 1813 pieces of ATMEGA328PB-AN (TQFP32) on stock at the time of composing this text.

The '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.
 

Offline Dubbie

  • Supporter
  • ****
  • Posts: 1106
  • Country: nz
Re: A Nano of Desperation
« Reply #3 on: October 18, 2021, 11:36:05 pm »
What are all those funny holes all over your board? Are they huge vias?
Where are the component pads?

 ;)
 

Online westfw

  • Super Contributor
  • ***
  • Posts: 3610
  • Country: us
Re: A Nano of Desperation
« Reply #4 on: October 20, 2021, 09:46:35 pm »
Quote
The '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.
The 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.)

 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 3201
  • Country: ca
Re: A Nano of Desperation
« Reply #5 on: October 21, 2021, 12:01:02 am »
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.

MCP1702 Vmax = 13V, LM7805 = 35V.
 

Offline george.b

  • Frequent Contributor
  • **
  • Posts: 373
  • Country: br
Re: A Nano of Desperation
« Reply #6 on: October 21, 2021, 05:22:26 am »
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.

MCP1702 Vmax = 13V, LM7805 = 35V.

Plus, 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.
 

Offline profdc9

  • Frequent Contributor
  • **
  • Posts: 250
  • Country: us
Re: A Nano of Desperation
« Reply #7 on: October 22, 2021, 05:42:54 am »
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. 

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
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 10403
  • Country: de
Re: A Nano of Desperation
« Reply #8 on: October 22, 2021, 08:48:16 am »
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).
 

Offline cstratton

  • Regular Contributor
  • *
  • Posts: 59
  • Country: us
Re: A Nano of Desperation
« Reply #9 on: November 01, 2021, 05:16:16 pm »
Arduino Nanos are out of stock in many places.  As a stopgap measure, I designed an alternative that uses the DIP28 ATMEGA328P-PU

Building 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.
 

Online james_s

  • Super Contributor
  • ***
  • Posts: 16935
  • Country: us
Re: A Nano of Desperation
« Reply #10 on: November 01, 2021, 05:34:49 pm »
I've always used the clones, I've never bought an official nano, the clones work perfectly fine.
 
The following users thanked this post: xrunner

Offline cstratton

  • Regular Contributor
  • *
  • Posts: 59
  • Country: us
Re: A Nano of Desperation
« Reply #11 on: November 02, 2021, 02:10:37 am »
There are now rumors of fake ATmegas that don't sleep quite right, but for most purposes, yes.
 

Offline profdc9

  • Frequent Contributor
  • **
  • Posts: 250
  • Country: us
Re: A Nano of Desperation
« Reply #12 on: November 10, 2021, 05:32:35 am »
Here is the completed NanoDIP which is at

https://github.com/profdc9/NanoDIP

It works, but I had to fix the labels of TX and RX on the pins.  You can find the fixed version above.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf