Tag Archives: ATtiny84

Protect your chickens with this automatic door

Philip Verbeek has developed an automated, ATtiny84-powered door system to protect his chickens against fox at night. 

As anyone who has a chicken coop knows, fox will not hesitate to go after your fowl for its next meal. In fact, a single red fox has been known to wipe out entire flocks in a single raid. These predators are not just relentless, but they are also patient and very smart. They will find all the cracks, openings, and weak points in your chicken runs and use those as entry points.


Knowing this, engineer Philip Verbeek decided to create an automatic door system to protect his chickens against the fox at night using an ATtiny84. The door position itself is dependent of the daylight intensity, and door will automatically close at sunset and then reopen at sunrise. (Due to their natural biorhythms, chickens will always go inside at dusk.)

A user can manually set the light value at which the system should trigger. This can simply be done by turning the potentiometer with a screwdriver. In Verbeek’s case, light intensity was measured by an LDR. This sensor should be activated for more than five minutes to start the system, thereby preventing it from being involuntarily actuated by somebody walking by.


The time for door closing is set by a timer and the door is lifted until an limit switch is pressed. This way, the system has a reference point.

“At the moment, I developed the system further into one casing (black box principle). So it is much more solid, easy to install and up and running in no time. The advantage over already existing kind of systems is that it is relatively inexpensive and adaptable to your own requirements,” Verbeek explains.

Need a new way to protect your coop? Check out the automatic door here, and see it in action below.


KeyChainino is the first Arduino-programmable keychain game

Play some Pong on your keychain as you wait for the bus… or even while unlocking your front door.  

Remember Alessandro Matera who unveiled his Tiny Watch earlier this year? It was a simple 3D-printed LED timepiece based on an ATmega328P and powered by a 3V CR2032 battery. Well, the Italian Maker is back with yet another nifty little wearable device.


We’ve all at one time or another fiddled with our keys while anxiously waiting for the bus, train or our latte at the coffee shop. This was the inspiration behind Matera’s latest creation: KeyChaininoIt’s an Arduino-programmable keychain gaming board that doesn’t require a standard mobile device to play. (In other words, it’s a great alternative for those who rather not have to whip out their smartphones.)

The Maker decided to ditch an LCD screen for an ATtiny84 powered 6×5 LED matrix and used Charlieplexing to drive the 30 tiny lights. Not only did it give it some old-school flavor, he wanted to make it easy for folks to design their own games without having to worry about how to devise boards.


One of the first games he made for it was no other than Pong. Matera shares, “I have created my first game: a simple arkanoid-like, where a ball just bouncing on the screen and you need to move the paddle – with the two buttons – to prevents the ball from falling from the playing field.”

Intrigued? Head over to KeyChainino’s page here, or see it in action below. In the meantime, those looking to play games on an Arduino-compatible business card should check out Arduboy as well.


Building a LEGO radio with littleBits and an ATtiny84

Oh Henry! Turn up the music with this littleBits project.

Give Philip Verbeek a bunch of LEGO blocks, a handful of littleBits, an MCU and a challenge, and there’s no over-the-top creation that the Maker can’t bring to life. Those of you who recall his earlier project — a pinball machine comprised of over 4,000 plastic bricks, six servos, five motors, an MP3 and Arduino — are sure to love his latest piece of work: Henry the LEGO Radio.


Just like any conventional boombox, Verbeek is able to adjust the music’s volume, automatically scan forward and backward for stations, and manually turn the dial for new tunes. Take apart the LEGO bricks to reveal its inner workings and what you will find are a pair of synth speakers, a dimmer, a button, a few wires, a battery, a power module, as well as an ATtiny84 based Radio Bit board.


The Radio Bit can be used as a standalone device (with a power Bit) or in combination with other littleBits modules, as seen in this project. For instance, if paired with the cloudBit, users can even trigger weather forecasts and employ the radio as an alarm in the morning. This unit boasts three buttons (scanning, next song and mute), a couple of indicator LEDs, a digital FM transmitter, a low-power audio amplifier and an audio jack with an adjustable volume, which when connected to a set of headphones, doubles as an antenna. According to Verbeek, Makers can also extend the antenna via an antenna connector. Meanwhile, built-in memory will store the last radio station before powering down.


Intrigued? Be sure to check out his official project page here, where you can vote for his littleBits module to go into production!

Aquaponics and hydroponics sensor platforms for Makers

Cooking Hacks, the open hardware division of Libelium, has launched two new sensor platforms that automate control and maintenance tasks in aquariums and in gardens through wireless connectivity and using open-source APIs. Designed for Makers, the new IoT solutions are based on Arduino, and include specialized sensors to measure parameters vital to aquatic life in ponds and fish tanks, or for indoor and outdoor gardening.


