Looking for feedback on personal project - Page 1
Forum section: electronics / beginners

author: TieMajor
author_rank: Contributor
timestamp: March 07, 2020, 01:41:30 am
content: Hello all,I'm a software engineer and I had somevery basicknowledge of electronics.I've recently decided to get into electronics and pcb design. I decided that a good first project would be a small board with RGB leds. All of that hooked up to an ATMEGA368 that I would program.So I started designing and this what I have now. I haven't printed any PCB yet. I figured I'd ask knowledgeable people some feedback on it as I feel I may have overlooked something important. (And my traces are not very pretty ...).I've put the schematic and the board layout (idk the exact term) in description. I could also link the list parts if it's something that's worth looking into.I don't really know what more information to give so feel free to ask questions if you wonder what or why I did something. I just hope it's not too bad!Thanks in advance.

author: ataradov
author_rank: Super Contributor
timestamp: March 07, 2020, 02:03:42 am
content: 1. You would have problem manufacturing the PCB on the top part of the board (dip in the heart). It is impossible to make sharp internal corners.2. You will also have problems inserting USB connector on the pointy bit of the heart.3. Use polygons and flood fill the area with power on one side and ground on the other. Or at least clean up the traces.4. There is no real need to have traces this thin, you have plenty of space, why make manufacturer's life harder?Also, I have a feeling this whole thing can be routed on one layer. WS2812B is very good for that.

author: TieMajor
author_rank: Contributor
timestamp: March 07, 2020, 02:35:50 am
content: Hi,Thank you for your feedback.Your first point was a concern for me too but I tired sending it to JCLPCB and they didn't give me any warning about it. Is there some kind of specifications about the shape or the angle or corners you can actually manufacture ?Your second point makes sense I saw it but figured it would be no big deal I'll try to adjust that.About the flood filling I'm not sure I really understand.For the traces size I guess it was the default and I just went with ittho I didn't think it would make it harder to manufacture naively. I guess I could change that too.Also about the layers I thought the same at first but kinda wanted to try to use two layers since I wanted to send to JCLPCB anyways.Thank you again for your feedback I really appreciate it !Have a good day / night !

author: ataradov
author_rank: Super Contributor
timestamp: March 07, 2020, 02:46:33 am
content: Quote from: TieMajor on March 07, 2020, 02:35:50 amA typical size of the routing bit is 2 mm, so this is the smallest internal diameter that can be manufactured. It is likely that they will not cut deep enough and instead of a sharp corner you will have a small radius.Quote from: TieMajor on March 07, 2020, 02:35:50 amThe usual approach to routing nets that go to a lot of places (power supply rails) is to use polygons that match the outline of the board. This way you don't need to route traces all of the the place and you solve all sorts of possible electrical issues. In this specific design it does not matter that match, but it is a good idea to apply good design practices to all designs, even simple ones.Here is a tutorial for EasyEDAhttps://docs.easyeda.com/en/PCB/Copper-Pour/index.htmlQuote from: TieMajor on March 07, 2020, 02:35:50 amIt is fine to have two layers. There is really no point in trying very hard to fit things into one layer.But in this case you are jumping from layer to layer all the time for no real reason. It just makes it look really bad and messy. All those LEDs could be connected by 3 parallel running tracks. You already have data in/out routed that way. All you need to do is route power and ground in the same layer parallel to the data tacks. And it will instantly look much better. Or do the power planes thing, which will be even better.

author: EEEnthusiast
author_rank: Frequent Contributor
timestamp: March 07, 2020, 03:13:20 am
content: you have many acute angled bends. These are suckers for acid traps and can cause over etching. Have them routed at 90 deg or larger. Prefer 120deg between any two trace bends.

author: TieMajor
author_rank: Contributor
timestamp: March 07, 2020, 03:28:25 am
content: Quote from: ataradov on March 07, 2020, 02:46:33 amOkay got it! I'll try to make it less pronounced.Quote from: ataradov on March 07, 2020, 02:46:33 amThanks for the link ! I did some googling on the side also and from what I understand this would take up an entire layer right ?Quote from: ataradov on March 07, 2020, 02:46:33 amIndeed, I don't know why I didn't do that... I think I got scared of running a trace too close to the edge and having VCC and GND on the same side scared me. Didn't really think it through.Quote from: ataradov on March 07, 2020, 02:46:33 amFrom my understanding of power planes having one for GND and one for VCC would require 1 layer for each + the top layer for the rest of the traces right ? Do you think using the bottom layer only for GND and routing the rest + VCC on the top layer would be good enough?

