Project: PiDesk – A Raspberry Pi controlled, futuristic desk

This is the summary post of a project I created as part of element14’s Sci Fi Your Pi Design Challenge: PiDesk.

Blog posts

Over the course of the challenge, a lot of content was created. I experimented with a new blogging approach with which I separated project updates from guides. The guides were kept as generic as possible, so that readers would not be required to know about the challenge to understand the content. With the challenge over, I’ll be renaming the guides and moving them to the appropriate sections of the website, hopefully making them easier to find for others. They will however remain linked in the project updates, so no information is lost in the process.

All posts are available on the element14 website and can be found using this link.

Project Summary

If this is the first time you stumble upon a PiDesk blog post, have a look at the blog posts above. To get a quick idea of what the project is about, have a look at the pictures below.

The collages represent different parts of the project in different stages. The final result is unveiled at the end of this post. To summarise though, the goal was to create a futuristic desk. I did so by integrating things such as LEDs, a wireless charger and capacitive touch controls inside the desk. There is even a computer that pops out of the desk when the correct button is touched!

summary-capacitive_touch summary-desk_build summary-magic_lamp summary-stepper_motors

Components

A lot of different components and technologies are used in this project: stepper motors, addressable LEDs, capacitive touch, wireless charging, etc …

Description Quantity Used in
Raspberry Pi B+ 1 Desk controls
WiPi USB Dongle 2 Desk controls / Desktop computer
No brand USB Sound Card 1 Desk controls
Adafruit Mono 2.5W Class D Amplifier (PAM8302) 1 Desk controls
Gertbot 1 Desk controls
NEMA 17 Stepper Motor 2 Desk controls
WS2812 LED Strip 2 meters Desk controls
AT42QT1070 Capacitive Touch IC 1 Desk controls
Micro Switch ON/OFF 2 Desk controls
Mini Speaker 8ohm 1 Desk controls
Raspberry Pi 2 B 1 Desktop computer
Adafruit Stereo 2.8W Class D Amplifier (TS2012) 1 Desktop computer
Recuperated Laptop LCD Display 1 Desktop computer
LCD Display Controller 1 Desktop computer
Speaker 8ohm 2 Desktop computer
Qi Wireless Charger 1 Magic Lamp
Qi Wireless Receiver 1 Magic Lamp
Adafruit NeoPixel Ring WS 2812 (12) 1 Magic Lamp
Adafruit Trinket 5V 1 Magic Lamp
12V to 5V DC-DC Converter 2 Desk controls / Desktop computer
12V Power Supply 1 Desk controls / Desktop computer / Magic Lamp

I made these image, trying to illustrate how everything fits together and interacts:

pidesk-1 pidesk-2

From left to right, top to bottom, we have:

  • Raspberry Pi B+: This is the heart of project PiDesk, as it is in charge of controlling all the different components involved in the project. I originally opted for the Raspberry Pi A+, but was forced to move to B+ as the workaround required to have both audio and neopixels work, required a USB sound card.
  • Dual channel relay board: The relay board is controlled by the Raspberry Pi GPIO pins. It makes it possible to turn a 12 power supply ON or OFF, powering the laptop display, and a 5V power supply for the Raspberry Pi 2 desktop computer.
  • Capacitive touch IC (AT42QT1070): The custom breakout board is used to convert Raspberry Pi GPIO pins into capacitive touch input sensors. The touch sensors have been created using copper tape and conductive paint.
  • LED strip (WS2812): The LED strip is controlled by the Raspberry Pi and has been built into the desk’s surface. It displays animations depending on the ongoing action.
  • Gertbot: The gertbot has two functions: raising and lower the screen assembly by controlling two stepper motors, and knowing when to stop using end stops.
  • Wifi dongle (WiPi): Wifi connectivity, mainly used during programming and testing.
  • Soundcard with amplifier (PAM8302): Play sound effects depending on the action to be executed.

pidesk-3 pidesk-4

The pictures above represent on one side, the Pi 2 desktop computer, on the other, the magic lamp. As you can see, these items are very straightforward compared to the desk controls and require very little explanation.

For the desktop computer, a Pi 2 is used in combination with a recuperated laptop screen for which a controller board was found. A combination of a stereo amplifier and speakers are used for sound.

As for the magic lamp, a Trinket microcontroller and NeoPixel ring are powered via a wireless receiver. The circuit is powered on when placed on top of the wireless charger.

Power distribution

pidesk-5

The main power supply is a beefy 12V one. It is used to power the stepper motors via the Gertbot and the LCD screen via the controller board. The other components of the project require 5V, which is achieved using DC-DC converters. The 12V input to the desktop components (Raspberry Pi 2 & LCD controller) are interrupted by a relay which is controlled by the Raspberry Pi B+. Two channels have been foreseen, although only one is currently in use.

