Tag Archives: ATtiny85

ATtiny85 operates (fingerprint) garage door opener

A high school sophomore known by the Instructables handle “nodcah” recently designed a DIY fingerprint scanning garage door opener powered by Atmel’s popular ATtiny85 microcontroller (MCU).

Fortunately, the DIY project isn’t limited to just garage doors, allowing Makers and tinkerers to create various types of simple motorized locks by modding the initial Instructables.

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

  • 

Fingerprint scanner and JST connector
  • Serial LCD kit with Atmel’s ATmega328 MCU
  • 
PNP transistor
  • Buzzer
  • Speaker wire
  • 3D printed case
  • Copper tape
  • 5V voltage regulator
9V battery and connector
  • SPDT limit switch

“The serial LCD kit sold by Sparkfun comes with an ATmega328 MCU to control the LCD. The ATmega has extra processing power to be used for other tasks besides controlling the LCD. Because of this, we can use it as an Arduino to communicate with the fingerprint scanner, send an ATtiny85 commands, control the LCD and use a buzzer to play tones,” nodcah explained in a detailed Instructables post.

“To prevent the module from running continuously, I’ve added a limit switch to detect when the case is closed. If it’s closed, power will not be supplied to it (saves battery power).”

After gathering the above-mentioned materials, drawing the circuit and assembling the serial LCD kit, nodcah builds the circuit boards, programs the ATmega328 and ATtiny85, configures the fingerprint scanner, writes the sketch and 3D prints a basic case.

“To open the garage door I wired my module to the button that normally opens the garage. Instead of a physical connection being made, the module uses a NPN transistor to ‘press’ the button. The wires should first be measured and cut to size, leaving a little extra wire just to be safe,” nodcah added.

“Then, the hard part: soldering the wires from the button to the FPS module. The wires should next be wrapped with a generous amount of tape. To get the signal from the ATmega outside of the garage to the ATtiny inside the garage, three wires (power, ground and signal) will need to be fed through the wall. On my garage, there was a piece of wood that I just drilled right through.”

Last, but certainly not least, nodcah notes that the module’s built-in enroll feature can be used to open the garage and create personalized messages for each profile.

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

Building a tinyAVR pocket sequencer

Earlier this week, Bits & Pieces took a closer look at an ATtiny85-powered ultrasonic ruler designed by a Maker named “bergerab.”

Today, we’re going to get up close and personal with an ATtiny pocket sequencer created by bergerab that uses the very same tinyAVR microcontroller (MCU). 

Built around the popular ATtiny85, the pocket-sized sequencer is fully programmable and usable in a studio setting.

“Besides making a pocket-sized sequencer, my goal of this project was to stretch the uses of the ATtiny chips to show how powerful they really are,” bergerab explained a recent Instructables post.

“This project is great for those interested in music and/or electronics, and by the end you will have one of the smallest, unique sequencers ever made.”

Aside from the ATtiny85 MCU, key project components include:

  • 

Perfboard (5 cm by 7 cm)
  • Two 10k potentiometers
  • Two tactile switch-buttons
  • Two two-way switches
  • A 7805 voltage regulator
  • Two 10uF caps
  • One 100uF cap
  • One 2k resistor
  • 8 LEDs
  • 74HC595 shift register
  • 1/4 inch audio female jack
  • Speaker/buzzer
  • 9v Battery (with connector)
  • (optional) 5cm by 7cm acrylic sheet

On the software side, bergerab uses a relatively simple sketch to regulate the device.

“In my design of this sequencer, I wanted the user to program the steps right when the device is turned on. To do this I used the ‘setup()’ function, [which] is executed when the ATtiny is initially given power, or if its reset pin is set to LOW,” he continued.

“I added a startup tone (which is a little arpeggio of a c major chord) to notify the user that they are in the frequency programming mode. In the main loop (‘loop()), the ATtiny is told to go through each step, and for each step, light the appropriate LED. Then play the note assigned to that step, at the specified note length. During this, the MCU is checking if the button (analogRead(pot)<30) is pressed. If it is, the program enters a function called ‘setSustain()’. In this function, the user can select the notes length, (via the button and potentiometer).”

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

IViny is an ATtiny85-powered DAQ



The Ivmech crew was recently in need of a small, inexpensive device capable of sensing analog values and toggling a few digital pins – all while logging everything to a PC.

Ultimately, the team decided to build the IViny DAQ, a mini data acquisition device powered by Atmel’s ATtiny85 microcontroller (MCU).

Aside from Atmel’s versatile ATtiny85 MCU, key project components include:

  • 2 channels 0 – 5V ve 0 – 3V digital input/output
  • 2 channels 0 – 5V 10 bit analog input
  • Channel maximum current 20 mA
  • USB power supply
  • V-USB based comms
  • PC user interface (UI)
  • 150 S/s (set to increase with future firmware upgrades)
  • 50 mm x 33 mm x 17 mm

“The IViny features two digital channels and two 10 bit analog channels, just like you’d find in any ATtiny85 project,” writes HackADay’s Brian Benchoff.

“Power is supplied over USB, and a connection to a computer is provided by V-USB. There’s also a pretty cool Python app that goes along with the project able to plot the analog inputs and control the digital I/O on the device.”

As Benchoff notes, the device doesn’t exactly run at light speed, with the firmware currently supporting 100 samples per second.

“[However], an upcoming firmware upgrade will improve that. Still, if you ever need to read some analog values or toggle a few pins on the cheap, it’s a nice little USB Swiss army knife to have,” he adds.

Interested in learning more about IViny, the ATtiny85-powered DAQ? You can check out the project’s GitHub page 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.

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
  • RGB LED
  • 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.

Report: Wearables to drive significant battery revenue

