The ATtiny85 microcontroller doesn’t have all that much of anything: 8 KB of flash, an 8-bit architecture, and only eight pins (three of which are taken up with power and reset duties). And that’s exactly what makes it a great fit for tiny little projects.
[Mimile]’s Tea Timer has a switch, a button, eight LEDs, and a buzzer. Flip the switch to “set” and button presses run through the desired steeping times. Flip it to “run” and you’re timing. The LEDs blink and the buzzer plays “Tea for Two” in squawky square waves. Wonderful!
But wait, how to control all of this I/O with just five pins? With one pin each for the two switches and one for the buzzer, that leaves only two pins for the eight LED display. [Mimile]’s fun solution is to use a binary counter (a 74HC393) and the remaining two lines to count and reset. That means toggling a pin very fast 255 times to light up all the LEDs. That’s a bizarre way to go, but we like it!
Hackaday has proven unable to resist the siren song of the ATtiny85. Whether teaching it to swear, to speak I2C, or to transmit analog TV signals, there’s just something about this cute little chip that invites you to test your mettle.
[Robert Nixdorf] frequently needs to use this high-end audio recorder, but it sucks dry a set of eight AA batteries in just a few hours. Obviously a longer lasting solution was required, and he started scouring the web looking for an answer. He bought a Quick Charge power bank and then hacked a Digispark to negotiate with the power bank to provide 12V output to Quick Charge his audio recorder.
Qualcomm’s Quick Charge system is designed to provide increased output voltages to reduce charging time in QC compatible devices such as mobile phones powered by their Snapdragon range of SoC’s. Depending on how the end-point negotiates with the charger, either 5V, 9V or 12V outputs are supported.
You can dig into the details in Qualcomm’s Quick Charge Patent [PDF] which shows how the system works. Quite simply, the voltage provided by the charger depends on the signals set on the D+ and D- data pins during the initial handshaking phase. [Robert] found it easy to get his QC charger to provide the required voltage by using a 3V3 voltage regulator and a resistive divider. But a more permanent solution would be needed if he wanted to use it on the field.
His parts bin revealed a Digispark board and he set about hacking it. He isolated the VUSB from the rest of his board since it would get pulled up to 12V when in use. And then replaced the existing 5V regulator with a 3V3 one. This required several bodges which he has documented on his blog. Some simple code flashed on the ATtiny85 handles all of the handshaking and sets up 12V output to run his audio recorder. A single charge on the power bank now lasts him almost 12 hours, so he’s pretty satisfied with the hack.
Quick Charge is currently at version 4 and supports USB-C and USB-PD hardware such as cables and connectors. But it seems using USB-C hardware outside of the current USB-C specifications is deprecated, with reports suggesting Google is asking OEM’s not to use Quick Charge but stick to USB-PD. Let’s hope this gets settled one way or another soon.
Thanks, [Frank] for the tip.
Proper documentation is important, and when traveling it is commonly achieved via photography. Redundant documentation is often inefficient, and the Camera Restricta — in a commentary on the saturation of photographed landmarks and a recent debate on photographic censorship in the EU — aims to challenge the photographer into taking unique photographs.
Camera Restricta has a 3D-printed body, housing a smartphone for gps data, display and audio output, while an ATTiny85 serves to control the interdicting function of the camera. When the user sets up to take a picture using Camera Restricta, an app running on the phone queries a node.js server that trawls Flikr and Panoramio for geotagged photos of the local area. From that information, the camera outputs a clicking audio relative to the number of photos taken and — if there are over a certain number of pictures of the area — the screen trips a photocell connected to the ATTiny 85 board, retracting the shutter button and locking down the viewfinder until you find a more original subject to photograph.
Continue reading “Camera Restricta Ensures Original Photography”
Turning an Arduino of virtually any sort into a simple AVR 6-pin ISP programmer is old hat. But when Atmel came out with a series of really tiny AVR chips, the ATtiny10 and friends with only six pins total, they needed a new programming standard. Enter TPI (tiny programming interface), and exit all of your previously useful DIY AVR programmers.
[Kimio Kosaka] wrote a dual-purpose TPI and ISP firmware for the ATmegaxxUn chips that are used as a USB-serial bridge on the Unos, and constitute the only chip on board a Leonardo or Micro. The catch? You’re going to have to do a little bit of fine-pitch soldering. Specifically, [Kosaka-san] wants you to get access to an otherwise obscured signal by drilling out a via. We’d do it just for that alone.
Continue reading “USB Arduino into AVR TPI Programmer”
How much game can you get out of a chip with only 1 kB of flash memory and (five or) six free GPIOs? Well, you can get it to play the classic memory game, Simon. [Vojtak] is submitting this project for the 1 kB Challenge, but it looks like it’s already been used to teach simple microcontrollering to teenagers as well, so the code is actually straightforward to read, but full of nice features.
Neat tricks include sharing button-press sensing and LED driving on the same pin, which was necessary to make everything work on such a small chip. A simple linear-congruential pseudorandom sequence provides the variation, and it’s seeded by slow-clock/fast-clock timing jitter, so you’re probably not going to see the same sequence twice. (It’s not the best random number generator ever, but it’ll do.) If that weren’t enough, high scores (and the random seed for the game) are saved to EEPROM so that you can brag to your friends or re-live your previous moments of glory.
The board is easily solderable together as well. This is a fantastic beginner project, with details in the code that everyone can learn from. It’s a great game, and a great demonstration of what you can do with a dollar’s worth of parts and 1 kB of code.
Continue reading “Tiny Game of Simon on an ATtiny13”
Ever have trouble justifying your hacking to anyone from another generation? [Domen] presented his mother with a custom-made device that monitors the milk temperature as it boils on the stove, preventing boil-over. And he made the device robust, simple to use, and foolproof. To his mom, it must look like he’s a wizard — able to conjure up home electronics out of solder smoke and some plywood.
Of course, we know better. Inside his gadget is a simple temperature sensor, an ATtiny841, a very nice home-made PCB, a buzzer, an LCD, and some pushbuttons. [Domen] rubbed together a few pre-existing libraries, and had a working prototype inside a nice wooden box on the quick. It’s a simple hack, but imagine how this must look to a muggle. For the detailed incantations, check out [Domen]’s GitHub for the project.
Continue reading “Hacking Together a Temperature Sensor for Boiling Milk”
We love it when someone takes inspiration from one of our posts and comes up with their own twist on it. [Matthew] liked one builds he saw on Hackaday so much, he built his own LED desktop Xmas tree!
[Matthew] was inspired by [designer2k2]’s DIY desktop Xmas tree that was posted in October. To get started, he found a set of concentric WS2812 rings over on Ali Express. The five rings total 93 LEDs, plus a single WS2812 for the top of the tree. He also got a laser cut tree model from Thingiverse and had it cut, combining the LED rings with the tree in the final product
The whole thing running on a Digispark USB Development Board from DigiStump, the same as the original project. There aren’t many details in the video, but [Matthew] has put links to where he got the rings and the tree, the laser cutting service, a link to the DigiStump website as well as a link to [designer2k2]’s original tree project. There’s no source code yet, but [Matthew] says a link to it is coming along with some more pictures.
Continue reading “Another Desktop LED Xmas Tree!”