author: ataradov
author_rank: Super Contributor
timestamp: March 07, 2020, 03:32:32 am
content: Quote from: TieMajor on March 07, 2020, 03:28:25 amThere is no need to as long as you understand how it will be manufactured. It is perfectly fine to have it sharp in the design.Quote from: TieMajor on March 07, 2020, 03:28:25 amIt will fill the areas no used by the traces. So you are not losing an entire layer. It is like having a "default" trace to be something useful instead.Quote from: TieMajor on March 07, 2020, 03:28:25 amNo, you can have those traces be embedded into either plane.Quote from: TieMajor on March 07, 2020, 03:28:25 amYes, this is a good approach for two layer boards anyway. Fill both top and bottom with the ground plane and route power as traces.Also, your design is missing any sort of decoupling capacitors. For this board it is probably not very critical, but for real projects you want to have something like 100 nF per power pin, and may be 10 uF close to the power connector.

author: TieMajor
author_rank: Contributor
timestamp: March 07, 2020, 03:39:00 am
content: Quote from: EEEnthusiast on March 07, 2020, 03:13:20 amOh okay ! I think I saw a warning somewhere where they stated that 90 deg was bad for some reason (I think conductivity, could be totally wrong tho). I tried to avoid that at all cost and ended up with this mess. I think applying ataradov advice will solve most of them. For the rest I'll be more careful from now on ! Thanks

author: TieMajor
author_rank: Contributor
timestamp: March 07, 2020, 03:55:49 am
content: Quote from: ataradov on March 07, 2020, 03:32:32 amOh okay. Thanks for the warning I wouldn't have think anything of it before I actually received them.Quote from: ataradov on March 07, 2020, 03:32:32 amOh okay it makes more sense now ! Thanks that could be very useful indeed !Quote from: ataradov on March 07, 2020, 03:32:32 amGot it ! Also what do you recommend as a pad connection ? Direct or Spoke ?Quote from: ataradov on March 07, 2020, 03:32:32 amWell since I'm at it I might as well add them. I just don't understand the difference between a power pin and power connector ... I guess power connector would be the usb in and power pin for the LEDs ?

author: ataradov
author_rank: Super Contributor
timestamp: March 07, 2020, 03:59:32 am
content: Quote from: TieMajor on March 07, 2020, 03:55:49 amSpoke. It is marginally easier to solder.Quote from: TieMajor on March 07, 2020, 03:55:49 amPower pins of the MCU. In this case they are VCC and AVCC. The idea is to provide local power reserve for each pin.

author: TieMajor
author_rank: Contributor
timestamp: March 07, 2020, 04:06:44 am
content: Quote from: ataradov on March 07, 2020, 03:59:32 amOkay got it ! Thanks again !Quote from: ataradov on March 07, 2020, 03:59:32 amOkay got it. I'll do more research on decoupling capacitors then ! So smoothing out the power for the MCU right ? Putting it on the LEDs would be overkill ?

author: ataradov
author_rank: Super Contributor
timestamp: March 07, 2020, 04:10:28 am
content: Quote from: TieMajor on March 07, 2020, 04:06:44 amAs a first approximation, yes.Quote from: TieMajor on March 07, 2020, 04:06:44 amIt really depends on the frequency of switching. For a real product, I would sprinkle some around the board, may be one per 2-3 LEDs. One per LED is an overkill.At the same time, if you are not sure and have board space, it is always a good idea to place a decent amount of bypass capacitors and do not populate them on the final board.

author: WattsThat
author_rank: Frequent Contributor
timestamp: March 07, 2020, 04:19:37 am
content: How do you plan to get a bootloader into that chip?I’m also perplexed as why you used usb C for just power inlet purposes. Comparatively speaking, expensive cables and connectors compared to a micro or mini usb.

