PCB Prototype Testing/Lookover

I have a schematic for a custom pcb that I made. Since the goal was to fit components into a small unusual shaped space, smd components were required. It has usb input for data and power, a lipo charging circuit, over discharge protection circuit, boost circuit, and the arduino and lights that the project is based around. Since everything is smd I can't test before ordering PCBs and am way in over my head in designing this circuit. (Just followed IC typical use circuits from the many datasheets) I want to know is there anything that stands out as wrong in the schematic, and is there some software(ideally free or low cost) that I could use to test it?

There is absolutely nothing stopping you from building a prototype with breakout boards and through hole components and it is something you absolutely should (must?) do. The only fussy part is the boost convertor, that will probably need a module to prototype with as you usually cannot build it on perf board as it needs a pc board and it’s layout is crucial to operation due to its frequency. Forget about solderless breadboard there, not possible.

I see tons of mistakes. Processor gnds and other necessary pins not connected, no bypass caps. Haven’t looked any deeper than that. Absolute rookie errors which means there are more. You also have drawing errors like broken nets, one on the boost convertor VCC. No connection on one isolator, broken net on the other.

Oh, one other thing. Use the entire page. That thing is too hard to figure out all jammed together. Too many lines crossing too. Needs some refinement.

Links would have been nice.

http://www.feeling-tech.com.tw/km-master/ezcatfiles/cust/img/img/24/fp6291v064.pdf

1.Missing 0.1uF caps on VCC, AVCC pins. Need 1 on each one.
2. No SPI connections, thus no way install bootloader or download code or change fuses - are you satisfied running at 1 MHz from internal RC oscillator?
3. Appears to have several open circtuits.
4. Please explain what U4 and U5 are doing.

Do you need to run the ATmega328P at 16MHz ? At 4MHz, you can power it with as low as 1.8 volts it does not have to be powered by a boost converter which, in your case, is running all the time.

What is the project intended to do, incidentally, because it doesn't seem much more than say an Arduino Nano with a charging circuit (and a boost converter) but maybe with a non standard USB data path.

PCBs (at least if you exclude the cost of delivery) can be cheap enough that the first early prototype design can have lots of jumpers and headers so you can isolate parts and test them separately but using breakouts is also a good idea.

In my opinion, its a big mistake to produce a PCB 'design' without breadboarding a protoptype first.

Most all SMT ICs etc, can be tested on a breadboard using appropriate breakout boards.

There is absolutely nothing stopping you from building a prototype with breakout boards and through hole components and it is something you absolutely should (must?) do.

That's not always practical and I haven't seen it done in-industry for a LONG time... Maybe since surface mount became standard. Usually the prototype is a custom PC board, although there may be some preliminary development done on a development system/board. (In the case of an Arduino, the Arduino is the development system.)

It might be worthwhile to breadboard & test parts of your design that you're not sure about (if you can).

...I haven't done PCB design professionally but here's the bad news... I might have seen a board come-back right the first time, once... Maybe never... I don't actually remember seeing that happen. Sometimes the board can be fixed with cuts & jumps but usually changes are made before it can go into full-production and sometimes it takes more than two revisions. I've got a board in front of me that's "Rev 1". The 1st production board would have been "Rev 0" with a different numbering scheme being used for the prototypes & the pilot run. So, that's at least the 3rd version.

So be mentally and financially prepared for that, and be prepared for a delay. :slight_smile:

WattsThat:
There is absolutely nothing stopping you from building a prototype with breakout boards and through hole components and it is something you absolutely should (must?) do. The only fussy part is the boost convertor, that will probably need a module to prototype with as you usually cannot build it on perf board as it needs a pc board and it’s layout is crucial to operation due to its frequency. Forget about solderless breadboard there, not possible.

I see tons of mistakes. Processor gnds and other necessary pins not connected, no bypass caps. Haven’t looked any deeper than that. Absolute rookie errors which means there are more. You also have drawing errors like broken nets, one on the boost convertor VCC. No connection on one isolator, broken net on the other.

I have gone back and fixed the optocoupler wiring.

CrossRoads:
1.Missing 0.1uF caps on VCC, AVCC pins. Need 1 on each one.
2. No SPI connections, thus no way install bootloader or download code or change fuses - are you satisfied running at 1 MHz from internal RC oscillator?
3. Appears to have several open circtuits.
4. Please explain what U4 and U5 are doing.

