Search for accurate ATtiny in Topics


ATTINY As A Clock?

Will using time library with an Attiny/45/85/84 ( http://playground.arduino.cc/Code/Time ) create an accurate clock? I keep on seeing people using these external crystal things. Do I need one? Isn't millis pretty dang accurate? How would I sync the clock with real time?

Topic by HavocRC    |  last reply


How to get an ATtiny to run an accurate clock? Answered

I'm making a clock with an ATtiny and I would like to know how to make it tell accurate time. I'm already pretty sure it would require an external crystal or resonator, but I just don't know the frequency or if there are any code requirements. I'll be programming the chip with an Arduino, if that helps with code. Thanks!

Question by GenAap    |  last reply


I'm having unknown issues getting an ultrasonic cleaner hack to function properly - send an electrical engineer.

I'm hacking a cheap ultrasonic cleaner to run for an indefinite period of time instead of 8 minutes max. It works well enough with a switch soldered directly onto the main board, but I intend to leave it for hours and I can't have the thing burning out so I've got an attiny85 running as a simple timer (can't get a 555 running accurately for the periods I need). The ultrasonic transducer is controlled through a transistor and relay which I'm using to my advantage. I've got it hooked up to the built in 5v supply through a switch on the ground and flip the attiny pin tied to the transistor high. Really it's all tied  right to the brain board connector for convenience. It only sort of works. I've tested the attiny to death so I know the code works, it's just the arduino blink program with numbers changed. When I flip the switch, it supplies power to the attiny and I hear a transformer buzz and the xducer fails to turn on. The screen doesn't dim any which I'd expect from being underpowered. When I hit the machine's on button it does turn on and when I hit the off button or let the time run out the machine stays on (small success). Once the timer cycles though it won't turn back on, which functionally makes it like I've added a 25 minute timer. I suspect it may be something to do with not enough current to get the transistor started, but enough to keep it conducting. Perhaps if I connect the attiny directly to the base of the transistor instead of through the 10K resistor on the main board it'll work properly. Then again I know basically nothing about what I'm doing and should feel lucky that I managed to hack it this far without electrocuting myself. Update: It get's weirder. I stuck a 20k pot on the output of the attiny and hooked it directly onto the base of the transistor, bypassing a 10k resistor, and it runs constantly regardless of the inputs. I hook it up before the resistor and the behavior remains as before.

Question by The Ideanator    |  last reply