View on GitHub

Quorten Blog 1

First blog for all Quorten's blog-like writings

Ah, yes! This is interesting, PotatoFi’s very own blog. He doesn’t post blog articles to it very often, though.

20200718/http://www.potatofi.com/

WLAN Pi? Is that based off of Raspberry Pi? No, it is based off of NanoPi, the main reason given for its selection that it came out with Gigabit Ethernet support earlier than Raspberry Pi, thus making it more suitable as a network testing tool. But nowadays, Raspberry Pi has Gigiabit Ethernet too, so this comparison is perhaps not so great anymore… unless the NanoPi comes out to have lower energy consumption than the newer Raspberry Pi models.

20200718/http://www.potatofi.com/2019/10/the-wlan-pi-handheld-case.html
20200718/https://www.wlanpi.com/
20200718/https://docs.google.com/document/d/13W31uoOfefEJIlWu1m7gt5pFws8YSt_xcbRZt2hidQA/edit#

Also, this is an interesting article on setting up a Raspberry Pi for cellular failover use on a computer network in general. Of course, this only works well if you have “unlimited bandwidth” cellular.

20200718/http://www.potatofi.com/2018/12/cellular-failover-with-android-phone.html

Here are some interesting and useful 3D printing tips on PotatoFi’s blog. Flat steel sheets versus textured ones? Textured ones work well with printing PETG plastic, flat ones for PLA.

20200718/http://www.potatofi.com/2020/03/managing-steel-sheets-on-prusa-3d.html

Here is an example of a nice printout using PETG plastic. Also, PrusaPrints.org is now competing to be a replacement for Thingiverse? Yeah, a lot of politics, and unfortunate if we see the earlier one get taken down, but at least that’s a good thing to be aware of.

20200718/https://www.prusaprinters.org/prints/36641-macintosh-scsi2sd-bracket

The textured plate surface results in very professional looking 3D printed plastics, with that nice ground surface texturing that you see in many commercial electronics plastic surfaces.

So, what is PETG plastic? Is it similar to PET plastic? Yes it is. Awesome! You can print with polyester terephthalate! The “G” is for “glycol modified,” this chemistry modification mainly aims to lower the melting point to make 3D printing easier.

20200718/https://en.wikipedia.org/wiki/Polyethylene_terephthalate#Copolymers

How do you specify rectangular drill holes in KiCad? It’s a lot uglier than plain old circular or elliptical drill holes… you need to specify a CNC milling layer and get your board manufactured with CNC milling support, and that is “wicked expensive” for the hobbyist. For hobby projects, just use a plain old circular (or elliptical hole if supported) that is big enough for the maximum diagonal distance.

20200716/DuckDuckGo kicad rectangular drill holes
20200716/https://www.eevblog.com/forum/kicad/rectangular-pad-drill/

What is the F.CrtYd layer? It’s an abbreviation for “courtyard”, this indicates the clearance needed by robotic pick-and-place equipment around the perimeter of a component. Or, alternatively, the clearance needed around a component for hand assembly.

20200716/DuckDuckGo kicad f.crtyd
20200716/https://forum.kicad.info/t/layer-confusion-crtyd-and-fab/5030

Does Raspberry Pi have a watchdog timer? I don’t see any mention of it in the BCM2835 technical documentation… but searching online, indeed I do see that there is a watchdog timer module available.

First, enable it.

sudo modprobe bcm2835_wdt
echo "bcm2835_wdt" | sudo tee -a /etc/modules

Now, you can use your favorite watchdog daemon software like watchdogd to control it, or roll your own.

20200715/DuckDuckGo raspberry pi watchdog
20200715/https://www.domoticz.com/wiki/Setting_up_the_raspberry_pi_watchdog
20200715/https://blog.kmp.or.at/watchdog-for-raspberry-pi/

On Raspberry Pi 4, the watchdog timer kernel module is loaded by default, you just need to run some software to enable it and ping it to get it all set up.

20200715/https://raspberrypi.stackexchange.com/questions/108080/watchdog-on-the-rpi4

So, all that said, Raspberry Pi is “airworthy” to be used as a critical part of a home network, where stalls cannot be tolerated and a watchdog timer is a must.

The problem with a boot-time watchdog timer… how do you know how long to wait for the system to boot? The idea with modern operating system kernels, and especially with embedded operating systems, is that you want the kernel to boot as quickly as possible, naturally. If you must reconfigure the boot-time watchdog timer in software… this can be done from EEPROM. Parameters:

  • Enable/disable

  • Timeout (in seconds)

