Bar table

After making the table I got an idea: why not to make it a little more special.

It has a seven-band audio spectrum equalizer(thanks Blip for this wonderful little chip!) with both LCD screen and RGB leds and a smoke machine. In my opinion, however, the best part of it is retractable liquor storage; when it's in its lower position, the table looks like an ordinary bar table. This is especially handy if relatives are visiting...

The mechanical system in the liquor shelf is basically a rather simple one; one gas spring 'lightens' the shelf so that it can be lifted effortlessly.

In addition to arduino I used a MSGEQ7 equalizer chip, a darlington array and six RGB led panels. I don't have any schematics but these parts are easy to use and there're many great tutorials about them.

I'll add more pics and info when I'll have spare time but feel free to ask questions.

This is actually just a proof of concept version. I'll probably add more functions and display modes in the near future.

Here's a video of it in action:

And a very simple source code:

#include <LiquidCrystal.h>

const byte PWMpin[] = {3, 5, 6, 9, 10, 11};
const byte freqpin = 3;
const byte strobepin = 14;
const byte resetpin = 15;
byte PWMvalue[] = {0, 0, 0, 0, 0, 0, 0};// Freqin/4 = PWMduty, PWMduty/16 = EQ
int freqvalue = 0;
byte EQ[] = {0, 0, 0, 0, 0, 0, 0};

LiquidCrystal lcd(2, 4, 7, 8, 12, 13);

byte two[] = {B00000, B00000, B00000, B00000, B00000, B00000, B11111, B11111};
byte three[] = {B00000, B00000, B00000, B00000, B00000, B11111, B11111, B11111};
byte four[] = {B00000, B00000, B00000, B00000, B11111, B11111, B11111, B11111};
byte five[] = {B00000, B00000, B00000, B11111, B11111, B11111, B11111, B11111};
byte six[] = {B00000, B00000, B11111, B11111, B11111, B11111, B11111, B11111};
byte seven[] = {B00000, B11111, B11111, B11111, B11111, B11111, B11111, B11111};
byte eight[] = {B11111, B11111, B11111, B11111, B11111, B11111, B11111, B11111};

void spectrum() {
byte dummy = 0;
for (byte a = 0; a < 7; a++) {
dummy = EQ[a];
switch (dummy) {
case 9:
lcd.print("");
break;
case 10:
lcd.write(0);
break;
case 11:
lcd.write(1);
break;
case 12:
lcd.write(2);
break;
case 13:
lcd.write(3);
break;
case 14:
lcd.write(4);
break;
case 15:
lcd.write(5);
break;
default:
lcd.print(" ");
}
}
lcd.setCursor(0, 1);
for (byte a = 0; a < 7; a++) {
dummy = EQ[a];
switch (dummy) {
case 0:
lcd.print(" ");
break;
case 1:
lcd.print("
");
break;
case 2:
lcd.write(0);
break;
case 3:
lcd.write(1);
break;
case 4:
lcd.write(2);
break;
case 5:
lcd.write(3);
break;
case 6:
lcd.write(4);
break;
case 7:
lcd.write(5);
break;
default:
lcd.write(6);
}
}
}

void setup() {
pinMode(strobepin, OUTPUT);
pinMode(resetpin, OUTPUT);
digitalWrite(resetpin, LOW);
digitalWrite(strobepin, HIGH);
lcd.createChar(0, two);
lcd.createChar(1, three);
lcd.createChar(2, four);
lcd.createChar(3, five);
lcd.createChar(4, six);
lcd.createChar(5, seven);
lcd.createChar(6, eight);
lcd.begin(16, 2);
lcd.noCursor();
}

void loop() {
digitalWrite(resetpin, HIGH);
digitalWrite(resetpin, LOW);
for (byte i = 0; i < 7; i++) {
digitalWrite(strobepin, LOW);
delayMicroseconds(30);
freqvalue = analogRead(freqpin);
PWMvalue* = freqvalue >> 2;*
EQ_ = PWMvalue* >> 4;
digitalWrite(strobepin, HIGH);
}
for (byte i = 0; i < 6; i++) {
analogWrite(PWMpin, 255 - PWMvalue);
}
lcd.clear();
spectrum();
}
[/quote]
/Edit: Some info added*_

;D ;D ;D
That's very cool! Hope you don't drink too much to your success on this project. :wink:

Hope you don't drink too much to your success on this project.

One may notice that in the video some bottles are pretty empty... :wink:
However, the gas spring won't adjust itself, so the weight of the shelf may change only 3-4 kilograms; otherwise it won't stay down or raise, because of removing or adding weight, respectively.