Tag Archives: Adafruit

This IR theremin speaks in four voices



It’s the end of the semester for Scott McKenzie (sjm298) and Alex Rablau (ar568) – both of whom successfully participated in Cornell’s ECE4760 class with the creation of an infrared theremin capable of speaking in four voices.

As HackADay’s Kristina Pano reports, the classic theremin design employs each of the player’s hands as the grounded plate of a variable capacitor in an LC circuit.

“For the pitch antenna, this circuit is part of the oscillator,” Pano explained. “For the volume antenna, the hand capacitor detunes another oscillator, changing the attenuation in the amplifier.”

However, McKenzie and Rablau put a twist of sorts on the traditional theremin by using two IR sensors to control volume and pitch, respectively.

 Essentially, the sensors are tasked with computing the location of each hand, outputting a voltage inversely proportional to its distance from the hand. Meanwhile, Atmel’s ATmega1284P converts the signal to an 8-bit binary number for processing.

“McKenzie and Rablau built four voices into it that are accessible through the push-button switch. The different voices are created with wave combinations and modulation effects,” Panos continued. “In addition to Classic Theremin, you can play in pure sine, sawtooth and FM modulation.”

Although the duo say they are pleased with the current version of the theremin, they are looking forward to implementing further improvements.

“Future iterations of the design could bypass the pulse-width-modulation by using an external digital to analog converter for output actuation. This would free up CPU time to leave additional cycles and memory for more complicated sounds. Also, in its current state, our theremin requires an external amplifier and speaker connected through a standard 3.5mm audio jack,” the two concluded.

“In order to make our theremin truly portable, a built-in amplifier and speaker would be necessary. Furthermore, our input from the user comes in the form of a single-axis distance sensor. Movements which the user makes which are orthogonal to this axis are not seen by our theremin, and produce no response. This is the biggest discrepancy between our theremin and the real theremin, which responds to all user movements of all magnitudes.”

Interested in learning more? You can check out McKenzie’s and Rablau’s theremin here and read about designing a pseudo theremin with Atmel and Adafruit here.

A flickering LED candle in a jar with Adafruit’s Trinket



Tim Bartlett says he’s always wanted to create a small light with realistic fire (flickering) animation. Enter Bartlett’s LED candle in a jar – just in time for the winter holiday season.

“Its brain is a programmable microcontroller, running a smart RGB LED via a single data pin, housed in the lid of a jar,” Bartlett explains. “I used Adafruit’s [Atmel-powered] Trinket — a tiny, inexpensive board available in 3.3V or 5V flavors.

”

Thus far, Bartlett has created three prototypes:

  • A self-contained 3.3V candle with a single Atmel-based Flora NeoPixel, powered by a tiny rechargeable 150mAh lipo battery inside the lid, with a pushbutton toggle power switch hot glued to the outside of the lid.
  • A 5V single-pixel candle, with Trinket on the outside for powering via USB, plus an extra 2.1mm socket for external wall or battery power.
  • A 5V 8-pixel candle using Adafruit’s 8 NeoPixel Stick, with all electronics inside the lid and a 2.1mm power socket on top.

“The jars have a white paper disc at the bottom and a tracing paper tube running the jar’s height. I plan on replacing them with some theatrical lighting diffusion so nothing bursts into flame — probably not a risk, but you never know,” says Bartlett.

“The Arduino code runs a basic fade on the green pixel, causing it to dip down and back every 120 milliseconds, roughly 8 times per second. When the green dips, the light gets dimmer and redder, as if it’s losing oxygen. An RGB mix of 255, 100, 10 (on a scale of 0 – 255) looks like a pretty good candle flame yellow to me.”

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

NeoPixel painting with Adafruit

Light painting is is an artistic medium combining light, motion and long-exposure photography. As Adafruit’s Phillip Burgess notes, a single point of light in motion will create a continuous streak in the final photograph for as long as a camera’s shutter is open.

“Digital technology takes light painting to the next level. Dozens of point lights, with color and brightness individually under computer control, weave a swath of awesome across the completed frame. Adafruit’s NeoPixel strips, combined with an Atmel-based Arduino Uno microcontroller (ATmega328) and a supporting cast of parts, make highly refined digital light painting achievable,” Burgess explained in a recent Adafruit blog post.

