Category Archives: Design Tips & Tricks

Arduino LilyPad plays MP3 workout shirt



BBrodsky has created an MP3-equipped workout shirt powered by an Atmel-based (ATmega328P) Arduino LilyPad (MP3).

“[The] workout shirt utilizes the MP3 player and an accelerometer to detect whether or not the wearer is moving. If so, it plays his or her music. The goal of the system is to promote an active lifestyle for wearers,” BBrodsky wrote in a recent Instructables post.

“The price of our system ranges between $60 and $100 based on parts used, the cost of the shirt, etc. It is affordable, easy to understand and create and will help promote healthiness and physical activity in society.”

Aside from the LilyPad MP3 player, key project components include:

  • LilyPad accelerometer
  • RGB rotary encoder
  • 
3.7V Lipo (lithium ion) battery
  • Micro SD card
  • Headphones or speakers
  • 
Conductive thread and a sewing needle
  • Soldering iron
  • Solder coil
  • Alligator clips (for testing the circuitry before sewing)
  • Rainbow LEDs (optional)
  • Vibration board (optional)
  • Button (optional)
  • On/off switch (optional)
  • Extra fabric and card stock (optional)

BBrodsky kicks off his Instructables by providing a brief overview of the MP3-equipped workout shirt.

“[The] system uses the accelerometer to sense motion, communicating the detected motion (or lack thereof) to the MP3 player. The MP3 player then runs the corresponding functions based on the values it receives from the accelerometer. The RGB rotary encoder is used as a visual that displays different colors (blue or green) based on what function is being executed,” he explained.

“Once the system is completed and integrated with the shirt, the device should be ready to use. Keeping the device plugged in using via USB to a laptop is useful, as the serial monitor can be used to visualize the processes that the system is running. The headphone jack can also be used to plug in speakers so that the music can be played out loud.”

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

Arduino-based farming in Maine

Roberts Farm in Maine is currently testing an inexpensive Arduino-powered agricultural system that automatically monitors and waters crops. As Scott Taylor of the Lewiston-Auburn Sun Journal reports, the system has already proven itself by allowing Earl Morse, a retired teacher and volunteer at the Roberts Farm project, to successfully harvest a crop of spinach grown last winter in an exterior green house.

Photo Credit: Scott Taylor, Sun Journal

“[The system] keeps watch on the soil temperature and interior moisture through freezing temperatures and darkness. It works, not with hundreds of dollars worth of computer equipment but hobbyist-grade, [Atmel-based] Arduino boards,” wrote Taylor.

“While the farm’s goal is teach local kids about growing their own food and the technology behind farming, Morse hopes to create an automated system that not only gives the plants light and keeps them watered but extends the growing season — and does it cheaply.”

According to Taylor, Morse hopes to publicly release the open source, Arduino-based system this fall.

“What we’re trying to do is make all the mistakes now, so it’s ready for everyone else to use,” said Morse.

Photo Credit: Scott Taylor, Sun Journal

“That’s basically what we’re trying to do, make a farm robot. Maybe a robot farmer.”

Interestingly, the idea behind the inexpensive Arduino-powered agricultural system is based on an older platform Morse helped design back in the 1980s. Indeed, the first version worked with an old Atari computer, although the most stable version relies on MS-DOS, with Roberts Farm still using the Microsoft OS to run its automated hydroponics nursery.

“What it does, this 20-year-old system, lets you match the growing conditions for any location on Earth,” Morse explained.

Photo Credit: Scott Taylor, Sun Journal

“You plug in the longitude and latitude and time of the year and it matches those conditions.”

More specifically, the system controls banks of lights over seedling plants, matching the light’s intensity and time lit to conditions anywhere in the world – at any time of the year. As expected, the system also keeps the seedlings watered, utilizing water from a nearby aquarium to add moisture and fresh fertilizer in a basic hydroponics configuration.

