For this project, I created a Storage Box that acts as a Vallet Tray.
Storage Box v1: Offline only (made solo by me, Adrian Campean (@bimj0rk))
The storage box can be opened by either waving the hand in front of a distance sensor, either by pressing a button on a remote control. The box features two modes: autonomous, which closes the box automatically after it was opened, and manual, which closes the box manually by repeading one of the aforementioned actions.
- Arduino Uno R3
- Ultrasonic distance sensor
- Servomotor
- IR reciever and remote control
- Speaker
- Small breadboard and wires for connectivity

I chose a small box from IKEA for this project. There are 5 holes drilled: three in the front for the ultrasonic sensor and speaker, one on the top for the IR reciever, and one in the back for the wires. The servomotor was mounted using double-sided adhesive tape and black duck tape, to match the interior. The duck tape was also used to hide the wires inside.

For the software part, I used only libraries publicly available within the Arduino IDE. The program features four main functions:
- One that translates the hexadecimal codes recieved from the remote control:
void translateIR(){
switch(results.value){
case 0xFF629D: //CH button, used for autonomous
autonomousMode();
break;
case 0xFFA857: //+ button, used for manual open
manualOverrideOpen();
break;
case 0xFFE01F: //- button, used for manual close
manualOverrideClose();
break;
default:
Serial.println("Button not found");
}
}
- One that dictates autonomous mode (open slowly, wait 8 seconds, play warning sound, wait another 2 seconds, close):
void autonomousMode(){
Serial.println("Autonomous mode");
for(position = 0; position <= 115; position++){
servoMotor.write(position);
delay(15);
}
delay(8000);
digitalWrite(activeBuzzer, HIGH);
delay(1);
digitalWrite(activeBuzzer, LOW);
delay(2000);
servoMotor.write(20);
Serial.println("Autonomous mode ended");
}
- and one for each manual open and close:
void manualOverrideOpen(){
Serial.println("Manual open");
digitalWrite(activeBuzzer, HIGH);
delay(1);
digitalWrite(activeBuzzer, LOW);
delay(1000);
for(int position = 0; position <= 115; position++){
servoMotor.write(position);
delay(15);
}
digitalWrite(activeBuzzer, HIGH);
delay(1);
digitalWrite(activeBuzzer, LOW);
delay(1);
Serial.println("Manual open ended");
}
void manualOverrideClose(){
Serial.println("Manual close");
digitalWrite(activeBuzzer, HIGH);
delay(1);
digitalWrite(activeBuzzer, LOW);
delay(1000);
servoMotor.write(20);
digitalWrite(activeBuzzer, HIGH);
delay(1);
digitalWrite(activeBuzzer, LOW);
delay(1);
Serial.println("Manual close ended");
}
Storage Box v2: Online mode (made in collaboration with Dan Deaconu (@DoubleDew) and Darius Nazemian (@dariusnp))
For the second version, I upgraded the box such that it can be opened and closed via HomeKit.
Instead of the Arduino Uno R3, I used the Arduino Nano ESP32, which can access my network and thus connect to HomeKit. The library used, HomeSpan, allows the Arduino to act as a HomeKit hub and device at the same time. I removed all sensors and added one more servomotor, for stability. In the Home app, the box appears as a window blind, as it allows for incremental opening and closing, should it be needed.