Tag Archives: MEGA

Designing an Arduino-controlled autopiloted sailboat

Jack Edwards, a mechanical engineer and loom builder, recently built a functioning Arduino-based autopilot system for the Wile E. Coyote, his 1983 Robert Perry Nordic 40 sailboat.

According to The Marine Installer Rant, the system successfully piloted Jack’s boat over 400 miles this past summer using both heading and GPS track mode with cross track error correction.

As the HackADay crew notes, the system is built around two Arduino Mega boards (Atmel ATmega1280).

“One is solely for the GPS, and the other controls everything else. Jack’s autopilot has three modes. In the one he calls knob steering, a potentiometer drives the existing hydraulic pump, which he controls with a Polulu Qik serial DC motor controller,” explains HackADay’s Kristina Panos.

“In compass steering mode, a Pololu IMU locks in the heading to steer (HTS). [Meanwhile], GPS mode uses a predetermined waypoint and sets the course to steer (CTS) to the same bearing as the waypoint.”

Jack’s autopilot system also employs cross track error (XTE) correction to calculate a new HTS when necessary.

Interested in learning more? You can check out extensive coverage of the project by The Marine Installer Rant here, HackADay’s write up here, as well as the relevant Fritzing and Arduino files here. Previous stories about marine-based autopilots featured on Atmel’s Bits & Pieces include “This Sailboat Autopilot has Arduino Under the Hood” and “Building a Compass Guided Kayak.”

Video: Building a TouchSynth with the Arduino Mega

Steve Mostovoy and Tim Boy Jr recently created a digital audio workstation for their high school senior project. Dubbed “TouchSynth,” the platform is powered by an Atmel-based Arduino Mega (ATmega1280). Additional key specs include a Maxim 7224 8-Bit DAC (with output amplifier), Longtech Optics LCM1602A 16×2 LCD, Philips HEF4794B LED driver, NFM-7881 8×8 LED Matrix and a four-wire resistive touchpad.

“Putting together the hardware was months of work. We started with breadboard designs to test the circuitry, and eventually moved to a vector board and a project box to get the project into its final form,” Mostovoy wrote in a detailed blog post describing the project. “For the stripboard design, we designed it digitally before we got started soldering. It turned out alright, if not a bit messier than we hoped. A large part of the issue [was related to] sending 16 wires to the 8×8 LED matrix. That could have been avoided with multiplexing and demultiplexing, but we decided not to spend the effort at that point, as we had a tight deadline.”

On the software side, the duo coded a simple program to generate amplitude lists for sin, triangle, saw and square waves at every frequency between A3 and G#5 (the range of the device), which were then written to program memory.

“The pgmLoc array stores the array positions that each different frequency starts at. They get smaller and smaller because we started at a low frequency, long wavelength and end up at a high frequency, short wavelength. Each waveform is a full period,” Mostovoy explained. “From there, we had to design the play function. In short, it had to do the following: play the song at full speed with no interruptions and handle varying tempos, [all while] displaying the song as it plays and highlights the (currently) played column.”

TouchSynth was a remarkably fun project to work on, says Mostovoy, as it taught him how not to organize code, how to think in terms of data and how to optimize.

“It also taught me not to pre-optimize, after I saw how ugly the settings code got for no reason. That could have been solved through some abstraction, but it was an unnecessary effort. I’m very happy with the final product, and I’m pleased with the Arduino’s robustness and reliability,” he added.

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

It should be noted that the TouchSynth was recently featured on the official Arduino blog

Atmel-Arduino controls this beer brewing machine

A Maker by the name of “The_Meatloaf” recently built a fully automated beer brewing machine using an Atmel-based Arduino Mega (ATmega128) to power a 4-button interface capable of saving and executing up to 26 different recipes.

The machine – designed in the context of a computer engineering degree program – was constructed entirely from scratch over the course of a year. As HackADay’s James Hobson notes, the automated brewing system removes most of the guesswork from an otherwise complex brewing process.

“The machine starts by heating the water in the first keg using a 2000W heating element, after which the water transfers into the mash vessel via servo valves, where it’s stirred by a mixing motor,” Hobson explained.

“The machine then drains the wort (the resulting liquid after mashing) and sparges (adds more water to the mash tun) the grains as programmed. The wort is brought to a boil for the programmed amount of time, while a servo-controlled ‘hopper’ automatically adds the hops. Finally, a counter-flow heat exchanger rapidly cools the solution to room temperature using ice water, then dispenses the solution for fermentation.”

