Tag Archives: Eagle

Designing a handheld game system with an ATMega328

A Maker named “randrews” recently created a handheld gaming system using a small LCD purchased from Adafruit, two custom PCBs, an ATMega328 microcontroller (MCU) and a number of buttons that function as de-facto control pads.

As HackADay’s Rick Osgood reports, Adafruit’s LCD display is a low-power sipper, making it a particularly good fit for the project.

After testing the screen, randrews kicked off the circuit design with Eagle.

“He hand routed all of the traces to avoid any weird issues that the auto router can sometimes cause. He made an efficient use of the space on the board by mounting the screen over top of the ATMega328 microcontroller (MCU) and other supporting components,” Osgood explained.

“The screen is designed to plug in and out of the socket, this way it can be removed to get to the chip. randrews needs to be able to reach the chip in order to reprogram it for different games.”

Once the initial board design was complete, randrews recruited his Shapeoko CNC mill to cut it out of a copper clad board. After milling it out, he used a small Dremel drill press to form all of the holes. 

On the power side, randrews designed a second, smaller PCB to fit 3V coin cell batteries and an on/off switch.

In terms of actual games, randrews says he will likely code a version of “Snake,” a popular title found on old Nokia phones.

Interested in learning more? You can check out the project’s official page here.

Tannin is a DIY MIDI controller



Last week, Bits & Pieces got up close and personal with the Atmegatron, an 8-bit mono synth powered by Atmel’s ATmega328P microcontroller (MCU).

Today, we’re going to be taking a closer look at the Tannin, a DIY MIDI controller built around the Atmel-based Arduino Nano (ATmega328). 

Deisgned by Shantea, the system is equipped with 16 potentiometers, 19 buttons and four LEDs controller.

“It fully supports MIDI Note On/Off and CC messages, including the MIDI In (I’m using that feature in Traktor to control LEDs and set modifiers). It even features experimental MIDI Clock In support,” Shantea explained in a recent HackADay Project post.

“I’ve set it in a way that LEDs blink in sync with that clock, but there’s more work to be done to make it work fully. The buttons also have built-in feature of long press, that is, if you press button for half second (that can easily be defined) it will send another MIDI Note On on another channel (2, regular presses are sent on channel 1). The pots as well send MIDI Note On/Off messages, 6 per pot, depending on their position, with CC messages, of course.”

On the software side, Shantea used The Hairless MIDI to Serial Bridge, routing the messages via virtual MIDI cable software (loopBe30).

“When you match your virtual port in hairless-midi software, the once-serial messages from Arduino will become MIDI messages routed over virtual MIDI cable,” he said. “After that you can easily map your controller to any software which supports MIDI learn.”

In terms of hardware specifics, Tannin’s faceplate is manufactured out of a special plastic board 1.5mm thick (glued to 3mm plexiglas) and houses three PCBs designed in Eagle.

“Two for two groups of potentiometers to get really stable values (I used to connect the pots with wires which often resulted in gibberish values), and they both use ground planes on both sides,” Shantea added. “[Meanwhile], the main PCB [is fitted with the Atmel-based] Arduino, with connectors for two PCBs for pots. Each pot PCB has 4051 chip on it to read potentiometers. Buttons and LEDs [are] connected in a matrix with shared columns.”

Interested in learning more? You can check out HackADay’s introductory blog post here and the project’s official HackADay page here.

Arduino Micro powers this LED matrix clock

A Maker by the name of Martin Atkins recently built an LED matrix clock using an Atmel-based Arduino Micro (ATmega32u4), a few bicolor LED matrix displays and Chronodot. All the major components for the project were purchased from Adafruit.

According to Atkins, the primary motivation for building the LED matrix clock was to learn Eagle and give OSH Park a shot.

“I wanted to make something with only components I’d already purchased, and that’s why it has a whole Arduino Micro attached to it even though a smaller board (or even just a lone microcontroller) would’ve been sufficient,” Atkins explained in a Google+ post.

“I didn’t get the displays lined up quite right, so there’s a small gap between them that looks obvious in this photo but isn’t so bad if you’re further away and looking at it head-on. But my learning for next time is to watch out for the positioning of odd-sized components.”

Atkins also noted that he just wired the red and green LEDs together, eschewing a bi-color approach for the current project and eliminating the need for doubling up on driver chips.

The total cost of the custom PCB? Around $45.

“The combination of the large-ish LED matrices plus the Arduino Micro and Chronodot forced the board to be on the larger side… It’s 3.94 by 2.25 inches,” he added.

Interested in learning more? You can check out Martin’s Google+ post here.

Designing an ATtiny45-based business card



A Maker by the name of Simon Bach has created a slick circuit board business card powered by Atmel’s versatile ATtiny45 microcontroller (MCU).



”First I designed the circuit and layout with Eagle. The actual circuit is very simple: four LEDs with resistors of 330 ohm at 4 I/O pins,” Bach wrote in a recent blog post.

“Since only one input and the reset pin on the Attiny is left, I decided to attach the four buttons for input through multiple resistors to an A/D input. Depending on which push-button/resistor combination is pressed, a different value between 0 and 1023 can be read on the A/D input. This value is mapped to a button in the program.”

According to Bach, the photo and contact details were created using Photoshop, with the image framed by a honeycomb pattern. Once the finished layout in Eagle was exported to a PS file, the picture and layout were merged.

“To put layouts on copper board, I use the toner transfer method. The layout is printed by a laser printer and melted with a laminator onto the board,” he explained.

“In order to obtain useful results, the choice of paper on which the layout is printed is crucial. The toner should not be absorbed too much by the paper, but adhere enough to the paper so that nothing smears.”

Before the layout was laminated, Bach cleaned the board and degreased it with acetone. He then proceeded with the transfer, using a fuser salvaged from an old laser printer.

“The board is etched in a sodium persulfate solution, which is heated to about 40 degrees Celsius. The process takes about 20 minutes, swirling the solution supports the etching process,” he continued. “In order to avoid etching away the fine copper traces, I took the card out of the etching bath after the actual circuit was etched completely.”

In terms of programming, Bach connected the Atmel MCU to an Arduino Duemilanove (ATmega168) with matching ISP sketch.

“This little game was also created with the Arduino IDE. Appropriate board settings for ATtiny µC have to be loaded into Arduino IDE before they work with the IDE,” he concluded. 

”The required A/D values for the keys were recorded via an analog input of the Arduino and entered into the final program. Since the A / D values vary slightly by decreasing battery voltage, an upper and lower limit for the respective key has to be specified.”

Interested in learning more about the Atmel-powered ATtiny45-powered business card? You can check out the project’s official page here.