As Morse notes, Arduino boards are perfect replacements for the PC-based version of the system. They are small, inexpensive, easy to program, adaptable and require a fraction of the electricity a standard PC needs to run.

Three versions of the open source Roberts Farm software are ultimately expected to be made open source, allowing farmers to:

  • Control the lights, monitor ambient temperatures, water plants and warn users if there’s an intruder.
  • 
Replace Morse’s MS-DOS application, enabling the farm to provide seedlings with appropriate amounts of light and water via Atmel-based Arduino boards.
  • Add livestock support, including managing a farm’s flock of chickens.

“What we want to do is be able to use every greenhouse to grow four crops per year, all year long. Summer, winter, it won’t matter,” he added. “[For the chickens, it] lets them out in the morning and in at night, keeping them fed and watered. [Plus], it has an intrusion alarm, warning you if there are predators around.”

Interested in learning more about farming with Atmel-based systems? You can browse through some of our previous stories on technology and farming including “The Internet of Things, Stalk by Stalk,” “Smart Urban Aquaponics in West Oakland“, “DIY Farming with Atmel and Arduino,” “Open Source Aquaponics with APDuino,” and “Agricultural Monitoring with Atmel AVR
.”

Video: Interactive m!Qbe redefines lighting


The Atmel-powered m!Qbe is an intuitive, interactive platform that allows users to easily control multiple lights. The system comprises a number of components, including the m!Qbe (central) module, m!base, m!charger and WiFi.

The m!Qbe is designed to be used in one room with an m!Base and should, depending on the layout, cover a circle with a diameter of 20 meters.

“Just flip it and switch to the suitable lighting situation for your current activity such as low yellowish light to relax on the couch, bright white light to read the newspaper or different colors for your birthday party,” an m!Qbe rep explained in a recent Indiegogo post.

“Use it in everyday life with many more possibilities than a traditional light switch and much faster than manual control on a mobile device.”

Indeed, the m!Qbe’s three faces, or sides, are designed to “memorize” specific settings.

“You predefine them once and recall them whenever you like,” said the rep.

“In addition, you can add a delay on every favorite. So you can go to bed or leave your home in bright light for instance. The m!Qbe [will] automatically turn off all your [lights] after a while.”

As you can see in the video above, the m!Qbe can be rotated to manually change color or brightness, while a brief touch on the icon switches from one light to another, allowing the user to easily select and adjust specific fixtures.

So, how does the platform work?

 Essentially, the m!Base component communicates with the m!Qbe and the network of lights.

“It converts the detected motion into lighting situations and provides access to the settings of the m!Qbe,” the rep continued.

“The installation of the m!Base is a plug and play solution. In its standard configuration you connect the m!Base with a cable to your network. If you want to connect it wirelessly, please order the WiFi option.”

As noted above, the m!Qbe is built around an Atmel 8-bit microcontroller (MCU), which uses data generated from a three-axis acceleration sensor and a three-axis gyro sensor to precisely calculate motion.

“Additionally on each of the two manual faces, a capacitive touch sensor is integrated and allows to detect touch actions of different lengths. In the m!Base a Linux system transfers the commands received via bluetooth from the m!Qbe to commands for every single lamp in the network,” the rep added.

“For the configuration of this transfer and to read out statistical information a web interface is implemented. If you want to extend the functions of the m!Qbe the easiest way is to modify the software of the m!Base.”

Last, but certainly not least, m!Qbe supports the Philips Hue system that includes not only the connected bulbs but also Friends of Hue such as LightStrips and LivingColors Bloom, along with dimming plugs for more traditional lamps.

Interested in learning more? You can check out the official m!Qbe page on Indiegogo here.

ATmega328P-based TinkerBots hit Wired’s Gadget Lab

TinkerBots is an Atmel-powered (ATmega328P MCU) building set that enables Makers and hobbyists of all ages to easily create an endless number of toy robots that can be brought to life without wiring, soldering or programming.

http://vimeo.com/91590326

