2026-11-25

KSZ8851SNL vs CH390D Ethernet controllers

Some time ago I added Ethernet to some of my PCB designs. I used the KSZ8851SNL SPI Ethernet chip. The main reasons for doing this were :-

  • Single chip MAC & PHY
  • Supported by an ESP IDF module
  • No built in TCP crap (just raw packets), so avoiding issues with lack of IPv6, etc
  • Available from JLC

To my surprise I have actually done NINE PCB designs with this now. OK, two are test boards, but that is still a lot. The reason that matters is because I am changing them all to use a CH390D SPI Ethernet chip now. Why am I doing this... Well let's compare.

KSZ8851SNL

This is the recommended circuit. As you can see, we have the chip, crystal, magnetics, RJ45, and some 27 passive components. The circuit worked - well seems to - since initial designs that have worked well I have had batches that are unreliable, which is actually a big concern.


It takes quite a bit of space on the PCB... The chip itself is 5x5.


It also gets hot, I have measured 65C, even with thermal vias under the chip, as recommended.

CH390D

This is the recommended circuit. As you can see, we have the chip, crystal, magnetics, RJ45, and some 6 passive components.


Some key tricks here are that the chip includes the 50Ω resistors for Ethernet, and the 12pF capacitors for the crystal.

As a result, it takes a lot less space...


So I ordered test boards, and had a slight panic!

The code change was a search and replace, crazy simple. ESP IDF have a CH390 module.

It started well - first couple of boards said ATE “PASS”. Wow. Then an “eth init fail” - tried again and “PASS”. Odd. Then OK. Then more needing two goes. In the end three would not PASS at all!

Worst kind of error - intermittent. It was a reset timeout. I poked with settings in ESP IDF for reset timings and timeouts. No joy!

But some boards did start. Good. Let’s look at those. Connected Ethernet cable and, nothing. No errors but no packets. Dead! Argggg! And this was all of the “working” ones.

I was really getting a bit down. Then, on an off chance it removed the reset GPIO from setting leaving it to float (weak pull up). Bingo. All boards now start up and pass packets. They work perfectly. WTAF.

I have now made my code do a controlled reset before invoking ESP IDF, and telling ESP IDF there is no reset GPIO. This all works. Phew!

Comparison

  • KSZ8851SNL $3.92, CH390D $1.18
  • KSZ8851SNL 65C, CH390D 45C
  • KSZ8851SNL 5x5mm and 27 passives, CH390D 3x3 and 6 passives
No it is a no brainer to change my designs to CH390D, and I am working through them now.

2026-11-16

Fun with e-paper

I have quite a few of the very nice Waveshare 7.5" mono e-paper panels with laminated black bordered glass front. So I have decided to make a new fun project - a battery based sign.

The project involves a small PCB, and a carefully designed 3D printed case. The display actually comes with some adhesive tape even, so it sticks to the case design.

I then include a 13.7Wh LiPo battery. It includes a recharge circuit to charge from USB.

The board includes an RTC chip, which uses 160nA. This has alarm settings and a button trigger as well. It can then wake the main CPU (ESP32-S3).

I have opted not to use the ESP32 deep sleep mode for this - by shutting down the whole processor the idle power consumption really is very low. The concept is simple - it wakes up periodically, say every 5 mins, checks for new data, and if no new data it goes back to sleep.


It is complicated to get this check and sleep process down to a minimum time, but I have managed to get it to a typical 850ms.

  • Fast boot loader, not checking the image integrity (this does get checked in the event of a crash, and will switch to other image if corrupt).
  • Not running a PSRAM memory check.
  • Not logging boot loader to serial.
  • Caching the channel and BSSID for WiFi connect.
  • Caching the IP, mask, gateway and DNS for IP connect.
  • Fetching a page via http not https (https adds 2s).

The caching uses the RAM and EEPROM in the RTC, and sadly not quite enough space to cache IPv6 - though I may be able to squeeze in for simple SLAAC and zero router address perhaps. One to consider.

So yes, some compromises here, but 850ms is really short.

The system does a more comprehensive start - scanning WiFi, getting IP again, checking s/w update, every day. This takes a few seconds.

To try and get some idea of the battery life I have set one of these up using a tiny 0.9Wh LiPo.

The ADC is not ideal, and estimating battery capacity is always fun. It has been reading capacities around 85% and actually going up and down a bit.

Over the last week it has gone from as high as 87% to 83% for my estimates.

