No, thank you. Your posts rank high are among the hundreds (thousands?) I have read the last few months on here while cutting my baby teeth on this embedded stuff.
Without guys like you so willing to help folks, this would be a lonely place.
With headless devices I always include a heart beat LED somewhere on the board. This starts to flash when the board is working. When debugging you know by the USB connection but for deployed, the LED works well.
Dave I noticed when I plugged the boards in to the test circuits in place of the G400 dev board I had there, that it wouldnāt start running the code Iād loaded, after I plugged it in, until I hit the reset button.
Do you think that behavior correlates to the missing pulldown on PB2?
PB2 on my board is one unbroken trace from the pin to the 4 pin header, buried in a bunch of other traces, so nowhere I can really scrape the mask off and add a resistor. But I should be able to jumper a resistor from the through hole header pin over to ground easy enough. Ugly, but hell, itās a prototype board.
I have an exposed ground pin a half inch over on a header for COM1 I can hook it in to.
Oh heck for that matter I could scrape the solder mask off next to the PB2 through hole and just do a bottom side surface mount resistor.
The whole bottom of my board is a ground plane except where I had to run short signal traces. I went out of my way to route as much as possible top side and to keep traces as short as possible on the bottom.
I need to do a better job on my ground planes next time. I found a really interesting document from Texas Instruments in a search the other day for design recommendations on ground plane design for reduced EMI emissions and it was really eye opening.
I had to refactor everything Iāve learned to incorporate that and plan on doing my next board entirely different. I donāt have any EMI test gear and probably canāt afford it but at some point my stuff will have to go through FCC so I might as well ādo it right the first timeāā¦ or do it as well as I understand, anyway.
I now build all major boards 4 layer and only use 2 layer for some home projects. Home projects based on the G120 or G400 are all 4 layer. The price is not that high anymore. The inner ground plane helps when it comes to EMI and EMC compliance and using the inner power plane for 3.3V with split planes for the likes of 5V makes routing top and bottom much easier.
Thanks Dave. I priced 4 layer prototypes on PCBCart and they arenāt horribly expensive. Cost scales and they end up being close to double the cost of 2 layer for the same form factor (but still sub $10 a board for the size I need in relatively low quantities). Go to 6 or 8 layer, though, and that cost rapidly increases. I donāt think Iād need that level of complexity unless I started messing around with BGA chips or needed to shrink something down to crazy small proportions.
I got these boards from PCBCart and they did a fantastic job. The only drawback is on their prototype boards they donāt solder mask between the pads (have to get a standard production job for that). That has caused a lot of issues with the MCU bridging between pads after reflow. Even using flux and wick to pull solder out is touch and go; without solder mask between the pads they are just as likely to bridge between pads as they are to mate pad to pin. (edit to add; it is also just as likely I suck too much solder back out and air gap the pin and pad; a 6+ hour long lesson of trial and error I learned the hard way)
But it is what it is, and I know that wonāt be as big of a problem when I get standard boards made later.
Iām still very new to all of this and the various learning curves are painful sometimes!
Itās somewhat frustrating to have an idea and want to see it come to life but there is a veritable MOUNTAIN of learning and practice and experimentation to get from point A to point B.
But then again, the journey is what itās all about. Once itās done, Iāll be bored again.
DFRobot, ITead Studio, or DirtyPCBs are good options that help keep the price down, and you get full service with solder mask where you need it. Even oshpark might work for youā¦ there are just soooo many options out there these days.
Not sure where you are located, but DFRobot offer and excellent PCB service with proper solder masking too. Iāve had no issues with 0.5mm pith connectors when getting them to make my boards.
I just spent a total of 10 hours tracking down why this one board wouldnāt work. Kept getting a short to ground with the MCU mounted, and I went through painstaking tracing trying to find the root cause.
I removed everything not processor related from the board. Rework and remove G30ā¦ painstakingly line it up and re-solder. No joy. Short to ground. Fluxā¦ wickā¦ fluxā¦ wickā¦ test pin for pin connectivity. 3v3 and gnd shorted but I couldnāt find it!
I had a solder bridge under a dang cap, where I couldnāt see it. Shorting VCC to ground. But that small ground plane wasnāt connected to others by trace or via through neglect in design by meā¦ unless the microcontroller was mounted.
Well, I thoroughly fried that G30. Once I cleared up the root cause and re-verified every pin was in fact not bridged AND properly connected to itās endpoint, I fired it up and felt the 3v3 VRM get hot.
Unplug it. WTH I have no short here!
SO I plug it back in and feel around on the board. Maybe I fried one of those fragile tantalum caps I used?
Nope. But when my finger touched the G30ā¦ whoa boy. That sucker was ready to take skin off.
I donāt know if the short fried it, or if I killed it while doing one of the (5 or 6) reflows to remove and re-seat it, but it is deader 'n a doornail.
I grabbed the first G30 that I thought Iād broke (my last G30 in the stockpile) that Iād bent pins on, meticulously straightened every last one of them back out, cleaned the solder off them with flux and wick, re tinned the padsā¦
So now Iām at 100% (4 for 4) with one more blank board to build, when I reorder G30ās next time I order parts.
Only killed off about $30 in parts total doing it. (The fried G30, plus random stripped non-labeled crystal capacitors, about a half dozen of those tiny thin 12mhz crystals, and various other parts.)
Really wish I had an automatic parts placement thingy and a reflow system that worked instead of causing under-chip shorts and bridged pinsā¦ Only 1 of 4 boards reflowed the CPU and GPIO extenders properly. The other three boards I had to hand solder all of the ICās (reflowing the QFN GPIO extenders with the rework station)
Diagnosing failures on this stuff is TOUGH.
Infinitely tougher than programming where the debugger highlights the line you screwed up on!
How the heck do you guys get over the learning curve on circuit failure diagnosis without going insane?!?!!
Phew. Thankfully you havenāt (yet) counted your labor costs on making those 4 either That might make you less enthusiastic about the endeavour, but please donāt let that stop you
Oh itās wearing on me. But I was born stubborn and refuse to admit that Iāve failed. Which is why thereās board #4 after {far too many hours} instead of 3 on the desk and one in the trash.
Iām committed to taking my beatings when they come; learning curves like this are full of painful errors and remorse. Rather than get disheartened or discouraged, I take the lessons for what they are. Painful, but thatās where the best learned lessons come from.
Like my screwy ground plane job. I didnāt have any appreciation for how ground flows, when I designed the board. That document from TI back from 1999 on emissions really shed some light on things. The current āoh jeezā moment is when I hooked a scope to the boards I designed and saw that my i2c clock was in the shape of a shark fin. No caps on that line. Only a 1k resistor left. But between the board, the cable, and the five i2c modules I have connected, my nice square waveform I saw in breadboard testing is now in the shape of a shark fin. I have massive capacitance on that trace.
The best guess I have at this point in time is the board design is bad, my ānorth sideā ground plane is poorly connected, and that trace has to take a very bad, long route back to reference voltage on the return path.
Which brings me to this ^^
Going from breadboard to prototype circuit board, 2 layer, gave me some rather astonishing findings. Iām still exploring the quirks of the board. But Daveās advice is solid. A proper ground layer would have stopped the communications issues before they started. I had no idea an FR4 board could create capacitance like Iām seeing, with a bad (not quite gridded properly) ground layer.
Every board I make from here out will be 4 layer simply to fully isolate the ground plane properly. The penny pinching part of me says āmake it as cheap as you canā but the realist in me says āyouāre going to have odd crap happening if you donāt do it right, and pay the money to do it the right way.ā
As far as labor costs I started this project back in early June and Iāve been working 12-16 hour days all summer, including weekends, buried in datasheets and forums and videos and ā¦
But itās coming together. This weekend I delved in to how to build power supplies and safety circuits. Kind of important to know how to do safety circuits properly before I start mucking around with 120 and 240v relays.
One confusing thing with the STMās (G30 and G80) is getting pin 1 correct since most have 2 circular markings, so itās always the smaller one bottom left of the writing.
Like young Dave, with the cost of DFrobot etc dont even bother with 2 layers when building your latest and greatest as it can take away alot of frustrations like you obviously seen. Also i you want a sanity check there are plenty of nerds on here who would be happy to look over your design before sending it away to manufacture.
Speaking of frustrationsā¦i have built dozens of STM based boards and even with my latest this week i have learnt some sobering lessons and WTF remarksā¦
Yeah the indented one. I had to do some digging and heavy googling to find that out
I donāt mind peer review of stuff, itās always helpful to have a second set of eyes look at something. Especially considering Iām greener than green, and thereās no one else in my company who has done circuit design. Iām kind of āforging the wayā and taking all of the hard lessons for the team.
Eventually the stuff Iām learning will end up in an internal knowledge base, or something. Or Iāll just be āthe manā who is even more indispensible than I am today. Depends on my mood I guess.
Some of the frustration is having to hand solder this stuff. Iām still learning soldering tricks and itās challenging. Iām sure in a year Iāll be ripping through this stuff with no problem but for now itās ā¦ allā¦ soā¦ damn ā¦ SMALL.
I wish I had 20 year old hands again. But back then, I wouldnāt have had anything closely resembling enough patience to get through this task.