I have added so called bypass caps
I did add a 16MHZ oscillator to the XTAL pins. Is there something else I must do?
U4 and U5 are optocouplers just incase the boost converter might causes issues with a common ground on the USB.

6v6gt:
Do you need to run the ATmega328P at 16MHz ? At 4MHz, you can power it with as low as 1.8 volts it does not have to be powered by a boost converter which, in your case, is running all the time.

What is the project intended to do, incidentally, because it doesn't seem much more than say an Arduino Nano with a charging circuit (and a boost converter) but maybe with a non standard USB data path.

PCBs (at least if you exclude the cost of delivery) can be cheap enough that the first early prototype design can have lots of jumpers and headers so you can isolate parts and test them separately but using breakouts is also a good idea.

I don't need the atmega to run at 5v or probably 16MHZ, but the leds are individually addressable, and so require 5v power and probably 5v signal because of that.
It is a "desk" lamp that is cylindrical and led wound in a circle inside. The main goals was to have battery backup for power outage use, and be able to move it around without it being connected to anything,
PCBs are cheap, but 18 dollars shipping for me is rough. I just figured since there is no shipping charge on a forum, any insite beforehand was a good idea.

srnet:
In my opinion, its a big mistake to produce a PCB 'design' without breadboarding a protoptype first.

Most all SMT ICs etc, can be tested on a breadboard using appropriate breakout boards.

If I was buying fairly custom breakout boards, I would just order my PCB.

When you make changes to code or schematics, don’t say you made changes, show us the changes i.e. show us the new schematic.

BTW, all GND pins on an I.C. must be connected to GND.

I think I see. So the main purpose is to power some leds in a desk lamp.
How is the desk lamp currently powered and have you any means of measuring its power consumption? This is important for dimensioning the battery pack and maybe some other components.
You've not shown any high power components so it looks like you intend to integrate with some existing switch mechanism. An Arduino pin can handle around 20mA so cannot directly drive a significant number of leds.

NoraTheDoggo:
I don't need the atmega to run at 5v or probably 16MHZ, but the leds are individually addressable, and so require 5v power and probably 5v signal because of that.

I run addressible LEDs, WS2811 etc, from 3.3v Arduinos. The LEDs do need a 5V supply but a simple dodge with a diode reduces the VCC of the first LED in the chain so they are happy to work from 3.3V logic.

If I was buying fairly custom breakout boards, I would just order my PCB.

I buy breakout boards for most all of the SMT packages real cheap from the far East.
I keep a stock of them so I can breadboard test a circuit, that uses SMT devices, before commiting to a PCB design.
I designed my first PCB using the stick on and stencil method with crepe tape back in the early 80s.

6v6gt:
I think I see. So the main purpose is to power some leds in a desk lamp.
How is the desk lamp currently powered and have you any means of measuring its power consumption? This is important for dimensioning the battery pack and maybe some other components.
You've not shown any high power components so it looks like you intend to integrate with some existing switch mechanism. An Arduino pin can handle around 20mA so cannot directly drive a significant number of leds.

I am making this from scratch. It will hopefully be powered by usb from a computer
The LEDS are individually addressable strips. The arduino is only sending data for which LED to be what color. I doubt they will consume more than 500ma. I can test when I get the chance.

srnet:
I run addressible LEDs, WS2811 etc, from 3.3v Arduinos. The LEDs do need a 5V supply but a simple dodge with a diode reduces the VCC of the first LED in the chain so they are happy to work from 3.3V logic.

I buy breakout boards for most all of the SMT packages real cheap from the far East.
I keep a stock of them so I can breadboard test a circuit, that uses SMT devices, before commiting to a PCB design.
I designed my first PCB using the stick on and stencil method with crepe tape back in the early 80s.

I might actually look into that.

srnet:
. . .
I designed my first PCB using the stick on and stencil method with crepe tape back in the early 80s.

I seem to remember doing something like that with ferric chloride.
Yes, you definitely want to get the design right to avoid too many iterations of that.
Now, of course, it is possible, for example, to get 10cm x 10cm boards made for $5 (you even get 5 of them for that price) so the risk of making a costly error has been reduced. But I agree that if you are working with unfamiliar components in a new design, creating a PCB should be preceded by some testing and verification activity.