So a crude estimate is that if it has used less than 5% in a week, the 0.9Wh could last 20 weeks? This would mean the 13.7Wh could last 5 years!

Yes, this is a wild estimate - it depends a lot on usage, and a LiPo will have some internal discharge as well. What I think I can confidently say is my original goal of 1 year battery life should easily be achievable. Ideally I want to do a full charge to flat test on the 0.9Wh to get a clearer idea.

2026-10-29

Some simple Eufymake tips 3D print over print

My Eufymake UV ink printer has issues, and so does dealing with Eufymake as a company, as I have blogged, but today, let's look at it working, and doing what I ask.

I have done a few "over prints" now, where I am printing on something that exists - printing on PCBs is excellent. But this time I have a 3D print that I want to accurately over print.

So a few tips.

  1. Dimensional accuracy of the 3D print. My resin printer can be very slightly out on larger prints - depends on the resin used. The models from JLC are unbelievably stable. So measure, with callipers, to check. Do not rely on the Eufymake camera.
  2. Make the artwork to the correct dimensions. My example here is nice as it is a 16x12 grid of 7.5mm square blocks. Almost impossible to get wrong.
  3. Add bleed to the artwork, a few mm over all edges on the most appropriate colour. For this model I copied and pasted half a block left, right, up, and down behind the image.
  4. Make an outline of the image, only like 1mm or something.
  5. Load the outline, centred exactly, and print on paper on the print bed.
  6. Place model on the outline to align exactly.
  7. Load the image, centred exactly.
  8. Know the centre of the image - in my case there is a clear and exact centre.

At this point, when you snapshot, the centre of the image should be right. It is worth double checking it matches the image. Do not trust anything away from the centre - trust the printed outline. Checking the image centre helps double check you have placed on the outline.

If doing many prints the bleed ends up on the paper and gets thicker. In my case with a solid base that means print after print the placement of the image gets easier as there is a thick print line around the edge and the model slots in to place.

Indeed, I printed an outline inside the image and placed on that - an alternative would be an outline outside the image, and print a thick layer on paper with the Eufymake so as to create a positioning slot for your 3D image to slot in to place.

The results. Some happy teenagers who can tap to pay on their Netherite Ingots (whatever they are?!).

I think this has proved a good exercise. The case printing I have been working on could have a thick outer outline printed on paper to perfectly align the case before printing. So yes, good testing even on a silly thing like this.


2026-10-28

PCB mechanical fit testing


One of my latest designs needed more mechanical fit checks that usual, it was to work with specific hardware and I wanted to check the case design with the PCB and battery and so on all fitted before ordering the PCB. So I 3D printed the PCB.


This is not really a new idea, but first I have done it. We actually did recently for some FireBrick work - 3D printing the case, but also 3D printing the PCB. This was FDM, which was fine for checking the mechanics.

But the result in resin is stunning beyond belief. I actually ended up going through the KiCAD models and updating some of the 3D model STEP files even to be even more accurate. Some points of mention.

  • The USB-C socket has the inner part, but you can plug in a USB-C cable properly and not break anything. This allows the exact fit of cable in socket and confirming is it not fouling anything in the case design.
  • The battery connector even has the pins - that is crazy. And again, the plug of a real battery could plug in and not even break the pins! This was great to confirm exactly the right connector and polarity and confirm battery lead length fits as expected and is reachable from where the battery will be located.
  • The ribbon connector has the gap for the ribbon from an e-paper, and allows me to verify the length fits and again is something one can reach in the case to install.
  • The sticky out bits fit in the case design which has slots for them (button, USB, WiFi antenna, and lugs).

I am amazed at the precision. But actually there was one area that was technically too accurate!

KiCAD output the board, and will even output the solder pads, and output the components. But in real life the components would be in solder paste. The actual output had maybe tens of microns gap between component leads and the PCB itself. This meant a print slice layer had nothing.

The result was most components were fine, amazingly, even though all of the SMD had this gap. The contact area after the gap was enough, even on even 0201 resistors. But the leads of SOT parts were curved to a point as they are in reality. In reality solder would wick up those legs.

The result was interesting. The components printed perfectly but very loosely connected to the PCB!

I ended up with a lot of missed components when taken out of the printer (and had to clean the release film) and even more missing after a wash.

What I need (and have a feature request in) is KiCAD to have a solder paste export to fix the component legs to the pads as they would be in real life.

For now I export PCB and components separately and load in to FreeCAD and move one 50um down. The result is a solid print with stuck down components!