Indeed, TinkerBots’ specialized “Power Brain” and kinetic modules twist and snap together with other TinkerBots pieces – and even LEGO bricks – adding movement and interest to whatever sort of robot a Maker can imagine and build.

The centerpiece of the TinkerBots building set is a square, red “Power Brain” module (approximately 1.5”x1.5”x1.5”) that contains Atmel’s ATmega328P microcontroller. This module is tasked with providing wireless power and data transmission to kinetic modules such as motors, twisters, pivots and grabbers.

Kinematics launched its official TinkerBots Indiegogo campaign a few weeks ago, with the building set garnering coverage from a number of prominent publications, including Wired’s Gadget Lab.

“Once you snap together a contraption, you can program it in a few different ways. By pressing the ‘record’ button on the Powerbrain brick and twisting the robot’s motorized parts, it will remember those movements and replicate them when you hit the ‘play’ button. And if you want to step it up and write your own code, you can also program your robots via the Arduino IDE,” writes Wired’s Tim Moynihan.

“TinkerBots started out as an Indiegogo campaign, and it blew past its $100,000 goal in less than a week; its funding now is nearly double that amount, with about a month left to go in its campaign. You can preorder various kits now, and prices vary depending on the number and type of pieces in each set. For $160, you get a basic car-building set with the Powerbrain, motors, wheels, a twister joint and some other bricks. There’s an animal-themed set for $230, a grabber claw set for $400 and $500 gets you a fully loaded kit with bricks to build anything.”

Interested in learning more? You can check out the official Indiegogo TinkerBots page here.

A manual milling machine with an Arduino digital readout

A recent Design News magazine featured a neat article about a fellow that built a wood frame for milling machine. It uses a Dremel-type router for the spindle motor. It’s a hand-cranker, as my machinist buddies say, the only motor is for the spindle.

Manual-mill-overall

This manual milling machine uses a hand-cranked X- and Y-axis with a Dremel-type spindle.

Cool thing is, the builder, John Duffy used an Atmel-based Arduino board to make a digital readout. This makes the mill much more useful.

Manual-mill-Arduino

This Arduino is used to create a digital read out (DRO).

You can check out Duffy’s detailed instructions in this PDF file here.

This upcycled printer is now a vinyl cutter

Vinyl cutters are typically used to make stickers, signs and graphics. In short, they are quite handy for Makers to have around, which is why LiquidHandWash recently upcycled an old printer by transforming it into a DIY vinyl cutter.

It should be noted that the above-mentioned project builds on earlier work by Instructables members silverjimmy and Groover, who previously posted instructions for laser cutters on the site.

“My idea is to take an old printer and turn it into a vinyl cutter, as they are quite similar in there design and it would hopefully make the build just that little bit easier,” LiquidHandWash explained.

“As most people find the electronics an software the most intimidating part of a project like this, I’ve gone into a fair amount of detail on how to set it up. Turns out the mechanical part of this project is far more challenging, as it takes quite a bit of tweaking, adjusting and general head banging to get the vinyl to cut  properly.”

Aside from an old printer with stepper motors, key project components include:

  • 

Atmel-based Arduino Uno (ATmega328)
  • 
Dupont wires
10 X 40 pin headers
  • Standoffs 
3mm nuts and bolts
  • Vinyl cutter holder 3pc blade
  • 
2X EasyDriver Shield stepping Stepper Motor Driver
  • Relay module shield board for Arduino 
Automotive relay

The first step? Determining where the the Arduino, relay and easy drivers will fit by removing all the old electronics and making a laser cut board to mount the components.

“Once that was done it was time to start using some of those Dupoint wires, they make every thing very easy to wire up,” said LiquidHandWash.

“Just pull a pin out of the headers and plug it in if you want to make the end of the wire male.”

Next up? Identifying the four wires on the stepper motor, wiring up the Arduino, installing and configuring the relevant software/sketches, modifying Inkscape, installing the blade and electromagnet, fitting the cutter and applying the sticker.

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

