esp32c3-doom-bauble icon indicating copy to clipboard operation
esp32c3-doom-bauble copied to clipboard

Request for help with ordering on JLCPCB - Can I use PCB Assembly, and should they add edge rails and fiducials?

Open ndbroadbent opened this issue 2 years ago • 13 comments

Hello, thanks so much for releasing this project on GitHub, it's really cool! I would love to make one myself. I have some electronics experience and have put together some PCBs before (with through-hole components), but have never ordered anything from JLCPCB before.

I would like to use the PCB Assembly service to make things easier, but I'm seeing this error: "The PCB specs you chose are not supported for Economic PCBA"

Screen Shot 2022-12-10 at 4 30 51 PM Screen Shot 2022-12-10 at 4 33 25 PM

I've never done any SMD soldering, but I would be happy to learn if it's the only option.

I was just curious if you were able to use PCB Assembly, or did you solder it yourself? Thanks!


UPDATE: I figured out the PCB assembly problem

I had set the color to "Purple", and that's why the Economic option was not available for PCB Assembly. I set it back to green.


A few more questions:

  • Which PCB thickness would you recommend? Default of 1.6mm, or something thinner like 1mm?
  • What's the easiest way to order all of the required components? Do you have a BOM you could share for Mouser or Digikey, etc.?

Tried uploading the BOM CSV to https://nz.mouser.com but I think it requires specific part numbers:

Screen Shot 2022-12-10 at 5 18 25 PM

ndbroadbent avatar Dec 10 '22 03:12 ndbroadbent

I have no clue... the PCB should fit the 10x10mm for economic assembly, so that should not be an issue. Perhaps it sees the ESP32C3 module on the underside and thinks it needs to do double-sided assembly, which 'economic' does not support?

The PCB thickness shouldn't really matter, but since this PCB is tiny and needs to fit in an enclosed space, I used 0.8mm PCB thickness and that works well. I soldered everything myself: the smallest component is 0603 and with a small tip and a microscope it's not that hard to get everything soldered down OK. Make sure to use enough flux, though.

Spritetm avatar Dec 10 '22 04:12 Spritetm

Hi @Spritetm, sorry to bother you again, but I am having a lot of trouble figuring out how to order all the components.

I found the 0.96 Inch TFT on AliExpress.

I also exported the BOM CSV from KiCad:

"Id";"Designator";"Package";"Quantity";"Designation";"Supplier and ref";
1;"DISP1";"LCD_LH086T";1;"LCD_LH096T";;;
2;"J4,J3,J1";"PinHeader_1x02_P1.27mm_Vertical";3;"Conn_01x02";;;
3;"U1";"SOT-89-3";1;"HT7833_SOT89";;;
4;"C3,C1,C2,C4";"C_0603_1608Metric";4;"1u";;;
5;"J2";"PinHeader_1x04_P1.27mm_Vertical";1;"Conn_01x04";;;
6;"R4";"R_0603_1608Metric";1;"220";;;
7;"R2";"R_0603_1608Metric";1;"R";;;
8;"R3";"R_0603_1608Metric";1;"2K7";;;
9;"U2";"SOT-23-6";1;"TP4057";;;
10;"C5";"C_0805_2012Metric";1;"10u";;;
11;"R1";"R_0603_1608Metric";1;"10K";;;
12;"Q1";"SOT-23";1;"AO3401";;;
13;"D1";"D_SOD-123";1;"MBR0520";;;
14;"U3";"ESP32-C3-WROOM-02";1;"ESP32-C3-WROOM-02";;;

I'm trying to look up these parts on Mouser or Digikey but not getting any results. For example, "HT7833". I did find "HT7833" on the JLCPCB website. (Only available for PCB assembly though?)

Although I also found "500mA LDO HT7833 SOT89" available on a website called "Best Modules Corp". Is that a good site to buy from?

I was just wondering, how do you order these parts?

ndbroadbent avatar Dec 10 '22 06:12 ndbroadbent

They're mostly components I had on hand, probably ordered from LCSC at the time.

On the BOM:

  • Skip J1-J4. Just solder wires directly to the holes.
  • U1 - From what I can see, RT9166A-33GXL should be a replacement that Digikey at least has.
  • C1-C4 - Anything 0603-sized, >=6.3V, 1uF should work
  • C5 - Anything 0805-sized, >=6.3V, 10uF should work
  • Whoops, R2 does not have a value. It should be 10K, same as R1.
  • D1 - Any MBR05x0 in SOD123 shape should fit here
  • U2 - Sorry, this needs to be a TP4057. A LT4057 could technically be made to fit (you should short pin 1 and 4 in that case), but there's no direct replacement.