2026-10-23

Is TOTSCO fit for purpose

I have explained many of the issues with TOTSCO - the company that does "One Touch Switching" for UK broadband and telephone services.

My main gripes have been over the unbelievably poor specifications and stupidly inadequate processes for accrediting CPs to connect to the One Touch Switching system. This is partly why I made a testing system (NOTSCO) free for CPs to use, and have actively helped many CPs as a "buddy CP" for what testing there is. I am trying to make this work for everyone.

But it gets worse.

TOTSCO are actively refusing to pass on a simple message to another CP that is failing to meet the OTS specification.

In this case it is such an egregious failure one has to wonder how even the inadequate TOTSCO process got this CP on the system. No I am not naming the CP. The error is as basic as they come - a residentialSwichMatchRequest getting a residentialSwitchMatchConfirmation but without an actual switchOrderReference (or implicationsSent). This is the most basic function of OTS and is broken beyond belief. The CP should be REMOVED from the platform until they can show they can actually comply with the spec, and more importantly TOTSCO should have always been testing CPs do, in fact, comply with the spec. Failing to do so is unbelievably irresponsible.

They cite "security", but they is ZERO security issue with passing on such a message. And no GDPR issue either. Their refusal is baffling.

What is crazy is they do operate a "CP to CP" communications system, but signing up for this is not mandatory. When CPs do sign up TOTSCO WILL pass on messages. This highlights that passing on messages is not a security issue. So why not pass one based on a simple email when a CP is not signed up to "CP to CP" communications. There is no justification for this.

If TOTSCO are absolving themselves of ANY RESPONSIBILITY for policing ANY compliance with the One Touch Switch specification, whose job is it? It is not my job as a CP.

So who do we turn to - perhaps OFCOM. Maybe OFCOM will decide TOTSCO are ignoring the most basic responsibility for addressing CPs not complying with the OTS specification.

Should OFCOM police this somehow?

Note this is not the first instance of TOSTCO being so stupid - we have another CP failing to meet the OTS specification that is likely a GDPR breach. They REFUSE to tell the other CP. I have now contacted the ICO (no reply yet). But why REFUSE to pass on such a basic message (not personal data in the message and no security issue).

This needs fixing - OFCOM you need to fix this.

2026-10-10

BT SFI Should not exist any more

It is a while since I have ranted about "Special Faults Investigation" service that Openreach sell.

[see update at end]

Why did SFI exist?

  • Openreach sold a service called metallic path or shared metallic path which is the wires from exchange to master socket. The standard for it was that of wires capable of making a telephone call, though the standard was improved in time.
  • BT Wholesale (at the time pretending not to be the same legal entity as Openreach) buy that, add equipment at the exchange (DSLAMs), backhaul, more equipment (BRASs, switches, etc), more backhaul, and sold a DATA service, at one end being a hand over (typically at a data centre) which is fibre with ATM or Ethernet, and at the other end the master socket with ADSL encoding.
  • ISPs buy that and add equipment in the data centre (LNS, Switches, DNS, email, etc) and transit and peering links, and sell an INTERNET service to customers - sometimes terminating at the master socket as ADSL, sometimes including a supplied router and Ethernet and/or WiFi

This system worked pretty well, and at each level someone is providing a service to some spec for a fee, and if the service breaks and does not meet that spec, then of course, they have to fix it, at no charge to their customer. Each layer builds on many parts to make a service to their customer.

This is where SFI comes in - there is gap. If the metallic path breaks, Openreach will fix it, however if it meets the spec (based on telephone calls) but is not good enough for ADSL data (e.g. below the min sync level BTW have agreed with the ISP), then Openreach DON'T HAVE TO FIX IT because it meets the metallic path spec. So they SELL an extra service to BTW, a Special faults Investigation, which, for a fee, involves the engineer trying to improve the metallic path (beyond the spec) to be better for data (e.g. ADSL). BTW have to buy this so as to fix the broken data service that they are selling to the ISP.

Why was SFI controversial?

All of the above sounds fine, at first. Bear in mind, BTW sell a data service to ISPs, and if a DSLAM breaks they will get it fixed (at not charge to ISP) and the same should apply if the data over the metallic path breaks (e.g. below agreed minimum sync rate), and again as not to spec that should be at no charge to ISP. But BTW DID CHARGE ISPs for the SFI. What is worse is many ISPs then charged their customers for the SFI!