Analysts at IHS say the global market for batteries used in wearable electronics will increase more than tenfold in just four short years, propelled by new devices suitable for active sports and fitness lifestyles. 

Indeed, worldwide revenue for wearable electronics batteries is projected to reach $77 million by 2018, up considerably from a mere $6 million by year-end in 2014.

In addition, industry revenue will have grown nearly 120 percent from 2014 levels.

“Wearable electronics will be the key to sustaining the current very-high-growth levels of battery revenue in consumer electronics,” explained Thomas McAlpine, power supply and storage component analyst for IHS.

“The tremendous expansion in store will come thanks to an increase in the shipments of smartwatch products, wearable health monitoring devices and smart glasses—products geared toward an active lifestyle combining advanced technological trends in miniature computing with newly smart consumer imperatives in fitness and fashion.”

In addition, annual shipments for wearable electronic devices will reach an estimated 56 million units by 2018, fueling continued demand for the batteries that power these products.

“Of the total number of batteries expected to be installed in wearable electronics by 2018, lithium polymer batteries will take the predominant share, accounting for 73 percent of total wearable electronics battery revenue,” said McAlpine. 

”Lithium polymer batteries are typically the preferred choice as they are lighter in weight and can be manufactured into a wider range of shapes and sizes, compared to traditional lithium-ion batteries.”

Smartphone and tablet PC demand will continue to drive the majority of revenue growth in the lithium battery market for portable electronics over the next couple of years, with the combined shipments of these devices projected to grow 46 percent from 2013 to 2015. 

However, shipments will decrease from 2015 onward, and coupled with projected erosion in the average selling prices of lithium battery cells, growth will decelerate for the overall lithium battery market for portable consumer electronics.

“This means the emergence of new applications in the market is critical. Lithium batteries will remain an integral component for innovation in consumer electronics,” McAlpine added. “To achieve sustained market growth, new wearable electronics and other devices need to be introduced and adopted by the mass market, similar to what is occurring now in recently emerging product categories.”

As we’ve previously discussed on Bits & Pieces, Atmel is right in the middle of the wearable tech revolution, with the the soft electronics DIY Maker community adapting various Atmel-powered platforms specifically for wearables, including the Arduino Lilypad (ATmega328V) (developed by MIT Media Lab professor Leah Buechley), along with Adafruit’s very own Gemma (Atmel ATtiny85) and Flora (ATmega32u4), the latter of which can be easily daisy chained with various sensors for GPS, motion and light.

In addition, Atmel’s microcotrollers are found in a number of smartwatches and wearable medical devices.

Interested in learning more about wearables? You can check out our extensive article archive on the subject here.

ATtiny85 powers this posture sensor

Anyone who stares at a computer screen for 8 hours a day probably has learned the hard way that posture does indeed matter. 

Enter Wingman’s posture sensor, a device that monitors the position of your head (relative to the chair) and reminds you to sit upright.

As HackADay’s Nick Conn reports, the posture detection platform is powered by Atmel’s versatile ATtiny85 micrcontroller (MCU), paired with the HC-SR04 ultrasonic distance sensor.

“Rather than going down the wearable route, which has its own drawbacks, Wingman decided to attach his sensor on the back of his chair,” Conn explained. 

”The best part is that the sensor is not mounted directly on the chair, but rather on a piece of fabric allowing it to be easily moved when needed.”

There are basically three modes on the software side:

  • Configuration
  • Watch (monitoring) mode
  • Standby

“The configuration-mode waits until the user holds his head still and saves the distance of a comfortable position. After this the watch-mode starts, what compares the current distance to the saved distance,” Wingman wrote in a recent blog post.

“If your head is too far away it will sound an alarm. If you get your head back the alarm will stop immediately. If not the device beeps a few times and then mutes. After some time it enters standby-mode. This is meant for leaving the device alone, the sensor reads the distance only every few seconds during this to save energy. If you get back to your chair the configuration-mode starts again.”

Unsurprisingly, the project can be easily expanded simply by adding multiple sensors in various locations – allowing the angle of the back and possibly the neck to be determined. This configuration would likely provide a more accurate indicator of poor posture.

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

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.

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.

LED SMD firefly built around an ATtiny85



A Maker by the name of Tyson has created an “electronic firefly” built around Atmel’s popular ATtiny85 microcontroller (MCU) and a custom PCB.

Additional project components include:

  • (2) 12 pf 0805 capacitors
  • (1) 100 kOhm 1206 resistor (for reset line)
  • (1) 1 MOhm 1206 resistor (for LED discharge)
  • (1) CR2032 battery holder (BC2032-E2 at Digi-Key)
  • (1) CR2032 battery
  • (1) Clear Orange 5mm LED (754-1271 at Digi-Key)
  • (1) 32 kHz crystal (535-9166-1 at Digi-Key)
  • (1) 8 to 12 oz Mason Jar
  • 2-3 oz sand

Before kicking off, Tyson reviewed Karl Lunt’s asynchronous fireflies project, with the overall goal of simulating intermittent blinking in low-light conditions like a firefly.

“Using the existing project, I did need to modify a few things. First off, I was using an ATtiny85 instead of the ATtiny13a, as well as an external clock,” Tyson explained in a recent blog post.

“Luckily, the external clock only required a few fuses to be set as far as programming went and a couple load capacitors to allow it to be used with the MCU. The ATtiny85 required a few code changes because the output port for the LED and mux for ADC had to be changed among other registers.”

In terms of the PCB, Tyson used photo paper for the print and Eagle to create the necessary traces. He then soldered on the ATtiny85 and set the appropriate clock speed.

Interested in learning more about building LED fireflies with Atmel’s ATtiny85 MCU? You can check out HackADay’s coverage here, the project’s blog page here and the source/board schematics here.