We recently heard it said of a hacker who pulled off a particularly nice VGA hack on an 8-bit microcontroller: “He knows all the bits, personally.” High praise, indeed. If you want to get on a first-name basis with a ton of transistors, then have a look at [Heinz D]’s Vacation Course in ATtiny13 Assembler (original in German, translated into English by robots here).
But be warned, this isn’t the easy way to learn AVRs. Not content with simply stripping away every layer of abstraction, this month-long “course” in AVR assembly starts off programming the chip initially with just two pushbuttons in its native machine language of high and low voltages. But still, especially if you can get a few assignments done in one sitting, you’re writing in the relative splendor of assembly language and uploading code with a proper programmer before long, because there’s a real limit to how much code one can toggle in before going mad.
There’s a beautiful minimalism to this entirely ground-up approach, and maybe it’s an appropriate starting point for learning how the machine works at its lowest level. At any rate, you’ll be able to lord it over the Arduino crew that you were able to get
blink.ino up and running with just a pair of mechanical contacts and a battery. Real programmers…
And once you’ve mastered AVR assembly language, you can recycle those two buttons to learn I2C or SPI. What other protocols are there that don’t have prohibitive timeouts? What’s the craziest code that you’ve ever entered bit by bit?
There’s nothing wrong with building something just to build it, but there’s something especially satisfying about being able to solve a real-world problem with a piece of gear you’ve designed and fabricated. When all the traditional methods to keep birds from roosting on his mother’s property failed, [MNMakerMan] decided to come up with a more persuasive option: a solar powered spinning owl complete with expandable batons.
We imagine the owl isn’t strictly necessary when you’re whacking the birds with a metal bar to begin with, but it does add a nice touch. Perhaps it will even serve to deter some of the less adventurous birds before they get within clobbering distance, which is probably in their best interest. [MNMakerMan] says the rotation speed of the bars seems low enough that he doesn’t think it will do the birds any physical harm, but it’s still got to be fairly unpleasant.
At first glance you might think that this contraption simply spins when the small 10 watt photovoltaic panel next to it catches the sun, but there’s actually a bit more to it than that. Sure he probably could just have it spin constantly whenever the sun is up, but instead [MNMakerMan] is using a ATtiny85 to control the 11 RPM geared DC motor with a IRF540 MOSFET. By adding a DS3231 RTC module into the mix, he’s able to not only accurately control when the spinner begins and ends its bird-busting shift, but implement timed patterns rather than running it the whole time. All of which can of course be fine-tuned by adjusting a couple variables and reflashing the chip.
We’ve seen plenty of automated systems for keeping cats away, and of course squirrels are a common target for such builds as well, but devices to deter birds are considerably less common among these pages. So it would seem that, at least for now, [MNMakerMan] has the market cornered on solar bird smashing gadgets. We’re sure Mom’s very proud.
Continue reading “Keeping Birds At Bay With An Automated Spinning Owl”
Like most of his work, this tiny two-digit thermometer shows that [David Johnson-Davies] has a knack for projects that make efficient use of hardware. No pin is left unused between the DS18B20 temperature sensor, the surface mount seven-segment LED displays, and the ATtiny84 driving it all. With the temperature flashing every 24 seconds and the unit spending the rest of the time in a deep sleep, a good CR2032 coin cell should power the device for nearly a year. The board itself measures only about an inch square.
You may think that a display that flashes only once every 24 seconds might be difficult to actually read in practice, and you’d be right. [David] found that it was indeed impractical to watch the display, waiting an unknown amount of time to read some briefly-flashed surprise numbers. To solve this problem, the decimal points flash shortly before the temperature appears. This countdown alerts the viewer to an incoming display, at the cost of a virtually negligible increase to the current consumption.
[David]’s project write-up explains how everything functions. He also steps through the different parts of the source code to explain how everything works, including the low power mode. The GitHub repository holds all the source files, and the board can also be ordered direct from OSH Park via their handy shared projects feature.
Low power consumption adds complexity to projects, but the payoffs can easily be worth the time spent implementing them. We covered a detailed look into low power WiFi microcontrollers that is still relevant, and projects like this weather station demonstrate practical low power design work.
[David Johnson-Davies] always wanted an illuminated button matrix for projects, but cost was never very friendly. That all changed when he discovered a cheap source of illuminated pushbuttons on Aliexpress, leading to this DIY 4×4 illuminated button matrix design which communicates over I2C. The button states can be read independently of setting the light pattern, and an optional interrupt signal gets pulled low whenever there is a change detected. Not bad for one PCB plus about $10-worth in components!
The device uses every single pin on an ATtiny88, and because each button gets its own pin the keypresses can be detected with pin-change interrupts. The state reporting of buttons over I2C is unambiguous, even when multiple buttons are pressed simultaneously. A simple protocol provides all the needed functionality, and all connections are brought to the board’s edge to allow for easily tiling multiple panels.
The GitHub repository contains the code and PCB files and [David] helpfully shared the board files to OSH Park and PCBWay for easy ordering. In addition, he provides two demos (Tacoyaki and Tacoyaki+) which are games related to the classic Lights Out to show off the matrix.
Inspiration can come from anywhere. Sometimes it’s just a matter of seeing an interesting part that you want to fiddle around with badly enough that you end up developing a whole idea, and potentially product, around it. That’s how [Bobricius] found himself creating this very slick little warning beacon, and looking at the end result, we think he made the right decision.
The Kingbright DLC-6SRD “jumbo” LED is actually six individual emitters built into a plastic diffuser. Interfacing with the device is simple enough; each LED has its normal anode and cathode leg, all you need to do is power them up. What [Bobricius] has created is a simple PCB design that the DLC-6SRD can plug right into, complete with a 2032 coin cell holder on the opposite side.
Of course, just lighting up all six elements at the same time wouldn’t be very interesting. [Bobricius] is controlling them individually right off of the digital pins of an ATtiny10 with the help of some Charlieplexing. This makes all kinds of interesting patterns possible, and as demonstrated in the video after the break, the current iteration of the project uses some very simple code to “rotate” the LED as if it was the flasher on an emergency vehicle.
The addition of a few blinking LEDs can make a world of difference in terms of nighttime visibility, so a cheap stick-on module that adds such a distinctive light pattern could be a very important safety device. It could also be useful for UAVs, following the FAA’s new rules which would mandate anti-collision lights for night flying.
Continue reading “Jumbo LEDs Make For A Handy ATtiny Beacon”
Most of us are aware that charlieplexing can drive a large number of LEDs from a relatively small number of I/O pins, but [David Johnson-Davies] demonstrates adding another dimension to that method to create individually controlled PWM outputs as well. His ATtiny85 has twelve LEDs, each with individually-set brightness levels, and uses only four of the five I/O pins on the device.
Each LED can be assigned a brightness between 0 (fully off) and 63 (fully on). The PWM is done by using one of the timers in the ATtiny85 to generate a periodic interrupt, and the ISR for the interrupt takes care of setting the necessary ratios of on and off times for each charlieplexed output. The result? Twelve flicker-free LEDs with individually addressable brightness levels, using an 8-pin microcontroller and just a few passive components on a tiny breadboard. There’s even one I/O pin left on the ATtiny85, for accepting commands or reading a sensor.
[David] really wrings a lot out of the ATtiny series of microcontrollers with his compact projects, like his Tiny Function Generator (which recently got an update.) He also demonstrated that while charlieplexing is usually used with LEDs, charlieplexing can be used with switches just as easily.
[Steve Martin] used to do a comedy act about “Let’s get small!” You have to wonder if [Paul Klinger] is a fan of that routine, as he recently completed a very small 3D printed PC that plays snake. Ok, it isn’t really a PC and it isn’t terribly practical, but it is really well executed and would make a great desk conversation piece. You can see the thing in all its diminutive glory in the video below.
The 3D printer turned out a tiny PC case, a monitor, and a joystick. The PC contains an ATtiny1614, an RGB LED, and some fiber optic to look like case lighting. The monitor is really a little OLED screen. A 5-way switch turns into the joystick.
Continue reading “Ultra Tiny PC Plays Snake”