Tag Archives: HackADay

Building a compass guided kayak autopilot

A Maker named Louis recently bought a used kayak on Craigslist. The pedal-powered craft is equipped with a hand-operated rudder, which makes it somewhat difficult for Louis to maintain a steady course while fishing.

The solution? An Atmel-powered Arduino autopilot that allows him to peacefully fish for salmon while remaining on course.

“In [Louis]‘ system, a motor is attached to the steering lever along with a few limit switches. This motor is powered by an Arduino controlled with an LSM303 compass module from Sparkfun,” explained Brian Benchoff of HackADay.

“When the autopilot module is started up, it first checks to see if the compass module is enabled. If not, the system relies on two tact switches to change the position of the rudder. Enabling the compass requires a short calibration of spinning the kayak around in a circle, but after that the steering is dead on.”

Louis isn’t finished with the Arduino-powered autopilot, though. Indeed, the Maker plans on adding a heading display along with a Bluetooth module for remote control at some point in the near future.

Video: Atmel’s ATmega644 powers this Nickelphone

A Maker by the name of Tyler Bletsch has created a keyboard that redefines the notion of “coin-operated.” Yes, the Nickelphone can emit square wave tones via a piezo buzzer, although the 25-key piano is really designed to function as a MIDI keyboard capable of driving a full synthesizer.

According to the HackADay crew, Bletsch selected Atmel’s ATmega644 as the “brain” because it is Arduino-friendly and boasts a total of 32 data pins – allowing him to assign each key its very own pin.

“Each coin was soldered to its own wire and connects up to a 1MΩ resistor array,” explained HackADay’s John Marsh. “Coin-presses are recognized by the simple capacitive sensing technique outlined here, but [Tyler] needed to take advantage of a workaround to accurately detect multiple presses.”

Interested in learning more about Tyler’s ATmega644 -powered Nickelphone? You can check out a detailed project guide and related source code here.

Devising a dead-icated Splatterhouse arcade game

Just in time for Halloween, Maker Clay Cowgill has devised a killer, interactive cabinet for the Splatterhouse Namco arcade machine he co-owns.

“I like video games, Halloween, and making ‘stuff,’ so this year I combined all three and created a ‘Dead-icated’ Splatterhouse arcade game,” Cowgill explains.

As the Hackaday crew reports, the Maker kicked off his Splatterhouse cabinet project by salvaging an old Williams Defender and coating the sides with a cocktail of drywall compound, sand and paint to achieve a stone texture.

Cowgill then fashioned some pink insulation foam into a tattered “wooden” frame for use as a monitor bezel, while strips of latex were molded to resemble torn flesh and placed along the boards.

“The control panel is yet another work of art: Clay 3D printed a life-size human femur for the game’s joystick, and converted the buttons to look like eyeballs,” .

The Maker decided to go beyond just the cosmetics and tapped into the game’s CPU with a customized daughterboard that detects a variety of game ‘state’ changes, such as player health, number of lives, game level and credits remaining.

cpu1-1

Indeed, the cabinet is equipped with an ATmega165 microcontroller (MCU) which reacts to these various in-game events and can be “software modulated for different effects if necessary” using four PWM outputs. For example, if a player takes heavy damage, red lights flash around the monitor, while inserting a coin or dying in the game causes a different set of LEDs behind the marquee to blink excitedly.

A serial port from the AVR MCU also streams the status of the in-game variables for debugging, Cowgill adds.

splat4

Want to learn more? Check out all the details of this Cowgill’s Splatterhouse project here.

Activating a PC with a knock and an ATtiny

A Maker by the name of Joonas has designed a knock sensor to activate his PC. According to the HackADay crew, the entire project cost Joonas a grand total of $10 and is built around Atmel’s ATtiny45 MCU which is tasked with emulating a PS/2 device.


“This takes advantage of his computer’s ability to boot upon receiving PS/2 input,” HackADay’s John Marsh explained. “The build uses a Piezo buzzer and a 1M Ohm resistor as a knock sensor exactly as the official Arduino tutorial demonstrates, [plus] one of those PS/2-to-USB adapters that are most likely lurking in the back corner of every drawer in your office.”