“[However, it is important to] have some Arduino/crafting/hacking experience before this project – this is great  for someone who is comfortable with wiring, soldering, heat shrink, image conversion, etc. It’s not a good first project, as there are a lot of expensive components that need careful handiwork.”

Aside from the Atmel-based Arduino Uno, key project components include:

  • Adafruit Data Logging Shield
  • NeoPixel strip, sticks or pixels
  • UBEC DC-to-DC converter
  • 8xAA battery holder and AA cells (NiMH rechargeable recommended)
  • SD card (or microSD with adapter), FAT-formatted
  • Camera with a long-exposure mode, plus a tripod
  • Imaging editing software to output 24-bit BMP files (e.g. Photoshop, GIMP, Pixelmator)
  • Wire: 22 gauge (approximate)
  • Soldering iron and related equipment
  • Optional: JST connectors, power blocks, etc.
  • 3/4″ square pine molding support frame or aluminum extrusion

Three primary software components are required to kick off the project: Adafruit NeoPixel (library), SDFat (library) for reading/writing SD cards and the Arduino light painting sketch. On the hardware side, Makers can begin by prepping their Adafruit Assembled Data Logging Shield.

“[This is] the most affordable and trouble-free way to add an SD card reader to an Arduino, and the combined board stack is slim enough to fit inside a popular mint tin. [Yes], there are other shields with SD (or microSD) card slots in addition to other features,” Burgess continued.

“Most can work just fine as a card reader for this project. Some may have a display or buttons, but our example software doesn’t support these, nor will thicker shields fit inside the mint tin.”

Next up? Solder the included male pin headers to the shield following the directions in the Adafruit Data Logger Shield guide. Stacking headers are not recommended for this project, as they won’t fit inside the mint tin. Then plug the shield into an Arduino Uno, subsequently connecting a USB cable between the board and a PC.

“The green PWR led on the shield should light up. If it does not (and especially if the computer complains about a USB device drawing too much power), there’s probably a solder bridge between pins. Unplug USB, remove the shield and look it over for any soldering mistakes,” Burgess added.

Interested in learning more about Adafruit’s NeoPixel painting project? You can check out the detailed tutorial here.

Atmel is building the Internet of Things (IoT)

The Internet of Things (IoT) refers to a future world where all types of electronic devices link to each other via the Internet. In 2009, there were 2.5 billion connected devices; most of these were mobile phones, PCs and tablets. By 2020, there will be over 30 billion connected devices of far greater variety.

According to Gartner, 50% of companies expected to help build the rapidly evolving Internet of Things have yet to coalesce. This is precisely why Atmel views the Maker Movement as one of the primary tech incubators for future IoT companies and devices, many of which will undoubtedly use Atmel microcontrollers (MCUs) to power their respective platforms.

MakerBot, which manufactures the Atmel-powered Replicator 3D printer, is a perfect example of a Maker-inspired company that emerged from nothing, yet was recently acquired for approximately $600 million by Stratasys. Adafruit, responsible for designing the Atmel-powered Gemma, Trinket and Flora platforms, is another example of a successful company started by Makers, for Makers. Of course, Atmel is also at the heart of multiple Arduino boards used by millions of Makers, engineers, schools and corporations all over the world.

There is a reason Atmel’s MCUs and MPUs are the silicon of choice for both Makers and industry heavyweights. Simply put, our low power sipping portfolio, which includes WiFi capability and extensive XSense integration options, is optimized for a wide variety of devices, ranging from IoT wearables to more stationary industrial platforms with connected capabilities such as smart grids and home appliance automation. Indeed, an IoT-enabled smart grid equipped with advance sensors offers huge energy savings, helping to create a green and sustainable future by conserving power and reducing water consumption.

Clearly, the age of IoT is already upon us. To be sure, over three-quarters of companies are now actively exploring or using the Internet of Things (IoT), with the vast majority of business leaders believing it will have a meaningful impact on how their companies conduct business. As noted above, the number of “things” predicted to be connected to the Internet by the end of this decade range from a staggering 30 billion to 50 billion.

