Hi!

I’m Max Klein. This is my personal website where I publish some of the projects I work on in my free time.

I mostly do electronics projects because I’m studying electrical engineering, but I also enjoy programming a lot which is why you’ll find a few software projects.

Below are the ones that I’m most proud of. You can browse through all the projects using the menu at the top.

Precision Thermometer

A precise battery-powered thermometer + hygrometer

Precision Thermometer

The idea for this combined thermometer and hygrometer came from the desire for a way to determine the best way to cool my shared attic flat in the summer. It should be able to measure temperatures down to a minimum precision of 0.1 °C and react quickly to changes in the ambient temperature. I wanted it to be small and portable, with a battery life long enough so that I didn’t have to worry about replacing the battery too often even with regular use. In addition, a simple data logging functionality would be nice.

[Read More]

HDL Compiler

Compiler for a self-invented hardware description language

HDL Compiler
After borrowing the “Dragon Book” from the library, I was interested in trying to write my own compiler. Without ever having looked at VHDL or Verilog, I thought about creating a language to “program” simple digital circuits. Initially written in C, it is now a Rust application that parses and compiles source code in this hardware description language which I developed myself. It produces files that can be read by my LogicSimulator project, a web-based simulator for digital circuits. [Read More]

Electronic Load

An electronic load controlled by an STM32 microcontroller

Electronic Load
At the moment, it’s only a constant current load, but constant power and constant resistance modes could be implemented in software. The load MOSFET is a BTS141 by Infineon Technologies, which comes with a few handy protection features. It is controlled by an op-amp in the “standard” ground-referenced constant current load topology. A second MOSFET is used to protect the circuit in case of reverse polarity at the inputs. The load is controlled by an STM32L031 microcontroller. [Read More]

Logic Simulator

A simulator for digital circuits

Logic Simulator
This is a web application for editing and simulating digital circuits. The simulator uses a cycle-based algorithm: each component is evaluated once per simulation cycle. It does not account for the propagation delay of wires or components. The simulation runs in a background worker process, which means that it can run at high speeds without affecting the user interface. However, it is also possible to tie the simulation speed to the screen refresh rate. [Read More]

Raytracer

CPU-based multi-platform raytracing renderer

Raytracer
A simple 3D raytracing renderer that implements the following features: Basic shapes (planes, spheres) 3D meshes loaded from .obj files, with mesh data stored in k-d trees to speed up ray-mesh intersection tests Texture mapping Accurate reflection and refraction using the Fresnel equations Directional and point light sources Environment mapping Supersampling anti-aliasing Parallelized rendering As the renderer doesn’t employ fully-fledged path tracing, there are no convergence issues and render times are comparatively low (under a minute to a few minutes depending on scene complexity). [Read More]

Angry Pixel

Game on the EK-TM4C123GXL and a 64x16 LED matrix where you have to throw a pixel

Angry Pixel

This is a simple game where you have to throw a pixel. The game is drawn to a 64x16 monochrome LED matrix. The ARM Cortex-M4F based microcontroller of the EK-TM4C123GXL development board simulates a two-dimensional grid-based world. There are destructible (hollow) and indestructible (filled) blocks that serve as obstacles. The goal is to hit and destroy all spheres/circles by correctly aiming and adjusting the throwing power.

[Read More]