If you have an Arduino UNO this project is practically free!
It also makes a great Arduino Nano project.
What you need (only passive components):
What you get:
The circuit implements a 6-Bit Digital to Analog Converter (DAC) using a 8-4-2-1 Resistor combination.
Arduino Uno Output pins 13 to 9 form the 6-Bits PB5 to PB0.
The Ideal resistors for the 8-4-2-1 network should have been:
1.1 K, 2.2 K, 4.4 K, 8.8 K, 17.6 K and 35. 2 K
However this has been simplified to
1.0 K, 2.2 K, 2.2 K + 2.2 K, 8.2 K + 560, 15 K + 2.7 K and 33 K + 2.2 K
The first 1.0 K instead of 1.1 K has been used to take care of the loading on the PB5 output.
A 0.01 uF filter capacitor is added to the resistor DAC output for smoothing the waveforms.