Showing posts with label PWM. Show all posts
Showing posts with label PWM. Show all posts

Friday, May 4, 2012

Bench Power Supply: Power Control

In this truly awful video, you can see my bench power supply at work.

For testing, I coded a function to cycle the voltage between 0-5.0V.  In reality, 0-100% duty cycle is the parameter the code changes. A "PWM'ed"  square wave(yellow trace) is fed to an RC filter, which is then buffered with an op-amp(the op amp output is the blue trace).

You can also see the LCD updating in realtime. The voltage reading is coming from the ADC on the ATmega 644. It's has a hard time keeping up with the displayed "SET" value, but there probably several factors, the biggest of which purely software related, I simply don't refresh the "widget" that displays the voltage reading any faster than 3Hz. 
(Ignore the Amperage settings/reading, they're not coded yet, the analog portions of that have me the most intimidated)




Anyways, crappy quality aside, this is a great demonstration of how PWM signals can be used to generate analog voltages from a digital MCU pin, and how "duty cycle" affects what comes out of a simple low-pass RC filter.


--P



Tuesday, April 26, 2011

Word Clock, Part 1

This was probably my biggest, most ambitious electronics project I've done so far. (And also one of my first)
It was inspired by this:
http://www.instructables.com/id/A-Word-Clock/, which in turn was inspired by: http://blog.makezine.com/archive/2009/09/qlocktwo-clock-tells-time-with-word.html.  (I see that the guy who did the instructables clock has since done new version of it, it looks really nice.)

Anyway, here is mine:

My word clock. If I could have taken a picture that hid the flaws, I would have :)