Code

All of the different components illustrated above require some code to work.

To get the NeoPixels and Gertbot to work, external Python libraries were used. Here are the links:

Two scripts are in charge of combining the different features and make everything work together. The full code is available on GitHub.

PiDesk Main Script:

PiDesk LED Animations Script:

Demo

Finally, the “moment supreme”, the moment you (may) have been waiting for, the final result.

pidesk-6 pidesk-7

Because it wouldn’t be a real demo without an actual video, here it is. The first part is a montage of various stages of the build, followed by some demonstrations.

 

Thank you

I’d like to thank element14, the sponsors, the judges and anyone involved in this challenge for setting this up, providing the kits and allowing me to participate. I had fun, I hope you did too following this project and you like the end result.

To my fellow contestants and members: thank you for following the project, liking the posts and providing feedback along the way.

20 thoughts on “Project: PiDesk – A Raspberry Pi controlled, futuristic desk”

  1. How did you repurpose that laptop LCD? I always thought they had proprietary interfaces, but it’s probably something standard. Must not have been too far off from being HDMI? Thanks in advance for your response.

    1. Hi Dan, I searched eBay for a controller board. Based on the laptop model it was possible to figure out which type of board was required. The one I got provided VGA and DVI outputs, which I could then convert to HDMI. There are some controller boards with HDMI output, but those were much more expensive at the time.

  2. I have a few questions Mr. Vandenbosch. What is your top surface of your desk? How well does your capacitive touch work through it? And how did you mask the conductive paint white? Thank you. Awesome project!

    1. Hi! The top surface is a thin sheet of translucent plexi. I masked the internals of the desk using big white sheets of paper, which also helps diffusing the light from the LED strip. Because the layers on top of the conductive pads are thin enough, the capacitive touch sensor still works well enough to detect a hand.

  3. Hi, Mr Vandenbosch. My name is Ayaan and I am currently thinking of making my own adjustable desk which is controlled by 12v linear actuator (x2), which can control the desk’s hight. And i was thinking how can i implant the capacitive touch sensor as switch to linear actuator on or off, with the led strip indicating which functions being used for example: Red can indicate the desk being lowered and blue can indicate the desk being raised. And i want this whole project to be controlled by Arduino uno, with wireless and bluetooth functionality so anyone with the right password can control the desk automatically via there phone without needing to use the capacitive touch sensor. Also i want to use the wireless charge as main key so if lets say magic lamp is not connected then nothing should happen, but once connected then capacitive touch sensor can detect my hand. So I’m wanting to use magic lamp as safe key, If that’s possible. So i needed a circuit with two buttons that can control the linear actuator (one button can control the raising part and the other button can control the lowering part) and another circuit with two buttons that can turn my computer on and off. My computer is not pi computer, it’s windows computer. I am asking you to help me coming up with a circuit that can control the desk and the computer all in one. I need to know what components to use, how to use them, how to connect them together so they can work together. Thank you for reading this email. I really appreciate it. Hoping to hear from you in near future!

    your sincerely
    Ayaan

    1. Hello Ayaan,

      All the components I used are listed in the blog post. It also includes the code and schematics.

      I cannot solve your entire project for you, as I believe the best way to learn is to try and figure out things yourself. Also, it’s a lot more fun and challenging to do it yourself.
      Try to gather information on all the components you would like to use, bluetooth, etc … It’s a challenging project, but if you break it down into smaller, easier projects, it becomes much more feasible!

      I can try to help you with specific questions, but don’t ask me to create your project for you. What have you tried already? What information have you searched and found?

      Good luck with your project!

      Frederick

  4. Hello,

    super project

    Why not use a digital piface 2 ? Maybe the price?

    How the program has started lighting the Raspi ?

    Congratulations , I like your destock

    1. Hi, yes, that’s certainly a valid option! The parts for this build were sponsored, so I tried to use those as much as possible. Things could be simplified a lot using more specific components. 🙂

    1. Hi Tony,

      thanks! Yes, every pad represents a different “button” that can be programmed to trigger an action of choice! The capacitive touch IC I’ve used has 5 inputs, though different versions exist with less or more inputs.

  5. Hello. Love this project and keen to start one for myself. Can I please ask one question about the touch sensor? Is each touch pad connected to 1 pin individually on the touch pad end of things. And Is their a aduino capacitive touch sensor under each of those 5 black sensor mats? Just a little confused which way it was done : ) thanks for sharing your project

        1. im amazed the ic touch pad is still detecting your hand gesture considering a single pad is being charged via one small in/output from the ic, and at that distance from the ic to the touch pad : )

Leave a Reply

Your email address will not be published. Required fields are marked *