Throwies are great.  They have a minimal parts count - 2 or 3 depending on whether you use a magnet - and produce a great effect.  They are very cheap and easy but not highly efficient:

1)  They are on all the time, so on average they waste half of their energy shining during the day.

2)  A continuous light is not as visible as a flashing light. An interesting flash-pattern adds to the intrigue and can even convey information.

3) Their Duty cycle is too high - a duty cycle of 10-20% is more than sufficient to be both visible and much more efficient. 

This is the first of what I hope to be 2-3 versions of microcontroller projects designed to be so cheap that they can be used as throwies.  The plan is to make them more efficient and use that gain to provide a more exciting effect.

This is the "basic" version - it requires only one additional part, three blobs of solder and a few snips.  And by magic* it can address all of the issues above.  It's programmable using the Arduino IDE, hence "Throwduino".

On a per-hour basis it should even work out cheaper than a normal throwie.  The cost analysis is in step 5.

Edit - Morse Code sketch now available - see last step.
        - Now you can throw your own message of choice!

* not actually magic - see step 6.

Step 1: Parts

You need only 3 essential parts for this project:

An ultrabright blue, blue-green or white LED*
A CR2032 battery
An ATtiny25/45/85 AVR microcontroller.
Optionally, a rare earth magnet.

You will also need these tools:

Soldering iron & solder
Wire cutters

If you want to do this and don't want to bother programing the chip yourself, leave a message and I'll see if I can arrange a source of pre-programed chips.

Assuming that you need to program the ATtiny you will need:

Parts (unless you have a programing shield for ATTinys):
A DIP8 socket
6-pin 0.1" male header (or 4-pin if you use jumper leads below)
About 2x6 inches of essentially any insulated wire or 1-2 jumper leads (ideally two colours)

Or (alternative parts):
Solderless breadboard
Jumper wres

An Arduino (an ISP programmer would also work)
PC with Arduino IDE & Arduino Tiny cores (more on this later)
Hot glue or epoxy advisable