author: TieMajor
author_rank: Contributor
timestamp: March 07, 2020, 04:21:34 am
content: Quote from: ataradov on March 07, 2020, 04:10:28 amI'm trying lol ! I'll do more research on that !Quote from: ataradov on March 07, 2020, 04:10:28 amOkay I'll look into that also! Thanks for all your feedback I think I have enough to make a V2 (or probably what would have been my V10 if I did it alone). I'll update the thread when I have something better to show ! (Or make a new one ? I'm not really used to forums). Your help has been greatly appreciated !

author: ataradov
author_rank: Super Contributor
timestamp: March 07, 2020, 04:25:39 am
content: Quote from: TieMajor on March 07, 2020, 04:21:34 amNo, it is a really good way of understanding it. There is is jut more to it than just "smoothing". But it is not a bad way to think about it this way, especially for simple projects like this.Quote from: TieMajor on March 07, 2020, 04:21:34 amDefinitely just update this one. And post pictures of the boards when they arrive.

author: TieMajor
author_rank: Contributor
timestamp: March 07, 2020, 04:28:56 am
content: Quote from: WattsThat on March 07, 2020, 04:19:37 amI was going to put 3 more headers and flash it using a uno board I have laying around. I was so excited about my mess that I forgot to add them before uploading here.Quote from: WattsThat on March 07, 2020, 04:19:37 amThere's really no good reasons except that I really like that connector for being reversible (Being my first design I realized I could do anything I want) and that I thought it would be a good training for my soldering skills!

author: TieMajor
author_rank: Contributor
timestamp: March 07, 2020, 04:32:13 am
content: Quote from: ataradov on March 07, 2020, 04:25:39 amOkay will do !

author: atmfjstc
author_rank: Regular Contributor
timestamp: March 07, 2020, 10:34:10 am
content: It doesn't seem to me like this is a particularly compute-intensive or timing-sensitive application so I think you could omit the crystal entirely and just use the ATMEGA's internal oscillator.

author: Circlotron
author_rank: Super Contributor
timestamp: March 07, 2020, 11:10:27 am
content: The track from C1 and C2 going back to the ground pin on the micro should not be shared with anything else. May not be an issue with all micros but I have had trouble when I did this on a breadboard at least.

author: Circlotron
author_rank: Super Contributor
timestamp: March 07, 2020, 11:11:20 am
content: Quote from: TieMajor on March 07, 2020, 01:41:30 amArtwork.

author: brucehoult
author_rank: Super Contributor
timestamp: March 07, 2020, 11:32:22 am
content: You're using the USB only for power?It seems like an ATmega328 is big overkill. An ATtiny85 (or even 25) would probably do the job. Your array for the LED values will be a whole 42 bytes out of 512 of RAM. I don't know how complex a sequence you want to program, but 8 KB of program space is a lot.I've been playing around recently using an ATtiny85 to drive a square grid of 64 WS2822 RGB LEDs and it's no problem at all. Running off the internal oscillator at 16 MHz is fine, and 8 MHz should be fast enough too.

author: brucehoult
author_rank: Super Contributor
timestamp: March 07, 2020, 11:49:32 am
content: Quote from: atmfjstc on March 07, 2020, 10:34:10 amThe bitstream out to the string of LEDs is timing-critical in that you can't stop it and start it in the middle. Once you start you've got to send data for all the LEDs without stopping. You certainly don't want to go off to service an interrupt or something in the middle.On the other hand, the exact frequency isn't critical. If you set up the delays in your code for 16 MHz then actually it will work fine even if the CPU is running at 15 MHz or 17 MHz -- and the internal oscillator is a lot more accurate than *that*.

author: WattsThat
author_rank: Frequent Contributor
timestamp: March 07, 2020, 02:33:30 pm
content: Forgot to mention in my original post: The last ws2812 in the daisy chain does not get its Dout pin tied to ground, it’s left floating.

author: TieMajor
author_rank: Contributor
timestamp: March 08, 2020, 02:11:35 am
content: Quote from: brucehoult on March 07, 2020, 11:32:22 amYes. Mainly because I find it more convenient to plug. And to experiment with mounting usb type c connector.Quote from: brucehoult on March 07, 2020, 11:32:22 amTrue. I also want to to add an oled screen module as a hat at some point, so I'm trying to keep all the doors open for now. I think I could downgrade somewhat easily. maybe with Atmega 128 with oled screen included. I haven't checked the specs on that yet.

author: TieMajor
author_rank: Contributor
timestamp: March 08, 2020, 03:08:20 am
content: Quote from: Circlotron on March 07, 2020, 11:10:27 amDo you think connecting to ground plane would make this problem go away or they need to be individually routed to DNG ?

author: TieMajor
author_rank: Contributor
timestamp: March 08, 2020, 03:09:17 am
content: Quote from: WattsThat on March 07, 2020, 02:33:30 pmOh okay I'll correct that !

author: ataradov
author_rank: Super Contributor
timestamp: March 08, 2020, 03:10:59 am
content: Quote from: TieMajor on March 08, 2020, 03:08:20 amYes, it will. Crystals are not that sensitive. Breadboards may have a bit much of stray capacitance and inductance, but this board will be fine as it is. And once you start doing ground floods, this problem will solve itself automatically.

author: TieMajor
author_rank: Contributor
timestamp: March 08, 2020, 06:42:30 pm
content: Okay so here's an update on my progress. I have done a few improvements :- I added ground power planes on the top and bottom layer.- I added bypass capacitors on the power connector and power pins of the MCU. (I'm still trying to comprehend how to use them but I think right now is correct).- I added another header to program the MCU more easily.- Cleaned up my traces and removed the DOUT routing to GND.I routed the shell of the connector to ground I don't know if that's how I am supposed to do I felt weird leaving them unconnected.The bottom layer only serves as a ground plane now no traces are run through it.I think that if there's no mistakes on my end I'll send them to manufacture !