According to Clint Witchalls, the Internet of Things is a quiet revolution that is steadily taking shape. Businesses across the world are piloting the use of the IoT to improve their internal operations, while preparing a stream of IoT-related products and services. Consumers might not (initially) recognize them as such, but that will not stop them from being launched, as few end users need to know that user-based car insurance, for example, is an IoT-based application.

From our perspective, the IoT represents one of the greatest potential growth markets for semiconductors over the next several years. That is precisely why Atmel remains focused on designing the absolute lowest power sipping products, particularly with regards to microcontrollers (MCUs) which offer maximum performance and meet the requirements of advanced applications. Atmel also offers highly integrated architecture optimized for high-speed connectivity, optimal data bandwidth and rich interface support – making our microcontrollers ideal for powering the smart, connected products at the heart of the IoT.

Reactive drums with Atmel and Adafruit

The Adafruit crew (Noe and Pedro) has designed a slick reactive drum system based on the Atmel-powered Gemma (ATtiny85) and NeoPixels. Essentially, this means musicians and Makers can easily upgrade their drum kits with sound reactive LEDs.

“This build uses a mic amp sensor and Gemma to light up NeoPixels to the beat of your drums. The cost of this build is considerably lower than other kits. It is also compact, rechargable and mobile,” the duo explained in a recently published Adafruit tutorial. “We made a circuit for a snare, mid-tom, hi-tom and a drum kick. Each drum is independent from one another but can also trigger other pieces if stricken loud enough. [Plus], our project cost one third of the price of other led drum kits on the market.”

To kick off the project, Makers may want to prototype their circuits using small alligator clips to connect the components together.

“The pins on the mic sensor are small, so be sure to double check your connections if you’re having trouble getting the circuit to work. It might be easier to solder wires to the mic and then alligator clip to those,” Noe and Pedro noted. “Since drumsets are so loud, the code is set to have a low sensitivity for the mic, so make sure to give a loud sound when testing the NeoPixels audio response. Rubbing the microphone with your finger is a good way to get a reaction.”

More specifically, the NeoPixel strips digital input connects to pin D0 of the Gemma, with the negative connection of the NeoPixel strip going to the ground pin on the Gemma. Meanwhile, the positive power wire of the NeoPixel LED strip connects to the VBat pin of the Gemma (not 3.3V). The out pin on the mic amp goes to pin A1/D2 of the Gemma (an analog input pin), with the positive power breakout pin on the mic amp connecting to the 3.3v pin of the Gemma and the negative ground pin of the mic amp sharing the same ground connection on the Gemma (together with the NeoPixel strip).

Once Makers have the circuit prototype tested and working, they can continue the project by soldering wires to the above-mentioned components for a solid connection.

“Start by measuring lengths of wires needed for connecting the Gemma to the NeoPixels and mic sensor. The wires should be long enough to run through the air hole and inside the drum shell,” the Adafruit crew added.

“The main circuit (which contains the Gemma, battery and switch) will be fitted inside an enclosure and mounted on the side of the drum shell closest to the air hole. To see if your wires are long enough, place the Gemma into position and see if the wire is long enough to connect the NeoPixel strips inside the drum shell. It’s fine to have some extra wire.”

Interested in learning more about building a reactive drum system using the Atmel-powered Gemma and Neopixels? You can check out Adafruit’s full tutorial here.

Building a speaking ultrasonic distance sensor

A Maker by the name of Klaus recently built a “speaking distance sensor” to help him park his car.

According to the HackADay crew, the platform is built around an Atmel-based Arduino Uno (ATmega328), an HC-SR04 ultrasonic distance sensor and Adafruit’s Wave Shield.

“Originally, this parking/distance sensor used a small TFT to display the distance to an object, but after a few revisions, Klaus redesigned the device to speak the current distance, courtesy of an SD card and a soothing female voice,” explained HackADay’s Brian Benchoff.

“Right now, the voice is set up to speak the distance from an object to the sensor from 10 cm to 1 m in 5cm increments. This isn’t the limit of the sensor, though, and the device can be easily reconfigured to sense a distance up to four meters.”

Currently, the board lacks an on-board amplifier/speaker, although adding a small amplifier (courtesy of Adafruit) should be sufficiently loud to be heard inside the noisiest parking lots and out in the street.