* You could use an Red, Orange, Yellow or Yellow-Green LED but you would need to use a resistor or you would risk a brown-out on the controller and will get a very short lifetime.  This adds 30% to the parts count but almost nothing to the price.  300-500 Ohms is not a bad place to start if you go this route.  Maybe a little less for Yellow-Green.
<p>Just a quick note that I had to change the battery in my Morse Egg which is based on the Throwduino but includes a 220 Ohm resistor connected to the LED. That results in 85 days using a single battery. </p>
<p>Hi Lars - thanks for your comment and picture! Always great to see a project made - I'll send you a 3-month pro by PM.</p><p>I guess the 220R just cuts down the current that bit more - 85 days is pretty impressive on a singe cell. And it looks like you used a CR2025, which is lower capacity than the 2032 as well! </p><p>Love that the light sensing still works too. When the pin is set to input it should be &quot;high resistance&quot; - drawing minimal current so the resistor should not matter. However it's always great to see what happens in practice. There's usually more going on with these things than I understand at least!</p><p>Cheers</p><p>Ugi</p>
<p>Thanks so much for the writeup. Also Thanks for the well commented code. Learned so much. I have modded your code and have a version that accepts numbers, commas, colons, and dashes. I am going to be using it for a game played campus wide called Firefly wherein students decode morse and are given clues/riddles in the morse code to help complete a task or scavenge hunt. Some of the game involves GeoCashing so... The full stops, dashes, commas and numbers were needed. Heres the Code:</p><p>const char flashSeq[]={&quot;CAN YOU CATCH THE FIREFLY. FIND CLUE AT 46.814559, -92.053409&quot; }; // Morse message. Edit this.</p><p>const byte seqLength =(sizeof(flashSeq)-1);</p><p>// Morse code encoding</p><p>// Stored as one byte per letter.</p><p>// High 5 bits are 1 for - and 0 for beginning with LSB of those high-5..</p><p>// Low 3 bits give number of flashes (dots + dashes).</p><p>// Morse allows for 5 flashes (for numbers) but letters require 4 maximum.</p><p>// FOr Dashes and dots dont forget to start 3 from the right and pattern the timming from right to left. </p><p>const byte morse[43]={</p><p> B11111101, // 0</p><p> B11110101, // 1</p><p> B11100101, // 2</p><p> B11000101, // 3</p><p> B10000101, // 4</p><p> B00000101, // 5</p><p> B00001101, // 6</p><p> B00011101, // 7</p><p> B00111101, // 8</p><p> B01111101, // 9</p><p> B00000000, // BL These have to be kept otherwise and A will become and H. The B will become a I.. and so on.</p><p> B00000000, //BL</p><p> B00000000, //BL</p><p> B00000000, //BL</p><p> B00000000, //BL</p><p> B00000000, //BL</p><p> B00000000, //BL</p><p> B00010010, //A</p><p> B00001100, //B</p><p> B00101100, //C</p><p> B00001011, //D</p><p> B00000001, //E</p><p> B00100100, //F</p><p> B00011011, //G</p><p> B00000100, //H</p><p> B00000010, //I</p><p> B01110100, //J</p><p> B00101011, //K</p><p> B00010100, //L</p><p> B00011010, //M</p><p> B00001010, //N</p><p> B00111011, //O</p><p> B00110100, //P</p><p> B01011100, //Q</p><p> B00010011, //R</p><p> B00000011, //S</p><p> B00001001, //T</p><p> B00100011, //U</p><p> B01000100, //V</p><p> B00110011, //W</p><p> B01001100, //X</p><p> B01101100, //Y</p><p> B00011100, //Z</p><p>};</p><p>const int LEDpin=4; // Although this is in a constant, there is a lot of direct port access </p><p> //I wouldn't try to change this without going throu' the whole code.</p><p>unsigned int threshold = 10; // We'll set this properly during setup</p><p>// This sets up some libs and definitions for use with the sleep timer</p><p>#include &lt;avr/sleep.h&gt;</p><p>#include &lt;avr/wdt.h&gt;</p><p>#ifndef cbi</p><p>#define cbi(sfr, bit) (_SFR_BYTE(sfr) &amp;= ~_BV(bit))</p><p>#endif</p><p>#ifndef sbi</p><p>#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))</p><p>#endif</p><p>ISR(WDT_vect){ WDTCR|=B01000000;} // reset Watchdog Timer to Interrupt mode each time.</p><p>// Mess about with some registers to turn stuff off &amp; set references.</p><p>void setup(){</p><p> ADCSRB&amp;=B10111111; // disable comparitor</p><p> ACSR |=B10000000; // turn off power to comparitor</p><p> ADCSRA |=B10000000;// turn on ADC</p><p> DDRB&amp;=B11100000; // set all to input</p><p> DDRB|=B00011010; // Set 1,3 and 4 as output</p><p> PORTB&amp;=B11110111; // set PB3 low - this was for the testing phase. Can probably be dropped now.</p><p> PRR&amp;=B11111110; // clear ADC disable bit in Power Reduction Reg</p><p> analogReference(6); // internal 2.56v reference with no bypass - INTERNAL2v56NB - </p><p>// The Firefly is on</p><p> flash(5); // Five flashes - we are up and running.</p><p> start_of_code();</p><p>// Set the threshold for light sensing during first 40 seconds.</p><p>// We take 148 measurements, bin the first 20 and then average the next 128.</p><p> unsigned int total=0;</p><p> for (byte rep=0; rep&lt;148; rep++){</p><p> int value=lightLevel();</p><p> // int value=10;</p><p> if(rep&gt;19){</p><p> total+=value; // tatke total of 128 readings</p><p> }</p><p> // flash(value);</p><p> pause(4);// was pause(4)</p><p> DDRB|=B00011010; // Set 1, 3 and 4 as output</p><p> PORTB&amp;=B1110000; // Set all low</p><p> }</p><p> threshold=(total&gt;&gt;7); // set threshold to average point (divide total by 128).</p><p> //flash(threshold); // This is mostly for debugging purposes. </p><p>}</p><p>//Main Loop</p><p>// We measure the light level. If it's low then we flash our sequence then sleep for 2s.</p><p>// If light level high, we sleep for 8s.</p><p>void loop(){</p><p> analogReference(6); // internal 2.56v reference with no bypass</p><p> // Measure light level and if it's low enough, display our flash sequence</p><p> if (lightLevel()&lt;threshold){</p><p> flashMorse(); </p><p> // If we were flashing, we now sleep for 4s</p><p> pause(8);</p><p> DDRB|=B00011010; // Set 1,3 and 4 as output</p><p> PORTB&amp;=B11110111; // PB3 low. </p><p> }</p><p> else{</p><p> // If we were not flashing then we sleep for 8s</p><p> pause(9);</p><p> DDRB|=B00011010; // Set 1,3 and 4 as output</p><p> PORTB&amp;=B11110111; // PB3 low.</p><p> }</p><p>}// end main loop</p><p>// Measure light level by looking at voltage generated by LED connected to D4 (A2) on pin 3 of the chip.</p><p>// Set Output and low to start to discharge any charge buildup - not sure if we need this</p><p>int lightLevel(){</p><p> pinMode(LEDpin, OUTPUT);</p><p> digitalWrite (LEDpin,LOW);</p><p> delayMicroseconds(50);</p><p> pinMode(LEDpin, INPUT);</p><p> delayMicroseconds(100); // let it stabilise as an input again</p><p> unsigned int value = analogRead(A2);</p><p> return value;</p><p>}</p><p>// Flash routine - 70ms on, 250 ms off</p><p>// Repeat certain number of times and then pause 500ms</p><p>void flash(byte No){</p><p> pinMode(LEDpin, OUTPUT);</p><p> if(!No){// if we receive a zero, just pause.</p><p> pause(5);</p><p> DDRB|=B00011010; // Set 1,3 and 4 as output</p><p> PORTB&amp;=B11110111; // PB3 low.</p><p> }</p><p> // If we had a non-zero number of flashes, we'll make them now</p><p> for(byte rep=0; rep&lt;No; rep++){ </p><p> flashDot(70);</p><p> }</p><p> // Pause (sleep)</p><p> pause(5);</p><p> DDRB|=B00011010; // Set 1 and 3 as output</p><p> PORTB&amp;=B11110111; // PB3 low.</p><p>}</p><p>void pause(byte time){</p><p> DDRB&amp;=B11100000; // set all to input</p><p> setup_watchdog(time); // set up wait period</p><p> system_sleep();// sleep</p><p>}</p><p> void flashMorse(){</p><p> start_of_code();</p><p> for(byte rep=0; rep&lt;seqLength; rep++){</p><p> byte index=0;</p><p> if(flashSeq[rep] == 44) Comma(); // Function for comma 6 blinks</p><p> if(flashSeq[rep] == 45) hyphenDash(); // function for Hyphen 6 blinks</p><p> if(flashSeq[rep] == 46) fullStop(); // function for Full Stop/Period 6 blinks</p><p> if(flashSeq[rep]&lt;48 || flashSeq[rep]&gt;90)index=0;</p><p> else index=flashSeq[rep]-47;</p><p> if(!index) pause(6);</p><p> else {</p><p> byte dotdash = morse[index-1]&gt;&gt;3; // put just sequence part (5 bits) into dotdash</p><p> // Dots and dashes according to sequence encoded in morse[]</p><p> for(byte flashes=0; flashes&lt;((morse[(index-1)]&amp;B111)); flashes++){</p><p> if(dotdash&amp;1)flashDot(1500); // if LSB is 1 then display a dash</p><p> else flashDot(60); // otherwise it's a dot</p><p> pause(4); // pause between flashes - 256ms</p><p> dotdash&gt;&gt;=1; // roll along to the next bit</p><p> }</p><p> pause(6); // End of word pause 0.5s</p><p> }</p><p> }</p><p> }</p><p>// flash the LED for time (&lt;256 ms) and pause for 250ms. </p><p>void flashDot(int time){</p><p> DDRB|=B00011010; // Set 1,3 and 4 as output</p><p> PORTB&amp;=B11110111; // PB3 low. </p><p> PORTB|=B00010000; // PB4 High</p><p> delay(time);</p><p> PORTB&amp;=B11101111; // PB4 low.</p><p> pause(4); </p><p>}</p><p>// Watchdog timer setup</p><p>// This is specific to the ATTiny85 (+ tiny45, &amp; tiny25) and won't compile for ATMega328 etc.</p><p>// 0=16ms, 1=32ms,2=64ms,3=128ms,4=250ms,5=500ms</p><p>// 6=1 sec,7=2 sec, 8=4 sec, 9= 8sec</p><p>void setup_watchdog(int period) {</p><p> byte value;</p><p> if (period &gt; 9) period=9;</p><p> value=period &amp; B111;</p><p> if (period &gt; 7) value|= (1&lt;&lt;5);</p><p> value|= (1&lt;&lt;WDCE);</p><p> MCUSR &amp;= ~(1&lt;&lt;WDRF);</p><p> // start 4-clock-cycle timed sequence</p><p> WDTCR |= (1&lt;&lt;WDCE) | (1&lt;&lt;WDE);</p><p> // set new watchdog timeout value</p><p> WDTCR = value;</p><p> WDTCR |= _BV(WDIE);</p><p>}</p><p>// set system into the sleep state </p><p>// system wakes up when wtchdog is timed out</p><p>void system_sleep() {</p><p> cbi(ADCSRA,ADEN); // switch Analog to Digitalconverter OFF</p><p> set_sleep_mode(SLEEP_MODE_PWR_DOWN); // sleep mode is set here</p><p> sleep_enable();</p><p> sleep_mode(); // System sleeps here</p><p> sleep_disable(); // System continues execution here when watchdog timed out </p><p> sbi(ADCSRA,ADEN); // switch Analog to Digitalconverter ON</p><p> PRR&amp;=B11111110; // clear ADC disable bit in Power Reduction Reg</p><p>}</p><p>void start_of_code()</p><p>{</p><p> pinMode(3, OUTPUT);</p><p> digitalWrite(3,HIGH);</p><p> delay(4000);</p><p> digitalWrite(3,LOW);</p><p> delay(4000);</p><p>}</p><p>void fullStop() // Period Handling</p><p>{</p><p> flashDot(60);</p><p> pause(4);</p><p> flashDot(1500);</p><p> pause(4);</p><p> flashDot(60);</p><p> pause(4);</p><p> flashDot(1500);</p><p> pause(4);</p><p> flashDot(60);</p><p> pause(4);</p><p> flashDot(1500);</p><p> pause(1);</p><p>}</p><p>void hyphenDash() // Hypen Handling</p><p>{</p><p> flashDot(1500);</p><p> pause(4);</p><p> flashDot(60);</p><p> pause(4);</p><p> flashDot(60);</p><p> pause(4);</p><p> flashDot(60);</p><p> pause(4);</p><p> flashDot(60);</p><p> pause(4);</p><p> flashDot(1500);</p><p> pause(4);</p><p>}</p><p>void Comma() // Comma Handling.</p><p>{</p><p> flashDot(1500);</p><p> pause(4);</p><p> flashDot(1500);</p><p> pause(4);</p><p> flashDot(60);</p><p> pause(4);</p><p> flashDot(60);</p><p> pause(4);</p><p> flashDot(1500);</p><p> pause(4);</p><p> flashDot(1500);</p><p> pause(4);</p><p>}</p>
<p>Fantastic - always great to see a project used, adapted and enhanced! </p><p>Glad you were able to follow the code - it's not the most accessible bit of Arduino because I wanted to make it as fast as possible so we can keep the chip asleep to conserve battery life. That means that there's a lot of direct port access. Your battery life should be pretty enormous on all of those Duracells!</p><p>Good luck for your campus project! One of the driving forces behind most of my projects is that I like to make techy thing that interest kids (my own and others) so I'm delighted that you found a student activity that could utilise these.</p><p>Since you made and posted a project based on one of mine, you get a free 3-month pro-membership. I'll send you a PM with the code in a mo'.</p><p>Thanks for posting - I'd love to hear how the students get on.</p><p>Ugi</p>
<p>Cheers Ugi. And thanks for the membership. </p><p>Side note on code changes. I exaggerated the timing mucho. Some of the players will be very young. I tested the timing on 7 year old and this speed seemed to be challenging but not anxiety inducing. + I added another colored led to Pin 2(PB3) so the start of the repeating message would be more obvious. </p>
<p>I used to teach a lot of pilot survival classes to private pilots. This could be an awesome survival tool. Using it as a ground to air signal, with programed SOS code. Amazing! Could even make a few to be used as a landing zone marker. Looks even better than the little fireflies that attach to 9 volts. How long do these last with a short code loaded and repeating?</p>
<p>It will depend a bit on your LEDs but mine last about 6 weeks. Hopefully in a survival situation you should not need that long!</p><p>I'm not sure how far away you could see one, however - it's just a normal LED. Quite bright from a few dozen yards but not something that's likely to alert a passing plane. </p><p>That said, you could make a version with a lithium ion battery, a transistor and maybe a half-watt LED that would give several nights of pretty bright flashing (maybe a week) for a few pounds. </p>
<p>Great tutorial! I soldered mine on a prototype PCB along with a battery holder in a candybox container. When the battery is empty I can easily revive it (if it still sits where I placed it). I also included a 220 Ohm resistor (don't know if this will increase battery time or not). I was curious whether or not the resistor would affect the sensing function, but it works just fine!</p><p>Best wishes,</p><p>Lars</p>
You ppl may like to see my Light sensor LED, using only a resistor and an LDR... ;-D <br> <br>reg <br>k <br>------------------------------------------------------- <br>&quot;May the good belong to all the people in the world. <br>May the rulers go by the path of justice. <br>May the best of men and their source always prove to be a blessing. <br>May all the world rejoice in happiness. <br>May rain come in time and plentifulness be on Earth. <br>May this world be free from suffering and the noble ones be free from fears&quot; <br>---- Vedic blessing <br> <br> <br>
Good instructable good use of Arduino, Attiny and the trick to use the LED to measure the light. <br> I made one Throwduino to see how it works, with the Morse code. I initialized it (connected the battery) in absolute darkness, so it would light only in darkness. But it works continuously, no matter if it is darkness or light. Am I doing anything wrong ? <br>Also, in the first program: <br> <br>const byte flashSeq[3]={1,4,3}; // Flash pattern. Edit this. <br> <br>// If you just want a longer pause, use 0 for each 500ms. <br> <br>what do you mean by that ? Make an example please. I tried first this code, with 4,4,4, as flashSeq parameters but I got 12 flashes because I didn't knew how to make longer pauses. <br> <br>Thanks in advance.
Hi - thanks for your message and for your interest in the project. I haven't met these issues with it before but I will help as much as I can. <br> <br>I assume by &quot;works continuously&quot; you mean that it flashes the whole time, rather than the light is on continuously. If the latter then it's probably a hardware issue (did you clip the wire between the pins for example?). <br> <br>The LED light sensing has worked with all the white, blue and blue/green LEDs that I have tested. That does not mean there are no LEDs that won't work but I would be surprised. What LED are you using? Colour? Vf? clear or diffused? It shouldn't matter but I'm just interested. <br> <br>Are you using the same chip (ATTiny 85) and battery (CR2032)? Do you have all the connections made correctly? I'm happy to look at a picture of your device if you post it (or PM me) to see whether I can spot any issues. <br> <br>You should not need total darkness but you do need to remember that it senses over 40 seconds, so you have to wait that long before bringing it out into bright light. The first 10 seconds are not used, so you can connect the battery in the light then put it in your cupped hands within the first few seconds and that should be easily enough. <br> <br>My guess would be that the battery connection broke briefly after you brought it out into the light so it re-sensed in the daylight. Maybe try connecting &amp; tape it up well in the light so you can see what you are doing and then putting it under an upturned coffee cup for a minute after. It takes an average so even if your first few seconds are in day light, some time in darkness will push the average down enough. <br> <br>With the original sketch, the LED will flash a few times after the sensing phase to tell you what value it has sensed. Might be worth looking at that. If you connect the battery in bright light it should flash out a higher reading than in low light (obviously) so try under both conditions and check that it's measuring the difference. <br> <br>With regard to the flash sequence, {4,4,4} should give you three groups of four flashes, with a short pause between each group. If you do {4,0,4,0,4} then you should get longer pauses between groups. If you do {1,0,0,0,2,3,0,0,4} then you get: flash, long wait, flash, flash, short wait, flash, flash, flash, fairly long wait, flash, flash, flash, flash. <br> <br>Hope that's of some help. If you can supply more details I will try to help further. <br> <br>Cheers <br> <br>Ugi
PS I think I may have made a mistake in the code! <br> <br>It has worked fine for me, but I think this line: <br> <br>threshold=(total&gt;&gt;5); // set threshold to average point (divide total by 128). <br> <br>Should be: <br> <br>threshold=(total&gt;&gt;<b>7</b>); // set threshold to average point (divide total by 128). <br> <br>I can't check it just now - I'm at work - but try that and see if it helps. <br> <br>Ugi
Update... <br> <br>Then I saw the PS for the threshold, I made the changes and it now works like a charm!!! <br> <br>Light / Dark detection - OK. <br> <br>Pauses - OK. <br> <br>Thank you very much for the answers and for the nice instructable! Be well!
Thank you for taking the time to comment - I would not have found the bug without that, because mine have worked so far - must be a difference in the performance of the LEDs. <br> <br>I'll make a correction to the 'ible. <br> <br>Cheers <br> <br>Ugi <br> <br>PS watch out for the RGB version, which will hopefully hit instructables pretty soon!
Glad to help. I like very much these easy to make, yet sophisticated and clever instructables like yours. I had my Arduino ready with ISP program into it and a breadboard ready to put an ATtiny, so it only took a quarter of minutes to make the changes, reprogram and test. I also made a PCB, since I didn't want to cut the Attiny pins (and in case something went wrong), but also to be able to put the circuit into a plush toy or something. I 'll try to post it. <br>One thought I made, with a little more code and a mobile vibration motor, you could have something buzzing into a drawer when it's closed (dark) but idle when someone opens it to look into. I read this in High tech practical jokes for the Evil Genius. Thanks again.
Here they are. The .zip contain the eagle files. You can connect either piranha, or normal Led.
3V Battery connector at the back side, that;s why it is so big.
I believe the circuit I made is correct, otherwise the Led wouldn't lit, or it wouldn't work at all. <br>Thanks for the answer. I am using a clear red Led, I also tried with a clear blue, and a green piranha. I don't know Vf for any of them. I will try again, based on your above answer for the initial seconds, and also I will try the pauses with the first code. <br> <br> Thanks for the answer, my friend.
Hi Ugifer,<br> <br> This great demonstration on how simple and cheap an ATtiny circuit can be, was an inspiration for my newest Ible: <a href="https://www.instructables.com/id/ATtiny-StarBird/" rel="nofollow">A(T)tiny StarBird</a>.<br> <br> Thanks!
That's fantastic - I love the project and it's always great to know that something you did helped to spark an idea with someone else. <br> <br>Thanks for your kind comments.
Great! <br />you got my vote
Thank you - much appreciated!
Nice idea! Would it be cheaper (and maybe easier) to use a 555 timer ic in a PWM-circuit to power the LED, instead of a microcontroller? <br> <br>A pwm circuit needs a bit more parts than your solution, I expect... Did you consider using a 555? <br>
I came at it rather from the opposite direction - more along the lines of: <br> <br>&quot;Hey! You can get an ATtiny for 50p! They could be disposable at that price - let's do something fun and not worry about losing the chip&quot; <br> <br>You could use a 555 for a flashing circuit or a PWM &quot;heatbeat&quot; but I have a feeling they are pretty power-hungry and they don't &quot;sleep&quot; like the AVR does. For this project, whenever the light is off the ATTiny is asleep drawing 4.5 microamps! I don't think you would get the same kind of lifetime out of a 555. Would be fun to see thou'.
Oh, and you wouldn't get the dark-detecting effect either without a load more components. The great thing about this is that the ATTiny can read the light level, control a meaningful pulse sequence and use only a vanishing current when it's not active.
You're right 100%! The 555 _is_ power hungry. I'm not very much into microcontrollers, that's why I first thought of the 555. ATTiny seems the very best choice to do this.
Oh, and sorry for rapid-commenting (but I think this is awesome!) <br> <br>Soldering things directly to the chip like that is called a &quot;dead bug&quot; configuration. <br> <br>Maybe that's totally common knowledge, and I'm a dork for not know it, but I laughed hysterically when I heard it A guy at our lab recently was talking to me about an attiny project I was working on and was like &quot;oh, you could deadbug it!&quot; <br> <br>Me: &quot;Deadbug...uhhwhat?&quot; <br> <br>Him: &quot;Deadbug!&quot; <br> <br>And he pulls out a chip with a bunch of components soldered to the bottom. <br> <br>Him: &quot;See, it looks like a dead bug!&quot; <br> <br>:)
Yeah - and this one is a poor dead bug with most of its legs pulled off! ;-)
If you want to do this instructable, and don't have a programmer, check out this awesome project out of MIT's fab lab: <br> <br>http://fab.cba.mit.edu/content/projects/fabisp/ <br> <br>(It's a programmer built on an attiny44 and some passive components. Totally awesome!) <br> <br>Also check out THIS project: <br> <br>http://hlt.media.mit.edu/?p=1229 <br> <br>Which lets you program your attiny directly from your arduino! You don't even need to solder anything. TOTALLY AWESOME!
You are right - I had meant to link to a couple of breadboard programming methods. I'll edit in the morning to link some.
YEESH! These would be expensive! Do you have an ultra-cheap source on attinys? <br> <br>(Because if you do, you should share it with your new best friend, blhack)
60p from Mouser is not too expensive for an Attiny, when a throwie costs about that (if you include a magnet). They make up in extended lifetime what they cost in extra investment! The issue for a UK order is the delivery charge but they drop that on orders over &Acirc;&pound;50. <br> <br>Current cheapest DIP ATTiny45 from Mouser is 43p + VAT (8p) = 51p if you buy 10 or more.
Couldn't you technically make them pulse like Apple computers when they sleep? I would think the AVR is powerful enough
Yes, you can. The attiny85 can do PWM. <br> <br>Source: I have done literally that (emulating my mac's light, ha)
You could do that easily - and with the same hardware I think (PB4 can handle PWM AFAIK) - but I think you would have to keep the AVR awake to do it and that takes several mA overhead. However, if you did a heartbeat then slept for a couple of seconds before the next, you could get a fair lifetime. <br> <br>

About This Instructable




Bio: Call me Ugi. Special offer! Make something based on one of my instructables and post a picture for a free 3-month pro membership (while stocks ... More »
More by Ugifer:Handheld Pong & Invaders on the cheap (Arduino compatible) Kid's Science Project - Reusable Hand Warmers Make a High-Altitude Balloon Tracker (Arduino) 
Add instructable to: