r/PCB • • Oct 05 '25

My first PCB!!!

This is V1 of my control board for an ESP-32 based digital instrument cluster I am developing for a 5th gen Subaru Sambar. It’s basically an optocoupled IO expander, ADC, and FRAM (for odometer). I knew nothing prior to starting this project a few weeks ago. Using… newly available resources.. I learned all about each chip, pull up resistors, optocoupling, voltage dividers, bucks, tvs diodes, and rc filters! KiCad is such a cool program

1.0k Upvotes

81 comments sorted by

21

u/giminik Oct 05 '25

Well done, where did you learn?

46

u/Key-bed-2 Oct 05 '25

I might get blasted for this but I used ChatGPT as aid and then independently researched its recommendations, since it was often wrong/missed things.

39

u/ampsuu Oct 05 '25

GPT works great for learning when you double check it and use logical thinking. Its bad to blindly follow it but man, its useful in many ways. Especially with stuff that dont get outdated easily.

11

u/razzzey Oct 05 '25

I also hate llms with a passion but I have to admit it helps a lot when you have no idea what something is called or what it does, it at least gives you enough useful keywords to do useful research. It's basically a reverse text search.

Edit: maybe hate them isn't the best wording, they have their use cases, but i hate it when people use them for the wrong tasks and believe they give actually reliable output.

6

u/Late_Film_1901 Oct 06 '25

I'm using it a lot in DIY. I treat it as that old uncle you call when you want to run it by him to check if what you plan to do makes sense. You know he is not a professional, his knowledge may be outdated but still he knows a lot, he will understand what you mean even if you don't use the correct wording and will point out the obvious mistakes you are about to make.

Sadly chatgpt will not come over with beer to help you. On the other hand it knows miles more than all my uncles combined.

3

u/Ok-Motor18523 Oct 05 '25

As long as you know the basics, and use it more of a research and analysis tool, and question its assumptions and statements, it can be quite effective as an assistant.

End to end from scratch, nope no chance unless it’s a super basic circuit.

1

u/SteveisNoob Oct 08 '25

Nothing wrong with using AI as a tool.

Nothing right with making AI do the work.

You seem to be in the first case, so all is fine. I use AI all the time for coding, troubleshooting etc. I simply make sure to understand how its suggestions work at minimum, and I alter the suggestions to my liking if possible. Faster to get things done and learn stuff that way.

1

u/not_afinanceguru Nov 03 '25

Out of interest, what AI tools do you use?

2

u/SteveisNoob Nov 03 '25 edited Nov 03 '25

Free version of ChatGPT.

Though, recently I have noticed that it isn't exactly reliable when it comes to hardware, which is kinda expected as LLMs, at least their free tiers, aren't good at tasks that require some intuition, critical thinking and decision making.

For simple-ish software stuff though, great learning tool.

1

u/ScaryPercentage Oct 06 '25

Chatgpt is awesome for brainstorming. When I can't properly explain the problem I explain it to ChatGPT, it asks questions, we refine the problem then I do research about it. It is a very useful tool.

It is aweful at finding solutions though. Especially in EE it repeats the same thing, suggests incorrect stuff, etc.

17

u/smoothPAPY Oct 05 '25

I wanted to do something simmilar for a toyota aygo but seeing this i am not sure if i can afford it ahaha. So many componenets just to read the speed and rpm.

7

u/Key-bed-2 Oct 05 '25

This actually only costs about $75 in total! (including the esp32 display) but obviously spent way more in prototyping Also, most of this is just for lamp signals (battery light, check engine light)

6

u/well-litdoorstep112 Oct 06 '25

btw are there chips with multiple optocouplers in one package? sort of like resistor networks.

It just seems weird how much space they take.

2

u/Key-bed-2 Oct 06 '25

Oo thank you I’ll look into this

2

u/Key-bed-2 Oct 07 '25

So I found there are 4 channel optos but they are more expensive per. Channel lol. So I’ll just stick to the individuals and also if one fails is cheaper and easier to replace.

1

u/well-litdoorstep112 Oct 07 '25

oh okay then. are they smaller than 4 regular optos next to each other?

1

u/Key-bed-2 Oct 08 '25 edited Oct 08 '25

If you get the DIP package, no. The SOIC package yes but it’s twice as expensive. To be fair it’s only like a dollar more but, what I got works so. If a new project needs it smaller I would go with the 4 channel SOIC! 4chan SOIC is $2 each so for this board that would be $14. 1chan DIP at $0.19 each it’s $5.24

