In Electronics PCB world,
0.1" is a standard spacing or pitch for ICs, connectors etc. for many, many years.
In LEGO world,
8mm pitch and
4.8mm diameter hole is its gold standard. (LEGO brick dimension drawing link)
Here is a useful trick to unite the two together with LEDs.
You simply spread several
0.1" through-hole LEDs (5mm OD LED on LCSC) on your PCB, with
8mm spacing center-to-center.
Once you solder the through-hole LEDs, the PCB can plug into any LEGO piece or technic beam very tightly.
After that, it’s only limited by your LEGO imaginations to e.g. …
In an effort to make a minimalist digital clock, I was looking for an easy to construct enclosure for all the small electronics modules, such as AAA battery, display modules, and MCU boards etc.
Yes, 3D printing is still outside of my skill set.
Interestingly, I’ve seen origami paper boxes, as introduced in this youtube video (link), which can be traced back to Tomoko Fuse’s earlier books (Amazon link). In her recent 2018 book, she used the term “modular origami”, which roughly speaking is a technique of stacking cleverly multiple identical origami pieces, called modules, to form a complex 3D structure. …
HT16K33 (datasheet link) is very similar to TM1637. It is also widely used in display modules such as Adafruit 8x8 LED matrix (schematic link and LED hardware link), or this 4-letter pHAT module (link).
Again Adafruit provides nice Arduino/Python language support (link) for its modules and HT16K33. But we can certainly experiment on HT16K33 with a FT232H module as well.
Comparing with TM1637, in terms of its I2C interface and digital commands, HT16K33 has the two main differences: the opcodes and that its I2C byte order is MSB first. …
Rust embedded software tooling is always an interesting alternative to MCU vendor specific IDE software, such as those provided by TI, Microchip, STM32, Nordic, etc.
With the advent of probe-rs and subsequently probe-run software, Rust for embedded coding can take a different path from
openocd + gdb, and it is getting more convenient.
There are already lots of cortex-m quick-start guides, especially of STM32F103 “Blue Pill”. Unfortunately, Rust library such as
stm32f1xx_hal is changing fast. For example, the
Timer now is initiated differently from the past.
Here is my latest try get it up and running:
In my earlier article two years ago, I mentioned Bob Peace’s comment of Dr. Middlebrook’s “differential amplifier” book. (link)
Here is my answer to four of my own questions. (Sorry for the long delay in between.)
Electrical circuit analysis for human designer is a bit like solving Sudoku puzzle.
In Sudoku, there is the local rule or constraint: no duplicates in each 3x3 square. Then there is the global constraint: rows, and columns across multiple squares can not have duplicate numbers. You have to satisfy both the local and global constraints.
In circuits, the local constraint is the device/component f(I,V) characteristics. For example, a resistor simply has a linear relationship: I = V/R. Other components have other f(I,V) characteristics, which may be linearized or piece-wise simplified. …
A “low-entropy” equation that depicts the circuit behavior can help analog designers work backwards, finding values of the circuit elements in order to meet the specification.
Let’s start from the output impedance of a simple linear circuit.
A common procedure of determining the output impedance is by: shorting input to ground, and look into the output port, to “see” the output impedance. In this simple case (Fig. 1), we can “see” R₁ ∥ R₂
When the circuit becomes more complicated, it is difficult to “see” the output impedance directly. One way is to inject a current and calculate the resulting voltage. …
Charlieplexing is an interesting technique to drive lots of LEDs with smaller number of output lines. The idea is very simple, given two output lines, you can drive two anti-parallel LEDs, in a circuit like the following.
X1 = positive and X2 = negative lights up LED1; X1 = negative and X2 = positive lights up LED2. If you need both LEDs to light up, just time-division multiplexing the positive and negative signals on X1 and X2, which flashes LED1 and LED2 fast.
Given N output lines, pick any pair of two lines to place two anti-parallel LEDs, you can drive total of N * (N-1) LEDs. …
Previously, I’ve described FT232H in MPSSE mode, that SPI or I2C communicates directly with simple hardware devices, such as TM1637/TM1638 or MCP3204 ADC.
In these cases, hardware interactive development (HID) is not very advantageous, since nowadays MCUs usually come with abundant libraries for these hardware devices, which makes prototyping fast and easy.
HID with AD5933 could be a more convincing use case.
AD5933 outputs a sinusoidal voltage waveform at a certain frequency and measures the resulting current, which is then ADC-ed and DFT-ed into one complex number (real + imaginary) of that frequency component.
Yes, it’s a network analyzer on a chip, though with limited capabilities. …
TM1638 IC appears in “LED&KEY” and “QYF-TM1638” modules, though the wiring of segments and grid pins are different between these two. (reference link for LED&KEY)
Can you figure out the push button connections to TM1638 without a schematic? Or in general, how would you test out a piece of new hardware before committing it to your schematic design? This is the purpose of hardware interactive design (HID).
We’ve discussed driving TM1637’s I2C protocol with FT232H (FTDI USB transceiver). …