A simple, self-contained 7-segment display

posted Jan 24th 2012 6:01am by
filed under: arduino hacks, ATtiny hacks

self-contained-7-seg

It’s no secret that seven-segment displays are an easy and useful way to relay data, so [Kelvyn Panici] decided to put together a minimalst, self-contained display for use around the house.

The display itself is a 16-digit model he picked up from DealExtreme for under $10. He wanted to find a microcontroller small enough to fit behind the display’s footprint, so he chose an ATtiny85 to control it. After mounting the mcu on a small piece of perfboard, he burned the Arduino bootloader and uploaded a small sketch to drive the display.

Things worked out quite well as you can see by the video below where he shows off a pre-perfboard prototype. [Kelvyn] currently does not have any immediate projects in the works that will utilize the display, though there are a plethora of possibilities. We think it would work great anywhere if it were fitted with a battery and some sort of wireless radio in order to make it completely self-contained.

Read the rest of this entry »

Adjustable rapid fire for Xbox 360 controller

posted Jan 11th 2012 4:32pm by
filed under: peripherals hacks

[Shawn] wrote in to share his post outlining the addition of rapid fire to an Xbox 360 controller. He’s going all out with this mod by including a pretty beefy microcontroller. But you get a lot of functionality for that. You can just make out the trimpot below and to the right of the green A button. This tweaks the speed at which your right trigger repeats. Next to the trimmer is an amber LED which indicates whether the hack is enabled or not. The switch to the left of the D-pad simply patches the add-on circuit into the right trigger hardware.

Some might raise an eyebrow when we call the ATtiny85 used here beefy. But considering the job at hand, we’re sure a lot of the lower end of the ATtiny family will work just as well. [Shawn] soldered everything up on a piece of protoboard and removed one of the rumble motors to make room inside the controller. The video after the break is pretty shaky and out of focus, but you can clearly hear him explain how the hack works.

If you’re looking for a rapid fire mod that doesn’t require programming a chip, perhaps you could just repurpose the PWM from the LED. Read the rest of this entry »




Building an EEPROM programmer

posted Jan 11th 2012 12:01pm by
filed under: Microcontrollers, pcs hacks

Behold this ATtiny85 based EEPROM programmer. It seems like a roundabout way of doing things, but [Quinn Dunki] wanted to build to her specifications using tools she had on hand. What she came up with is an ATtinyISP USB programmer, pushing data to an ATtiny85, which then programs an EEPROM chip with said data.

The hardware is the next module for her Veronica 6502 computer build. When we last saw that project [Quinn] was planning to add persistent storage for the operating firmware. This will be in the form of an EEPROM programmed with this device. Using ISP and an ATtiny as a go-between means that she should have no problems reflashing the OS without removing the chip. But it all depends on how she designs the interface.

For example, she blew a whole bunch of time troubleshooting the device because garbage data was being written to the chip. In the end, having her manual bus programmer hooked up during the flashing operation was the culprit. Lesson learned, it’s onward and upward with the build.

We’ve been featuring [Quinn's] projects a lot lately. That’s in part because they’re really interesting, but also because she does such a great job of documenting her experience.

Musical greeting card with minimal parts

posted Nov 22nd 2011 6:01am by
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 »

TV-B-Gone can double as a camera remote control

posted Nov 3rd 2011 11:01am by
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.




N64 controller input using an ATtiny85

posted Oct 13th 2011 3:35pm by
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.

Building a battery-powered motion alarm

posted Sep 27th 2011 7:02am by
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.

ATtiny Hacks: ATtiny45/85 servo library

posted Sep 25th 2011 4:00am by
filed under: Microcontrollers

ATtiny Hacks Theme Banner

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?




Hack a Day serves up fresh hacks each day, every day from around the web as well as hacking related news.

Send us your hacks










     




Hacks

Resources