RfC: Linux SBC using two layer PCB - Page 1
Forum section: electronics / general

author: technix
author_rank: Super Contributor
timestamp: January 20, 2020, 08:13:00 pm
content: How do you think of that, a Linux-capable SBC with a two-layer PCB.

author: Siwastaja
author_rank: Super Contributor
timestamp: January 21, 2020, 08:04:16 pm
content: I fail to see what purpose limiting yourself to a 2-layer PCB would serve, except to make design a bit harder and the product to perform a bit more poorly, likely.It's very unlikely people would home-etch the boards, either. For that, you'd like to have large-pitch, low pin count devices, minimize number of vias, etc.It can't be price difference, either, so what's the point? The end result looks exactly the same on the outside. Is there some extra appeal on owning a Ferrari but knowing it has a three-cylinder engine?

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 22, 2020, 12:00:46 am
content: I'd be curious to see that.Unless the RAM is embedded in the same SoC package, I don't know how you could seriously route like DDR(/2/3/4) RAM to a BGA SoC with only two layers.If you still manage this (kudos), EMC is probably going to be piss-poor.

author: technix
author_rank: Super Contributor
timestamp: January 22, 2020, 05:35:11 am
content: Quote from: Siwastaja on January 21, 2020, 08:04:16 pmIt is price difference. Two-layer boards can be up to 5x cheaper than 4-layer at some facilities, for example JLCPCB. Also those usually have shorter turn-around time and better quality control.Quote from: SiliconWizard on January 22, 2020, 12:00:46 amThe board I am currently making used a SiP with built-in RAM - Allwinner V3s. However I also do have a sketch where Allwinner A13 and its DDR3 SDRAM are done in two layers. In both cases the SoC are in QFP package.When dealing with BGA SoC, I will have to increase layers. For example even though I will be using a memory module on my i.MX 6 chip, that is still a 6-layer board.

author: Jeroen3
author_rank: Super Contributor
timestamp: January 22, 2020, 06:46:32 am
content: I've linked it before somewhere here. But:https://tibbo.com/store/plus1.htmlI also got the Bananapi board running with Ubuntu 18.04.*(ethernet doesn't stay online though)http://wiki.banana-pi.org/Banana_Pi_BPI-F2SThis chip could be done on 2 layer, if you really need to. Although 4 layer is probably better. But no need for more or dense memory routing.

author: donotdespisethesnake
author_rank: Super Contributor
timestamp: January 22, 2020, 09:19:44 am
content: Quote from: technix on January 20, 2020, 08:13:00 pmOlimex made one using AllWinner chip, so definitely possible.

author: technix
author_rank: Super Contributor
timestamp: January 22, 2020, 10:05:25 am
content: Quote from: Jeroen3 on January 22, 2020, 06:46:32 amThat chip is unobtanium even on Taobao. Allwinner V3s is a similar business really though.Quote from: blueskull on January 22, 2020, 06:16:07 amI have considered that, but want to wait on linux-sunxi a bit for the u-boot and other drivers to fall in place first.Here is my board, everything is packed into Raspberry Pi A+ physical size and a two-layer PCB:* Allwinner V3s* microSD card slot* 64MiB SPI Flash (S25FL512S)* RTC battery* 10/100 Ethernet* Wi-Fi + Bluetooth (AP6212)* USB Type-A (actually OTG port)* Audio line out* Microphone* USB power port (doubling as the debug serial port with onboard USB-serial chip HT42B534)

author: Jeroen3
author_rank: Super Contributor
timestamp: January 22, 2020, 11:51:20 am
content: It is a very new chip. Might be unobtainium for a while still.That board looks very dense. But where is the memory?

author: george.b
author_rank: Frequent Contributor
timestamp: January 22, 2020, 12:31:31 pm
content: You can run Linux on an AVR running an ARM emulator, so you could use even a single layerFor modern, high-speed stuff, a 2-layer PCB sounds like a bad idea.

author: technix
author_rank: Super Contributor
timestamp: January 22, 2020, 01:07:15 pm
content: Quote from: george.b on January 22, 2020, 12:31:31 pmWhat I mean is something with a reasonable performance.Quote from: george.b on January 22, 2020, 12:31:31 pmWell if the SoC somes with built-in SiP memory or PoP with memory riding on the back, and if the package involved is something that can easily fan out like QFP, QFN or shallow BGA, it is doable with two layers.