In addition, says Marsh, AVRweb was used to disable the 8X clock divider so there would be sufficient clock cycles for PS/2 communication. Joonas subsequently loaded some test code (final version posted to Github) to ensure the vibrations were being detected correctly.

Readers of Bits & Pieces may also want to check out a recent article about a Halloween Knock Box powered by Atmel’s versatile ATtiny45 (or 85) microcontroller (MCU).

The box is fairly easy to put together, as basic components include an MCU, a piezo element (amplifier) for the knock sensor and a motor to provide the knocking feedback.

Improvising a logic analyzer with an ATtiny2313

Joonas Pihlajamaa wasn’t having much luck debugging his PS/2 keyboard interface. Wishing he had a dedicated logic analyzer, Joonas ultimately decided to combine an ATtiny2313, breadboard and FTDI for unlimited-length logic capturing with a PC.

As the HackADay crew notes, the ATtiny2313-based logic analyzer is capable of capturing at 50+ kHz, more than enough for a PS/2 port.

“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,” explained HackADay’s Brian Benchoff. “Joonas was able to capture PS/2 signals with his logic sniffer, so we’ll call this project a success.”

As previously discussed on Bits & Pieces, Atmel’s high-performance, low-power 8-bit AVR RISC-based ATtiny2313 microcontroller boasts 2KB ISP flash memory, 128B ISP EEPROM, 128B internal SRAM, universal serial interface (USI), full duplex UART and debugWIRE for on-chip debugging.

The ATtiny2313 also supports a throughput of 20 MIPS at 20 MHz, operating between 2.7-5.5 volts. By executing powerful instructions in a single clock cycle, the MCU achieves throughputs approaching 1 MIPS per MHz – neatly balancing power consumption and processing speed.

Interested in learning more about Atmel’s extensive lineup of versatile tinyAVRs? You can check out our complete device breakdown here.

Playing Tetris on a breadboard with Atmel

Jianan Li has designed a breadboard-based Tetris game built around two Atmel microcontrollers (MCUs). As the HackADay crew notes, Li’s breadboard Tetris creation is so impressive that it probably should be considered “wire artwork.” To be sure, the layout of the ‘board and circuits are as elegant as the carefully written code.