Note that you also need to modify the ESP32-C3-Wrover to have more flash, see https://www.youtube.com/watch?v=11tu9p26eIA . A replacement flash chip would be e.g. any W25Q128JVS?? chip.

Spritetm avatar Dec 10 '22 06:12 Spritetm

Thanks a lot for your help! I figured out how to get the PCB assembly working (I had selected the purple color, and the Economic option is only available for green, blue, red, etc.)

I found this article about how to generate the BOM and Centroid file for JLCPCB. I used this plugin to generate the BOM CSV instead: bom2grouped_csv_jlcpcb.xsl

I also opened the PCB and schematic in KiCad and checked the "exclude from bill of materials" for J1-J4, and also excluded the LCD and ESP32 from the BOM and position files.

Here's the updated BOM CSV using the GitHub Gist plugin:

Comment,Designator,Footprint,LCSC
"1u","C1,C2,C3,C4","Capacitor_SMD:C_0603_1608Metric",""
"10u","C5","Capacitor_SMD:C_0805_2012Metric",""
"MBR0520","D1","Diode_SMD:D_SOD-123",""
"AO3401","Q1","Package_TO_SOT_SMD:SOT-23",""
"10K","R1,R2","Resistor_SMD:R_0603_1608Metric",""
"4K7","R3","Resistor_SMD:R_0603_1608Metric",""
"220","R4","Resistor_SMD:R_0603_1608Metric",""
"HT7833_SOT89","U1","Package_TO_SOT_SMD:SOT-89-3",""
"TP4057","U2","Package_TO_SOT_SMD:SOT-23-6",""

Placement file for JLCPCB (top):

Designator,Val,Package,Mid X,Mid Y,Rotation,Layer
"C1","1u","C_0603_1608Metric",154.700000,-97.500000,-90.000000,top
"C2","1u","C_0603_1608Metric",141.800000,-96.500000,180.000000,top
"C3","1u","C_0603_1608Metric",153.200000,-97.500000,-90.000000,top
"C4","1u","C_0603_1608Metric",154.100000,-103.400000,0.000000,top
"C5","10u","C_0805_2012Metric",151.300000,-97.500000,-90.000000,top
"D1","MBR0520","D_SOD-123",139.000000,-101.200000,90.000000,top
"Q1","AO3401","SOT-23",148.400000,-96.200000,0.000000,top
"R1","10K","R_0603_1608Metric",139.200000,-97.500000,90.000000,top
"R2","R","R_0603_1608Metric",145.900000,-98.700000,180.000000,top
"R3","2K7","R_0603_1608Metric",141.800000,-91.500000,180.000000,top
"R4","220","R_0603_1608Metric",148.900000,-98.700000,0.000000,top
"U1","HT7833_SOT89","SOT-89-3",153.000000,-93.300000,180.000000,top
"U2","TP4057","SOT-23-6",141.300000,-94.000000,0.000000,top

JLCPCB was able to find all the parts:

Screen Shot 2022-12-10 at 8 48 24 PM

The only problem is that something went wrong with generating the placement file, or maybe the import. The rotations are all off:

Screen Shot 2022-12-10 at 8 49 37 PM

So I selected all the parts and clicked "rotate left" twice:

Screen Shot 2022-12-10 at 8 51 21 PM

I placed the order and they will review it and let me know if there's an issues.

Screen Shot 2022-12-10 at 8 54 56 PM

Thanks!!

ndbroadbent avatar Dec 10 '22 07:12 ndbroadbent

I tracked down all the other components I need (battery, speaker, switch, etc.)

From AliExpress:

From Mouser:

ndbroadbent avatar Dec 10 '22 09:12 ndbroadbent

Nice! Hope you can keep us updated, it probably will make a nice recipe for others trying to build this.

Spritetm avatar Dec 10 '22 09:12 Spritetm

DFM Analysis: Screen Shot 2022-12-11 at 12 33 28 AM

Looks like only U1, U2, and Q1 needed to be rotated, and D1 needed to be reverted to the original rotation. I still have no idea why there was a problem with the rotation. All the parts look correct in the KiCad PCB editor.

Here is U1 (HT7833):

Screen Shot 2022-12-11 at 12 41 31 AM

Library footprint:

Screen Shot 2022-12-11 at 12 42 34 AM

Here's the part on the JLCPCB website: https://jlcpcb.com/partdetail/HoltekSemicon-HT7833/C164106

Looks like their footprint is different to the one in KiCad (rotated 180 degrees):

Screen Shot 2022-12-11 at 1 03 58 AM

Found this Reddit post: https://www.reddit.com/r/AskElectronics/comments/j5r2hp/is_it_normal_for_jlcpcbs_smt_preview_to/

They use different canonical orientations from KiCad.

