View on GitHub

Quorten Blog 1

First blog for all Quorten's blog-like writings

Okay, so I’m looking for more information on capacitive pressure, force, or weight sensors. The technology in its earnest is simple, so surely there are commercial implementations with better accuracy, aren’t there? Indeed there are, I found some designed for heavier objects, but I have to keep searching for ones designed for small objects. Unfortunately, there are no capacitive force sensors on Digi-Key, only resistive force sensors.

Also, the Dummies link has some interesting information on the various terminology used for force-related sensors. The very simplest is just a button or a crude change in force sensor.

20191204/DuckDuckGo capacitive pressure force weight sensor
20191204/https://www.dummies.com/computers/arduino/what-you-should-know-about-arduino-pressure-force-and-load-sensors/
20191204/DuckDuckGo capacitive load sensor
20191204/https://www.loadstarsensors.com/why-build-capacitive-load-cells.html
20191204/https://www.loadstarsensors.com/capacitive-load-cells.html

Indeed, the same vendor has low capacity sensors too.

20191205/https://www.loadstarsensors.com/rapg-low-capacity-single-point-aluminum-load-cell.html

Read on →

`myhostname` and `lmhosts`

2019-12-05

Categories: unix   windows  
Tags: unix   windows  

Recently I learned about myhostname. What is it? “myhostname” is glibc default configuration for namespace resolution of localhost and _gateway. It exists entirely in userspace, and although I heard it can do other interesting things like dynamically add custom hostname resolution in userspace, I have not found any information on that.

20191205/DuckDuckGo myhostname
20191205/https://www.freedesktop.org/software/systemd/man/nss-myhostname.html

Likewise, there’s the Lmhosts file on Windows, the name of local configuration file in system directory, so no-go on that. Although, again, I purportedly heard there was some sort of userspace configuration for this too.

20191205/DuckDuckGo windows lmhost
20191205/https://support.microsoft.com/en-us/help/923947/you-cannot-modify-the-hosts-file-or-the-lmhosts-file-in-windows-vista

From my first Digi-Key searches on segmented LCD displays, I couldn’t really find LCD displays less than $10 with as many segments as I wanted, i.e. around 10 segments. Likewise, I found out that LED displays ran around similar costs, $5 for 4 digits. But, now I search again, and the magic is in opening up the search criteria. Sure, I can’t find a 7-segment LCD display with as many digits as I like at the price point I want, but I found a 14-segment display with 8 digits and about $4 for one unit.

20191203/https://www.digikey.com/product-detail/en/lumex-opto-components-inc/LCD-S401C39TR/67-1792-ND/469781

And, circling back to modifying my previous expectations, I also found a good 4-digit, 7-segment LCD display, about $4 for one unit.

20191203/https://www.digikey.com/product-detail/en/varitronix/VIM-878-DP-RC-S-LV/153-1115-ND/1118605

Read on →

Weight sensors, yes, the infinite subject that I keep trying to search for more information on. But now, I take a break to try to think through things myself and explain how this can all work.

The easiest way to build a weight sensor is to modify a spring-based scale. A spring-based scale uses the displacement caused from compression of a spring, due to an applied force, to generate a rotational displacement on the display dial. The spring is constructed to be as close to linear as possible, then the display dial simply has a printing of linear numeric values that correspond with the applied force. The electronic version simply applies a variable resistor in place of the display dial, which then generates a resistance that linearly varies with the applied force. The primary disadvantage of this weighing system is that the spring requires a lot of space, adding excess thickness to your weight sensor and making it less attractive to use.

A thinner, but potentially less accurate, method to build a weight sensor is via capacitive means. Two large, thin metal plates sandwich a thin piece of insulator that is designed to compress under load. Effectively, this behaves as a capacitor. When a force is applied, it results in compression of the sandwiched insulator: the thickness of the insulator decreases, which causes the capacitance to increase. In this case, the primary issue in accuracy is getting a thin insulator material that has a linear compression response.

Read on →

One thing that can sometimes be a challenge is improving the organization of various objects because it can seem dull and boring. But, there are ways to make this activity more interesting, fun, and engaging. One way that works with plush toys is for each of them to have jobs and pay rent to their “toybox” like you would pay rent for an apartment. Then the money is there to pay for improvements, so why not?

So, now that the motivation is there, the question comes down to, how do you do the improvements? What kinds of improvements should be made?

