After the above explorations, I decided to take the plunge and have some PCBs made. I ended up picking a cheap box to put the irrigation controller into and designed a PCB to control 12 valves using PWM.
The result came out relatively large (I tend to make postage-size stuff) and has lots of discrete components. So I looked into JLCPCB and their SMD assembly service. I picked as many parts from their “basic” set as possible, leaving me with the esp32 module, the Vreg, a TVS diode, a poly fuse, and connectors to hand-solder.
Ten days after pressing the buy button I got the resulting 5 boards in my mailbox (78mm x 68mm for $42 including components, assembly, and shipping – totally insane, subsidies to kill manufacturing everywhere else ).
Looks really nicely made with nice soldering and no crooked parts. The mounting holes even fit the enclosure for which I only had a spec sheet, yay! Time to add the missing components and then a stiff drink to build courage to test…
Hello world worked right off the bat (I actually first checked power traces, then added the Vreg and tested that, then added the USB connector and checked the USB enumeration, etc…)
One issue is visible in the photo, which is that the blue LED is too dim. I used a 33Ω resistor and that’s too much. I ended up soldering a second one in parallel on top and that now looks OK. Next time I’ll stick to red/green/yellow, getting these resistors for unknown LEDs right seems to always be trial and error.
Another issue I hit is that the connectors I picked are going to be too cumbersome given the space left in the enclosure. I hadn’t properly visualized the space nor the depth of the enclosure:
To the left of my finger is a connector the way it’s supposed to be mounted. Just above my finger the same connector set on its back: that would be much better. To the right is the back of a connector: I think I can cut one row of pins, bend the other one, and add two pins for mechanical stability… So that’s what I did:
And the result:
I checked the catalog and the vertical version of this connector doesn’t have the same row-to-row pin spacing, so I couldn’t use it, I could order a different connector, though. I think in the end I’ll just hack the 10 connectors I need.
Some lessons learned:
- I need to spend more time figuring out the right resistor for LEDs, although the datasheets leave a lot of room for variation in the actual forward voltage (unless one orders specific batches in volume)
- I have two N.P. components but forgot to have the value (“NP”) show on the silk screen, so at first I thought I had forgotten to spec them for assembly
- total absence of test points and of 0Ω resistors, oops! (“go for broke?”)
- need to spend yet more time on enclosure and specifically the overall fit of everything
NB: I moved this thread to the build logs