author: ataradov
author_rank: Super Contributor
timestamp: March 08, 2020, 06:49:48 pm
content: This looks much better. The artworks is still kind of messy and asymmetrical. For this design it may be better to just use direct lines between the pads of the LEDs instead of trying to do 45 degree bends. They just don't look good.Also, put some vias between two ground planes. As a first approximation put 1-2 vias per "island" in the red layer. Again, not something that would matter in this design, but matters a lot for more complicated designs

author: TieMajor
author_rank: Contributor
timestamp: March 08, 2020, 07:40:17 pm
content: Quote from: ataradov on March 08, 2020, 06:49:48 pmI agree it looks much better this time(Thanks for the advice on the power planes). I tried removing the 45 degree bends on between the leds, it's a little bit better I guess ...Quote from: ataradov on March 08, 2020, 06:49:48 pmIs it to make better connection with the GND in this case ? I tried adding some near the areas that would require it. Maybe the ones near C1 and C2 are a little too much.

author: ataradov
author_rank: Super Contributor
timestamp: March 08, 2020, 08:00:03 pm
content: Yes, vias provide lower impedance path to ground. You've got placement of the vias right.I also like to place them in the corners where ground plane gets broken by other traces. On a board this sparse it is not that important, but when you have a lot of components you may end up in a situation where you have a component connected to a ground plane, but the plane itself is connected to the rest of the ground in one tiny place on the other end of the board. Having more vias ensured shortest path to ground everywhere.Vias are free (to a point), so there is no need to limit yourself.

author: TieMajor
author_rank: Contributor
timestamp: March 08, 2020, 09:05:55 pm
content: Quote from: ataradov on March 08, 2020, 08:00:03 pmNice ! Okay well then it's time to send it off ! I'll update here and go train my soldering skills in the meantime

author: atmfjstc
author_rank: Regular Contributor
timestamp: March 09, 2020, 03:27:48 pm
content: I think you should have placed the reservoir capacitor after the fuse, not before it. If the capacitor fails short, the fuse will be useless. If the power is supplied by a computer USB port, those probably have their own protection against shorts, but if comes from one of those dodgy chargers... who knows what could happen.Also, although the latest image seems to indicate you may have fixed it (hard to tell, pixels so small), a previous version of the schematic had the reservoir cap in series with the power instead of across it, definitely wrong as it will block out DC instead of filtering it.

author: TieMajor
author_rank: Contributor
timestamp: March 10, 2020, 12:30:53 pm
content: Quote from: atmfjstc on March 09, 2020, 03:27:48 pmOh I see. Yes it could be dangerous indeed. Unfortunately I already send it to JLCPCB. I'll be careful when testing this time and will correct it for the next revision. Thanks for bringing that up!Quote from: atmfjstc on March 09, 2020, 03:27:48 pmYup I fixed it before sending. Caught the error while doing a final review ! Also I'll try to export higher quality of the artwork next time !