Announcing our next theme: ATtiny hacks

ATtiny Hacks Theme Banner

It is time once again to announce a new theme. This time around, we have chosen to highlight projects built around the ATtiny series of processors. These are 6 to 32 pin AVR processors that run up to 16 MHz and have anywhere from 512 Bytes of flash with 32 Bytes of RAM to 16K of Flash with 512 bytes of RAM. We’re guessing that this will be a pretty popular theme since so many people are using Atmel processors these days. If you have a project that you would like to see on Hackaday that is using an ATtiny processor, please hit us up on our tip line. If we like it, we may we choose to feature it in one of our daily themed hacks.

To kick off this theme, here is a nice write up about a stepper motor driver based around the ATtiny13. This project reads the analog value on pin B4 and adjusts the speed of the stepper motor. It is well documented and includes source code.

32 thoughts on “Announcing our next theme: ATtiny hacks

  1. I vote for no bootloaders allowed. This should showcase the talent of the designer in both hardware AND software aspects of a build.

    I have no issues with arduinos as art displays and fun hobby projects but I’m an advocate of speed, efficiency, and economy. I sometimes proto with a duino but why throw away the speed and ability to optimize your end project with a bloated development tool?

    Just sayin.

    1. you call it bloated, but you want a specific rule that excludes using it on not that powerful attiny? doesn’t making it work on such platform prove you are wrong in the begin with?

      I guess C should be “banned” too…

    2. Just because the Arduino IDE has shortcuts to make things easy, you don’t have to use them.

      Just because you want to suffer doing things the hard way doesn’t mean we all do.

    3. Wat? Bootloaders and the Arduino IDE are two different things.

      If someone can manage a usable bootloader on an ATTiny, I want to see it! Of course, it would be even more impressive if they manage it over a PHY other than serial (i.e. see Audioino)

      1. i was able to put USBAspLoader on attiny2313. There wasn’t much space left on the device thought, especially if you get floating point routines addedd when including delay.h

      2. @Ni: If you get floating point stuff from delay, you’re compiling it wrong. The delay routines specifically require you to turn optimizations on, and I’d suggest -Os to optimize for size.

    4. What about making the Arduino IDE work with chips that it is not intended for…isn’t that hacking in itself?

      I really don’t care how they get it done as long as they get it done…if you only need a chip 1/10 as fast but you are using an ATTiny45 because it is cheaper than a chip 1/10 as fast, who cares if the code is only 50% efficient?

  2. Bravo!
    I love playing with these thing. Th little ones like the ATtiny 13 can be had for <$1 and you can do a little or a lot with them depending on your need. I built a simple flasher to simulate an alarm system w/ an ATtiny 13, an LED and a wallwart from a defunct phone. Granted a small task for a RISC computer but, from my point of view it was a solution for under a dollar that has worked non stop for 3 years.

  3. Hah, maybe i’ll finally figure out how to program that darn tiny13 on a STK500. That method posted everywhere, where you have to stick jumper wires all around the board while having a finger up your nose and pushing a button at the same time seems not to work for me :D

  4. Sorry but I don’t get the “hack factor” in designing a device with a defined µc.
    I do this all year long as a job and it’s not considered hacking by my boss.
    It’s simply electronic design.

    1. the new definition of “hacking” these days is an electronic design when done by hipsters ;)

      because “hacker” sounds way cooler than electronics hobbyist

    2. I took it to mean using an attiny as a means of hacking something else.

      For example, I hacked a guitar effects pedal to control my camera’s shutter and I used an attiny to control the interface between the effects pedal and my camera.

  5. I like this theme :) I’ve been playing with some attiny’s for about a year now and really enjoy what I’ve been doing with them.

  6. Anyone know a good but decently cheap pic programming hardware that works well? I gotta work with the WAF (Wife allowed Funds) so the idea of getting a programmer, but the only ones i know of are for production lines and are a bit pricey for a hobby piece for me.

    1. there’s a pickit2 clone available on the web for less than 30 bucks and even cheaper if you build it yourself. Did it and it works fine for most pics.

      1. And if anyone complains about 30 (or even 50 for an official pickit3), think about what you are paying for the processors. About a quarter each, a dollar for the more powerful ones.

        If you can do serial programming the programmers are dirt cheap if you build them yourself.

      2. It’s also worth bearing in mind that a PICkit 2 or 3 will not just program PICs, but can also act as an in-circuit debugger – an extremely valuable feature that very cheap programmers will miss out.

  7. I’ve had trouble with this setup (using an MSP430 instead of AVR), albeit at lower voltage (6-9V instead of 12). I don’t know why, but I had to write microstepping code to get usable low speed torque. Anyone have a possible explanation?

    Other than that, this circuit is missing some of the basic protection diodes required for driving higher power motors, but it works if you set reasonable goals and is about as cheap and simple as you could hope for.

    1. I’m also playing with microstepping and low voltages (5V and down) and I have to admit that it must be just that some steppers (and their loads) just don’t lend themselves to microstepping. I am trying to do 1/8th step and what happens is that the motor just sits there for 7/8th of the cycle and then suddenly jumps on the last 1/8th. Messes up any hope for synchronisation (it’s a CNC setup, so two or three of these motors doing this create a complete chaos). I cannot even make it half step (with a chopper driver tho, so even 1/2 step is not full power). Anyhow, I think to remedy that you have to get a bigger motor or lower the load or use one with more steps per revolution.

  8. my 2c on the whole to Arduino or not to Arduino debate.

    if you argue it makes it too easy and people should use “proper” micros then you can argue that micros is to easy and you should use ttl logic and you can go all the way back to the first computer. Arduino’s is just the latest iteration of an age old argument.
    Each previous generation hates the next because
    its too easy ,but is that not the point of improvements of technology to make a said task easier?

    Remember this is Hackaday, not some highly theoretical site about how it should be done using only “approved” hardware.
    Most of the hacks of interest is not so much about the how but its about the why.It’s pointless if you program a micro to keep time accurate to 1nS if you do not have much application for it or is just gonna blink an led(except for a few bragging points).

    just my 2c, do with it what you will.(maybey I s hould use a dictionary instead of firefoxs spell cheacker?)

  9. Yeah! I bought a bunch of those a while back. Looking for some inspiration!

    You can use an arduino as a programmer. If I recall… the sketch was flaky (or maybe it was avrdude). You run it once, it fails. You run it again, it works. Just keep trying. You gotta watch how you set your fuse bits, because if you mess up, it is impossible to reset them if you’re using an arduino as a programmer. There’s a website that you tell it what you want to set and it will give you the correct arguments for avrdude.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s