Building an ATmega32U4-based FinalKey



The FinalKey is a one-button device tasked with securely encrypting and storing multiple passwords. Interested in building your own? Well, you’re in luck because CyberStalker recently posted detailed DIY build instructions for his FinalKey project.

Key project components include:

  • 1x Arduino Pro Micro (ATmega32U4)
  • 1x 6x6x7 mm Tact switch
  • 1x 3 mm LED
  • 1x 380 Ohm Resistor for LED
  • 2x 4.7K Ohm Resistor for I2C Pullup
  • 1x EEPROM
  • 1x The Final Key Case
  • Thin insulated wire (optional but highly recommended for ease of assembly)

Although building the FinalKey is relatively straightforward, CyberStalker recommends DIY Makers read up on basic soldering, using a hot-glue gun and burning firmware to AVR chips.

Recommended tools?

  • Soldering iron and solder
  • Hot-glue gun and hot-glue stick
  • Micro-USB cable
  • Small wire-pliers
  • Flat-head screw-driver
  • Optional: An ISP programmer like AvrISP-MKii

“Note that the optional ISP programmer is for burning the firmware without the Arduino bootloader,” CyberStalker wrote in a recent blog post.

“This option is the most secure as a bootloader on the chip leaves it open to attackers who could install compromised firmware on your FinalKey if it is connected to a compromised computer.”

CyberStalker kicks off the project by soldering the EEPROM chip to the Arduino.

“I used a bit of SuperAttack glue to hold it in place,” he explained.

“Place the EEPROM directly on top of the AVR chip and align its pins such that EEPROM pin0 is at Arduino pin A0 and EEPROM pin 5 (diagonally opposite of 0) is at Arduino pin 2. Then bend the pins down to holes and solder them in place.”

Next, CyberStalker turned the board around and soldered the two 4.7k pullups. They both connect to pin 15, one to pin 2 and the other to pin 3.

“Cut leads to reasonable lengths and fix the button and LED into the case before soldering the next components. I used a small amount of glue to fix the button, be careful about thin glues and tact switches,” he said.

“Solder a short length of wire to the switch and Arduino pins 9 and 7. Solder a short piece of wire to LED- and Arduino pin 10 and solder the 380 ohm reistor to LED+ [with] a small wire going to Arduino VCC.”

In terms of burning, CyberStalker modified a number of files in the Arduino distribution, so DIY Makers should use the patched files from the FinalKey firmware package.

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

This geiger counter is powered by Adafruit & Atmel

The Geiger–Müller counter, also known as a Geiger counter, is an instrument used for measuring ionizing radiation. According to Wikipedia, the device detects radiation such as alpha particles, beta particles and gamma rays using the ionization produced in a Geiger–Müller tube.

Recently, Johan of dynode.nl designed geiger counter powered by Adafruit’s Atmel-based (ATtiny85 MCU) Trinket.

“Lately I have been messing around a bit with microprocessor powered geiger counters. One smart guy came up with the idea of generating high voltage using PWM signals from the microprocessor itself,” Johan explained in a detailed blog post.

“With some additional external parts a HV supply and negative going pulse suitable for microprocessors is easy to make.”

So, how does the circuit work? Simply put, a ~1 Khz squarewave turns the MPSA44 high voltage transistor on and off – generating high voltage when the inductors current is shut off.

As Johan notes, the specific voltage is contingent upon the pulse width of the square wave which can be tweaked on a software level.

“The 1N4007 diode rectifies this voltage, and the HV cap removes most of the ripple on this voltage. The resistor limits current to the GM tube,” he continued.

 “The current pulses from the tube generate a voltage drop over the 100K resistor which turns on the BC546. When this happens, the voltage [via] the 10K resistor is pulled to ground, generating a negative going pulse each time the GM tube detects an ionizing ray or particle.”

