Tag Archives: I2C

Soil moisture sensor packs an ATtiny44A MCU

Powered by Atmel’s ATtiny44A microcontroller (MCU), Chirp is a plant watering alarm equipped with a soil moisture sensor.


According to a company rep, Chirp uses capacitive sensing as opposed to resistive humidity sensing.

Meaning, it does not actually make an electric contact with the soil, thereby successfully avoiding electrode corrosion and soil electrolysis – resulting in optimized accuracy and extended battery life.


On the hardware side of things, a standard AVR 6 pin ISP programming header is available on the board for programming and serial communication. The device acts as a I2C slave, so the header can be used to read the moisture and light levels. It should be noted that another microcontroller or a dev board such as Arduino can be used as I2C master to read those levels.


The alarm level is set for each plant individually, with Chirp configured to detect low moisture level and emit rare short chirps as appropriate. As more water evaporates, Chirp increases the alarm rate.

Chirp is currently available on Tindie at a $15 price point.

WifiDuino for the Internet of Things

Powered by Atmel’s versatile ATmega32U4 microcontroller (MCU), the open source WiFiDuino is a chip-sized development board that packs a 28×64 OLED display.

“We designed WifiDuino based on our belief in the future of the Internet of Things (IoT) when everything is connected. We will be living in a world when every object can communicate with each other using WiFi,” a WiFiDuino rep explained in a recent Indiegogo post.

“With WifiDuino, you no longer need to worry about getting a WiFi shield. [We] have done the hard part for you. It’s great for people who are tired of buying WiFi shields every time you want the board to be connected.”

Aside from Atmel’s ATmega32U4 MCU, key WiFIDuino specs and features include:

  • Supports Arduino IDE (Leonardo)
  • STA, AP, ADHOC network modes
  • Connects directly with smartphone
  • 20 digit I/O
  • 12 Analog I/O
  • UART, I2C, SPI
  • 5v power and I/O pin level

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

Who’s talking about the Arduino Zero ?

The Atmel-powered Arduino Zero dev board was officially announced on May 15th, 2014. The board’s debut has already been covered by a number of prominent tech publications, including Ars Technica, HackADay, EE Times, Electronics Weekly, CNX SoftwareUberGizmoGeeky Gadgets, SlashGear, PC World, SemiWiki and Makezine.

Sean Gallagher, Ars Technica

“The Zero is a 32-bit extension of Arduino’s flagship Uno board, developed jointly by the Arduino team and Atmel, targeted at helping developers prototype smart devices. Based on the Atmel SAM D21 ARM Cortex-based microcontroller, the Zero includes Amtel’s Embedded Debugger—allowing developers to debug their projects without having to wire up another interface.


“It gives developers a huge boost in storage and memory over the Uno, providing 256KB of onboard Flash storage (compared to the Uno’s 32KB) and 32KB of static RAM (compared to the Uno’s 2KB). It can also emulate an Electronically Erasable Programmable Read-Only Memory (EEPROM) of up to 168KB, while the Uno only supported 1KB of EEPROM.”

Brian Benchoff, HackADay

“The Arduino Zero uses an Atmel ARM Cortex-M0+ for 256kB of Flash and 32k of RAM. The board supports Atmel’s Embedded Debugger, finally giving the smaller Arduino boards debugging support.

“The chip powering the Zero features six communications modules, configurable as a UART, I2C, or SPI. USB device and host are also implemented on the chip [and] there are two USB connectors on the board.”

Max Maxfield, EE Times

“I’ve become a huge supporter of the Arduino, from the concept to the hardware to the software (IDE) to the ecosystem. I’m now using Arduinos and Arduino-compatible platforms for all sorts of projects, including my Infinity Mirror, my Inamorata Prognostication Engine and my BADASS Display.

“Each Arduino and Arduino-compatible platform offers different features, functions, capacities, and capabilities, which makes it possible to select the optimal platform for the project at hand using criteria such as size, cost, performance, and number of input/output pins. As of this morning, there’s a new kid on the block – the Arduino Zero, which has been jointly developed by Atmel and Arduino.”

Alasdair Allan, MakeZine

“While it shares the same form factor as the Arduino Leonardo—with 14 digital and 5 analog pins—all of the digital pins except the Rx/Tx pins can act as PWM pins, and the analog pins have a 12-bit ADC instead of the Leonardo’s 10-bit ADC, giving significantly better analog resolution,” writes Makezine’s Alasdair Allan.

“The new board comes with 256KB of Flash memory, and 32KB of SRAM. While the new board doesn’t have EEPROM, it does support 16KB by emulation, so Arduino sketches relying on this feature will still run without issue.”

Arduino Zero – official specs:

  • Microcontroller ATSAMD21G18, 48pins LQFP
  • Operating voltage 3.3V
  • Digital I/O Pins 14, with 12 PWM and UART
  • Analog input pins 6, including 5 12bits ADC channels and one 10 bits DAC
  • DC current per I/O Pin 7 mA
  • Flash memory 256 KB
  • SRAM 32 KB
  • EEPROM up to 16KB by emulation
  • Clock speed 48 MHz

Interested in learning more? You can check out the official Arduino Zero page here.

Atmel’s ATtiny85 MCU powers ButtonDuino dev board

ButtonDuino – which recently made its Indiegogo debut – is an uber-mini (0.73in x 0.718in), USB programmable development platform powered by Atmel’s popular ATtiny85 microcontroller (MCU).

The open source ButtonDuino is breadboard compatible, so it plugs, with no pin conflict, directly into any standard pitch (2.54mm) breadboard as well as vero-boards. In addition, the platform can also be easily stacked with any ButtonDuino compatible ButtonShields and is expandable via I2C or SPI.

