Showing posts with label atmel. Show all posts
Showing posts with label atmel. Show all posts

Thursday, 6 May 2010

Geeky Advent Rehash.


Well ok, it's five months late but here's is my rushed take on tinkerlog's Geeky Advent widget (instructions here) the interesting quirk with these things being the way an LED is used as a light sensor. I've built it using an ATtiny85 instead of the ATtiny13 which requires a tweak to the code to allow for the slight differences in the ADC registers...

ADC Reference voltage

ADMUX = ( 1 << REFS2 ) | ( 1 << REFS1 ) | ADC2; //internal ref 2.56v, sense on PB4

ADC clock prescaler

ADCSRA = ( 1 << ADEN ) | 7;

prescale set to 7 (divide by 128) as i'm led to 'believe' it improves accuracy if the main chip clock is set to 8Mhz

Fuses set to switch off chip prescaler.
avrdude -c < Your Programmer > -p t85 -U lfuse:w:0xe2:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m


Seems to work ok but may need some tweaking to the 'AMBIENT_LIGHT' variable.
not demonstrated is that the LED's light up one LED, Two LED's, Three LED's, Four LED's on each reset, (apologies for blurry video but i'm using a crap digital camera)

Saturday, 20 March 2010

A Quick Piece About The TV B Gone On Stripboard



Well as you may or may not know i dabble (and fiddle) in Electronics & Microcontrollers so after having met the US hackers Mitch Altman/Jimmie Rodgers at a Fizzpop workshop and successfully built a AVR ISP programmer i thought i'd have a bash at making a TV B Gone on stripboard from scratch. Here it be (well attempt #2 t.b.h) , the main circuit was pretty much built 'on the fly' with a homebrew LED driver being a PNP transistor powering 2x IR emitters in series (my calculations are a bit ballpark so it's probably under powered). Does the job though, just a shame the 3xAA batteries that power it dwarf it and spoil the illusion hence them being cropped out the picture.

(PS: The ongoing competition in geek circles with these things appears to be in ever increasing the range, so hang around for the TV-B-Gone bazooka, coming to a Nielsen box near you soon!)