USB Volume Control

I have been playing around with the AVR VUSB library for the last little while. This library allows you to build USB devices with most AVR microcontrollers. The first small project I wanted to implement was an external USB volume controller that acts as a regular multimedia keyboard and therefore works with pretty much any device that supports USB keyboards.

As part of this project I also wanted to give PCB etching a go, which seems like a nice way to quickly manufacture high quality PCBs for one-off projects.

IMG_20160502_102227

Continue reading “USB Volume Control”

USB Volume Control

PS1 Controller Bluetooth Mod

2 Weeks ago I came across a PS1 controller bluetooth mod by /u/Dementat_Deus on Reddit. The mod was very clean and I knew right away I wanted to give it a go too. In fact I ordered the parts 15 minutes after I read the post. There is one major issue with this build though that I wanted to address. The Bluefruit EZ-Key Bluetooth module used in this build only has 12 inputs for buttons, but the PS1 controller has 14 buttons. Because of that 2 of the buttons are not working. /u/Dementat_Deus used those buttons as power switch and to trigger pairing mode. The big advantage of that is that you don’t need to add additional buttons for pairing and power and get a very clean look. In my build I wanted to be able to use all the buttons though because all of the games I like to play utilize the full set of buttons.

I went ahead and the final result with 2 additional buttons looks like this:
IMG_20160319_131306

Continue reading “PS1 Controller Bluetooth Mod”

PS1 Controller Bluetooth Mod

$15 Wireless Display

output_Xzmr1W

I’ve been looking for a project to use the ESP8266 (ESP-03) wireless module. While playing around with these modules I figured it would be nice to have a place to send debugging data to without using the the serial terminal. I figured I could hook up a 16×2 display (QC1602A) that I ordered a while ago with the ESP and have a sweet wireless display unit. Unfortunately the ESP doesn’t have enough GPIOs to drive the display. I ended up ordering an Arduino Pro Mini of Ebay to control the display, which would in turn fetch the display data through the ESP.
Continue reading “$15 Wireless Display”

$15 Wireless Display

Arduino Uno – High Frequency PWM

I did some tests to see what max PWM frequency you can archive without overclocking the Uno and running it with the stock 16Mhz crystal. The default Arduino PWM frequency is 500Hz. If you need a higher frequency you have to manually bit-bang one of the output pins.

This example shows how to do a 30% duty cycle. The delays (and the overhead of the other instructions) determine the PWM frequency. In this case I got a PWM frequency of 9.1kHz . I disabled all interrupts to avoid any interference from processing interrupt service routines.

const int PWM_PIN = 8;

void setup()
{
  pinMode(PWM_PIN, OUTPUT);
  noInterrupts();

  // Don't use loop() to avoid serialEventRun overhead
  while (true) {
    // 30% duty
    digitalWrite(PWM_PIN, HIGH);
    delayMicroseconds(30);
    digitalWrite(PWM_PIN, LOW);
    delayMicroseconds(70);
  }
}

void loop(){}

Continue reading “Arduino Uno – High Frequency PWM”

Arduino Uno – High Frequency PWM