author: OwO
author_rank: Super Contributor
timestamp: January 22, 2020, 01:23:32 pm
content: Normally I would say yes, you can do quite a lot on a 2 layer board, but with that layout the answer is NO. There is basically NO ground plane. Every signal on that board will couple into every other signal, and not through obvious paths either; because there is no ground, every chip's ground is basically floating, which means any signal that goes into any pin of the chip will induce voltage onto every other pin relative to chip ground. If you really want to get this to usable shape I say rip up all routing and take another look at component placement. Aim to place components so that almost nothing has to be routed on the bottom layer. All traces on the bottom must be no more than 1cm long; the bottom side must be a continuous ground plane with no slots longer than 1cm.

author: george.b
author_rank: Frequent Contributor
timestamp: January 22, 2020, 01:25:37 pm
content: Quote from: technix on January 22, 2020, 01:07:15 pmIt's probably doable, yes. Like SiliconWizard said, though, you'll probably have poor EMC, and who knows what issues that could cause. Just because youcando something, doesn't mean youshould, IMO. Especially without a ground plane.But don't let that stop you, if you're really determined to do it. Who knows, you could prove us wrong.

author: thinkfat
author_rank: Unknown
timestamp: January 22, 2020, 02:19:24 pm
content: I've seen the Octavo Systems OSD3358-SM being wired dead bug-style with just a few power rails connected. So why do a PCB at all? You can certainly pull the wires you need over to a breadboard and go from there.If the lure is cheap JLCPCB prototype boards, rest assured that those are of only the lowest quality and quality control is at the "minimum we can get away with" level. You certainly won't go into any kind of volume production with them.If you think of hobbyists ordering boards and building one of those themselves, you're kidding yourself.

author: technix
author_rank: Super Contributor
timestamp: January 22, 2020, 03:08:39 pm
content: Quote from: OwO on January 22, 2020, 01:23:32 pmQuote from: blueskull on January 22, 2020, 02:29:23 pmSomething have to give when the sum of the courtyard areas of all the components involved is larger than the board area.Quote from: thinkfat on January 22, 2020, 02:19:24 pmThat is yet another unobtainium chip. Also AFAIK Octavo chips has internal PMIC, so as long as the wires can hold the current the core is correctly powered and power sequenced even when there is just one power pin connected. V3s is not such a chip, I have to power it properly.Quote from: thinkfat on January 22, 2020, 02:19:24 pmThere are ways to force JLCPCB to put more attention into your quality without paying extra: for example have the PCB design pushing against their spec limits. They can not deliver failing boards, so such a challenging specs will force them to take it seriously. This is a 5mil trace board with 0.3mm vias, something that is right up there against their limits for a double layer PCB. They can and did complain, but they did advertise that level of specs and they have to stand up to it.

author: technix
author_rank: Super Contributor
timestamp: January 22, 2020, 03:29:32 pm
content: I wonder how many of you both have a Chinese mobile phone account and reads Chinese. Currently at JLCPCB it is 10x to 40x more expensive to make a four layer board then making a 2-layer board of the same size, for Chinese users that is.

author: langwadt
author_rank: Super Contributor
timestamp: January 22, 2020, 03:35:59 pm
content: Quote from: technix on January 22, 2020, 03:29:32 pmso it goes from dirt cheap to practically free?

author: technix
author_rank: Super Contributor
timestamp: January 22, 2020, 03:39:20 pm
content: Quote from: langwadt on January 22, 2020, 03:35:59 pm4-layer has always been CNY 200. 2-layer is currently CNY 5 for the first two orders of each month and CNY 20 for the rest of the month. This is 5 pieces of 10cm by 10cm boards, anything smaller wouldn't change the price much. (4-layer does have a 5cm by 5cm tier at CNY 100, but that size is too constraining.)There are domestic competition going on.

author: OwO
author_rank: Super Contributor
timestamp: January 22, 2020, 04:01:34 pm
content: This is what a reasonable 2 layer layout might look like:There are a lot wrong with this design (bad footprints; via in pad) because it is an old design from when I first started out, but notice that all important traces go over an unbroken ground plane and all chips have local decoupling under the board. This particular board required a few jumper wires because some signals couldn't be routed.If this is to be a commercial product, don't do it unless there is extreme price pressure. The unit cost of a 4 layer board in volume is usually a small fraction of the total BOM cost, and cost savings of going to 2 layers is partly canceled by needing a bigger board.

