Migrating to a new CMS, so every now and then the content from the old site pops up here
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.
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.