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.

34 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. 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?

    3. Sadly the regular ‘Arduino no good’ mentality.
      Speed? how fast do you want yr stepper to turn?
      efficiency? I just checked the assembler program and my ‘Arduino’program that I program into an Attiny13 is a lot smaller, ergo, more efficient.
      Economy? whatever that may mean in this context.

      But please go ahead with a 260 line assembler program, what an Arduino IDE program does in less than 70.
      Ah right… efficiency

  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. 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. 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. 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.

  6. 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.

  7. 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?)

  8. 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 to SnoboundCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.