1

u/Savallator Oct 09 '25

As the point of an optocoupler is often to provide galvanic insulation, separate ones are often preferred to also have isolation between the channels.

1

u/well-litdoorstep112 Oct 09 '25

it's all in the dielectric. Everything is conductive if the voltage is high enough

3

u/slabua Oct 06 '25

What does it do?

3

u/Key-bed-2 Oct 06 '25

It takes the digital and analog signals from the vehicle and converts them to 3.3v logic-level signals that the computer can understand. And also has FRAM which is stable memory to store the odometer values.

2

u/grislyfind Oct 05 '25

I might have put the terminal blocks around the outside, or (better) used sockets that harnesses would plug into. It's a pain to remove a zillion wires to make changes to a board, but still not as bad as having wires soldered to the board.

1

u/Key-bed-2 Oct 05 '25

Yes I’ll be putting molex style connectors on the final version, I just wanted the terminals for testing 👍🏻

2

u/well-litdoorstep112 Oct 06 '25

in my experience they're a bitch to depin and diagnose if they don't have a good contact.

Im currently redesigning my PCB from molex to those WAGO style connectors (base soldered to the board and then you plug in the whole block of wagos). Molex connectors were such a pain in the ass that my first prototype just has wires directly soldered to the board.

1

u/Key-bed-2 Oct 06 '25

This is the jist of how I was planning on doing it, but now I’m questioning if I should have a hard connector on the board instead. These connectors were just widely available and cheap..

2

u/Taster001 Oct 06 '25

I would definitely use on-board connectors. So much cleaner.

1

u/Key-bed-2 Oct 07 '25 edited Oct 08 '25

I updated v2 so it takes a 38pin molex “microclasp 55917” for the main wiring harness. Not sure if I’m gonna bother for the I2C, usbc, and button module since those parts will be fixed so shouldn’t see any fatigue. Edit: ok, I’ve been convinced. I changed all the accessory connections to on board JST connectors! I think V2 is pretty much perfect now

2

u/Intelligent_Ad_7986 Oct 06 '25

Soldering wires is always a lifetime issue. The soldering heat hardens the copper connection and that's where it will break.
Crimped wires to PCB connectors is the way its done by the OEM's.

1

u/Key-bed-2 Oct 06 '25

Will definitely change to an on board connector for v2, thx for the feedback!

1

u/Key-bed-2 Dec 28 '25

I took your advice! Here’s v2 (really it’s like v384 lol) One 38 pin harness and we switched to a raspberry pi so I put a 2x40 header that it plugs directly into for easy hot swap. Mayyyybe not the best idea? But I think it’ll be fine.

1

u/kubus7654 Oct 06 '25

soldering wires straight to a board is not recommended

3

u/scaredoftheinternet Oct 05 '25

Best way to learn is by doing! Very cool. Have you started bringing up functionality yet?

4

u/Key-bed-2 Oct 05 '25

Indeed! I have a working proto board and this should be wired the same way, but I need to wait for my roommate to get home to fully test cause he’s the programmer. It did successfully power up without burning anything 😅 edit: I’ll add to this, some of the component spaces are blank cause they are for expansion/ values differ depending on the sensor I use.

7

u/mr_joda Oct 05 '25

I will always recommend to use spring loaded clamp connectors instead of these. They provide constant force over the time. This screw ones will loose contact.

Or any multipin connector with locks.

4

u/[deleted] Oct 05 '25

Nice, good work, well done.

Keep doing more and you'll get there.

1

u/hendersonrich93 Oct 05 '25

That’s a lot of loose wires to attach to those posts. Couldn’t make it with polarized multi wire connectors? It is a neat looking board.

2

u/Key-bed-2 Oct 05 '25

Yeah the terminals are just for testing, it will have molex connectors when it’s finished

1

u/Ok-Motor18523 Oct 05 '25

A with others. Move the connectors to the edge.

Consider using pluggable terminal blocks rather than screw type to the board.

1

u/Key-bed-2 Oct 05 '25

So, I wanted to keep all the connections close to each other for fittment purposes, and relocating to the edge meant trace routing got quite difficult with the allotted board size. So, keeping central made the most sense. Also, as I mentioned to others, the terminals are just for testing and will be replaced with molex connectors. I’ll be making a V2 with footprints better suited for the molex and some other minor changes, though technically this board would work fine.