Interested in learning more about building an Atmel-based speaking ultrasonic distance sensor? You can check out the project’s official page here.

Christmas lights with an Atmel-based Arduino

Thanksgiving may be over, but Christmas and twinkling holiday lights are headed our way. And really, what could be more appropriate for Makers than strings of artfully strung Christmas lights controlled by an Atmel-based Arduino?

One such DIY LED array recently came to our attention, courtesy of the folks at HackADay.

Indeed, a Maker by the name of Anx2k created permanently mounted Christmas lights using LEDs left over from another project. More specifically, the RGB pixels are mounted underneath the tiles on the roof, three per tile, two facing up on either side of the tile and one facing out at an angle in the middle.

“All the wires [run] into his attic where he has an electrical box serving as the main control hub. He uses an Arduino Uno (ATmega328) to control them and a 460W computer power supply to provide the juice,” explained HackADay’s James Hobson.

“The LED modules themselves are Adafruit RGB pixel strings. There’s actually three of the LED modules per tile – two shining up to illuminate the tile, and one shining out.”

As you can see in the video above, Anx2k configured a number of slick patterns for the Arduino Uno to run, including color drop, blended Christmas, spectrum chase, Christmas alternate, random stars and rainbow.

Solar-powered batteries woven into fabric for wearables

A new generation of solar-powered wearable electronics could soon be hitting the streets, with batteries inconspicuously woven into clothing fibers or incorporated into watchbands.

Image Credit: Adafruit

As a recent article published in Nano Letters notes, electronic textiles have the potential to integrate smartphone functions into clothes, eyeglasses, watches and materials worn on the skin. Possibilities range from the practical – for example, allowing athletes to monitor vital signs – to the aesthetic, such as lighting up patterns on clothing.

However, the article identified current battery technology as the primary “bottleneck,” responsible for slowing progress toward the development of a wider range of flexible e-fabrics and materials. Indeed, a number of wearable electronic items, such as smartwatches and Google Glass, still require a charger with a cord.

To unlink smart technology from the wall socket, a research team headed by Taek-Soo Kim, Jung-Yong Lee and Jang Wook Choi had to rethink what materials are best suited for use in a flexible, rechargeable battery that’s also inexpensive.

Image Credit: Adafruit

Ultimately, the team decided to test unconventional materials, discovering that they could coat polyester yarn with nickel and carbon – using polyurethane as a binder and separator to produce a flexible battery that kept working even after being folded and unfolded many times. The researchers also managed to integrate lightweight solar cells to recharge the battery without disassembling it from clothing or requiring the wearer to plug in.

As we’ve previously reported on Bits & Pieces, analysts at ABI Research have determined that wearable wireless device revenues will grow to exceed $6 billion in 2018. Of the four segments tracked, sports, fitness and wellness are the largest, never dropping below 50% share of all device shipments over the forecast period.

Amulet Pendant: Powered by Atmel’s ARM-based SAM4L MCU.

“Fitness activity trackers are quickly gaining popularity in the market,” confirmed ABI Research senior analyst Adarsh Krishnan. “Different from other more single-use or event-centric devices, activity trackers monitor multiple characteristics of the human body including movement, calories burned, body temperature and sleep tracking.”

The Makers of Iron Man

A Maker by the name of Ryan Brooks – aka “the real Tony Stark” – has created a slick 3D-printed, nod-receptive Iron Man helmet.

According to Terry Chao of DVICE, an Atmel-powered Arduino Pro Mini (ATmega168) and an Adafruit accelerometer allows the helmet’s faceplate to open and close based on which way the wearer nods.

“By nodding backwards, the faceplate seamlessly opens and locks into place, while nodding with a forward motion will close it. Brooks is currently selling iterations of his servo mechanism on his website, starting at $150,” wrote Chao. “Because the helmet’s base is tapered towards the bottom by design, Brooks made it possible to keep the shape of the original helmet through reticulating back neck flaps that allow the wearer to comfortably put it on.”

Brooks also equipped the helmet with some “Jarvis” voice action to inform the user if it is booted up and ready, along with appropriate air lock and “whoosh” sound effects when the faceplate opens and closes. Meanwhile, light blockers are tasked with protecting the wearer’s eyes from the bright LEDs in the mask.

