Week 10: Output devices

This week's assignment is to add an ouput to a designed microcontroller board. Since I'm now thinking mainly about my final project, I have split this assignment into two parts: (i) Clapper switch for my amplifier; (ii) speakers for my future DAC board, which I will start assembling this week.

Output device 1: Solid-state relay for a clapper switch

For my input device , I have used the relay as an output (to switch the tube amplifier for my final project)

Solid-state relay

Solid state relay is a great tool to control high power/voltage equipment with low voltage logic signals. Though I eventually plan to use this circuit for turning my tube amplifier on, the amplifier is currently at the development stage, so I instead plugged in the christmas lights to the relay.


Christmas lights turned with a clapper

One can see that the circuit works as required, though there is a slight leakage in the "off" state, which one can recognize from the dimmed (rather than the turned off) lights.

Output device 2: Speakers/pre-amp for the DAC board.

Now, the second output device that I planned to make was the DAC board (with a preamp) for my tube amp and speakers. For this to come true, I desperately need a microcontroller which would have an on-board DAC (I dislike alternative solutions like the class D amplifier, or exploiting the PWM mode coupled with RC filters as was suggested by Neil, as they both result in very mediocre sound quality). Attinys or Atmegas, which are so easy to work with, unfortunately, do not carry DACs, so I have to switch to the XMega microcontrollers.

XMega "Hello world"

To start the DAC board, I had to go through the Hello world experience, which wasted much more time then I expected. A great introduction to the XMegas can be found in the Jake's page.

I have used the Jake's DAC board for the purpose of Hello world. Regardless of the original purpose of the code, I have found it very handy even for my own DAC project, since it can help very quickly diagnose if my own newly designed board works or not. I have milled his board, stuffed it, and after struggling for quite some time with the software side, I have managed to succesfully load the code to the XMega board.

Successful test of freshly milled XMega board

DAC board + pre-amp

The next step was to design my own board. At that point, I had very little time left and managed only to pick the right components and draft the circuit design, consisting of XMega, Op-amps and the Bluetooth module:

Initial sketch of the DAC + pre-amplifier

The continuation of this work can be found below:

Issues that I faced

Files