...Three Projects have been submitted for this month's Project14: Acoustics
..hope you would like it!
BUILD(I): The Annoying 'CAPS' Lock Buzzer
The CAPS LOCK key is the most annoying key on the keyboard. Majority of the times, you have noticed, It’s always getting in the way.
Ever enter a password with CAPS LOCK enabled? Huh... Enough times to get locked out of your account? Yeah, me too..(only sometimes).. I Agree'
Even Google decided to drop it all together in their Chromebooks.
Until the rest of the industry decides to follow their lead, they’ll likely be no shortage of awkward emails or overly aggressive comments that are the direct result of this treacherous key.
METHODOLOGY...
The CAPS LOCK state of a keyboard attached to a PC is maintained by the PC; not the keyboard. If you attach five keyboards to a PC and hit the CAPS LOCK key on one keyboard, the CAPS LOCK light on all five attached keyboards will illuminate. You can then hit the CAPS LOCK key on a different keyboard and all the CAPS LOCK lights will turn off.
This is implemented by the connected PC sending a periodic USB output report to all the attached keyboards. Inside this USB output report is a bit indicating the current state of the CAPS LOCK, NUM LOCK, and SCROLL LOCK keys. Attached keyboards examine these bits when the USB output report is received and turn their lights on and off according to these bits.
WARNING: THIS PROJECT HAS BEEN DERIVED FROM THE ORIGINAL WORKS OF GLEN ATKINS, AND INSPIRED FROM KEYSIGHT LAB'S WAVE-2020 SERIES BY DANIEL BOGDANOFF.
Working..Explained
The annoying caps lock buzzer looks like a keyboard to the host PC except it doesn’t have any keys. The host sends the periodic USB output reports to our “keyboard” and when the USB output report is received, our “keyboard” turns the buzzer on or off to match the state of the CAPS LOCK bit in the USB output report.
Think of it like the little indicator LED on your keyboard, but one that makes a terrible screeching noise that you simply can’t ignore. This is made possible by the fact that the Caps Lock status is handled at the OS level rather than the local input device.
As a side effect, you’ll always know when CAPS LOCK is enabled so entering the wrong password, joining lines when you’re just trying to scroll down in to your thesis report , or answering an entire email (to your .boss.) in ANGRY SCREED format should be history.
Things you will need
-Arduino Pro Micro
-Small Buzzer (can be directly powered through Micro)
-An LED (optional; but I chose green one)
Without using the PIC ones (showcased in the original build), I chose to use ATMEGA32U4 based Pro Micro, which also provides the necessary USB 2.0 Data lines for both programming the microcontroller and as a dedicated USB - HID Device (emulated as Keyboard, Mouse, Joystick, PenTest, Rubber Ducky, Remote Injection Tool, etc. etc...tested them all .yay.)
Connections (Clean n Simple)..
- Connect Buzzer+ to pin 3 on pro micro, LED on 9 (your choice) and the rest is ground. You can also use 'pinButton(pull-down)' to initiate a reverse Caps Lock on PC Keyboard from the microcontroller; 'Hacky-way to control'.
CODE:
#include "HID-Project.h"
const int pinLed = 3;
const int pinLed2 = 9;
const int pinButton = 2;
void setup() {
pinMode(pinLed, OUTPUT);
pinMode(pinLed2, OUTPUT);
pinMode(pinButton, INPUT_PULLUP);
// Sends a clean report to the host. This is important on any Arduino type.
BootKeyboard.begin();
}
void loop() {
// Update Led equal to the caps lock state.
// Keep in mind that on a 16u2 and Arduino Micro HIGH and LOW for TX/RX Leds are inverted.
if (BootKeyboard.getLeds() & LED_CAPS_LOCK)
{
digitalWrite(pinLed, HIGH);
digitalWrite(pinLed2, HIGH);
//delay(20);
//digitalWrite(pinLed, LOW);
//digitalWrite(pinLed2, LOW);
//delay(5);
}
else
digitalWrite(pinLed, LOW);
digitalWrite(pinLed2, LOW);
// Trigger caps lock manually via button
if (!digitalRead(pinButton)) {
BootKeyboard.write(KEY_CAPS_LOCK);
// Simple debounce
delay(300);
}
}
(Be sure to include the HID-Project Library from within the IDE Lib Manager; code works for Pro Micro & Leonardo based on Atmel.32U4), may work on Teensy.
Annoying CapsLk Buzzer in ..ACTION... … …
BUILD(II): The ATARI PUNK CONSOLE
The Atari Punk Console (commonly shortened to APC) is a popular circuit which utilizes two 555 timers or a single 556 dual-timer IC. It has been modified slightly from the original circuit, ‘classified’ as "Sound Synthesizer", that was published in the famous “RadioShack” booklet: "Engineer's Notebook: Integrated Circuit Applications" in the year 1980 and was after few years recognized popularly as "Stepped Tone Generator" in "Engineer's Mini-Notebook - 555 Circuits" by its lead designer & author, Forrest M. Mims III (Siliconcepts, 1984).
It is nowadays dubbed as "Atari Punk Console" (APC) by Kaustic Machines crew because of its "low-fi" sounds resembling the famous classic Atari console games from the 80s, that replicates a square wave output similar to the Atari 2600. Kaustic Machines added a -4db line level output with volume control to the circuit which was originally designed to drive a small 8-ohm mini speaker.
Working...
The Atari Punk Console is actually a square wave oscillator which further drives a monostable oscillator that creates a single (square) pulse. There are two controls, one for the frequency of the oscillator and one to control the pulse width. The controls are usually potentiometer based (can be modified to adapt capacitive slide interface). The circuit is simple DIY ‘noisemaker’ that is relatively inexpensive and easy to build, can be easily modified & configured by replacing components from the perf-board (of course you have to de-solder it, in my case). Try it in your pastime, and you will definitely have some classic fun (SIDE EFFECTS: infuriating & annoying for others).
Things to search for (will be lying around..)
- 556 IC (or 2x 555: worstcase)
- Resistors valued : 1K, 10K, 4.7K
- Capacitors valued : 10nF, 100nF
- Potentiometers(x2) : 470K each (or 500K)
- 3.5mm mono audio-jack
- 9V battery
- itsy-bitsy wires as links
Original Circuit Connections (Kaustic Machines Crew)
Prototyping on a Perf-Board (rounded manually)
Fun Fact: It took quite longer time to cut and file the perfboard, than it was required for the soldering-part...#MakerSpirit
For sorting things out, you can do it in a Jedi Style (Breadboarding), or become Sith Lord (CNC Milling)
WARNING: only ACOUSTICS … … …
BUILD(III): The Arduino-Touch
Remembering the 80s...
Synthesizers were initially viewed as ‘avant-garde’;
valued by the 1960s psychedelic and counter-cultural scenes. Switched-On Bach (1968), a bestselling album of Bach compositions arranged for synthesizer by Wendy Carlos, took synthesizers to the mainstream. They were adopted by Sampling, introduced with the Fairlight synthesizer in 1979, which has influenced all genres of music and had a major influence on the development of electronic and modern hip hop music. Today, the synthesizer is used in every genre of music, and is considered one of the most important instruments in the music industry. According to Fact in 2016, "The synthesizer is as important, and as ubiquitous, in modern music today as the human voice."
Can’t get enough 80s synth music?
This project is certainly for you Element14 lovers! The Arduino-Touch aka Capacitive Synthesizer will be rocking you out to infectiously simple computerized tones with just the touch of bare-copper.
Things
- Printed Circuit Board (Single-sided Copper Clad: 180mmx180mm)
- ATMEGA328P IC (DIP) along with 28-pin socket (though you can easily scrape it out from UNO Board)
- 1x Ceramic resonator: 16MHz
- 1xResistor: 10K
- 1x Capacitor: 0.1uF
- 2x CR2032 Coin cells and Cell holders (SMT)
- LED (color of your choice, but an SMD one; optional)
- 1x 2 Pole Slide Switch
- 1x Mono 3.5 mm Audio Jack
- Female header: 6-pin (need only 5 of them for programming MCU)
- A desktop milling machine (though you can do it in Jedi-Method:'Etching')
Milling in action...
Soldering it out...
No Coding, Only Uploading...
Take the Arduino Uno, plug-in the USB cable, set out your board & port, compile the following files(both) in the IDE, Click UPLOAD. After this you can remove the IC from the UNO board and plug back into the designed board.
Retro users can utilize the 5Pin header on the PCB and use it through FTDI or CP2102 Programmer according to following configuration
- Reset: Header Pin-1
- Digital Pin 0: Header Pin-2
- Digital Pin 1: Header Pin-3
- Vcc(5V): Header Pin-4
..Leave the Pin-5..
- GND: Header Pin-6
!!!you can also manipulate the code for performing tones of your taste!!!
Links: Check the following to get board-file(Eagle.brd), gerber-file(Manufactring.grb), NC file(CNC Milling.nc) and Arduino Code(.ino & pitches.h).
https://github.com/ankur608/Arduino-Touch
Unable to record the final build video(Sorry..limited time restraint); will post it sooner. Unless..
Cosmic BONUS CONTENT: Tune in your radio receivers, for listening to CMB Radiation, (the remnant reaction to Big-Bang action...)