Of course, this isn’t the first Iron Man project Bits & Pieces has covered. Back in September, we reported how a Maker by the name of Thomas Lemieux turned numerous heads when he showcased his rather impressive Iron Man suit at the 2013 World Maker Faire in NYC.

“Everything is Arduino powered. There are four Arduino UNOs (ATmega328) in the suit; one for each bionic replusor, one for the sound board, and one for the arc reactor. All of the components are powered by ten 2600 mAh batteries that had to be ordered from Hong Kong,” Lemieux told Electronic Design. “The sound components for each repulsor and the sound board are wave shields from Adafruit. The SD cards with all of the sound files are located there.”

According to Lemieux, the project actually began with the arc reactor.

“I wanted one to sit on my desk at home and thought it would be cool to build one myself. So I walked the aisles at Home Depot and found any part that would seem to work,” he explained.

“The fins are cut from a solid sheet of metal and I used copper coils to bend around them. I used a sink tap as the center piece. And the rest is washers, rubber tubing and erector set pieces all J-B welded together. I got all of the electronics and LEDs from Radio Shack.”

Lemieux also told Electronic Design that the biggest challenge in designing the suit was fitting all the electronics into such a constrained space.

“It was very much trial and error… I started building on May 2nd, spending about four hours a day plus many all-nighters.”

Lemieux says his next suit will be more streamlined and easier to assemble.

“I also want to make Ultron. I have some great ideas on lighting his face up,” he added.

A tinyAVR USB volume knob

A Maker by the name of Rupert has designed a tinyAVR-powered USB volume knob based on Adafruit’s popular Trinket (Atmel ATtiny85) platform.

“After purchasing a Trinket to experiment with and Adafruit having a great mentality for Open Source Hardware, I decided to modify my own ATtiny85 volume control PCB to make it compatible with the Trinket’s 5Volt firmware (flash_me_hv_5volt.hex)! (which is Arduino compatible),” Rupert explained in a recent blog post. “This gives access to direct programming without the need for a separate programmer from the Arduino IDE. Its also nice to support the hard work done at Adafruit by purchasing one of their Trinkets.”

As the HackADay crew notes, an awesome looking RGB LED ring powered by Adafruit’s Neopixel was ultimately added to the design, albeit at the expense of a “mute” control.

“The PCB Rupert fabbed is pretty well suited for being manufactured one-sided,” wrote HackADay’s Brian Benchoff. “If you’ve ever wanted an awesome volume knob for your computer, all the files are available from Rupert‘s blog here.”

In addition to creating the above-mentioned tinyAVR USB volume knob, Rupert is reportedly working to load Adafruit’s Trinket bootloader on Atmel’s ATtiny84, an MCU with a total of 8 analog pins.

As we’ve previously discussed on Bits & Pieces, Adafruit’s popular Trinket can best be described as a tiny microcontroller board built around Atmel’s versatile ATtiny85.

“We wanted to design a microcontroller board that was small enough to fit into any project – and low cost enough to use without hesitation,” Adafruit’s Limor Fried (aka LadyAda) explained.

“[It is] perfect for when you don’t want to give up your expensive dev-board and you aren’t willing to take apart the project you worked so hard to design.”

Fried describes the Attiny85 as a “fun processor,” because despite being so small, it boasts 8K of flash and 5 I/O pins – including analog inputs and PWM ‘analog’ outputs.

“We designed a USB bootloader so you can plug it into any computer and reprogram it over a USB port just like an Arduino,” Fried continued. “In fact we even made some simple modifications to the Arduino IDE so that it works like a mini-Arduino board. You can’t stack a big shield on it but for many small and simple projects the Trinket will be your go-to platform.”

There are currently two versions of the Trinket: 3V and 5V. According to LadyAda, both work the same but have different operating logic voltages.

“Use the 3V one to interface with sensors and devices that need 3V logic, or when you want to power it off of a LiPo battery. The 3V version should only run at 8 MHz. Use the 5V one for sensors and components that can use or require 5V logic, [as] the 5V can run at 8 MHz or at 16MHz by setting the software-set clock frequency,” she added.