posted Nov 22nd 2011 6:01am by
Brian Benchoff
filed under:
ATtiny hacks,
digital audio hacks

We’re all familiar with those musical greeting cards. Give the Hallmark store $10, and you have a card with a microcontroller inside that plays one of several songs available. [Jarv] was playing around with translating MIDI tracks to square wave songs with an Arduino earlier, so he decided to see how cheaply he could reproduce these musical cards. The resulting build allows him to put any song he wants in his card and costs less than the Hallmark offering.
The circuit is extremely minimal – just an ATtiny 85, a battery holder, and two piezo speakers for two-voice harmony. After soldering up the battery and speakers, [Jarv] needed a way to get music on his chip. For this, he used MuseScore, a music notation program that allows [Jarv] to merge multiple voices together.
Once the sheet music was cleaned up, [Jarv] used his XML2H Python script that takes MIDI data and spits out frequencies and delays. In the end, [Jarv] spent less than $5 on his greeting card – almost cheap enough to start thinking about musical throwies to complement the batteries, LEDs and magnets on our window flashing.
Check out the video after the break to hear [Jarv]‘s circuit play the theme from Toy Story.
Read the rest of this entry »
posted Nov 3rd 2011 11:01am by
Mike Szczys
filed under:
digital cameras hacks,
Microcontrollers

[Christopher] found a way to get a bit more mileage out of his TV-B-Gone kit. The little device is intended to turn off every television in range with the push of a button. But at its core it’s really just a microcontroller connected to some infrared LEDs. Instead of sending codes to shut of televisions, you can rewrite the firmware to send a camera remote shutter release code.
It doesn’t take too much to pull this off. You need a way to flash new firmware to the device, and you need to know the new code timing that you want to send. Since the firmware is open source it’s easy enough to make code changes, and there are several easy methods of flashing AVR devices (like the tiny85 used here), including using an Arduino as an ISP.
But [Christopher] did more than just add the Nikon code for his camera. He realized that there’s a jumper to select between European or American television codes. Since he wasn’t using the foreign option, he replace that pin header with a switch that selects between normal TV-B-Gone operation and camera shutter release modes. Nice.
posted Oct 13th 2011 3:35pm by
Mike Szczys
filed under:
Microcontrollers

[Larsim] worked out the timing necessary to read button and joystick data from an N64 controller using an ATtiny85 microcontroller. The project was spawned when he found this pair of controllers in the dumpster. We often intercept great stuff bound for the landfill, especially on Hippie Christmas when all the student switch apartments at the same time.
Instead of cracking the controllers open and patching directly to the buttons, [Larsim] looked up the pinout of the connector and patched into the serial data wire. In true hacker fashion, he used two 5V linear regulators and a diode in series to step his voltage source down to close to 3.6V, as he didn’t have a variable regulator on hand. It does sound like this causes noise which can result if false readings, but that can be fixed with the next parts order.
The controller waits for a polling signal before echoing back a response in which button data is embedded. This process is extremely quick, and without a crystal on hand, the chip needs to be configured to use its internal PLL to ramp the R/C oscillator up to 16Mhz. With the chip now running fast enough, an external interrupt reads the serial response from the controller, and the code reacts based on that input.
It seems the biggest reason these N64 controllers hit the trash can is because the analog joystick wears out. If you’ve got mad skills you can replace it with a different type.
posted Sep 27th 2011 7:02am by
Mike Szczys
filed under:
Microcontrollers

[Brad] was asked by his Sister to design a motion-based alarm that would help her catch her son sneaking out of the house at night. Obviously this didn’t need to be a long-term installation so he decided to throw something together that is only active at night and can be battery-powered. What he came up with is a light-sensitive motion sensor that uses very little power.
He knew that an Arduino would be overkill, and decided to try his hand at using the Arduino to develop code for an ATtiny85. It has an external interrupt pin connected to the output of the PIR module, which triggers action when motion is detected. The first thing it does is to check the photoresistor via the ADC. If light levels are low enough, the buzzer will be sounded. [Brad] measured the current consumption of his circuit and was not happy to find it draws about 2.5 mA at idle. He spent some time teaching himself about the sleep functions of the AVR chips and was able reduce that to about 500-600 uA when in sleep mode. Now all he has to do is find a nice place behind the house to mount the alarm and there’ll be no more sneaking around at night.
If you’re trying to keep a tight leash on your own kids you could always make them punch the time clock.
posted Sep 25th 2011 4:00am by
Mike Szczys
filed under:
Microcontrollers