Interested in learning more about the Atmel-Arduino automated brewing machine? You can check out the original Reddit post here and additional photos here.

Building an Atmel based wireless MIDI floor piano

Jianan Li and a team of Makers recently designed a wireless MIDI floor piano for Duke University’s Hackathon. According to the Hackaday crew, a DIY Pressure Plate for a haunted Halloween house featured on the popular website served as the initial inspiration for the wireless MIDI floor piano.

“Having only 24 hours to compete in the Hackathon, they had to choose something that was fairly easy to build out of cheap materials, and quick to assemble. This was just the ticket,” explained Hackaday’s James Hobson.

“The piano features 25 of the aluminum foil pressure plates, whose state are read by the [Atmel-based] Arduino Mega. This is then transmitted by an XBee radio to an Arduino Uno (ATmega328), which acts as the receiver for the laptop that processes the signals. They even added a remote control using Atmel’s ATtiny85 to allow for octave and instrument changes – it uses an XBee to communicate back to the Uno.”

Unsurprisingly, the above-mentioned pressure-sensitive wireless floor project isn’t the first that we’ve seen powered by Atmel microcontrollers (MCUs). Indeed, earlier this year, Sean Voisen and his team at Adobe were asked to build “something new” for the Children’s Creativity Museum in San Francisco.

By August, a digital-physical environment for kids called “Sense It” was up and running. With a 14′x8′ touch-enabled LED wall and a 14′x12′ pressure-sensitive floor, the platform can best be described as a place for kids to run, jump, play and create in a world of ‘extra large’ digital experiences. Sense It is built around a system of pressure-sensitive resistors placed under MDF panels, comprising a total of twenty-one 2′x4′ tiles, each one including 8 pressure-sensitive resistors and an ATtiny84 based platform.

Interested in learning more? Additional information about SenseIt can be found here, while the wireless MIDI floor piano project page is available here.

Video: Atmel-based Arduinos in a semi-auto production line

Alexander Kozusyev from Kiev recently contacted the official Arduino blog to describe how he integrated Atmel-based boards into a semi-auto production line designed to cast polyurethane foam.

According to Ardunio’s Zoe Romano, Kozusyev is using an Arduino Mega (ATmega2560) to read RFID codes and control a number of components, along with an Arduino Uno (ATmega328) (+ firmware GRBL version 0.9) to control the CNC.

“[The] production line has two independent CNC 3-axis manipulator. The first [is] spraying of [a] release agent. [The] second [is the] automatic pouring [of] polyurethane into the mold,” Kozusyev explained.

“Before spraying or pouring, [the system] reads RFID unique code for the mold, and then loads the G-CODE from the database server based MySQL. After pouring, the mold is moved to the waiting area.”

Atmel @ the Silicon Valley Maker Faire – Sarge the home patrolbot

So the 2013 Silicon Valley Maker Faire was held this past weekend in sunny California, with Atmel’s microcontrollers taking center stage in many creations, both big and small.

Although it is practically impossible to list all the devices at the Faire with Atmel microcontrollers under the hood, we’ll be taking the next few days to highlight a number of projects we came across while walking the rather expansive Faire grounds.

In this article, we’ll offer up a closer look at Sarge the home patrolbot, designed by the RoboRadix crew. Sarge’s basic function is to roam around a home or apartment, deftly avoiding pesky obstacles and keeping an electronic eye on things when its owners are out and about.

Currently, the good Sarge is a work in progress, but we were able to get a basic rundown from the folks at the Faire. Unsurprisingly, the ‘bot is built around the versatile Arduino UNO (ATmega328) or MEGA (ATmega1280), both of which are powered by Atmel microcontrollers.

Additional specs include two 12 Volts DC motors from an old lawn mower, a Linksys wireless IP camera, one Piezo Buzzer, two 12 Volts DC motors from an old lawn mower, one Pololu dual VNH5019 motor driver shield, one ultrasonic range sensor, two Sharp IR distance sensors, one Breadboard and power supply, one DC/DC power supply single Output 3A 15W 5-pin, one Power-Sonic 12V SLA battery and two 9V battery holders and 9V battery.


Oh, and yes, a special shout-out to the cool R2D2 unit (courtesy of Camp Peavy and their home-brewed robots) that was sharing the same exhibit table as Sarge. Sorry Sarge, we didn’t mean to make you feel inadequate, but we just couldn’t pass up the opportunity to gawk at our favorite Star Wars droids.