Around the office, we have a few people using height adjustable desks. Every day, some of us get to see them going up and down, like waves rising and falling on a rough sea. Each time being controlled using the hardware buttons on the side of the desk.
Then came the idea!…
Could we make an adjustment to use a proximity sensor to raise and lower the table? If we could, we could create an experience where the desk is pushed down by moving your hand toward the desk and the sensor. Likewise, raising it could be as simple as raising your hand away from the desk and seeing the table rise with it.
First, we took a look at the current input to the table. After seeing an RJ45 port, we did a little googling and found a nice blog post about someone who had already hacked their desk.
This gave us some inspiration and help us with our design.
The Plan
Our shopping list for hardware consisted of:
- An ultrasonic range sensor, to detect the hand
- Two relays, to operate the up and down buttons of the desk
- An Arduino, to run the code
The unit operates by waiting for an object (typically a hand) to be detected at a certain distance from the sensor.
Once the hand is detected the red LED turns on to indicate to the user that movement now will trigger the relays (and move the desk)
With the red LED turned on, moving the hand closer to the sensor will trigger one relay (down), moving the hand further away will trigger the other relay (up). If the hand moves too far away (or too close) to the sensor then hand lock is lost, the relays and LED turn off.
The Results
Well, it works! And here’s a video for proof:
While it works, it’s perhaps not very reliable. Possibly due to the flying wires and bread-boarded layout, but the range finder wasn’t as accurate or reliable as hoped. It’s also quite hard to keep a hand over the detection area while moving it up and down.
Practice appeared to improve things and getting the hand detection and yellow LED to turn on almost becomes a game to see who can do it better than someone else, rather than it ‘just working’.
The range finder is intended for detecting walls in robotics and would be very good for this, detecting a relatively small hand is not as reliable.
Still, all-in-all, a good project with lessons learned and new skills acquired.