Kicad libraries follow the IPC standard (pin1 in top left). Not everyone follows this standard (see this thread) but at least it’s a standard. JLC orientation matches the actual orientation of the parts on the reel. This is intuitive but makes life difficult because there is no consistent rotation that can automatically be applied; every part needs to be rotated differently according to the diagram in the datasheet. Furthermore some parts have multiple tape/reel options and might have different orientations even for the same package/footprint.

Another thread: https://forum.kicad.info/t/placement-rotations-am-i-missing-something/38833/2

Blog post and script for helping to fix rotation issues:

  • https://dubiouscreations.com/2019/10/21/using-kicad-with-jlcpcb-assembly-service/
  • https://github.com/matthewlai/JLCKicadTools

Mystery solved! I guess I'll just fix all the library component rotations in KiCad if I ever make more of my own PCBs.


UPDATE: I figured it out! I need to use this script to generate the CPL CSV: https://github.com/matthewlai/JLCKicadTools

This produces the correct orientation for JLCPCB parts so I don't have to adjust anything manually:

Screen Shot 2022-12-11 at 1 33 36 AM

ndbroadbent avatar Dec 10 '22 12:12 ndbroadbent

I got some feedback from JLC about the 3D model:

Sorry to bother you, but there is one thing that we want to confirm with you about your 3D printing order before proceeding.

As shown below,

  1. the wall thickness of the indicated red areas are very thin, which has a high risk of crack and damage or deformation during the printing process.

For Resin material, normally we request the partial wall thickness to be 1mm to get a better print effect ( overall thickness 1.5 mm will be better).

2.the indicated holes diameter are very small, there is a high risk that the holes will be plugged by material. It's better to enlarge the hole to 1.5mm.

Can you accept the risk? Shall we continue to proceed with the risk or activate the replace file button to let you modify the file ? PlS advice, tks!

image

Product details from my 3D printing order:

Screen Shot 2022-12-12 at 10 33 13 PM

@Spritetm Did you get a similar response from JLC?


I was able to fix the speaker grill holes to be 1.5mm:

         }
         //speaker grille
-        translate([7,-4,4.1]) rotate([0,90,0]) union() {
+        translate([7,-4,4.4]) rotate([0,90,0]) union() {
             for(i=[0:45:360]) {
-                rotate([0,0,i]) translate([0,-2.3,0]) cylinder(d=1.2, h=10);
+                rotate([0,0,i]) translate([0,-2.5,0]) cylinder(d=1.5, h=10);
             }
-            translate([0,0,0]) cylinder(d=1.2, h=10);
+            translate([0,0,0]) cylinder(d=1.5, h=10);
         }
         //speaker
         translate([4.5,-4,4.1]) hull() {
Screen Shot 2022-12-12 at 10 58 14 PM Screen Shot 2022-12-12 at 10 59 07 PM

~~But I might need to open some of the STLs in Blender and see if I can fix the thin walls.~~

I was also able to fix the wall thickness:

         //bit between monitor and px
-        translate([0,-2,10]) cube([28,28.5,7], center=true);
+        translate([0,-2,10]) cube([29.5,30,7], center=true);
Screen Shot 2022-12-12 at 11 02 01 PM

ndbroadbent avatar Dec 12 '22 09:12 ndbroadbent

I think I got a similar warning from JLC (but mine was automated, seems the Chinese version differs a bit from the international version) and I just YOLO'ed it. The worst bit of thin wall is behind the top of the LCD, so if that breaks through it's not visible from the outside. The holes aren't critical; they worked pretty well for me but if they clogged I would have run them through with a drill to clean them up.

Spritetm avatar Dec 12 '22 09:12 Spritetm

So I ordered some PCBs with the above BOM and placement corrections. I tried two with the memory upgrade and one without. All 3 when hooked to usb boot loop. Or, perhaps more accurately, the serial device becomes available then unavailable in a loop. I have tried with and without a battery. even flipped U2 in case that was incorrect. Has anyone else experienced this? Any ideas what's going on?

computerhac avatar Jan 10 '23 01:01 computerhac

The C3 does that when it's not programmed. Simplest solution is to ground GPIO9 when applying power (using either something like a pair of tweezers or a temporary bodge wire) and retry programming.

Spritetm avatar Jan 10 '23 01:01 Spritetm

Here I am trying to track down an electronics issue and I just needed to press the program button. Thank you for the quick reply! Cool project BTW

computerhac avatar Jan 10 '23 01:01 computerhac

Just as a note for anyone who builds with the bom above, the LCD colors are inverted as is.

In main>lcd.c under Rcmd1 I had to change ST77XX_INVON , 0 to ST77XX_INVOFF , 0

computerhac avatar Jan 12 '23 17:01 computerhac