Ionizing radiation is something that almost anyone finds exciting (or scary) and I've also been for long wanted to build a Geiger counter. Unfortunately Geiger tubes have usually been too expensive to seriously consider buying them just for a hobby project. But I found out that sovtube sold soviet ...read more
Brainfuck is a minimalist programming language. It's mostly a toy and writing any real programs with it is almost impossible. Its design is very simple, the whole language has only eight valid instructions which operate on an array of bytes initialized to zero. Data on the array is manipulated ...read more
PIC16F84 is old 8-bit microprocessor made by Microchip. It was once very popular among the hobbyists, because of its low price. It was the first microprocessor I started to use so I thought it would be fun to try remaking it in VHDL. The source code is open source and ...read more
Before the vector calculus was invented mathematicians used to do vector calculus like operations using quaternions. Quaternions are four dimensional extension of complex numbers. They have two additional imaginary units $j$ and $k$. Quaternion multiplication is non-commutative and is defined by the formula:
$$i^2=j^2=k^2=ijk ...read more
Some time ago I needed an UART for a project. Things it needed to do were very simple and I didn't want to add a microprocessor to use UART and instead decided to just code a simple finite state machine to use it.
But I couldn't find a ...read more
The other day I was coding an FPGA design that needed a source of normally distributed random numbers. Uniformly distributed random numbers are fairly easy and cheap to generate with a linear feedback shift register, but generating normally distributed numbers is a harder problem. There are several ways to generate ...read more
I've been playing with the electronic circuit genetic algorithm design program. I have tried to make some stable bandgap voltage references, so far results have been promising, but not very good. None of the resulting circuits could be used in a production, except if you don't care much ...read more
I've been working for a while on a program that automatically generates analog electronic circuits using evolutionary algorithms. It's still very much a work in progress, but I've used it to generate some useful circuits. Current workings of the program is as follows:
- Programmer decides a goal ...
I was never good with remembering if derivate of $\sin x$ was plus or minus $\cos x$. Or if the derivative of $\cos x$ was plus or minus $\sin x$. I could just remember that one derivative had minus and other didn't. But I don't have that problem ...read more
In Python it's possible to redefine some builtin values that shouldn't really be changed. For example True and False can be changed in Python versions 2.7 and lower. This is fixed in Python 3 and assignment to True or False raises: "SyntaxError: assigment to keyword" but it ...read more
A long time ago I read from some book, probably some of the Jim William's or Bob Pease's books, interesting trick to approximate the cutoff frequency of a simple low or high pass filter. Below is equation for the cutoff frequency of a first order low or high ...read more
This is a blog about electronics, computers and mathematics. I'm thinking about writing for example: VHDL, FPGAs, general electronics, LaTeX, programming, pitfalls in Python and lots of other stuff. Recently I have written a program that uses evolutionary algorithms to autonomously design analog electrical circuits. I have had some ...read more