Powered by an ATtiny84 microcontroller (MCU), the Arduino Uno-compatible Open Garden platform consists of three separate kits equipped with sensors to maintain healthy growth, despite whether plants are located indoors, outside or in water. A suite of sensors, ranging from humidity and temperature to light and soil moisture, monitor plants for optimal care wherever they are situated. The platform’s actuators can control irrigation, as well as activate lights and oxygen pumps. A hydroponics kit is also available, which includes both pH and conductivity probes.


Open Aquarium has been designed to help Makers care for their fish by automating the control and maintenance tasks that are typically required in tanks and ponds. This newly-unveiled platform monitors water factors such as temperature, pH and conductivity. In addition, the fully Arduino-compatible system has the ability to measure water levels and leakage, as well as deploy actuators that can feed the fish, regulate water heating / cooling, activate pumps to change water or administer medicine, and control light intensity to simulate day and night cycles. The sensors send information using wireless interfaces such as Wi-Fi, GPRS and 3G.


Each product comes with a complete open source API to easily control the board through an ATmega328 based Arduino, as well as a web application that allows users to easily access and visualize relevant information from a browser or iPhone/Android device.

“We design connected technology using open source code to help makers discover, improve, and scale new sensor-based solutions for the Internet of Things,” explained David Gascón, CTO at Libelium.

Interested in learning more? You can check out the official Open Garden page here. Readers may also want to browse through some of our previous articles on open source agriculture, including “Vertical Farming with Arduino,” “The Internet of Things, Stalk by Stalk,” “Smart Urban Aquaponics in West Oakland,” “DIY Farming with Atmel and Arduino,” “Open Source Aquaponics with APDuino,” “Agricultural Monitoring with Atmel AVR
,” “Arduino-Based Farming in Maine” and “Building a DIY Moisture Monitor.”

ATtiny84 powers this DUO Decimal SBC

Jack Eisenmann has created a number of Atmel-based homebrew computers that we’ve covered on Bits & Pieces, including the DUO tiny, DUO portable and DUO Mega.

Recently, Eisenmann debuted the DUO Decimal, an ATtiny84 based SBC.

“[This] ATTiny84 based computer [features a] 7 segment number display and 2 buttons. [You can] use the 512 bytes of EEPROM to store program code,” Eisenmann explained in a recent project post.

 “[Plus, you can] use the 512 bytes of SRAM for program data and as a code editing buffer.”

Additional key project components include:


(x1) 7 segment number display: LA-401VD (SC56-11EWA)
  • (x2) Button: 101-TS7311T1602-EV
  • (x3) 10K ohm resistor: 291-10K-RC
  • (x1) 20K ohm resistor: 291-20K-RC
  • (x1) 330 ohm resistor (7 isolated): 4114R-1-331LF
  • (x1) 14 pin chip socket: 2-641599-4 (1825093-3)
  • (x2) 3 pin male header: 69190-403
  • (optional) 5 pin female header: 929870-01-05-RA
  • (x1) Larger capacitor: UVR1H100MDD1TA
  • (x1) Battery holder: BAT-HLD-001
  • (x1) Battery: CR2032
  • (x1) Switch: MHSS1104
  • (x1) Board
  • (x1) Fuse for preserving EEPROM between programming cycles

As HackADay’s Adam Fabio points out, Eisenmann designed an entire language for the new board.

“DUO Decimal is programmed in an interpreted language called DUO Decimal Numeric Code (DDNC),” said Fabio.

”There are 47 DDNC commands, covering everything from basic math to list manipulation. Programs can be entered through the buttons, or save your fingertips by downloading them through the AVR ISP interface. The entire C code for the DUO Decimal, including the DDNC interpreter is available on Jack’s website.”

It should also be noted that Eisenmann coded several example DDNC programs, including 6 function calculator with trigonometry, a Mandelbrot set tester and even a version of the classic of the rock-paper-scissors game.

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

tinyAVR helps keep the time

A Maker by the name of Chris Gunawardena recently created a DIY minimalist LED clock powered by Atmel’s ATtiny84 microcontroller (MCU).

As HackADay’s Rich Bremer reports, the clock is equipped with a total of 24 LEDs, with one group designated for each hour, while the other displays five minute increments.

“The 24 LEDs are arranged in two concentric rings. To display the hour, both LEDs at the same angle are lit up. To show the minutes, just the inner LED is lit,” writes Bremer.

“If you are familiar with the ATtiny84 you know that it only has 12 in/out pins, which is significantly less than the amount of LEDs that need controlling.”

As such, Chris ended up using a number of 74HC595 shift registers to increase the IO pins on the ATtiny.

