Infrared Communications for Atmel Microcontrollers

Are you planning an IR communications project? Do you need to choose a microcontroller? Check out the information Cornell University Senior Lecturer Bruce Land sent us about inexpensive IR communication with Atmel ATmega microcontrollers. It’s another example of the sort of indispensable information covered in Cornell’s excellent ECE4760 course.

Land informed us:

I designed a basic packet communication scheme using cheap remote control IR receivers and LED transmitters. The scheme supports 4800 baud transmission,
with transmitter ID and checksum. Throughput is about twenty 20-character packets/sec. The range is at least 3 meters with 99.9% packet receive and moderate (<30 mA) IR LED drive current.

On the ECE4760 project page, Land writes:

I improved Remin’s protocol by setting up the link software so that timing constraints on the IR receiver AGC were guaranteed to be met. It turns out that there are several types of IR reciever, some of which are better at short data bursts, while others are better for sustained data. I chose a Vishay TSOP34156 for its good sustained data characteristics, minimal burst timing requirements, and reasonable data rate. The system I build works solidly at 4800 baud over IR with 5 characters of overhead/packet (start token, transmitter number, 2 char checksum , end token). It works with increasing packet loss up to 9000 baud.

Here is the receiver circuit.

The receiver circuit (Source: B. Land, Cornell University ECE4760 Infrared Communications
for Atmel Mega644/1284 Microcontrollers)

Land explains:

The RC circuit acts a low-pass filter on the power to surpress spike noise and improve receiver performance. The RC circuit should be close to the receiver. The range with a 100 ohm resistor is at least 3 meters with the transmitter roughly pointing at the receiver, and a packet loss of less then 0.1 percent. To manage burst length limitations there is a short pause between characters, and only 7-bit characters are sent, with two stop bits. The 7-bit limit means that you can send all of the printing characters on the US keyboard, but no extended ASCII. All data is therefore sent as printable strings, NOT as raw hexidecimal.

Land’s writeup also includes a list of programs and packet format information.

Great Plains Super Launch

Contributed by Mark Conner

The Great Plains Super Launch (GPSL) is an annual gathering of Amateur Radio high-altitude ballooning enthusiasts from the United States and Canada. The 2012 event was held in Omaha, Nebraska from June 7th to the 9th and was sponsored by Circuit Cellar and Elektor. Around 40 people from nine states and the Canadian province of Saskatchewan attended Friday’s conference and around 60 attended the balloon launches on Saturday.

Amateur Radio high-altitude ballooning (ARHAB) involves the launching, tracking, and recovery of balloon-borne scientific and electronic equipment. The Amateur Radio portion of ARHAB is used for transmitting and receiving location and other data from the balloon to chase teams on the ground. The balloon is usually a large latex weather balloon, though other types such as polyethylene can also be used. A GPS unit in the balloon payload calculates the location, course, speed, and altitude in real time, while other electronics, usually custom-built, handle conversion of the digital data into radio signals. These signals are then converted back to data by the chase teams’ receivers and computers. The balloon rises at about 1000 feet per minute until the balloon pops (if it’s latex) or a device releases the lifting gas (if it’s PE). Maximum altitudes are around 100,000 feet and the flight typically takes two to three hours.

Prepping for the launch – Photo courtesy of Mark Conner

On Thursday the 7th, the GPSL attendees visited the Strategic Air and Space Museum near Ashland, about 20 minutes southwest of Omaha. The museum features a large number of Cold War aircraft housed in two huge hangars, along with artifacts, interactive exhibits, and special events. The premiere aircraft exhibit is the Lockheed SR-71 Blackbird suspended from the ceiling in the museum’s atrium. A guided tour was provided by one of the museum’s volunteers and greatly enjoyed by all.

Friday featured the conference portion of the Super Launch. Presentations were given on stabilization techniques for in-flight video recordings, use of ballooning projects in education research, lightweight transmitters for tracking the balloon’s flight, and compressed gas safety. Bill Brown showed highlights from his years of involvement in ARHAB dating back to his first flights in 1987. The Edge of Space Sciences team presented on a May launch from Coors Field in Denver for “Weather and Science Day” prior to an afternoon Colorado Rockies game. Several thousand students witnessed the launch, which required meticulous planning and preparation.

EOSS ready for launch – Photo courtesy of Mark Conner

Saturday featured the launch of five balloons from a nearby high school early that morning. While the winds became gusty for the last two launches, all of the flights were successfully released into a brilliant sunny June sky. All five of the flights were recovered without damage in the corn and soybean fields of western Iowa between 10 and 25 miles from launch. The SABRE team from Saskatoon, Saskatchewan took the high flight award, reaching over 111,000 ft during their three-hour flight.

The view from one of the balloons. Image credit: “Project Traveler / Zack Clobes”.

The 2013 GPSL will be held in Pella, Iowa, on June 13-15. Watch the website superlaunch.org for additional information as the date approaches.

Elektor Weekly Wrap-Up: Receiver Project, Arduino-Based Design, & More

It’s officially summertime when Elektor’s special summer issue hits the newsstands. This year the team put together an attention-grabbing issue—complete with a redesigned layout—that’s packed with articles on projects such as a wearable distance-measuring device for swimmers, a music-making application with an Arduino, an “e-smog” detector, an innovative two-transistor regenerative receiver project, and more.

The two-transistor regenerative receiver

Editor-in-Chief Wisse Hettinga presents the issue in the following short video.

The 2012 summer issue is now available.

Elektor's 2012 summer issue

In other news, the Elektor team announced a new book on BASCOM-AVR is in the pipeline.

AVR microcontrollers are popular, easy to use and extremely versatile. Elektor magazine already produced a wealth of special applications and circuit boards based on ATmega and ATtiny controllers. These were mostly finished projects. In this book however the programming of these controllers is the foremost concern. BASCOM is an ideal tool for this. After a minimal preparation phase, you can start right away putting your own ideas into practice.

BASCOM and AVR microcontrollers — it’s an unbeatable team! Whatever you want to develop, in most cases the ATmega has everything you need on board. Ports, timers, A/D converters, PWM outputs and serial interfaces, RAM, flash ROM and EEPROM: everything is in plentiful supply, and with BASCOM their use is child’s play. More challenging peripherals like LCDs, RC5 and I2C can be used as well with just a handful of instructions. A wide hardware platform is available, too. Whether you’re using Atmel’s STK500 kit, the Elektor ATM18 or your own board, you can instantly turn the examples from this book into practice. For less exacting tasks controllers from the ATtiny are series used. That way, you can realize your own projects quickly and with little expense.

The companion CD-ROM with this book provides sample programs and software including BCAVRDMO, AVR STUDIO, LCDTOOLS, and TERMINAL.EXE.

Elektor members can preorder the book now.

CircuitCellar.com is an Elektor International Media publication.