Minimal Setups

Blogs

Tetris

Tetris - Hardware and Software

Update Amplifier (separate input circuitry per PSG, it appears, that a silent PSG has a DC level on its output which is summarized to the AC output of the working PSG, so two input circuits with individual couping capacitor):

Update of the power switch of the amplifier (at appears, that the small transistor couldn’t deliver enough current):

This Tetris implementation consists of a hardware and a software (running on that hardware).

PL 9823 meets MSP430

Generating signals for PL 9823 using a MSP430

Debugging

mspdebug rf2500 gdb

msp430-gdb -x firmware.gdb

Attention: the gdb in the TI toolchain package is broken, use the one from Debian

Signals Working Cycler

These signals are related to code under tag cycler_works_include_output_stage.

First octets:

Last octets:

Schematics and legend for signals:

Some more explanations

Consider above schematics and the screen shot “Last octets” from the oscilloscope.

Timer TA1 is running in “up mode” to the value 45 set in compare register TA1CCR0. The compare registers TA1CCR1 is set to 10, TA1CCR2 is set to 22. The output mode of the timer is set to “Reset/Set”, which means the GPIO associated with TA1CCR1 (P2.1) and TA1CCR2 (P2.4) are set at the overflow and restart of the counter and reset when the counter matches the associated compare value.

Just another Stratum 1 Timeserver

This server utilizes ntpsec on Debian on a BeagleBone Black with a UBlox GPS module.

It has been joined the NTP pool, the statistics are available at https://www.ntppool.org/scores/93.241.86.156.

Some additional statistics graphs for the server are available at https://numbers.hottis.de/ntpserver.

Preparation of the BeagleBone

The GPS module is connected via serial line to the UART of the BB.

The additional connection of the PPS output with the PPS device of the Linux running on the BB via a GPIO must be prepared. A device tree overlay must be created and compiled:

Yet Another Debouncing Method

You can find several approaches for debouncing mechanical switches on the Internet, some work better, some not so good.

One common approach is to ignore events in an ISR when they come too fast:<

void count() {
	static uint32_t lastEvent = 0;
	uint32_t currentEvent = micros();
	if (currentEvent &gt; (lastEvent + configBlock.debounce)) {
		lastEvent = currentEvent;
		cnt++;
	}
}

void setup() {
        pinMode(REED_PIN, INPUT_PULLUP);
        attachInterrupt(REED_PIN, count, FALLING);
}

This works very good when only the tipping of a switch is relevant.

Three Phase Inverter - Second Service

I wrote in October about my first try to build a simple three phase inverter, see here. In the first try I used four MSP430 microcontroller, one for the PWM of each phase and one to coordinate the phase shift of the three phases.

In this experiment I put everything on one STM32 microcontroller. Here I used the DMA feature to feed data into the PWM counter and I calculated the sine values at start-up time on the microcontroller. Additionally I put in the driver for a CAN interface, however, it is not yet supported in the firmware.

Three Phase Inverter

Already when I was still in school, about 30 years ago, I was curious to make an inverter using some MOSFETs. I actually was able to build a simple one phase inverter with rectangular signal shape (I used a NE555). Using this thing I drove a transformer to light a blub. However, all of these inverters I built passed by in fire.

Now, I tried it again, not longer using MOSFETs but IGBTs with free-wheeling diode. Moreover, I used some microcontrollers and sine values to feed a PWM to get a sine-alike signal shape. And this time I was able with three phases to drive an asynchronous motor.

Theremin

A Theremin is a rather old electronic music instrument, invented in 1928. It is played by approaching hands to two antennas, without touching them. One antenna is used to manipulate the frequeny of the tone, the other one to manipulate the volume.

This is just another Theremin. Only basic structure of the circuit was taken from many other published Theremin circuits.

Completely new (or at least not found during my Theremin googling) is the digital zero-calibration.

Children Protection for Postfix-based EMail-Server

This small tool implements a whitelist on a Postfix mail-server. It prevents certain recipient addresses (your kids ones) from receiving mail from any not whitelisted address. Any mail from not whitelisted senders is redirected to a delegate (a parent).

The code for this tool can is here: https://gitea.hottis.de/wn/childprot.

Configure the tool by adding this line into the master.cf of the Postfix installation:

childprot unix -   n    n    -    25    spawn user=mail argv=/opt/sbin/ChildProt

and this one to the main.cf: