Ian's Build Log

Started putting together my CE header things today, and discovered 3 mistakes. Three mistakes, in such a tiny thing! One was just stupid (mistakenly ordered one chip in some micro-something package instead of an SOIC: Maxim sure do love their tiny tiny packages, don’t they?), but the other two were educational (in an annoying way).

I’d ordered female header sockets that I thought would fit normal square male header pins. Turns out there are more kinds of connectors in the world than you can ever imagine, and I ended up with sockets with little round holes the bigger square pins wouldn’t fit into. Lesson: look carefully at the mechanical drawings for connectors to make sure that they’ll, you know, connect…

The last mistake taught me the valuable lesson that SOIC packages come in different widths and that you sometimes have to look very carefully to work out which package you’re actually getting when you order things. Mouser says it’s in an SOIC-16, but they also have a little “width” field lower down! I managed to squeeze a 5.3mm wide chip onto a 3.9mm wide footprint, but it’s not the prettiest. Lesson: check the full part number on the manufacturer’s website to see what the package really is! This is a TI part, and it’s easy to find the exact package information if you look.

Ho hum. And I just went and checked, and I have another board on the way with the same SOIC width mistake for half a dozen chips… That’s going to be fun to solder!

I’ve been suffering from footprint woes today. I ordered boards for the CE header sensor board and for my Morse blinky example, both of which have SOIC chips on them with 5.3mm wide bodies. I screwed up the footprints, and used a 3.9mm wide one everywhere instead. (In my defence, there doesn’t even seem to be a 5.3mm wide SOIC-14 footprint in the KiCad libraries.)

I gamely tried to solder the wider chips on to the narrower footprints, but it’s not very effective. For the CE header sensor board, the shift register (a 74HC595) has most of its pins not quite connected, but I think I might be able to repair that with some adventurous soldering. (The LDR and the I2C temperature sensor on there work fine.)

But the Morse blinky looks like this:

Every one of those 74xx chips is perched on a footprint that’s way too narrow, so most of them have pins floating in the air or just beyond where solder on the pads can reach them. Here’s a picture of the chip in the top left of the board that I attempted to do some more aggressive work on. You can see that the pins are still nowhere near the solder blobs on the pads…

So that’s all a bit sad. I’m very tempted to respin the Morse blinky example, just so I have something to show from that silly project. (The CE header stuff I’m less bothered about, since most of it worked, and it was a pretty useful learning project.) This was all a very valuable lesson anyway, since I will henceforth be just about the most paranoid person in the world about footprints, which can only be a good thing!

So, tomorrow will be redoing the Morse blinky, doing some breadboarding on PWM outputs from the Teensy as a possible thing to use on the Current Sink or Swim, and if I can get that working satisfactorily, laying out the board for that and thinking about what’s needed for the firmware and software to go with it.

This was actually something that happened on the BenchBudEE that was part of the past versions of CE. It was a hassle, especially given that people were often learning to solder while attempting these fixes.

Much like you allude to, I have taken to checking datasheets and matching up against the width of the footprint in the library. I find that the SO family parts are particularly bad, followed by the QFN families.

The solder job on this board looks like a valiant effort! I would recommend trying to “fold the pins under” by bending the pins down and underneath the part. There are older components that did this to improve how the parts were socketed, but sometimes i have seen them soldered down as well.

Folding the pins under sounds like a good thing to try. I’ll give that a go!

Well, I tried the “fold the pins under” trick on the CE sensor board, which only had one chip with a bad footprint. I can see how the technique could work if you had decent soldering skills. Unfortunately, I have soldering skills that could best be described as “woefully amateurish” and I made a complete hash of it.

The other board with the problem had five chips with bad footprints, and I couldn’t quite face the prospect of folding the leads under all of those and trying to solder them down. So I just fixed the layout and sent the boards out to OSH Park again. Avoiding the frustration of trying to fix the thing is definitely worth the US$6.50 it costs to get new boards made!