author: technix
author_rank: Super Contributor
timestamp: January 22, 2020, 04:28:38 pm
content: Quote from: OwO on January 22, 2020, 04:01:34 pmFor me that board is not intended to be a commercial product but a learning experience, so I am definitely putting cost on the front seat. What I want here is something that can work in a lab environment so I know what works and what does not next time when an actual commercial project comes. Think of me building up my reference design library and throwing a bunch of them in one test project to check if they works or not.Specifically, this board contains:* V3s core design with MP2122 and XC6206 as PMIC, powered from a single 3.3V rail.* AP6202 Wi-Fi and Bluetooth, with control pins and interrupt pins combined into one I2C GPIO expander MCP23008.* Software support for V3s, especially SPI booting and initializing Ethernet MAC address from 24AA02E48 in boot time.* Device tree voodoo with Linux and u-boot.As of price pressure, here in China designers are supposed to shave every possible cent off the BOM.

author: technix
author_rank: Super Contributor
timestamp: January 22, 2020, 05:04:45 pm
content: I am not going to re-do the whole board since it is just a bunch of designs blocks mashed together as a verification board, however in order to address the ground issue I have increased via stitching. This board is intended to be cheap first, and I only expect it to work in a lab environment long enough so I can verify that I don't have major issues in those design blocks. Premature optimization is a bad thing, optimizing a bunch of unverified blocks is a sin.

author: MarkL
author_rank: Unknown
timestamp: January 22, 2020, 05:24:43 pm
content: Here's another example of a 2-layer Linux board. It can be done:https://www.eevblog.com/forum/projects/design-challenge-idea-linux-capable-sbc-without-bga/msg1119169/#msg1119169The board works fine and has a decent ground plane. However, it never made it out of prototype, and so never had any formal EMC testing done on it.It was rather difficult to layout, and the time spent was not worth what it would have saved to simply go with more layers.

author: GeorgeOfTheJungle
author_rank: Super Contributor
timestamp: January 22, 2020, 05:41:44 pm
content: Quote from: technix on January 22, 2020, 05:04:45 pmBut, how cheap? Because there are hundreds of tiny Linux SBCs and many are very cheap under $10 already. The "Chip", the RPi Zero, The OrangePi Zero, the NanoPi Zero, the Lichee Nano, the Banana Pis, etc etc.http://linuxgizmos.com/ringing-in-the-new-year-with-136-open-spec-linux-sbcs-under-200/https://www.friendlyarm.com/index.php?route=product/category&path=69&sort=p.price&order=ASChttps://www.seeedstudio.com/Sipeed-Lichee-Nano-Linux-Development-Board-16M-Flash-WiFi-Version-p-2893.htmlhttps://www.seeedstudio.com/LicheePi-Nano-ARM926EJS-SoC-Development-Board-16M-Flash-p-2892.html

author: technix
author_rank: Super Contributor
timestamp: January 22, 2020, 06:25:17 pm
content: Quote from: GeorgeOfTheJungle on January 22, 2020, 05:41:44 pmBeing a bunch of PoC's thrown together, there is no point spending a cent above bare minimum. It is a design challenge (think school assignment) and a functional verification board anyway.Quote from: MarkL on January 22, 2020, 05:24:43 pmMine was difficult too, especially due to all the density (otherwise I would have a decent ground plane.)Hmm maybe I should start designing up some function block modules? For example there is a standard M.2 pinout definition that matches the AP6212 Wi-Fi + BT block, so maybe I should design and build a M.2 module with just that block, and in future boards when such a function is needed I just put a M.2 2230 socket in there?