This led to a lot of disputes, and the pettiness got mental. Some examples are BTW used to say SFI was optional so on all faults said we do not opt for SFI. They then refused to actually fix lines unless and SFI was booked but said charge was for work beyond the master socket, so we said do no work beyond master socket. They then said they could not accept that request, and also said that a visual inspection of the end user router and wiring counted as (chargeable) work beyond the master socket. At one point we instructed customers (who did this) to remove their router and all wiring and physically hide it out of sight before the BT engineer arrived. We had pictures even. BTW still tried to charge. On one occasion the engineer immediately closed the fault as "no customer router plugged in", without testing or fixing the fault! We have done well disputing SFI charges at every stage, usually quoting their own terms to them and again explaining that we (as an ISP) are not buying a metallic path.

Note: there is a logic for a charge for wasting time - reporting something that is not a fault, e.g. an engineers visits and finds the end users router is on fire - a charge on that basis, as a penalty of some sort, does make sense and makes sense to be passed on to whoever screwed up.

Why should SFI not exist now?

Now we have the crux here - we are still getting SFI charges, and still spending time disputing them, but for almost all lines SFI should not exist. To explain, that initial bullet point has changed for most lines now - because of the UK telephone service switch over from old copper pairs to the exchange.

  • Openreach sell a DATA service with handover on a fibre at the exchange, Openreach equipment in the street cabinet, and wires or fibre to the end user premises handed over as VDSL or Ethernet.
  • BTW buy that DATA service, and have equipment at the exchange, backhaul, etc..
  • Etc

What we have here is no longer a gap - no longer is Openreach selling a metallic path and BTW using it to sell a data service. If the data service is not working it is Openreach not providing something to spec, and so Openreach should fix that as a NORMAL FAULT INVESTIGATION. There is no gap for which SFI was invented to cover. Indeed, BTW should dispute every such SFI charge before even thinking of charging us (ISP).

There are still some ADSL, but they are quickly going, so SFI could exist for those lines for now - with the same original controversy of BTW trying to charge ISPs, but this is dwindling. Somehow BT try to charge for SFI for VDSL and FTTP services even now where it logically makes zero sense.

If BTW really are separate from Openreach now, they really have no excuse for not disputing every SFI charge related to FTTC or FTTP on this basis.

Giving BT some credit where it is due

One thing BT never had the nerve to do with all their changes to contract terms was make it so that their customer would have to pay them to fix a service they agreed to provide, but were failing to do so. Such a contract, even on a commercial basis, would be very challenging, and I would hope OFCOM could be persuaded to step in if that happened. The basic concept of I agree to pay you for a service and you agree to provide that service relies on the provider having to provide what they agreed, or they fix at their own cost. They tried a lot - the whole visual inspection is perhaps the most creative, but never that.

I may not be able to say that for all providers, but that is another story.

Update

ISPreview published an article on this, thanks. OR tried to justify SFI - their main justification seems to be work in customer premises (which we don't want - they are far to expensive for such work), or failing to find a fault (which makes sense if there is no fault, but does not when there actually a is fault - they should pay us for failing to find it).

However it is very clear to us that OR are still operating SFI charges as if they were selling a metallic path facility. Just yesterday we disputed an SFI charge and got told "Charge valid - SFI2 checklist determined "no fault present" (to SIN 349)".

To explain, SIN349 (which states it forms no part of any BT contract) is the metallic path spec (improved from basic telephone service). BT Wholesale do not buy a metallic path service from OR any more they buy a data service (VDSL/SOGEA), so testing the line to SIN349 is irrelevant - they need to test that the supplied VDSL/SOGEA service is working.

And, of course, as an ISP, we do not buy metallic path service from BTW, and never have, so even in the old day when testing to SIN349 may have made an SFI charge (from OR to BTW) valid, it did not make it valid as a basis for BTW to charge us, as we buy a data service not a SIN349 spec metallic path service.

2026-09-30

Wallet inspector

What is fun with a nice UV ink jet printer is on what you can print...

One thing is a bank card.

This is now my Monzo card, oops.


Yeh, I can print on a card and the new non-embossed cards are even easier.

Someone suggested I make a flashy web site offering this as a service just to see how many people will send me their bank cards to print. It really is the 2026 version of "wallet inspector"!

KSZ8851SNL vs CH390D Ethernet controllers

Some time ago I added Ethernet to some of my PCB designs. I used the KSZ8851SNL SPI Ethernet chip. The main reasons for doing this were :- S...