So how do you change the configuration if you cannot boot your operating system? At the very least, last resort, there can be a hardware DIP switch override to disable the boot-time watchdog timer.

UPDATE 2020-10-10: Note that microcontrollers like the AVR can be configured to enable the watchdog timer at boot. So indeed there are commercial products already with the solution to the issue I’ve just described, it’s just that it’s not consistent for more powerful embedded CPUs.

Very interesting. The GoMN Meetup today covered JFrog’s new Golang integrations partly related to their JFrog XRay product, for vulnerability scanning from their databases. The no-cost API access only covers mirrors of public databases like CERT, apparently there’s a such thing as proprietary vulnerability databases. Wow.

JFrog GoCenter is the name of the game.

vulnDB is a proprietary vulnerability database.

Currently the functionality is only integrated into VScode IDE, this has something to do with trying to avoid revealing too much information about the proprietary API access.

Want to 3D print metal objects on the cheap? Unfortunately, no “consumer-grade” “desktop” 3D printer is capable of doing this… but there is a close compromise that works under some circumstances. Often times, in the case of decorative items, the use of metal serves no essential purpose other than to be shiny in order to make the item in question look pretty. In this case, metal plating of any solid substrate is good enough. And, what better way to metal plate than by electroforming? Just paint a conductive carbon ink coating on the surface of your 3D printed part, place it in a electrolyte bath, run the electric current, swirl it around, and tada! You’ve got a “metal” object, as far as eyes are concerned. To plate with arbitrary metals, first electroform copper, then you can electroplate almost any metal on top of that. So the same could be said… with using a soldering iron to deposit other metals onto the surface of copper, but that is significantly labor intensive for objects of any appreciable size, i.e. anything larger than the size of electrical solder joints.

Another point in hand… if your metal coating is thick enough and the surface area large enough, you could even use metal-plated objects as a reasonable electrical conductor for DIY electronics. In particular, the ne ultra achievement… you could 3D print your own surface board substrate, then metal-plate the conductive traces on top.

Please see my my previous blog article for links to Instructables and more details on how to do this.

Raspberry Pi 3A+? Wow, that became a thing? I thought that was a product line that Raspberry Pi Foundation would not continue due to lack of popularity… but now it’s back! This time, though, the board did not sacrifice computer network-grade communications capabilities…

KEY POINTS:

  • RPi 3A+ does not have Ethernet, but it does have onboard Wi-Fi and Bluetooth.

  • The Raspberry Pi Model A form factor has been one of the most requested “missing” features of the newer versions of Raspberry Pi 2 and 3. Thus, Raspberry Pi 3A+ has been created to fill that gap., also this is somewhat of a “capstone” for the Raspberry Pi Foundation since their next board will be radically different from the classic architecture.

  • The promo video is in “Far East” electronics industry style.

  • Purportedly RPi 3A+ was going to be USB 3, but they blew the design budget on the flashy promo video. “Guilty” replied one of the RPi Foundation members.

Read on →

Implementing a software banking system is easy. Commerce is defined by transactions: a buyer and a seller, a creditor and a debtor. Money moves from one account to another, and it adds and subtracts a corresponding quantity from the account totals. So, what’s this whole thing with loans?

The idea with loans is that you have to work with physical currency. The flexibility of a “paper-based” banking system allows account balances to freely float positive or negative. By the “tip of a pen,” you can insert a negative sign in front of a bank account balance number. However, the primary concept behind loans is that of the constraints that physical money imposes. You can’t own “negative” physical possessions: either you have them or you don’t. If you don’t have the physical money, you can’t trade it complete a commercial transaction; therefore, you simply can’t do commerce.

Hence, when working with physical money, the concept of a loan is absolutely required. It is the only way to “virtually” allow bank balances to float negative when working with physical money. The requirement, of course, is that all bank balances eventually become positive.

Read on →

I thought I’ve found out this clever trick to compute approximate division, but it turns out I didn’t really. Well, it’s an interesting attempt anyways.

Let’s start with the equation.

a * b = c

Now, make an assumption. What if a == b? This simplifies as follows.

a^2 = c

Now, phrase the equation as an error adjustment on that ideal assumption.

(a + r) * (a + q) = c
a^2 + a*q + r*a + r*q = c

If we’re just adjusting one factor to be ideal, this is further simplified.

Read on →