View on GitHub

Quorten Blog 1

First blog for all Quorten's blog-like writings

KiCad. Wow, impressive list of sponsors going on here. Many hands working to support KiCad, and how it became so successful.

20200312/https://www.kicad-pcb.org/about/kicad/

Here is another company for full robotic pick-and-place PCB assembly. Beyond JLC PCB, here is NextPCB. Where are the based? China… oh, dang, this again. Still the rest of the world being left out of the full turn-key prototyping process.

20200312/https://www.nextpcb.com/pcb-assembly-services
20200312/https://www.nextpcb.com/assembly-capabilities

But, nevertheless, I concede. They are UL certified, so if you want to avoid ham-handed manufacturing defects from your DIY manufacturing at home, you can head this way.

20200312/https://www.nextpcb.com/

Raspberry Pi board uses M2.5 screws. Though you could size up to M3 with some drilling. Note that M3 screws are more common and they were used in PC floppy disk drive mounts.

20200311/DuckDuckGo raspberry pi m3 screw
20200311/https://raspberrypi.stackexchange.com/questions/23029/what-size-screws-does-the-raspberry-pi-board-use

Board thickness is 1.4 mm.

20200311/DuckDuckGo raspberry pi board thickness
20200311/https://www.element14.com/community/thread/57943/l/thickness-of-raspberrypi3-pcb

Raspberry Pi standoffs should be at least 11 mm board-to-board distance. Here are some parts that match those dimensions.

20200311/DuckDuckGo raspberry pi standoff height
20200311/https://www.pololu.com/product/1952
20200311/https://www.adafruit.com/product/2336

Here are some almost ideal parts on Digi-Key… slotted instead of Philips screws, but one millimeter short for Digi-Key standoffs. Use a paper/cardboard spacer I say.

20200311/https://www.digikey.com/product-detail/en/keystone-electronics/4707/36-4707-ND/4499300
20200311/https://www.digikey.com/product-detail/en/w-rth-elektronik/971100154/732-12917-ND/9488621
20200311/https://www.digikey.com/product-detail/en/keystone-electronics/29301/36-29301-ND/1532984

Previously I’ve bought some pin headers and soldered with them, but with my bad novice soldering skills, I’ve had trouble with the insulation material melting. On male pin headers in particular, this would be problematic because then the pins would sag over and ruin the usability when the pins would be sticking out at the wrong angle. On the other hand, I had some female sockets that I charred a number of times, but they didn’t end up so bad from my extra soldering ironing heating.

So, what can I do in the future when buying new pin headers to get more temperature-resistant ones? Avoid plain Polybutylene_terephthalate (PBT) headers. Glass-fibre reinforced ones, however, are more temperature resistant. Polyester headers are also more temperature resistant, and weird-sounding materials like liquid-crystal polymer (LCP) and polycyclohexylenedimethylene terephthalate (PCT) are pretty temperature resistant. The higher temperature ones can be placed in a reflow soldering oven, while plain PBT may be unsuitable for such treatment.

Please also see my hot temperatures article for reference.

Read on →

I see there are quite a number of folks on the Raspberry Pi forums that post schematics of the physical breadboard layout rather than the symbolic schematics. Surely if there are so many people doing it, there must be a software tool to do it. What is it? Fritzing is the name of the game. It was originally developed for Arduino but of course the Raspberry Pi community ended up doing many of the same things as Arduino folks so it was also adapted for Raspberry Pi.

20200310/DuckDuckGo create raspberry pi breadboard schematic
20200310/https://raspberrypi.stackexchange.com/questions/42735/wiring-diagram-software
20200310/https://fritzing.org/home/

However, please note that the Raspberry Pi Foundation themselves are still doing things the old school way when they post breadboard-style schematics: they have a hired designer ham-handing it out in generic vector graphics design and illustration software such as Adobe Illustrator and maybe also Adobe Photoshop.

20200310/https://www.raspberrypi.org/blog/resources-restyled/
20200310/https://github.com/raspberrypilearning/components/tree/master/components
20200310/https://github.com/raspberrypilearning/components

Read on →

Digi-Key has created a KiCad library of their own, listing many Digi-Key parts. This is a great way to get started creating your schematics, you’ll get all the Digi-Key part numbers on your items and it will be really easy to generate a Bill of Materials.

20200310/https://www.digikey.com/en/resources/design-tools/kicad
20200310/https://github.com/Digi-Key/digikey-kicad-library

Digi-Key Bill of Materials. Yeah, you can roll your own, but if you are working out a design in KiCad, wouldn’t it be nice to generate one from your KiCad design? Indeed you can, here’s how. Just make sure you either use the Digi-Key KiCad library or annotate all your parts with Digi-Key part numbers, and the rest should be a breeze. Unless… for some reason you’re using an old KiCad version that doesn’t have the group by quantity BOM plugin. In that case, you can use the KiBOM exporter after a simple git clone. It also allows you to generate nice HTML BOM listings.

20200310/DuckDuckGo digikey kicad bill of materials plugin
20200310/https://forum.digikey.com/t/kicad-kibom-and-digi-key-streamlines-ordering/857
20200310/https://github.com/SchrodingersGat/KiBoM