NoraTheDoggo:
I am making this from scratch. It will hopefully be powered by usb from a computer
The LEDS are individually addressable strips. The arduino is only sending data for which LED to be what color. I doubt they will consume more than 500ma. I can test when I get the chance.I might actually look into that.

OK. So it looks like once the device has been programmed and the design has stabilised, you will not require a permanent USB data connection (maybe just a separate FTDI type adapter when required).
Maybe also look at an Arduino Pro Mini with separate LIPO cell charger / battery manager:

Some examples:
https://www.sparkfun.com/products/11114 (Pro Mini 3.3Volt variant)
SparkFun Serial Basic Breakout - CH340C and USB-C - DEV-15096 - SparkFun Electronics (ftdi type programmer)

6v6gt:
OK. So it looks like once the device has been programmed and the design has stabilised, you will not require a permanent USB data connection (maybe just a separate FTDI type adapter when required).
Maybe also look at an Arduino Pro Mini with separate LIPO cell charger / battery manager:

Some examples:
https://www.sparkfun.com/products/11114 (Pro Mini 3.3Volt variant)
SparkFun Serial Basic Breakout - CH340C and USB-C - DEV-15096 - SparkFun Electronics (ftdi type programmer)

I would like ot be able to reprogram the arduino, and to set light patterns I was just going to use USB, Is there any else I need to do? USB data in goes to RX and send data from TX. Is there another process for uploading code?

NoraTheDoggo:
I would like ot be able to reprogram the arduino, and to set light patterns I was just going to use USB, Is there any else I need to do? USB data in goes to RX and send data from TX. Is there another process for uploading code?

That is clear. Once you have installed an Arduino bootloader onto the ATmega328p, you can then upload code via the USB connection which you would obviously want to do from time to time. However, if miniaturisation is your objective then normally you do not install the USBTTL chip (e.g FTDI or CH340 etc.) on the board itself. You connect temporarily a separate device USBTTL adapter to the board.

This is exactly the main difference between an Arduino Pro Mini and an Arduino Nano. The Nano has a built in USBTTL adapter and the Pro Mini doesn't.

An alternative for loading code using the bootloader is through SPI using a programmer device ICSP (or another Arduino configured as one). This was mentioned earlier on.

Ultimately, of course, the choice is yours. What ever you do, ensure that those opto couplers, which you have specified on RX/TX are compatible your chosen solution.

Hi,
This cropped version of drawing may help.


Pin 6 of U3 appears to be connected to an NC on U4.

Tom..... :slight_smile:

6v6gt:
That is clear. Once you have installed an Arduino bootloader onto the ATmega328p, you can then upload code via the USB connection which you would obviously want to do from time to time. However, if miniaturisation is your objective then normally you do not install the USBTTL chip (e.g FTDI or CH340 etc.) on the board itself. You connect temporarily a separate device USBTTL adapter to the board.

This is exactly the main difference between an Arduino Pro Mini and an Arduino Nano. The Nano has a built in USBTTL adapter and the Pro Mini doesn't.

An alternative for loading code using the bootloader is through SPI using a programmer device ICSP (or another Arduino configured as one). This was mentioned earlier on.

Ultimately, of course, the choice is yours. What ever you do, ensure that those opto couplers, which you have specified on RX/TX are compatible your chosen solution.

OK thanks. I will add pads to allow upload of a bootloader. (This is the isp connection that is on many arduinos correct?) I am keeping the usb connection for code upload and data transfer. It would be cool to add a program on my computer to match the lamps to the average color of my screen. The optocouplers are rated/designed for data transfer.

TomGeorge:
Hi,
This cropped version of drawing may help.


Pin 6 of U3 appears to be connected to an NC on U4.

Tom..... :slight_smile:

I am in the process of fixing that. I noticed before but havent had time to fix. Thanks BTW

Why do we even try to help . . .

Did you read post #8 ?

“BTW, all GND pins on an I.C. must be connected to GND.”

larryd:
Why do we even try to help . . .

Did you read post #8 ?

“BTW, all GND pins on an I.C. must be connected to GND.”

Yes. I do have that change met. I just haven't fixed everything based off advice given and so have not posted a new image of the schematic yet. I have school and work from dawn till dusk, and homework afterwards. I don't have much time to work on this currently.