Infrared-controlled Light Switch

If you’re looking for your first electronics project, or a project to get someone else started in electronics, [Vadim] has you covered. Back when he was first starting out in electronics he built this infrared-controlled light switch that works with a standard TV remote control.

[Vadim]’s first few projects ended up as parts for other projects after they were built, so he wanted to build something useful that wouldn’t ultimately end up back in the parts drawer. The other requirements for the project were to use a microcontroller and to keep it simple. [Vadim] chose an ATtiny2313 to handle the RC-5 IR protocol and switch the light.

The circuit still has a switch to manually control the lights, preserving the original functionality of the light switch. The rest of the design includes a header for programming the board and another header for tying into the high voltage lines. This is a great project for anyone who knows what they’re doing with mains power but is just getting started with microcontrollers. If properly designed and implemented you’ll never stumble across a room to turn the lights out again!

Perhaps mixing high and low voltages on the same circuit board doesn’t spark your fancy or you can’t modify the light switch in your place of residence? Check out this mechanically-switched light switch.

 

An Improvised ATtiny2313 Logic Analyzer

2313logic

After banging his head against a wall trying to get a PS/2 interface to work, [Joonas] decided he needed a dedicated logic analyzer. He didn’t need anything fancy; writing bits to a serial port would do. He came up with a very, very simple ATtiny2313-based logic analyzer that can capture at 50+ kHz, more than enough for a PS/2 port.

The hardware for [Joonas’] build is a simple ATtiny2313 breadboard adapter, an FTDI Friend, and not much else. The 2313 has eight input ports on one side of the chip, making attaching the right logic line to the right port a cinch.

The highs and lows on each logic line are sent to a computer over the FTDI chip, converted into OLS format, and piped into Open Sniffer to make some fancy graphs.

[Joonas] was able to capture PS/2 signals with his logic sniffer, so we’ll call this project a success. However, there were a few problems that made this project a little more trouble than it was worth: there is no easy way to turn a serial dump into a binary file, Putty didn’t allow suppressing output to the terminal, and Mac serial ports twinkling above 115.2 kbps don’t work natively. Still, the project did its job, and we couldn’t ask for anything more.

[via Dangerous Prototypes]

An Open Source Hardware Modchip

OSHW XenoGC Clone

Many Hackaday readers might remember the days of buying modchips from somewhat questionable sources. These little devices connect to a gaming system to circumvent security measures, allowing you to run homebrew games (and pirated games, but lets not focus on that). [Guillermo] built an open source hardware Gamecube modchip based on the XenoGC.

The XenoGC was a popular modchip back in the Gamecube days, and its source was released in a forum post. A Wiki page explains how to build a clone of the device based on an ATtiny2313.  Most modchips were closed source, but this project lets you look at how they work. You can browse the XenoGC source on Google Code to learn more about the exploit itself. You’ll find the AVR code, which manipulates the DVD drive over a serial interface, in the XenoAT folder.

[Guillermo]’s hardware is available from OSHPark, so you can easily order boards. He’s also hosted the design files on Github. With one in hand, you can start building homebrew for the Gamecube, which can probably be picked up for around $25 nowadays.

Giving toys an electronic voice

sound

Whether it’s a Furby or Buzz Lightyear’s button that plays, ‘To infinity and beyond’, most digital audio applications inside toys are actually simple affairs. There’s no Arduino and wave shield, and there’s certainly no Raspi streaming audio from the Internet. No, the audio inside most toys are one or two chip devices capable of storing about a minute or so of audio. [makapuf] built an electronic board game for his kids, and in the process decided to add some digital audio. The result is very similar to what you would find in an actual engineered product, and is simple enough to be replicated by just about anyone.

[makapuf]’s game is based on Game of the Goose, only brought into the modern world with electronic talking dice. An ATtiny2313 was chosen for the microcontroller and an AT45D 4 Megabit Flash module provided the storage for 8 bit/8khz audio.

The electronic portion of the game has a few functions. The first is calling out numbers, which is done by playing recordings of [makapuf] reading, ‘one’, ‘two’, ‘three’, … ‘twelve’, ‘thir-‘, ‘teen’ and so on. This data is pumped out over a pin on the ATtiny through a small amplifier and into a speaker. After that, the code is a simple matter of keeping track of where the players are on the board, keeping score, and generating randomish numbers.

It’s an exceptional exercise in engineering, making a quite complicated game with a bare minimum of parts. [makapuf] estimated he spent under $4 in parts, so if you’re looking to add digital audio to a project on the cheap, we can’t imagine doing better.

You can see a video of [makapuf]’s project after the break.

Continue reading “Giving toys an electronic voice”

Etch your own CPLD development board

etch-your-own-cpld-breakout

Ever wanted to make the jump from microcontrollers to logic chips? Although not technically the same thing we consider FPGA and CPLD devices to be in similar categories. Like FPGAs, Complex Programmable Logic Devices let you build hardware inside of a chip. And if you’ve got the knack for etching circuit boards you can now build your own CPLD development module. Long-time Hackaday readers will remember our own offering in this area.

Our years of microcontroller experience have taught us a mantra: if it doesn’t work it’s a hardware problem. We have a knack for wasting hours trying to figure out why our code doesn’t work. The majority of the time it’s a hardware issue. And this is why you might not want to design your own dev tools when just starting out. But one thing this guide has going for it is incremental testing. After etching and inspecting the board, it is populated in stages. There is test code available for each stage that will help verify that the hardware is working as expected.

The CPLD is programmed using that 10-pin header. If you don’t have a programmer you can build your own that uses a parallel port. Included on the board is an ATtiny2313 which is a nice touch as it can simulate all kinds of different hardware to test with your VHDL code. There is also a row of LEDs, a set of DIP switches, and a few breakout headers to boot.

MIDI out for a Korg CX-3 organ

midi-out-for-a-vintage-korg-cx-3-organ

[Michael] loves this old organ of his, but recently he wondered if it would be possible to add MIDI out without altering its original functionality. With a bit of research and more than a bit of hard work he accomplished his goal.

The nice thing about working on a quality piece of hardware like this is the resources you can find regarding how they work (which we bet is tailored for how to repair them when they break). [Michael] found a website with plenty of info on the circuit boards and how they work. From this he was able to locate a few chips which stream serial data regarding which keys have been pressed. Bingo!

Once he located the three signals he was after he built a board to translate them to the MIDI protocol. His circuit is based around an ATtiny2313. It is supported by a liner voltage regulator circuit as well as a buffer chip which converts the incoming signals to the 5V levels needed. His home etched board is clean and well mounted, and the success of the project can be heard in the clip after the jump.

Continue reading “MIDI out for a Korg CX-3 organ”

ATtiny2313 frequency meter measures 1Hz-10MHz

attiny2313_frequency_meter

This frequency meter project squeezes a lot of performance out of the ATtiny2313 microcontroller. That chip does all of the work, measuring the frequency on the input pin as well as multiplexing the set of 7 seven-segment displays which read out the measurement.

The system is only as accurate as the clock crystal used by the AVR chip, so [Manekinen] recommends using one with the best tolerances available. It is also necessary to choose a value which is divisible by 1024 to get the best combination of accuracy and resolution. In this case he’s using a 22.1184 MHz crystal oscillator which is a slight overclocking of the chip which is spec’d to run at 20 MHz max.

We didn’t totally follow his explanation of how the two timers are used for counting. But if we really wanted to drill down for a full understanding his code (written in BASCOM-AVR) is available. If you’re just interested in the hardware we embedded a screenshot of the schematic after the break.

Continue reading “ATtiny2313 frequency meter measures 1Hz-10MHz”