[Mastro Gippo] hit Shenzhen back in April and organized a challenge for himself: could he develop an electronic device from idea to product in only 24 hours? The result is the Grillino, a simple clone of the Annoy-a-Tron: a small, concealable device that makes chirping sounds at random intervals. It’s name was derived from a mix of the Italian word for a cricket—”grillo”—and, of course, “Arduino.”
Shenzhen was the perfect setting for his experiment, especially because [Mastro Gippo] was in town for the Hacker Camp we mentioned a few months ago. The build is pretty simple, requiring only a microcontroller, a battery, and a piezo speaker. What follows is a detailed journey of dizzying speed through the production process, from bags stuffed full of components, to 3D-printing a test jig, to searching for a PCB manufacturer that could fulfill his order overnight. Video and more below.
Continue reading “Developing the Grillino in 24 Hours”
When [Robert] is presented with a challenge, he doesn’t back down. His friend dreamed of reusing some old LED panels by mounting them to the ceiling of the friend’s night club. Each panel consists of a grid of five by five red, green, and blue LEDs for a total of 75 LEDs per panel. It sounded like a relatively simple task but there were a few caveats. First, the controller box that came with the panels could only handle 16 panels and the friend wanted to control 24 of them. Second, the only input device for the controller was an infrared remote. The friend wanted an easy way for DJ’s to control the color of the panels and the infrared remote was not going to cut it. Oh yea, he also gave [Robert] just three weeks to make this happen.
[Robert] started out by building a circuit that could be duplicated to control each panel. The brain of this circuit is an ATtiny2313. For communication between panels, [Robert] chose to go with the DMX protocol. This was a good choice considering DMX is commonly used to control stage lighting effects. The SN75176 IC was chosen to handle this communication. In his haste to get this PCB manufactured [Robert] failed to realize that the LED panels were designed common cathode, as opposed to his 25 shiny new PCB’s which were designed to work with a common anode design. To remedy this, he switched out all of the n-channel MOSFET with p-channel MOSFET. He also spent a couple of hours manually cutting through traces and rewiring the board. After all of this, he discovered yet another problem. The LED’s were being powered from the same 5V source as the microcontroller. This lead to power supply issues resulting in the ATtiny constantly resetting. The solution was to add some capacitors.
Click past the break for more on [Robert’s] LED panels.
Continue reading “Custom Electronics and LED Panels Brighten Up a Nightclub”
If you’ve written a great library to generate random numbers with a microcontroller, what’s the first thing you would do? Build an electronic pair of dice, of course.
[Walter] created the entropy library for AVRs for a reliable source of true random numbers. It works by using the watchdog timer’s natural jitter; not fast by any means but most sources of entropy aren’t that fast anyway. By sampling a whole lot of AVR chips and doing a few statistical tests, it turns out this library is actually a pretty good source of randomness, at least as good as a pair of dice.
The circuit itself uses two 8×8 LED matrices from Adafruit, an Arduino, and a pair of buttons. The supported modes are 2d6, 2d4, 2d8, 2d10, 1d12, 1d20, a deck of cards, a single hex number, a single 8-bit binary number, or an eight character alphanumeric password. It’s more than enough for D&D or when you really need an unguessable password. Video demo below.
Continue reading “The Most Random Electronic Dice Yet”
Deep in the Colorado foothills, there are two radio transmitters that control the time on millions of clocks all across North America. It’s WWVB, the NIST time signal radio station that sends the time from several atomic clocks over the airwaves to radio controlled clocks across the continent. You might think replicating a 70 kW, multi-million dollar radio transmitter to set your own clock might be out of reach, but with a single ATtiny45, just about everything is possible.
Even though WWVB has enough power to set clocks in LA, New York, and the far reaches of Canada, even a pitifully underpowered transmitter – such as a microcontroller with a long wire attached to a pin PWMing at 60kHz – will be more than enough to overpower the official signal and set a custom time on a WWVB-controlled clock. This signal must be modulated, of course, and the most common radio controlled clocks use an extremely simple amplitude modulation that can be easily replicated by changing the duty cycle of the carrier. After that, it’s a simple matter of encoding the time signal.
The end result of this build is an extremely small one-chip device that can change the time of any remote-controlled clock. We can guess this would be useful if your radio controlled clock isn’t receiving a signal for some reason, but the fact that April 1st is just a few days away gives us a much, much better idea.
Atmel’s ATtiny10 is their smallest microcontroller in terms of physical size – it’s an SOT-23-6 package, or about the same size as surface mount transistors. The hardware inside this extremely bare-bones; three I/O lines, 1kB of Flash, 32 bytes of RAM, and a reduced AVR core with 16 registers instead of 32. With such a minimal feature set, you would think the only thing this micro would be good for is blinking a LED. You’d be right, but [cpldcpu] can blink a LED with the ‘tiny10 over USB.
The V-USB interface usually requires about 1.5kB of Flash in its most minimal implementation, and uses 50 bytes of RAM. This just wouldn’t do for the ‘tiny10, and although [cpldcpu] is working on a smaller, interrupt-free V-USB, there were still some hurdles to overcome.
The biggest issue with putting code on the ‘tiny10 is its reduced AVR core – on the ‘big’ 32-register core, direct memory access is two words. On the ’10, it’s only one word. AVR-GCC doesn’t know this, and no one at Atmel seems to care. [cpldcpu] worked around this problem using defines, and further reduced the code size by completely gutting V-USB and putting it in the main loop.
It’s not much, but now [cpldcpu] can blink an LED with a ‘tiny10 over USB. If you’re wondering, 96.4% of the Flash and 93.8% of the SRAM was used for this project.
[Tim’s] new version of Micronucleus, Micronucleus 2.0, improves upon V-USB by removing the need for interrupts. The original Micronucleus was a very small implementation of V-USB that took up only 2KB. Removing the need for interrupts is a big leap forward for V-USB.
For those of you that do not know, “V-USB is a software-only implementation of a low-speed USB device for Atmel’s AVR® microcontrollers, making it possible to build USB hardware with almost any AVR® microcontroller, not requiring any additional chip.” One tricky aspect of using V-USB is that the bootloader requires interrupts, which can lead to messy problems within the user program. By removing the need for interrupts, Micronucleus 2.0 reduces the complexity of the bootloader by removing the need to patch the interrupt vector for the user program.
With the added benefit of speeding up the V-USB data transmission, Micronucleus 2.0 is very exciting for those minimal embedded platforms based on V-USB. Go ahead and try out Micronucleus 2.0! Leave a comment and let us know what you think.
We don’t know if this will come as a surprise to the regular Hackaday reader, but a whole bunch of Atmel microcontrollers have a very cool feature hidden away in their datasheets. Most of them – everything from the ATMega 168, 328, 32u4, to the ATtiny85 and 84 have a temperature sensor right on the chip. [Connor] did a little bit of research on this sensor and came up with a little bit of code that spits out the core temperature of these Atmel chips over the serial port.
The temperature sensor on these Atmel chips is accessed by writing a code – ‘100111’ for the Mega32u4 and ‘100010’ for the tiny84, for example – into the ADMUX register on the chip. According to the datasheet, the returned temperature is accurate to +- 10°C, but that can be easily calibrated by holding an ice cube (in a plastic bag, of course) up to the chip.
With a little more code, [Connor] is able to output the temperature of the microcontroller core over a serial port. In testing, his chip started out at 20°C and reached equilibrium at 24°C after about a minute. Pretty neat, and could be used as a temperature sensor for a project in a pinch.