The first improvement relates to, well, the plush toys all having jobs. If they all have jobs, chances are each of them are going to want to get out of the toybox more to work, play, or otherwise. Alas, when this happens in a disorganized toybox, the result is… virtual chaos. Everyone is bumping off of everyone else when one scrambles to get out to the “door,” the top of the toybox. Then if one wants to be able to get out quickly, they must make sure they sit at the top of the toybox, not the bottom.

Read on →

A matrix scanning keyboard controller connected to a computer via serial communications. Yes, indeed this is an easy concept to build out in software via a microcontroller, but Don Lancaster’s TV Typerwriter was all hardware based, as were other early computer terminals. So, ultimately, the question comes down to “how do you build a keyboard controller in pure hardware circuits?” The solution is simple once you think through things a bit.

The key to realize is that the entire process can be drafted around the concept of a big central clock that drives the entire controller, and higher-level operations can be designed around “outer loops” that run on slower clocks. Here is an abstract listing from fastest looping, lowest-level operation to slowest-looping, highest-level operation.

  1. Shift out UART buffer, i.e. serialize a single 8-bit UART character that corresponds to a key event message.

  2. Scan a single key.

  3. Scan a single column (column-major) or row (row-major).

  4. Scan the entire keyboard matrix.

  5. Cycle through old, new, and current keyboard state buffers.

Read on →

So, I was looking into more detail on 7-segment LCD displays on Digi-Key. I’ve already looked here before to shop for a 7-segment LCD display to use with my Raspberry Pi Zero 3D scanner, but I was dismayed by the prices of the gear. Now that I’ve been through Digi-Key’s selection of LED displays and have also seen high prices on those, well I guess I am no longer as dismayed as I once aws. The trick that the Raspberry Pi Foundation uses to get the Raspberry Pi Zero’s price so low is manufacturing on an absolutely massive scale. Nonetheless, for the sake of larger system building, it is a relief that the Raspberry Pi Zero itself is only a $5 component in your larger system.

But, anwyas, on the subject of 7-segment LCD display control. Upon closer analysis of the 7-segment LCD displays on Digi-Key, some of them are not multiplexed displays like the LED displays are. Rather, there are two control pins for every LCD segment on the display, plus a few more pins for common ground and voltage. So if you do want to drive an LCD display the same way you’d drive a multiplexed LED display, you need to buy an LCD display controller chip and insert that into your system, or build your own out of a collection of chips. However, some LCD 7-segment displays are multiplexed, typically only the more complicated ones.

Also looking on Wikipedia, it confirmed this knowledge, albeit only in a very minor side note on the liquid crystal display article. Most of the article was about compute monitor LCDs.

Read on →

Important! Want to use stepper motors? Make sure you consider using “silent step” stepper motor controllers. These achive reduced noise level from stepper motors by limiting the current they supply to only what is necessary to achieve the desired motion. More current to a non-moving stepper motor contributes to the noise that it makes.

Yes, and on top of this, if you want more precision, you also want to use a stepper motor controller with micro-stepping capabilities.

20191128/https://forum.digikey.com/t/making-a-diy-3d-printer-run-silent/2927

How do you know what size of DC barrel connector to use for a particular voltage power supply? Unfortunately, in general, there are no well-established standards for DC barrel connectors and intended supply voltage. However, there are a few very common sizes for particular uses.

  • 12 V: 5.5 mm outer diameter, either 2.1 mm inner diameter or 2.5 mm inner diameter.
  • 5 V: 3.5 mm outer diameter, 1.3(5) mm inner diameter. Please note that I have found the Japanese Standard 5 V to be more common than this dimension.
  • Both standards use 9.5 mm length barrels.
  • Japanese standard 5 V: “EIAJ-02 for 3.15–6.3 V 4.2 mm OD, 1.7 mm ID.”
  • Japanese standard 3 V: “EIAJ-01 for 0–3.15 V 2.5 mm OD, 0.7 mm ID.”

Beyond that, you’ve got to really do guess and check. Digi-Key made a good recommendation on some helpful common gear tools you may have for performing the measurement.

  • A toothpick is gemerally manufactured from 2.1 mm to 2.2 mm in diameter, so you can use this to help disambiguate between 2.1 mm and 2.5 mm. Likewise, the tip of a ball-point pen can similarly be used.

  • A multimeter test lead is manufactured to 2.0 mm in diameter, so you can also use this with visual analysis to compare diameters.

Read on →