View on GitHub

Quorten Blog 1

First blog for all Quorten's blog-like writings

A while back, I found this very useful embedded Linux wiki page on the Raspberry Pi. This area of the site has a host of useful technical information on the Raspberry Pi computer board that is harder to come by on the official Raspberry Pi sites.

20191114/https://www.elinux.org/R-Pi_Hub

Building a fully proper motor control circuit on Raspberry Pi is literally an introductory course in power engineering. The protective circuitry literally is a low-voltage AC power adapter between your motor and your computer. The first part that piques my interest: upon a careful analysis of the diode protective circuits in the L293D, I found out it was actually a diode bridge rectifier between the motor and its power source.

So if you turn the motor on its own, it is a generator that supplies power to your computer. Of course you can’t control your motor at the same time it is being used as a generator.

Kids, don’t try this on commercial consumer electronics at home. I did, and the electronic in question almost turned into a brick. That’s because in the interest of cutting costs, they eschew on proper electrical isolation in both their motors AND AC power supplies. Lucky for me, the particular electronic did have some alternate design wherein there was effectively a polyfuse that would not let too much current flow from the motor into the rest of the circuit, when tripped it would refuse to provide any power to the entire device circuit.

But, you should still be forewarned, in college classes on electrical/power engineering, professors do note to students that popular consumer electronic gadgets omit some protective circuitry from the AC power adapters in the chargers in the interest of saving cost/bulk/weight and reasoning that such power fault events are rare. “Let the buyer beware,” but especially for home use, the buyer is but one of the many people who use it.

Read on →

Interesting, so the functional diagram of the L293D from STMicroelectronics shows that an H-bridge with diode protection is basically two buffer circuits and a diode bridge.

20191111/https://www.digikey.com/product-detail/en/stmicroelectronics/L293D/497-2936-5-ND/634700
20191111/https://www.st.com/content/ccc/resource/technical/document/datasheet/04/ac/22/f9/20/5d/43/a1/CD00000059.pdf/files/CD00000059.pdf/jcr:content/translations/en.CD00000059.pdf

So, now the question to ask. If I can’t get the exact motor controller that I want, maybe I can build my own. First order of business. Can I get 3 V NAND logic in the through hole DIP form factor? Indeed I can!

Read on →

I’ve read this article a little while back, but apparently I didn’t save it. It is a very interesting article about how the IRS tried to take on the ultra-rich, it didn’t go well. Namely, the case of Georg Schaeffler, “the billionare scion of a family-owned German” auto parts manufacturer, who was working quietly as a corporate lawyer, until some complications happened with the purchase of Continental AG that nearly caused the him to loose it all. A highly creative debt restructuring came under the suspicion of the IRS as a tax evasion strategy.

20191110/https://www.propublica.org/article/ultrawealthy-taxes-irs-internal-revenue-service-global-high-wealth-audits

Ubiquity networks done it again, they’re doing things with their router, switch, and access point firmware that are getting on people’s nerves. This time, it is making firmware that indiscriminately phones home via a secure connection, without any means of user configuration to disable it. Enterprise users are really upset that they are performing “data exfiltration” transparently and sidestepping enterprise security controls.

20191110/https://www.theregister.co.uk/2019/11/07/ubiquiti_networks_phone_home/.

Also, one of Uber’s self-driving SUVs has killed a jaywalking pedestrian, the first of its kind, root cause being partly due to Uber’s software not expecting to detect a jaywalking pedestrian, failing to recognize such, and thus failing to assign proper goals until it was too late. Unfortunately the SUV’s emergency braking was also disabled since it was purported to cause “erratic” behavior and render the vehicle inoperable.

Although there was a driver at the wheel, he looked down at his phone seconds before the impact and thus was unable to recognize and react until it was too late.

20191110/https://www.theregister.co.uk/2019/11/06/uber_self_driving_car_death/

Got some integrated circuits that you’d love to use except that they are in the stubborn surface mount device packaging? Sometimes there have been cases in the past where a third party manufacturer would solder these onto through-hole boards, but too often those parts are discontinued. So, surely there’s ought to be a more general adapter approach available, shouldn’t there? Indeed, there is. The most advanced adapters have a full socket that makes it really easy to insert your surface mount chips, but there are very few of these in stock. Far more common is a more bare circuit board approach where you can solder on your surface-mount device to the adapter, the place the adapter in your through-hole system.

20191110/DuckDuckGo surface mount to through hole adapter
20191110/https://www.digikey.com/en/product-highlight/l/logical-systems/surface-mount-adapter-kits
20191110/https://www.digikey.com/product-detail/en/logical-systems-inc/PA28SO1-08-3/309-1023-ND/301897
20191110/http://www.logicalsys.com/datasht/so108-b.pdf
20191110/https://www.digikey.com/product-detail/en/logical-systems-inc/PA-SOD3SM18-28/309-1097-ND/1640081
20191110/https://electronics.stackexchange.com/questions/103849/is-it-possible-to-attach-leads-to-surface-mount-component

While reading about other things on Hackaday, I found this interesting article on the history of Zork. How it was a tour de force of programming techniques to cram a mainframe computer onto a microcomputer using virtual machine techniques.

20191110/https://hackaday.com/2019/05/22/zork-and-the-z-machine-bringing-the-mainframe-to-8-bit-home-computers/

Okay, okay, so I’ve had a hard enough problem and trouble finding a motor controller IC that would work well with 3 V motor power supply. So, now that I think about it, surely I can build my own such controller by buying MOSFET transistors and wiring them up in an H-bridge, right? Indeed I can. I’ve found two good sources.

Please note that the circuitdigest website’s MOSFET motor controller schematics are lacking the “flyback diodes” (i.e. diode bridge rectifier), so these will also need to be added.

20191110/DuckDuckGo mosfet motor comtroller ic
20191110/http://www.instructables.com/id/DIY-MOSFET-Motor-Controller/
20191110/https://circuitdigest.com/electronic-circuits/simple-h-bridge-motor-driver-circuit-using-mosfet

The circuitdigest site makes reference at the end that proper delocalized coupling is a must, even with low-voltage motors if you want them to run without glitches. What do they mean by this? Basically, they mean that output buffers must be used at the proper locations… since they do not use a microcontroller, and of course you need proper “flyback diode” isolation via a diode bridge rectifier, and maybe even the low-pass filter across power to protect against transient high voltage spikes. They do mention using a large ground plane to also isolate from the high currents which is good.

Read on →

Ceramic resonators? Those are an alternative to quartz crystals. Their main advantage is that they can be smaller and cheaper, but their main disadvantage is that they are not as accurate as quartz crystals. So if you’re wondering how the Raspberry Pi gets its clock signal without a quartz crystal, well that is one way. Actually, looking at the schematics and reading more detail here, a quartz crystal actually is used for the oscillator.

20191109/https://en.wikipedia.org/wiki/Ceramic_resonator
20191111/DuckDuckGo raspberry pi crystal X1
20191111/https://raspberrypi.stackexchange.com/questions/74482/switch-out-the-x1-oscillator-on-a-rpi-2-3