It should also be noted that Johan’s design supports serial logging capability using a tx only software serial library tasked with outputting the measurements in CPM every 10 seconds on pin 4.

So, what’s next for the Trinket-powered geiger counter? Well, Johan says the platform still requires some tweaking, as the circuit is quite susceptible to electromagnetic interference which causes erroneous counts.

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

Video: Creating a DIY Spotify remote

The UK-based HackShed crew has created a DIY Spotify remote powered by an Atmel-based Arduino board paired with an LCD keypad shield.

The remote displays the current (playing) song, as well as supporting various functions such as play/pause, previous and next.

“The remote is made from a VB.NET application that listens on a select COM port for commands; it also broadcasts the current playing song via the COM port to the Arduino,” Steve from HackShed explained in a detailed blog post.

“You could add a Bluetooth module to this to make it completely wireless, which would be really cool.”

The HackShed crew kicks off the DIY Spotify remote project by building an Arduino sketch that scans the serial port for incoming characters (current song), “listens” for button presses and Serial.println() commands, while displaying the current song on the LCD with scrolling text.

“These three tasks are actually really simple to do; most of the hard work will be on the .NET application side that sends commands to Spotify,” Steve noted.

“The Arduino refreshes the LCD Screen every 3500ms. This is optional but it seemed better that it was constantly scrolling instead of just static text; moving text seems less boring.”

Next up? Visual Studio and the actual Spotify control class coded by Steffest way back in 2009. Essentially, the application works by listening and sending information on the same COM port as the Arduino.

“The application listens for 3 commands (play/plause, prev, next) once these get detected they send the relevant command over to the Spotify application. Information about the current song is then sent to the COM port and received by the Arduino, which outputs this to the attached LCD screen,” Steve added.

“As you can see, the only options you have is to select a COM port (this should be the Arduino’s COM port) and a connect/disconnect button. [Plus], the console window at the bottom updates in realtime as to what is getting sent/received from the Arduino.”

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

Let’s go Charlieplexing!



Charlieplexing is a technique proposed in early 1995 by Charlie Allen at Maxim Integrated for driving a multiplexed display in which relatively few I/O pins on a microcontroller are used to control an array of LEDs.

According to Wikipedia, the method employs the tri-state logic capabilities of microcontrollers in order to gain efficiency over traditional multiplexing. Indeed, most Makers have likely encountered a project where multiple LEDs are required – with only a few wires.

As Ochâtelain notes in a recent Instructables post, Charlieplexing using an Atmel-based Arduino board may very well fit the bill.

“With only four wires you can drive 12 LEDs with only four resistors as an optional protection and without any ‘intelligent’ component like a 74595 or similar,” ochâtelain explains.

Recommended project components?

  • 4 RGB LEDs (or 12 single color LEDs)
  • Atmel-based Arduino board
  • 4 resistors
  • Breadboard
  • 4 PIN male headers

Ochâtelain kicks off the project by prepping the stripboard.

“We will add a resistor to each strip, so just leave two rows in the beginning of the strips empty – one for the headers, one for the start of the resistor, cut (= isolate) on the third row of holes, the LED will be plugged starting from the forth row,” he writes.

“To simplify the bending, we mark the stripboard distance on every pin all LEDs. This way it is very easy to bend the pin the required strip. Please be aware to keep always the same ‘orientation’ of your LEDs. In this case Pin 3 is always the anode.”

Next, Ochâtelain defines the specific bending pattern and plugs the LEDs into the stripboard.

“Now comes the easy part: Just solder all the LED-PINs, then the 4 resistors (I first used 3k3 throughholes and then 0k5 SMDs) and the 4 header pins,” he adds.

“Keep a sharp eye on any short-circuit on the front and back side of the board.”

Last, Ochâtelain tests the system with a Charlieplexing Arduino sketch. 

Interested in learning more about Charlieplexing with an Arduino? You can check out Ochâtelain’s Instructable page here.