1

u/knifesk Oct 05 '25

Planning to convert the car to self driving? 😅

1

u/Maja-007 Oct 06 '25

Are schematics available?

1

u/Key-bed-2 Oct 06 '25

Ehehehe I can send it but the schematic is a MESS lol

1

u/Key-bed-2 Oct 08 '25

This is my schematic 🤣

2

u/Wild_Scheme4806 Oct 09 '25

Why dint u use netlabels, mustve been crazy hard to take all the wires from one side to another. Anyways, the PCB looks great.

2

u/Key-bed-2 Oct 09 '25

I ehhh didn’t know what I was doing. I’ll look into net labels for future, thx!

1

u/orefat Oct 08 '25

Great PCB. And that's a lot of opto insulated inputs. Adding an LED for each optocoupler would be a great thing for troubleshooting when things don't work out.

1

u/Key-bed-2 Oct 08 '25

Thanks! Yeah, the prototype board I used had that, but man the extra resistors and leds take up a lot of space. I might try and make an led test jig of sorts.

1

u/cookinwithcameron Oct 10 '25

How is the SI on that bad boy?

1

u/Key-bed-2 Oct 10 '25

Sorry, what is SI? I’m not familiar with the term

1

u/cookinwithcameron Oct 10 '25

Signal Integrity. The study of how well each trace and the components structure the signals (waves) on every bus/trace.

1

u/Key-bed-2 Oct 10 '25

Oooo, no idea lol but probably not good. But I don’t think it should really matter with my application. I did add some rc filters and the TVS but not sure if those even really matter in this case. Most of the signals are just lamps, and the few gauges will have so much smoothing programmed anyway, that any noise hopefully won’t show.

1

u/dos-wolf Oct 10 '25

Lmao the support email kills me... congrats on the build

1

u/Key-bed-2 Oct 10 '25

😆 ya know, just incase ownership changes and something goes wrong!

1

u/Connect_Truck_1930 Oct 16 '25

how did you add an image to your board

2

u/Key-bed-2 Oct 16 '25

You can create a silk screen from image in KiCad there’s lots of videos that are better at explaining it than me, I barely knew what I was doing for this one

3

u/electricfunghi Oct 05 '25

Keep on trucking!

3

u/VOIDPCB Oct 06 '25

Good job.

Purp skurp.

1

u/wiebel Oct 06 '25

This is awesome. Although nowadays I see through-hole components as a burden. SMT is in my opinion simpler to solder as long as you didn't go crazy with the sizing and not having huge forced vias everywhere is really a good thing. Also Hot plates are not that expensive anymore and a complete game changer when it comes to quality of the soldering. You probably noticed this already on the two SMD ICs. Having the actual parts on the silkscreen is a nice touch but try not to omit the identifier, as in which Ux are the SMD ICs. I like eg. the R2.2k1.8 notation, as I do the overall silkscreen. Very nice.

1

u/Maddog2201 Oct 06 '25

Good to see I'm not the only person with a Subaru doing weird projects, been building a DCCD controller for about 4 years now, cars and electronics projects are fun, especially when you can drive it and see the end result.

1

u/AideTop8744 Oct 06 '25

If I were you I would use Wago Style snap contacts, those screw terminals arent great for contact esspecially in a car where there is a lot of vibrations.

1

u/Icy-Reporter-6834 Oct 06 '25

Sorry , Could you explain what is this in deatail , i like to here the path also? , wait for repley

1

u/Owboduz Oct 06 '25

Don’t be afraid of using surface mount parts. As long as the pins are on the edge and they’re 0.65mm pitch or bigger, they’re pretty easy to solder. Just use plenty of flux.

1

u/WelderNL Oct 07 '25

Delicious!!

1

u/Le_modafucker Oct 07 '25

Looks lovely 😊

1

u/Gillian_Q Oct 07 '25

Wow! Thats pretty slick.

1

u/Ok-Horror7211 Oct 09 '25

that's cool

1

u/Foreign-Tax4981 Oct 09 '25

Nice job 👍

1

u/Perfect_Goal_1014 Oct 18 '25

Love this, looking for someone for my company right now need a pcb asap are you interested?

1

u/fadnix Oct 26 '25

Nice PCB, and really impressive that you learned all of this is few weeks! Keep up the good work.