Schematic and pcb

Ideas

Scratchbook

uController PSU

Introduction

Every (home)lab needs a good variable powersupply and so does mine. I wanted to design something with a microcontroller to set the voltage and current limit. Using a microcontroller also brings the possibility to use an LCD and fancy rotary encoders for control. The control loops themselves are pure analog.

I made this powersupply mostly from components I already had.

Continue reading

Interface a rotary encoder with Atmel AVR (interrupt style)

Introduction

When I wanted to gently interface an incremental rotary encoder with an 8-bit Atmel AVR microcontroller, I couldn’t find a nice example. That’s why I wrote this little text. Many other howtos, manuals and descriptions are fuzzy, incomplete or too complicated to do the (easy) job.

This article describes three things: the hardware (just the minimal hardware) and two pieces of code. The first is just a simple interrupt based program and the other uses timers to make bigger steps when you turn faster.

I use Atmel AVR studio as IDE and the Through hole USBprog to program the microcontroller.

Continue reading