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.
But where’s the Ardui.. oh right, whoops.
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.
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…
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.
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)
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
Actually, I am using a TWI (i2c) bootloader with an ATtiny to save pins. I need the reset pin as a GPIO!
@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.
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?
I’ll chime in on this Arduino Haters thread…
I say, if you have a really cool project, then I could give a flying rats ass how you did it.
Done.
Isn’t the difference between the Arduino and some everyday microcontroller just that newb friendly compiling software?
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
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.
Looking forward to see what people come up with. It’s also nice to see some non-Arduino stuff now and again :)
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
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.
the new definition of “hacking” these days is an electronic design when done by hipsters ;)
because “hacker” sounds way cooler than electronics hobbyist
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.
ok, I got what you mean. I prefer your example over the stepper motor driver in the article.
Sounds like a real hack ;)
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.
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.
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.
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.
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.
Much of the ATtiny range runs at 20MHz, not 16. Also look out for the ones with high frequency PLL driven PWM which can produce quite good sound.
Atmel sells the AVRISP mkII In-System Programmer for $34
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.
well if your stepper requires 12v it will not function as spec if you only give it 6-9V
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.
it has an ULN2003. That has protection diodes built in
Thanks to myself for proposing this subject….
Yes you are the MAN.
You kinda fell off the map there… been busy working a day job like the rest of us?? ;-P
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?)
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.