“There are two microcontrollers at work, each running the Arduino bootloader. The main chip is an [AtmelATmega328 which is responsible for monitoring the buttons and controlling game play,” writes HackADay’s Mike Szczys.

“The other is an [AtmelATtiny85. The 8 pin chip listens to it’s bigger brother, playing the theme song when the game starts, and pausing or resuming to match the user input.”

No matter which way you slice it, this is definitely one of the most stellar interpretations of Tetris we’ve seen over the years. As some of you may recall, Tetris is a modern digital classic originally designed and programmed by Alexey Pajitnov in the Soviet Union. The very first version of the game was released on June 6, 1984, while Pajitnov was working for the Dorodnicyn Computing Centre of the Academy of Science of the USSR in Moscow.

According to Wikipedia, the name “Tetris” was derived from the Greek numerical prefix tetra- (all of the game’s pieces contain four segments) and tennis, Pajitnov’s favorite sport.

ATmega328 drives this rockin’ Lunchbeat sequencer

A Maker by the name of Jan Cumpelik has designed a rockin’ breadboard sequencer aptly dubbed “Lunchbeat.”

Powered by Atmel’s stalwart ATmega328, the microcontroller (MCU) accepts inputs from the neat row of 10k trimpots as well as a series of tactile switches. Feedback is provided by a row of 8 LEDs – driven from a 595 shift register to save pins on the microcontroller.

“The remaining chip is an OpAmp which works in conjunction with a 3-bit R2R ladder DAC to output audio. Turn your speakers down just a bit before taking in the demonstration,” writes HackADay’s Mike Szczys.

“[Below] you will also find an image version of his schematic that we made for your convenience. It is only available as a PDF in the code repository he posted.”

As previously discussed on Bits & Pieces, Atmel’s ATmega328 is a a high-performance 8-bit AVR RISC-based microcontroller that boasts 32KB ISP flash memory with read-while-write capabilities, 1KB EEPROM, 2KB SRAM, 23 general purpose I/O lines, 32 general purpose working registers and three flexible timer/counters with compare modes.

Additional key specs include internal and external interrupts, serial programmable USART, a byte-oriented 2-wire serial interface, SPI serial port, 6-channel 10-bit A/D converter (8-channels in TQFP and QFN/MLF packages), a programmable watchdog timer with internal oscillator and five software selectable power saving modes. Operating between 1.8-5.5 volts, the  ATmega328 executes powerful instructions in a single clock cycle – achieving throughputs approaching 1 MIPS per MHz – neatly balancing power consumption with processing speed.

Interested in learning more? You can read more about the ATmega328 on Atmel’s website.

Video: Arduino powers this self-balancing robot

The IdleHandsProject crew has designed a slick, self-balancing robot using an Arduino Pro Mini (Atmel ATmega168) and an IR sensor.

The wheels and motor were taken from a smaller IR vehicle, cut in half and soldered with an old battery mount to the lower part of the Arduino. The IR switch was selected simply because the Sean Hodgins of the IdleHandsProject crew didn’t have a gyro/accelerometer on hand at the time.

“Its just a simple on or off that determines the direction of the robot. There is a potentiality on the IR switch that needs to be changed depending on the surface,” Hodgins wrote in a recent blog post. “Also because the motor is so tiny, I’m able to power it directly from the Arduino. A two motor version [would] most likely have to run a motor controller (which is also on the way).”

As HackADay’s Mike Szczys notes, the black PCB seen to the right of the robot is the IR reflectance sensor.

“[Basically], it shines an IR led at the floor and picks up what reflects back,” he explained. “The board [also] has a trimpot which is used to adjust the sensitivity. You have to tweak it until it stands on its own… [Remember], self-balancing robot builds are a great way to teach yourself about Proportional-Integral-Derivate (PID) algorithms used in a lot of these projects.”

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

Video: ATMega8 drives this brushless motor controller

A Maker by the name of Davide Gironi has designed a brushless motor controller powered by Atmel’s ATMega8.

As previously discussed on Bits & Pieces, the low-power sipping 8-bit AVR RISC-based microcontroller boasts 8KB of programmable flash memory, 1KB of SRAM, 512K EEPROM, and a 6 or 8 channel 10-bit A/D converter. The device also supports throughput of 16 MIPS at 16 MHz, while operating between 2.7-5.5 volts.

“Brushless motors have no brushes in them (duh). But what does that really mean? In order to spin the motor a very carefully crafted signal is sent through the motor coils in the stationary portion (called the stator), producing a magnetic field that pushes against permanent magnets in the rotor,” writes HackADay’s Mike Szczys.

“A big part of crafting that signal is knowing the position of the rotor. This is often accomplished with Hall Effect sensors, but can also be performed without them by measuring the back EMF in the coils not currently being driven. The AVR-GCC compatible library which Davide Gironi put together can be tweaked to work with either setup.”

You can find out more about Davide Gironi’s ATMega8-powered brushless motor controller on the project’s official page.

Video: The Google Authenticator-Arduino-LEGO mashup

Last week, Bits & Pieces took a closer look at an Arduino-powered Gmail (alert) lamp programmed to ping its creator in real-time about incoming emails labelled “important.” And today we’re going to get up close and personal with another Arduino-based project that involves a Google app known as Authenticator.

Essentially, Google’s Authenticator is a program that generates one time passwords (OTPs) for users, which are then employed as a second factor of authentication in conjunction with a “normal” password.

“OTPs work by having a shared secret and a synchronized clock on two devices,” HackADay’s Eric Evenchick explained. “When you generate the password, a hash based on the secret and timestamp is created. This proves that you have access to the secret, and can only be used once.”

As you can see in the video above (Note: hit the CC button for English captions), a Maker by the name of Luca Dentella designed a functioning authentication system using Google Authenticator and his Atmel-powered Arduino. The platform is showcased using a cute mini LEGO of a model house, complete with a door that swings open when the correct code sequence is entered.

“A web app is used to generate a secret that can be configured into the Arduino using an array, and into Google Authenticator using a QR code,” Evenchick added. “The Arduino is using a library that implements Time-based One Time Password authentication (TOTP).”

Interested in learning more about Luca Dentella’s Google Authenticator-Arduino-LEGO mashup? Be sure to check out his official project page here.