I’ve been out of action for electronics the last few weeks because of an enforced house move (not recommended during a pandemic lockdown, but we didn’t have a choice), but I’ll be getting back into things again. I’ve started laying out the PCB for my Current Sink Or Swim variant, which I’m calling Teensy Load, because it’s a programmable load with a Teensy attached. I think I need to work on product naming for the future…

The next project on my list is a solder fume extractor (everyone does the same projects when they start, don’t they? there are hundreds of designs for these things out there!). In homage to Jon Thomasson’s Solder Sniffer 9000, I’m calling it the Solder Snorter. It’s going to have one functional variation compared to Jon’s design, which is to have a resistive touch switch to switch it on and off, with the contacts made up of the nostrils of a cartoon pig silkscreened onto the board. (Hence “snorter”.)

It’s mainly a vehicle to learn a little about battery charging and DC/DC conversion (the “Full Charge Ahead” videos from the legacy CE course are really useful for this). Plus the resistive touch switch thing looks like it might be funny to do. I thought it would be simple, but a first quick search indicates that there might be “traps for young players” involved somewhere. So there’s going to be some breadboarding required to work out just how to do that.

Boards and parts ordered for my Teensy Load (basically a programmable version of the Current Sink or Swim using a Teensy for the programmability).

Took two tries to get a board layout I was reasonably happy with. This is the first project that feels like “uncharted waters” where there are a few things where I’m really not sure what I’m doing. (Any feedback would be welcome: the KiCad files are at https://github.com/ian-ross/teensy-load/tree/master/hardware – the schematics haven’t changed much from what I posted a little while ago.)

I think that the critical bits of the design are OK: fat traces (with 2 oz. copper) for the high current loop (and the loop made physically as small as possible given the sizes of the components), power ratings for the sense resistor and FET should be OK (I think the heatsink might be overkill: the 3D render looks pretty ridiculous anyway…), and everything else pretty vanilla. Some “safety by design” using voltage dividers to make the full range of the DACs used for setting the current and voltage limits correspond to the maximum ranges of those things that I want. The only limit that needs to be managed in the Teensy firmware then is the overall power limit, done by capping the voltage limit to make sure the power limit isn’t exceeded.

OSH Park’s 2 oz. copper service for cheap boards is slower than their regular service, so now the long wait begins…

While I’ve been waiting for boards (I need to find a cheap PCB house in Europe: OSH Park are good, but it’s a long wait for delivery from the US to Austria), I’ve been working on this solder fume extractor project. I kind of retreated from the idea I originally had, which was to have some sort of resistive touch switch using a couple of pads on the PCB. That seemed like it ought to be quite easy to do, but it turned out to be trickier than I thought.

So, a normal switch it is, since this thing was mostly about learning a little about batteries and battery charging and power conversion, and I’ve done that.

I’ve read more datasheets for battery chargers and boost converters than I ever really planned to! How the hell do people find stuff to use among the thousands of options? Do you just end up with a small list of go-to options, and add a new one occasionally when you hear about something new and cool? Or do you do the whole parametric search + read all the datasheets thing for every project?

Anyway, I ended up with a disappointingly simple schematic for all that work.

Layout next, which should be reasonably simple, but both the main components have layout guidelines to follow, which is a new thing for me.

I need to find a cheap PCB house in Europe

Olimex? I used them a long time ago.

You could check out Aisler, they are in Germany.

1 Like

@zwizwa Looks like Olimex don’t have a PCB service any more: “This PCB manufacturing service is suspended. These pages are kept for reference and archive purposes only. Please do not send PCB files for manufacturing.”

@slowertech Thanks for the tip! Aisler does look like a good option.

There are a couple of other options I know about, but they’re less cheap and less aimed at the “maker” market. Eurocircuits is one, Würth Elektronik is another.

Aisler are listed on PCBShopper, so it’s easy to do price comparisons. OSH Park really are pretty amazing if you’re happy to wait a while: a 2-layer board 1 in. x 1 in., 3 off, is €4.63 including shipping from the US to Austria (about 25 days total predicted, production and shipping). Aisler is €11.89 (7 days total). There are a lot of Chinese manufacturers who are pretty cheap, but as soon as you factor in shipping costs and times for these small prototype/maker kinds of orders, they look less good. For instance, from PCBWay the boards are very cheap, but a shipping option that gives a comparable price to Aisler (€12.57) takes about 31 days. I’m sure the quality from most of the Chinese houses is just as good, but I honestly have no basis for choosing one from another, and I’m sure some of them are less good. And of course, shipping times are probably a bit all over the place at the moment, so I don’t know how seriously to take those predictions.

I think I’ll give Aisler a try.

I’m now wondering how OSH Park manage to be so cheap. I guess it has to be some combination of efficient pooling and good process automation, but it’s pretty striking.

I have fallen into the JLC trap. The boards are effectively free, you just pay for expedited shipping. That gets 2 layer boards here in about a week, 4 layer in about 10 days. I have also used a range of the other PCB houses in Asia, to varying levels of success.

Another EU based supplier is Ragworm

And I always recommend comparison shopping on a site like PCBshopper

A daunting task in the best of times. The real answer is most people go with what they know. So as you’re building that out, you’ll have to figure out what works. I think pilfering from other schematics you find of devices you’re using also helps, though that usually leans more towards simple OSHW type designs. After that, I like going to app notes before I go into datasheets. And for power stuff, I’m a bit of a convert to tools like WebBench and other tools.

This was a big swap for me, I used to think this was “cheating”. But now I know it’s just a best practice and it’s usually the first thing I seek out. It has saved me many times now.

And now I’m noticing you link PCBshopper, so please ignore that :smiley:

That makes a lot of sense. I hadn’t thought of looking at OSHW designs, but that’s a good idea. (I watched one of Phil S’s videos yesterday, which was really good and very practical, going through a lot of details of a design of his, and I should look for more of that.)

I’ve been reading a lot of datasheets, but I should start collecting app notes too. I guess there just is no substitute for reading as much as you can. It would sure be nice if app notes came with a difficulty rating though, so you’d know to steer clear of the double black diamond ones until you have a bit more experience. There’s certainly no lack of things to learn from anyway. I really like it that all of the major manufacturers have these enormous libraries, almost all of it available for free.

I need all the help I can get, so anything that involves “cheating” to make life easier is A-OK with me!

Boards ordered from Aisler. I like their board viewer. They’re confident enough in it that they offer a free respin if the boards you get don’t match their render. And they have a nice thing where you pay the same price for 2-day turnaround with less fine design rules and HASL and for 5-day (?) turnaround with finer design rules (including slots) and ENIG. This board has a USB Micro-B socket that has some little plated slots, so I went for the 5-day service.

The only downside is that the soldermask is green…

This was a fun board to lay out. It’s designed to screw to an 80 x 80 mm computer fan, hence the funny shape. There are clips for an 18650 Li battery on the back. And the battery charger IC and the boost converter both had layout guidelines, so I had lots of fun drawing copper pours and making vias (so so many vias).

Ordered all the parts as well, so hopefully next weekend will be assembly time!

Finished the solder fume extractor fan. Battery charging works. The fan spins. Solder smoke is sucked away and absorbed quite nicely. I rate that a success. I learned a bit about batteries and battery charging, a bit about power conversion, got some more KiCad practice, and ended up with a useful little tool.


Only made three mistakes (that I noticed), none of which were more than slightly annoying:

  • Tried to share a resistor between two back-to-back LEDs on the status output of the battery charger. That’s fine when the status is low (charged) or high (charging), but connects the two LEDs in series between the positive rail and ground when the status output is in a high-Z state (which it is if there’s no battery connected). Workaround: only populate one LED. Lesson: it’s called tri-state logic for a reason – think about that other state!

  • No soldermask over the stitching vias on all the copper pours. Didn’t notice at all when I was doing the layout. Kind of silly, but no consequences for me for this project. Lesson: inspect the Gerbers carefully!

  • No thermal relief on any pads connected to the (numerous) copper pours. This was the most annoying, because it made soldering anything to the board challenging. (Some components ended up being less than perfectly placed…) My thinking on this was that all the copper pours were there for thermal reasons, so who would want to thermally relieve the connections to them? Turns out that’s not such a smart way to do things, especially for hand soldering. Workaround: solder really hard… Lesson: learn how to deal with thermal relief in KiCad properly, and think carefully about the balance between thermal conduction and manufacturability (and repairability, as @rich pointed out!).

2 Likes

After a long wait, I got my Teensy Load boards, assembled one last weekend, and just had a testing session. Some things work, some don’t. The most critical thing (current limiting) doesn’t work, which is a bit rubbish, but it’s a chance to do some troubleshooting and work out what’s wrong. (This is the first project I’ve had that didn’t work first time, so I’m due some learnin’.)

What does work:

  • Talking to the DACs from the Teensy over I2C to set current demand and voltage limit.
  • Measuring current and voltage using the Teensy ADCs.

What doens’t work is current limiting: the current gradually creeps up until the power supply I’m using for testing starts cutting out. The gate of the current control FET starts off around Vdd then ambles down to some intermediate value instead of going low to switch the current off. The current set point at the non-inverting input of the current control op amp is about 3 mV, and the voltage measured across the sense resistor at the non-inverting input creeps up to about 25 mV without the FET switching off. (I suspect that those stupidly small voltages are part of my problem…)

Anyway, it looks quite pretty. Here’s the scene in my shed this afternoon (confused looking Ian out of shot!):

and here’s close-up of the little thing. You can see the Teensy slung underneath the board, the weird looking sense resistor I bought, the two DACs for setting the current demand and voltage limit, and my high-class hardware store standoffs and improvised stabiliser (OSH Park send you three boards, so why not make use of them?).

Nice log! I might know about your FET gate current limiting drive problem, can you let me have the opamp model no, and its power supply arrangement. Schematic if its something you can share would be helpful. (I should add I checked up-thread, and want to confirm you used the tlv4333 and its power supply which isn’t super clear from the schematic. And the diode too.)

The opamp is the TLV4333 and it’s running from a single 3.3V supply (taken from the Teensy, which has a regulator that generates 3.3V from the USB 5V input).

The whole KiCad project is at GitHub - ian-ross/teensy-load: Contextual Electronics active current sink project, but the relevant part of the schematic is this:

(The suspicious-looking FET_GATE signal goes off to the anode of a diode whose cathode is connected to an opamp that sinks current when there’s an overvoltage, which isn’t the case so far in the testing I’ve been doing.)

So I believe you are seeing a limitation of the TLV4333. The relevant bit of the spec is p8, where the output swing is listed as limited to 30mV typ, (max 70mV) of the opamp rails (if its fed from 0V-3.3V → 0.07V - 3.23V), which rather mirrors what you are seeing in terms of voltage.

[On the input side the TLV4333’s inputs seem able to sense and operate +0.1V outside the rails, which is nice. Other opamps are not so nice.]

Neither of these limits are typically modeled in a circuit SPICE simulator or similar, except at a chip-design transistor level and they don’t share those spice models, and they require specialist SPICE, several GB of IC foundry data etc. to run at all!

Rail to rail opamps should have a * next to that statement, as they typically mean “close” to the rail.

I hope I am not leading you away from the truth, I should have a proper look at the whole design you have provided.

Thanks for the tip. Looks like you might be right. Damn. That will teach me to really look at the details, instead of trusting lovely phrases like “rail-to-rail input and output”. Section 8.3.4 of the datasheet has a method to get output swing right to the negative rail, but it requires another negative supply below the negative rail, which kind of misses the point of a single-supply opamp!

What is the best way to deal with this? It seems like the simplest solution is just to set things up so that the signals being compared are bigger. Now I look at the schematic again, an obvious way to do that would seem to be to take the output of the current sense amplifier (which I use to drive an ADC on the microcontroller I’m using) and use that as one of the opamp inputs. Then I can use the current set voltage from the DAC I use to set the current level as the other input. Both inputs to the opamp then have a full-scale range that goes from 0 to Vdd: no more tiny voltages.

It would look something like this (quick scribble…):

Does that make sense? I can’t see anything grossly wrong with it, but I did make the original circuit with the 3 mV signals everywhere, so I can’t really be trusted!