Servo8bit is a library for AVR microcontrollers that allows you to drive servo motors without the need for a 16-bit timer. Obviously, this is quite useful for smaller chips that only have 8-bit timers and it is specifically targeted at the ATtiny45 and ATtiny85 microcontrollers. The library offers 256 steps of resolution, and can drive up to five servos at one time. Servo control pulses can be generated between 512 and 2560 microseconds and if you don’t mind increasing the time between these pulses [Liya] says it would be possible to increase the 5-servo limit.
The library is quite easy to use, but in its current state it would take just a bit of work to port to another device. It’s been written for an 8 Mhz clock signal with PortB used to drive the motors. Using find-and-replace to change the PORTB keywords to use a DEFINE variable should be easy enough, but we don’t know how hard it would be to change the clock frequency.
We wonder if it’s possible to make this a slave device, perhaps implementing a 1-wire protocol?
posted Sep 15th 2011 6:01am by
Mike Nathan
filed under:
ATtiny hacks,
cellphones hacks


[John Thomson] usually keeps his phone on vibrate when it’s in his pocket, and he often forgets to turn the ringer back on when setting it down to charge. This typically results in a bunch of missed calls in the meantime, so he had to devise a way to counteract his forgetfulness.
You might remember [John] from the Santa-pede contest we held last December. He wanted to try his hand at yet another competition, the Avnet Dog Days of Summer contest, so he scrambled to come up with a quick fix for his situation. He concocted a simple circuit based on [ChaN’s] design for a “Simple SD Audio Player with an 8-pin IC” that would alert him to incoming calls, even when his phone was on vibrate.
[John] used an ATtiny85, just as [ChaN] did, adding a speaker for sound output and a piezo sensor to detect his phone’s vibrations. When the piezo senses a bit of motion, the audio player kicks in, blaring a series of sounds that are sure to get [John’s] attention.
posted Aug 29th 2011 3:14pm by
Mike Szczys
filed under:
digital audio hacks

This naked speaker is the basis for [MaoMakMaa's] newest project called the Wavedrone. He plans on using the autonomous and cable-less device during street performances. You can hear the effect of some stretched jazz cords being played on it in the video clip after the break. The sound is kind of an ethereal background noise that observers might not immediately realize is there.
You can see the 9V battery which serves as the power source clinging to the frame of the speaker. A 7805 linear regulator tames that battery and feeds the two IC’s on the circuit board seen to the right. The ATtiny85 is reading music from an SD card and playing it back in mono (obviously) with the help of an LM386 audio amplifier chip. The trimpots that go into the high pass and low pass filters in between the microcontroller and amplifier allow for a bit of sound manipulation, but we’re more impressed with the quality of the sound this is getting when properly trimmed.
Read the rest of this entry »
posted Jul 26th 2011 3:22pm by
Mike Szczys
filed under:
digital audio hacks

Bigtime is a simple way to create an auxiliary display for the Beat707 MIDI controller. The right half of the display shows the beat pattern that the drum machine is using, while the left half keeps track of the current measure.
Just a few components went into the extra hardware. A four-digit seven segment display is fed data from an ATtiny85. Since that microcontroller has only eight pins, a 595 shift register and CD4067 take care of translating serial data into the outputs necessary to light the display. The entire thing connects to the Beat707′s I2C bus, which means you don’t need to make hardware alterations to the original, and this leaves plenty of room for more addons.
The code package includes a Fritzing file, but for your convenience we’ve embedded a PNG of the hardware connections after the break. You’ll also find the demo video where [Guilherme] explains how this works.
Read the rest of this entry »