Essentially, the entire build is packed onto a protoboard with point-to-point wiring, which is housed in a basic tinted plastic case.

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

Open Garden hardware built around ATtiny84 MCU

Cooking Hacks, the the open hardware division of Libelium, has debuted a new Open Garden hardware platform.

Powered by Atmel’s ATtiny84 microcontroller (MCU), the platform consists of three separate kits equipped with sensors to maintain healthy growth, whether plants are located indoors or outside.

“All kits measure parameters such as temperature, humidity and light; soil moisture is monitored in the Indoor and Outdoor kits; water sensors such as pH, conductivity and temperature are added to the Hydroponics kits,” David Bordonada, Manager of Libelium’s Open Hardware division, explained.

“The Open Garden platform works with various types of actuators that can modify the state of the plants, by irrigating them with droppers or sprinklers or activating lights and oxygen pumps. The sensor nodes periodically send information to an Internet Gateway by using available wireless interfaces such as Wi-Fi, GPRS and 3G.”

According to Bordonada, an open-source web application stores data, allowing users to easily access relevant information from a browser or iPhone/Android app.

The system – compatible with both U.S. (110V) and Europe (220V) power requirements – will be showcased at Maker Faire Bay Area, May 17-18, 2014, at booth 231.

“Open Garden helps you get started with plant projects that range from beginner gardens to fully automated watering systems with grow lights,” added Bordonada.

“Now it’s easy to run your garden with microprocessors and a suite of sensors to monitor your plants and make sure they get optimal care.”

Interested in learning more? You can check out the official Open Garden page here. Readers may also want to browse through some of our previous articles on open source agriculture, 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,” Agricultural Monitoring with Atmel AVR
,” “Arduino-Based Farming in Maine” and “Building a DIY Moisture Monitor.

Reactor Core is an AVR programmer

The Reactor Core – which recently surfaced on Kickstarter – is a hardware programming platform for Arduino boards and stand-alone AVR-based microcontrollers (MCUs). 

Designed by Frank Fox, the Reactor Core is powered by Atmel’s ATmega328P MCU and an FT232R for USB to serial communication.

“The Arduino IDE has a fantastic option of directly programming microcontrollers using ISP [and] we included a ATmega328P (equivalent to an Arduino Uno board) on the programmer,” Fox explained.

“This allows you to program compatible blank ATmega microcontrollers with the Arduino bootloader. Once the bootloader is installed, then they are ready for use with the Arduino software. You can then switch back to the USB/serial connection to upload your sketches.”

The Reactor Core also includes an integrated ZIF socket for a number of Atmel’s ATtiny chips.

“To make  programming easier, we built in a ZIF socket. You setup the Reactor Core as an ISP, place your ATtiny chip in the ZIF socket, select the type of chip in the Board option, upload the sketch and then remove to install into your circuit,” said Fox.

“With the ZIF we will have support for both the ATtiny84 and ATtiny85. Using the ISP header you can connect to other compatible microcontrollers.”

As Fox notes, Makers can use the platform to self-replicate the bootloader to a blank microcontroller, thereby creating a cloned MCU.

“We think of this process like the chain reaction in a nuclear power plant. Once the first reaction happens, additional reactions are triggered. You can have dozens of projects all powered by the microcontrollers you programmed yourself. The Reactor Core is a device to empower you to make more reactions happen,” he added.

“The Reactor Core is also a way to simplify your life. Instead of having an Arduino, a programmer shield and a USB to serial converter, you only need the Reactor Core for all of these processes. This way if your Arduino is tied up on a project, you can still prototype another.”

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

Going 8-bit AVR with the DUO portable computer

Back in 2013, Bits & Pieces got up close and personal with Jack Eisenmann’s multi-core homebrew computer which is built around 16 ATMega328P microcontrollers. However, the talented Eisenmann didn’t stop there, as he subsequently decided to create the DUO tiny, a programmable computer based on Atmel’s ATtiny84.

Earlier this week, Eisenmann debuted the DUO portable, an inexpensive 8-bit computer based on Atmel’s ATMega1284 MCU. The platform is equipped with a black and white LCD output, along with a QWERTY keypad input.

Files are stored in a 64 KB EEPROM chip, with data written and read via a host computer through a serial interface.

All programs on the computer are written in a proprietary language dubbed “DPCL,” an acronym for DUO portable command language. Essentially, 

DPCL consists of plain ASCII commands interpreted by the ATMega1284. The programs are checked for syntax errors during runtime, with 12 KB of RAM allocated for DPCL programs.

Interested in learning more about the 8-bit AVR DUO portable? You can check out the project’s official page here.

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.