Upcoming ButtonShields include:

  • Real time clock (RTC)  – I2C
  • EEPROM – I2C
  • Temperature sensor  – I2C
  • Pressure resistive sensor
  • Coin battery pack
  • 3-axis digital compass

“[Users can] create amazing Graphical User Interfaces (GUI) with LabVIEW by National Instruments. All you need is the same micro-USB cable that you already have to program and power ButtonDuino,” the ButtonDuino crew explained.

“The best feature? ButtonDuino’s schematics, code and bootloaders are all free and open source. All the details will be released once the product is finalized.”

Aside from Atmel’s popular ATtiny85 microcontroller (MCU), key ButtonDuino components include:

  • USB Regulated power up to 800mA via external power supply or 500mA from PC/laptop
  • Programmable via USB or AVR mkII
  • Arduino IDE 1.0+ (Windows/OSX/Linux)
  • 6 x available I/O Pins and I2C and SPI expandable
  • 8k flash memory without bootloader (6k after USB bootloader)
  • 3 x 8 bit hardware PWM pins
  • 4 x 10 bit ADC pins
  • Power LED
  • Test LED (Pin 1)
  • Soon to be available in deep red (PCB silkscreen)

Interested in learning more?

You can check out ButtonDuino’s official Indiegogo page here.

Interfacing with Adafruit’s Atmel-powered Trinket

Bits & Pieces recently covered a project by a Maker named Pocketmoon who wanted to demonstrate just how many components can be hung off Adafruit’s 3.3v ATtiny85-powered Trinket.

Today, we’re going to be taking a closer look at constructing a Trinket RGB shield clock, courtesy of the Adafruit crew. 

According to Adafruit’s Mike Barela, the project was inspired by a forum member who asked if the Trinket can be interfaced with an RGB LCD shield, which was originally designed to link with more “classic” Arduino boards using a standard shield pin layout.

“Obviously the shield cannot stack onto Trinket but with four wires, the display shield can hook up to a Trinket project well. This is accomplished as both use the I2C or two-wire bus to communicate,” Barela explained in detailed tutorial.

 “As a further demonstration, the Adafruit I2C based DS1307 real-time clock module is used to display the time and date. The display shield’s buttons allow for changing the hour in case of daylight savings time and toggle the backlight.”

Before kicking off the project, Makers will need to download three code libraries (TinyWireM, TinyRTClib, TinyAdafruit_RGBLCDShield) all optimized for Atmel’s ATtiny85 microcontroller (MCU) powering the Trinket. Next up? Modifying the Arduino IDE to work with Trinket by adding the hardware definition file, the avrdude.conf file, changing the ld.exe program (or download the preset Arduino 1.05 from Adafruit).

“Since we’re using I2C for the shield and real time clock, hookup is fairly straightforward,” said Barela.

“Don’t forget, I2C allows you to use multiple devices on two shared pins, perfect for when you don’t have a lot of pins like the Trinket.”

On the code side of things, Barela uses two programs are used to save space. The first, typically runs once (initialization) and sets the battery-backed DS1307 RTC, while the main code displays the clock value and polls the buttons. Meaning, if the up or down buttons are pressed, the value offset is incremented/decremented. This is added to the RTC clock time to form the hour.

“The combination of Trinket and the RGB LCD Shield is a good combination for display and input. There is enough code space to hook a number of sensors for real-time readout,” Barela concluded. “If you believe the shield form factor is not ideal, use of the LCD with the I2C backpack is a good combination. See the tutorial for the Trinket Ultrasonic Rangefinder as an example. If you want a more precise clock, you can swap the DS1307 for a Chronodot, it is code-compatible and ultra-precise!”

Interested in learning more? You can check out Adafruit’s detailed tutorial here.

High-performance lighting with Atmel’s MSL2021/23/24 LED drivers

Atmel’s MSL2021/23/24 series of solid state lighting (SSL) LED drivers are equipped with an adaptive power control scheme and temperature compensation circuitry – offering the most efficient power management for high color-rendering index (CRI) luminaires.

According to an Atmel engineering rep, the MSL2021/23/24 devices drive one dominant LED string and one color LED string to achieve the target correlated color temperature (CCT), replicating the color spectrum and attaining a high CRI value.

“Competitive LED drivers, by contrast, are more expensive and complex to use, requiring an external microcontroller and firmware to address temperature compensation,” the engineering rep explained.

The above-mentioned Atmel series consists of three devices:

MSL2021 – The first LED driver with integrated temperature compensation for the color LED string.

MSL2023 – Equipped with an I2C serial port and internal pulse-width modulation (PWM) generators.

MSL2024 – Features PWM inputs which are suited for development with Atmel’s general-purpose and communications AVR microcontrollers.

Key functions and features include color control of two-color LED light engines, direct control of offline AC/DC controllers, adjustable temperature compensation for controlling color over temperature, as well as PWM and peak current control of each LED string.

Additional key specs include an accurate “white point”adjustment using proprietary temperature compensation scheme; control of single or two-stage power factor correction (PFC) AC/DC or DC/DC supply via efficiency optimizer; initial calibration at factory and storage of system defaults via integrated EEPROM; smooth start-up to avoid “red flash” and comprehensive fault management.

In terms of specific applications, the MSL2021/23/24 LED drivers can be used for general lighting, architectural lighting and mood lighting. Interested in learning more about Atmel’s extensive lighting portfolio? Be sure to check out our main lighting page here which offers a detailed look at various lighting technologies.