When building a voltage divider circuit, check how much current is going to be drawn by the “input” (i.e. the output side of the voltage divider). If you have a higher current input, you will need to use lower value resistors to get a stable voltage division. Also, please take into note the presence of any pull-up or pull-down resistors on the input. Again, these may also require you to use lower value resistors in your voltage divider, because otherwise, those pull-up or pull-down resistors are in effect resistors in parallel, which will significantly decrease the resistance of one of the legs of your voltage divider, rendering it inaccurate.

20200308/https://en.wikipedia.org/wiki/Voltage_divider#Loading_effect

Simple circuit ways to send a signal down a power line. High voltage communications and comparator. The other alternative of modulating the power supply at the same voltage is more challenging. For data send, design a local power supply that can store up all required charge to consume during blanking periods, and variably modulate the signal of consumption or high impedance (no consumption). Then listen for a modulated power supply signal for data receive, again using your local energy storage to continue operating when your power supply goes blank.

Read on →

Recently, I have stated that in switched-mode power supplies, you should use capacitors with a low equivalent series resistance due to a switched-mode power supply causing high ripple currents to such capacitors. Now, what about motor controllers? The decoupling capacitors to motor controllers are rather similar to those used in power supplies. I’ll put in my recommendation: you should also use low equivalent series resistance decoupling capacitors for a motor controller, especially if you are using PWM motor speed control. That will for sure cause high ripple currents, and you don’t want to have decoupling capacitors that heat up and wear down if you don’t have to.

So yes, that I’m updating my L293D schematics with the corresponding changes.

Previously I’ve discussed the possibility of using a discrete components MOSFET motor controller circuit. It’s actually not a bad idea considering the switching controllers with external MOSFETs. If you want to drive higher current loads, the external components are required. So, simply for the sake of operating with through-hole components at lower voltages, it’s justifiable.

Of course, another option is still yet to use adapters and modern surface-mount MOSFET motor controllers. Saves you board space, for sure.

Read on →

First of all, I have to make reference to a great datasheet I’ve found on a particular Maxim switched-mode power supply that was extremely informative for an computer-grade electronics design novice like me.

20200308/https://datasheets.maximintegrated.com/en/ds/MAX1771.pdf

Again, I reiterate, because this is important! Second, I have to draw attention to the key realizations that got me unstuck on the decisions that had to be made for a suitable switched-mode power supply for my Raspberry Pi projects.

There are two classes of integrated circuits for switched-mode power supplies: switching regulators and switching controllers. Switching regulators have the main switching MOSFET builtin, whereas switching controllers use an external MOSFET. This allows switching controllers to supply more current than switching regulators, but it comes at the expense of requiring more complex circuit design.

Read on →

Capacitors, capacitors… seemingly simple components, but tough to fully understand. If you have a decoupling/bypass capacitor wired up to the main power supply, it will get charged up by the power supply and stay there. But, what if you have some other voltage source that you want to absorb by a capacitor like a motor that may cause inductive voltage spikes? Can the capacitor still accept more charge and absorb this? Yes… the key is to have a proper understanding of capacitance.

The capacitance equation is C = Q / V. Capacitance is equal to charge divided by voltage. What does this mean? It means that capacitance is a function of how much charge a capacitor has stored compared to what voltage it supplies in circuit. If two capacitors are charged up to 5 volts, but one capacitor can discharge a specific resistance load for a longer period of time than the other, then the longer lasting capacitor has a greater capacitance. What is also means is that any capacitor can be charged to a higher voltage, but it won’t last as long at supplying a higher voltage than would a capacitor with a greater capacitance. Furthermore, this means that a capacitor is never “fully charged” within a circuit. Rather, it is merely charged up to the point where its voltage is equal to the supply voltage, but it is still capable of accepting more charge if pumped with a higher voltage. That is the key to understand.

Read on →

So, I was studying my motor control designs, and it came to my mind: When I am controlling motors, don’t I need larger decoupling capacitors on the motor power supply path? I remember when just taking a crack open at the Lego MINDSTORMS RCX programmable brick, I saw four very large electrolytic capacitors. Surely, three of those were devoted just to the three available motors you could drive, and the fourth was for the board-level power supply. Surely, what I’ve seen about the absolute basic schematics.

And indeed, I am in agreement with the expert advice. Here is a great discussion about the subject on this Arduino forum. Use 100 nF ceramic for decoupling the logic power supply, and 100/470 uF electrolytic plus 100 nF ceramic to decouple the motor power supply. Yes, indeed the Raspberry Pi schematics that show just the L293D directly connected from the Raspberry Pi to the motor are too simple.

20200307/DuckDuckGo L293D decoupling capacitors
20200307/https://forum.arduino.cc/index.php?topic=293864.0

Also, I learned about another curious tidbit. If you are wiring up sensitive analog circuits, you may also need inductors to decouple your circuit. For digital, inductors are generally overkill and not needed for sufficient decoupling. That’s good… go easy on the novices, come on!

Read on →