author: Siwastaja
author_rank: Super Contributor
timestamp: January 22, 2020, 06:34:57 pm
content: Note you may be able to squeeze the design to smaller area on 4-layers, making the PCB cost difference somewhat smaller.For example, a tightly packed, miniatyrized 50x100mm 4L design might become 60x120mm on 2L due to added ground and power traces which need to be done 100% on the component layers, preventing component placement.Cost difference of bare PCB being 5x cheaper is of little importance, if the PCB is like 5-10% of the total cost. (Besides, I think you won't reliably find a 5x price difference, unless you deliberately shop for some special discount 2L and compare it to standard 4L.)For a quick approximation, the PCBWay calculator shows $0.85/pcs for a 4L 50x100mm, and $0.65/pcs for a 2L 60x120mm, @ 1000pcs. I would be happy to pay $0.20 extra for shorter and less painful PCB routing time, smaller final product, and better EMI performance.I would guesstimate your component BOM would be around $10 at minimum, and the assembly cost, which would be the same for 2L or 4L PCB, would be somewhere around $1 PCB.Yes, you may be able to find a somewhat better deal on a 2L board, but you might find a good deal on 4L, as well.If this is just for a design challenge, then I understand.

author: technix
author_rank: Super Contributor
timestamp: January 22, 2020, 06:54:26 pm
content: Quote from: Siwastaja on January 22, 2020, 06:34:57 pmI'm talking 10x to 40x for me. That is beyond significant.Quote from: Siwastaja on January 22, 2020, 06:34:57 pmThis board is not quite a design challenge actually, more like a bunch of PoC's being thrown in together so I can verify the functional correctness of each module. I don't mind slowing the external circuitry down on this board really.

author: nctnico
author_rank: Super Contributor
timestamp: January 22, 2020, 10:02:11 pm
content: Quote from: blueskull on January 22, 2020, 12:13:34 pmThe board may be dense but for starters I'm missing filtering and ESD protection on the ethernet port. Both are needed to pass CE testing (and let the board survive). Also having only 2 layers may come back and bite you because the power supply distribution isn't good enough to run it stable.

author: thm_w
author_rank: Super Contributor
timestamp: January 23, 2020, 12:18:58 am
content: I thought OP had already made it clear that this board is not going to be entering production, so all that matters is 1-5pc cost. EMI is probably not a concern unless it kills the wifi.It looks to be about 53x53mm or 4.3 square inches.JLC 200 cny = $29 USD/5pcOSHpark = $43/3pc free shipSomeone linked gold phoenix in another thread which had a 4-layerpool service, $20 minimum for 10 square inches. But 5mil min trace/space vs jlc 3.5mil. I think you'd just get two boards for that? But I've not heard enough reviews to risk trying that yet.I would just use one of the allpcb/pcbway/etc coupons and that cuts the price down a bit.

author: Siwastaja
author_rank: Super Contributor
timestamp: January 23, 2020, 06:22:31 am
content: Quote from: thm_w on January 23, 2020, 12:18:58 amOh, but at such low qty, the component cost and stencil cost would greatly dominate over 2L/4L choice, no?Like for 5pcs, the components would be in $50-100 range, and the stencil would be somewhere around $10-20? Is some $20 extra for 4L going to kill the project?

author: technix
author_rank: Super Contributor
timestamp: January 23, 2020, 06:48:36 am
content: Quote from: nctnico on January 22, 2020, 10:02:11 pmMagjack HR911105A. Filtering and ESD treatment are built in.Quote from: Siwastaja on January 23, 2020, 06:22:31 amActually no. V3s is cheap. The most expensive component on this board is AP6212 at CNY 25. V3s is CNY 10, two switch mode regulators are CNY 1 each, Magjack CNY 7, everything else sub CNY 1.

author: OwO
author_rank: Super Contributor
timestamp: January 23, 2020, 08:16:02 am
content: I can see the advantage of 2 layers which is ability to produce copies on-demand at low cost and low prototyping cost. Even in volume 4 layer boards are about twice the cost per area. For this board it'll be around $1/unit, which is worth optimizing on a high volume product. However that kind of layout is never going to pass review here. Not even for test boards. You are going to have to redo it later, so why not just do it properly the first time? If it can't be done with a reasonable ground plane on 2L, it's better to find out now rather than later.

author: OwO
author_rank: Super Contributor
timestamp: January 23, 2020, 08:36:46 am
content: I had a board with a 900MHz transmitter (35dBm). With certain antennas, attempting to transmit resets the MCU. This was a 4 layer board with solid ground planes. It turns out that is not good enough and at this power level you need shield cans. It works the other way too - in receive, all digital noise on the board will couple into the antenna becausethe board is part of the antenna!Without a solid ground plane it will be orders of magnitude worse, so you may see problems with 25dBm WiFi as well.

author: GeorgeOfTheJungle
author_rank: Super Contributor
timestamp: January 23, 2020, 09:15:20 am
content: Quote from: OwO on January 23, 2020, 08:36:46 amI made a protoboard with an esp32 and a LAN8720 PHY, and it works fine except that when there's WiFi activity the 8720 flags with RX error and drops enet packets like crazy

author: technix
author_rank: Super Contributor
timestamp: January 23, 2020, 12:11:35 pm
content: Quote from: OwO on January 23, 2020, 08:16:02 amAgain, 40x board cost, I am not going to stomach it. And all of this runs on my own funds, not some employers'. If someone else is paying me for a solution stack, I can pull off a demo with this, then optimize it on their money later.Quote from: OwO on January 23, 2020, 08:36:46 amIf it weren't the penny pinching here, I would almost never put antennae on my boards, instead I would use a RF connector and use some external solution instead. I run through surface mount SMA very quickly for this. Since I am penny pinching, a CNY 1 surface mount SMA connector or a CNY 0.5 IPX connector costs infinite times more than a CNY 0 inverted-F PCB antenna.

author: OwO
author_rank: Super Contributor
timestamp: January 23, 2020, 02:27:26 pm
content: Did I read that right? Surface mount SMA?

author: thinkfat
author_rank: Unknown
timestamp: January 23, 2020, 02:31:49 pm
content: Quote from: OwO on January 23, 2020, 02:27:26 pmOut of curiosity, what's the problem with that? Difficult for a PnP robot? It's probably a pain for a human to assemble, too.

author: technix
author_rank: Super Contributor
timestamp: January 23, 2020, 02:39:36 pm
content: Quote from: OwO on January 23, 2020, 02:27:26 pmYes, surface mount SMA (and surface mount IPX too)

author: OwO
author_rank: Super Contributor
timestamp: January 23, 2020, 02:43:02 pm
content: I looked up surface mount SMA connectors:Looks like USB connectors that rip off the PCB weren't enough, let's bring that to RF connectors as wellEDIT: surface mount U.FL aren't a problem because they are small compared to pad area and aren't easy to bump.

author: technix
author_rank: Super Contributor
timestamp: January 23, 2020, 03:28:04 pm
content: Quote from: OwO on January 23, 2020, 02:43:02 pmNot that kind of surface mount SMA, the kind that rides the edge of the PCB.

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 23, 2020, 04:03:35 pm
content: Quote from: technix on January 23, 2020, 03:28:04 pmThat's a lot better already.

author: technix
author_rank: Super Contributor
timestamp: January 23, 2020, 04:05:49 pm
content: Quote from: SiliconWizard on January 23, 2020, 04:03:35 pmIMO that is the best, as it has the most seamless transition to and from microstrips.

author: thinkfat
author_rank: Unknown
timestamp: January 23, 2020, 04:59:17 pm
content: Quote from: OwO on January 23, 2020, 02:43:02 pmAlso, U.FL plugs will come off the connector quite readily if you yank the cable. Unlike SMA when screwed on tight.

author: technix
author_rank: Super Contributor
timestamp: January 23, 2020, 05:04:15 pm
content: By surface mount SMA, I man things like this:

author: langwadt
author_rank: Super Contributor
timestamp: January 23, 2020, 07:39:50 pm
content: Quote from: technix on January 23, 2020, 05:04:15 pmcommonly known as "edge launch"

author: Doctorandus_P
author_rank: Super Contributor
timestamp: May 01, 2020, 02:35:58 pm
content: You could glue everything dead bug style on a sheet of copper and use that as a GND plane and then air wire the whole thing.Make it look nice, make a web page with some pictures and a vid and you have a solid chance of getting a hackaday article out of it, which would give your website and other efforts some publicity.

author: KaneTW
author_rank: Frequent Contributor
timestamp: May 01, 2020, 02:57:11 pm
content: I don't see how a 4-layer board 40x-s the cost. Especially once you consider total cost.The cheapest 100x100mm 5pc JLCPCB 2-layer board with cheapest shipping to Germany is $10, a 4-layer is $35.Even if you add ENIG, 0.2mm holes it's only $85. Upgrade to a 6-layer and it's $145.

author: technix
author_rank: Super Contributor
timestamp: May 02, 2020, 07:29:13 am
content: Quote from: KaneTW on May 01, 2020, 02:57:11 pmI'm talking local Chinese prices.

author: soFPG
author_rank: Frequent Contributor
timestamp: June 19, 2020, 07:43:40 pm
content: Is it possible to get Chinese prices via a taobao agent?

author: technix
author_rank: Super Contributor
timestamp: June 29, 2020, 10:28:16 am
content: Quote from: soFPG on June 19, 2020, 07:43:40 pmYou need someone that speaks Chinese language and have a Chinese mobile phone number for that.

author: spostma
author_rank: Regular Contributor
timestamp: July 28, 2020, 06:09:27 pm
content: two stacked two-layer boards can make a 4-layer board including an uninterrupted ground plane!If you make a 2-layer with a V-score, and break them into two pieces,- one bigger base board with a ground plane and I/O connectors, and- one smaller board with castellated pads around the edges with the processor+memory, but WIHTOUT ground plane,After soldering the smaller board on top of the bigger one with the ground plane,you effectively make a 4-layer board locally.You only need to pay attention to get short ground plane links to the critical chips,e.g. can be achieved with a 3mm plated holes in the base board with the ground plane to solder a ground pads of the processor boards.How about that?