Tag Archives: GitHub

Activating a PC with a knock and an ATtiny

A Maker by the name of Joonas has designed a knock sensor to activate his PC. According to the HackADay crew, the entire project cost Joonas a grand total of $10 and is built around Atmel’s ATtiny45 MCU which is tasked with emulating a PS/2 device.


“This takes advantage of his computer’s ability to boot upon receiving PS/2 input,” HackADay’s John Marsh explained. “The build uses a Piezo buzzer and a 1M Ohm resistor as a knock sensor exactly as the official Arduino tutorial demonstrates, [plus] one of those PS/2-to-USB adapters that are most likely lurking in the back corner of every drawer in your office.”

In addition, says Marsh, AVRweb was used to disable the 8X clock divider so there would be sufficient clock cycles for PS/2 communication. Joonas subsequently loaded some test code (final version posted to Github) to ensure the vibrations were being detected correctly.

Readers of Bits & Pieces may also want to check out a recent article about a Halloween Knock Box powered by Atmel’s versatile ATtiny45 (or 85) microcontroller (MCU).

The box is fairly easy to put together, as basic components include an MCU, a piezo element (amplifier) for the knock sensor and a motor to provide the knocking feedback.

Atmel’s ATtiny9 plays chiptunes

A chiptune – also known as chip or 8-bit music – can best be described as a synthesized electronic track produced by vintage sound chips or emulated by more modern generations of silicon.

Typically, chiptunes consist of basic waveforms, including square waves, sawtooth or triangle waves and basic percussion. These are often generated from white noise going through an ADSR envelope, low-quality PCM samples or FM synthesis.

A talented member of the demoscene known as “dojoe” managed to rig an Atmel ATtiny9 MCU to play chiptunes – using just 1KB of flash, 32 bytes of RAM and a 16 byte register file. Dubbed Noiseplug (based on a small RCA plug), the creation has 6 pins (four usable, as two are for power) and runs at 8 MHz.

Interested in learning more? The source info is available on GitHub here, while additional data on Atmel’s ATtiny9 MCU can be found here.

Arduino-based Smart Citizen Kit packs Atmel’s ATmega32U4

The Arduino-based Smart Citizen Kit – designed by Acrobotic – is an open-source environmental monitoring platform powered by Atmel’s ATmega32U4.

Dubbed the Ambient Board, the Kit hardware comprises two printed-circuit boards – an interchangeable daughterboard or shield, and an Arduino-compatible data-processing board. As the name suggests, it is equipped with sensors to measure air composition (CO and NO2), temperature, light intensity, sound levels, and humidity.

“Once it’s set up, the ambient board is able to stream data measured by the sensors over Wi-Fi using the FCC-certified, wireless module on the data-processing board,” the Acrobotic crew explained in a Kickstarter post. “The device’s low power consumption allows for placing it on balconies and windowsills. Power to the device can be provided by a solar panel and/or battery.”

The Acrobotic crew also noted that it is currently designing additional shields for urban agriculture soil and water testing (in collaboration with Refarm The City), measuring electromagnetic fields, tracking energy consumption as well as air composition inside the home, and even monitoring biometrics. As expected, all the design files (both schematics and PCB layout) for the open-source platform are available on Acrobotic’s Github repository.

Meanwhile, the online component of the Smart Citizen Kit is used for logging and visualizing the data measured by the hardware. Once the platform is properly is configured, users can navigate to the website and visualize measurements, share data with others and view what other users in are reporting – all while querying the Application Programming Interface (API) to instantly access data across multiple devices.

Smart Citizen has already raised over $34,000 on Kickstarter, with close to 3– backers pledging their support for the project. Additional information can be found here on the official Smart Citizen website.

Note: “The Smart Citizen Kit was originally conceived at the Fab Lab Barcelona, in collaboration with Barcelona-based arts production center Hangar and the interaction design studio MID.”

ATtiny25’s are inside this ShuttAVR

YouTube user “balthamos89” wanted to snap pictures at defined intervals, but didn’t have an intervalometer handy. To make matters worse, software specifically coded to trigger the camera via a PC burned through his camera battery within 30 minutes.

“I needed something that would last days,” balthamos89 explained in a YouTube post. “So, my options were to buy an overpriced external power supply, or build something that can take photos that didn’t interface through USB. My camera doesn’t have support for a wired trigger, so IR was my only option.”

Balthamos89 said he thought it would be fun to strap in a microcontroller into pre-existing hardware, so he decided to gave it a try.

“I happened to have some AVR ATtiny25’s lying around, so I popped open the IR remote for the camera and poked around a bit. Though, I poked around a bit too much and ended up with a broken IR remote,” he continued.

“Determined, I ripped out the old chip and soldered a new switch. I had to add in code for handling the IR signaling, but I ended up with a functioning remote. Not only that, but it had intervalometer capabilities as well.”

Pretty cool, eh? If you want to try building your own version of the AVR ATtiny25-powered ShuttAVR be sure to check out the the relevant files on GitHub.