ATtiny85 555 timer replacement

Meaningful discussion outside of the potato gun realm. Projects, theories, current events. Non-productive discussion will be locked.
PVC Arsenal 17
Staff Sergeant 3
Staff Sergeant 3
Posts: 1762
Joined: Mon Mar 27, 2006 4:18 pm
Location: United States

Wed Sep 07, 2011 3:45 pm

Several people on this forum (including myself) have either asked about or built something using the 555 Timer IC. The timer is cheap and there are many schematics available online to help with most applications. But for those (also including myself) who are put off by the extra components and wiring necessary for such circuits, this may be of interest.

Here is the ATtiny85, a very small yet functional microcontroller available as a familiar 8-pin DIP.

It can easily be programmed with an Arduino or Arduino clone using the free Arduino IDE and the instructions provided here. (Awesome site)

For those who already have Arduinos, using this micro should cost <$3. It has far more functionality than the 555 and it can be customized in code rather than through manipulation of components.

If you're looking for a bare minimum micro with some great potential, this is it. I just ordered 10 @ $1.39ea to be used in MilSim grenades. (Press a button and a buzzer goes off 3 seconds later.) They would also work well for pulsing a solenoid on a full-auto gun.

Hopefully this helps someone. I was ecstatic when I came across the HLT page because previously these little micros weren't worth the effort of programming.
User avatar
ramses
Staff Sergeant 2
Staff Sergeant 2
United States of America
Posts: 1679
Joined: Thu May 29, 2008 6:50 pm

Wed Sep 07, 2011 4:02 pm

It's kind of sad when it's more cost effective to use a microcontroller than to use an IC with a few comparators on it. But nice find!

Do you have to write to the port register, or does the standard digitalWrite() work?
POLAND_SPUD wrote:even if there was no link I'd know it's a bot because of female name :D
PVC Arsenal 17
Staff Sergeant 3
Staff Sergeant 3
Posts: 1762
Joined: Mon Mar 27, 2006 4:18 pm
Location: United States

Wed Sep 07, 2011 4:05 pm

digitalWrite() will work.
User avatar
Technician1002
Captain
Captain
Posts: 5189
Joined: Sat Apr 04, 2009 11:10 am

Wed Sep 07, 2011 5:55 pm

Depending on where you buy parts and the quantity, the 555 timer can be purchased much cheaper. 13 cents cheap enough? I use enough to buy in bulk.
http://www.taydaelectronics.com/servlet ... mer/Detail
PVC Arsenal 17
Staff Sergeant 3
Staff Sergeant 3
Posts: 1762
Joined: Mon Mar 27, 2006 4:18 pm
Location: United States

Wed Sep 07, 2011 6:05 pm

Cheap no doubt, but I don't think many people [who have Arduinos] would mind spending a dollar more for extra functionality. Keep in mind that you still need some resistors and caps to achieve delays with the 555. The ATtiny can do all that and more with a bit of code... heavily simplified by the Arduino libraries. Imagine reading a 10k pot and then using the map function to set the RoF on an electropneumatic gun. It's almost too easy. 8)

Of course, all of the above statements are a mask for my ineptitude with electrical systems. I'm part of the lazy generation I suppose. :wink:
User avatar
Technician1002
Captain
Captain
Posts: 5189
Joined: Sat Apr 04, 2009 11:10 am

Wed Sep 07, 2011 6:28 pm

Image

For pure simplicity, two resisters and a cap are simple. One can be a pot. A 555 does not require a regulated 5 volt supply.

The processor has a much more limited voltage range.
Operating Voltage
– 1.8 - 5.5V for ATtiny25V/45V/85V
– 2.7 - 5.5V for ATtiny25/45/85
The 555 will run fine on 5v, 4AA batteries, a 9 volt, or a 12 volt battery.

The processor has an internal reference clock. This is nice.
PVC Arsenal 17
Staff Sergeant 3
Staff Sergeant 3
Posts: 1762
Joined: Mon Mar 27, 2006 4:18 pm
Location: United States

Wed Sep 14, 2011 11:47 am

Turns out I got my ATtiny's for free. I'm looking forward to programming them to operate a rotary breech mechanism in my latest project. It's too bad I don't have the time to make use of all 10.

Edit: IIRC the ATtiny should run fine off 2 AA's. It doesn't need to be regulated.
User avatar
Technician1002
Captain
Captain
Posts: 5189
Joined: Sat Apr 04, 2009 11:10 am

Wed Sep 14, 2011 12:03 pm

Hmm.. Sentry bot comes to mind.. PWM for programmed protection zones..

Door..
Window,
Bush,
Flag,
cookie jar,
etc

A fixed camera and programmed strike zones is a possibility for a sentry gun.
PVC Arsenal 17
Staff Sergeant 3
Staff Sergeant 3
Posts: 1762
Joined: Mon Mar 27, 2006 4:18 pm
Location: United States

Wed Sep 14, 2011 12:07 pm

It's a shame the chip can't work directly with the Arduino servo library. I'd have to generate the pulses in my own code or use some external circuitry.
User avatar
ramses
Staff Sergeant 2
Staff Sergeant 2
United States of America
Posts: 1679
Joined: Thu May 29, 2008 6:50 pm

Wed Sep 14, 2011 4:11 pm

You might be able to port the softwareservo library.
POLAND_SPUD wrote:even if there was no link I'd know it's a bot because of female name :D
Post Reply