Tag Archives: bergerab

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.

This ultrasonic ruler is pocket-sized

A Maker known as “bergerab” has created an Atmel-based ultrasonic ruler powered by the popular ATtiny85 microcontroller (MCU).

According to the inventor, the recently posted Instructables prototype is accurate to +/- one centimeter.

“Using this pocket-sized ultrasonic ruler, you can simply point at any object, click a button, and the distance will be displayed on the 8 LED display,” bergerab explained in a meticulously detailed Instructables post.

“This ruler is the smallest (5cm by 7cm) and cheapest (about 5 USD) ultrasonic measuring device available today.”

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

  • 74hc595 shift register
  • 7805 voltage regulator
  • HC-SR04 ultrasonic range sensor
  • 330 Ohm resistors (8)
  • One tactile-switch button
  • One two-way slide switch
  • LEDs (8)
  • One indicator LED (with 2k resistor)
  • Perfboard (5cm by 7cm)
  • 9v battery (with connector)

On the software side, bergerab describes the sketch for the circuit as quite small and simple.

“Basically, all the code does is every 500 milliseconds, the distance between the HC-SR04 and an object infront of it is shifted out to the shift register via the data and clock pins attached to the ATtiny85,” he added.

“When the user presses the button on the device, they are actually activating the ‘latch’ on the 74hc595. This illuminates the need for attaching the latch pin to the attiny and attaching a button to the ATtiny85.”

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