Building a better desk controller

At work we have AMQ height adjustable desks.  They use a controller some corporate type probably thought was really cool.  It is that one on the left and it screws into the underside of the desk.  The problem with it is the capacitive touch buttons.  They are unreliable when you want them to work and they often react when you just get near them with your chair causing most people in the office here to set their desks to one position and then unplug them.  They get away with this because they appear to work in a demo and when they sell them to businesses and they are cheaper than the competition that probably makes a better controller.  The rest of the desk is fine so I decided to make my own controller.

To start off I need to figure out how the controller works.  To do this I used a Analog Discovery USB scope.  It was easily the best tool I’ve bought for my own electronics hobbies and is worth double what they charge for it.  The software is awesome and works on mac, linux, and windows.  There is even an API so you can use it with your own code.  Using a breadboard and a couple Ethernet jack breakouts I made a way to sniff the lines driven by the controller.  With this I drew this diagram:

If you are smarter than me you will see a problem with this diagram that I discover later.  However you can see that it is relatively simple.  Each of the buttons pull one or two of the lines to ground when then are pressed.  Also, I figured out how the number display works.  It is just a UART line.  Here are my notes on how the UART works:

When the numbers are displayed there are short bursts of 4 8-bit values sent over the UART line.  When height number is displayed it sends two 1’s and then the height value as a integer.  This then translates to a fractional value by dividing by 10.  Secondly, when you press the memory button to set memory it sends 1, 6, a bit that corresponds to the memory setting, and then 0.  Lastly there is an error state that displays A,S,and most of a F on the screen.  This happens when the encoder has lost it’s place and you have to run the thing all the way to the bottom for it to zero again.  Here is an image from the software for the logic analyzer showing a burst on the serial line:

One thing I really like about the Waveforms software is how easy the cursors are.  Expensive rack mounted test equipment usually doesn’t have this useful of cursors.  My next step was selecting the components I was going to use to build my controller.  Here is what I chose (some of these were used because they were parts I had on hand from previous projects):

To build this here are the tools I used:

First I drilled out and test fitted my face plate on my enclosure.  Here is a few pictures of that process:

I then cutout the space for the display by drilling the corners and then cutting the plastic with a razor blade.  If I were to do this again I’d use a smaller drill bit for the corners and cut using a dremmel.  Doing it this way took a long time.For the buttons I soldered stranded wire onto the leads and crimped female 0.1 headers onto the other side.  Here are some pictures of that process:

One of my buttons was too close to the pcb mounting point to screw on the nut.  I used an appropriate sized drill bit to cut it away:

With all that done the next step was to prototype the circuit and program the microcontroler.  To do this I used a breadboard and prototyping wires.  Here is where I learned I missed a few things before.  For one the power connection.  Before I was a bit confused about pin 3 and 4 which both seemed to be connected to power.  By using the scope I discovered that pin 4 was only high when the other controller was plugged it however it was at a slightly smaller voltage than pin 3 which was always high.  This lead me to believe that the controller was pulling it high to let to motor controller know it was plugged in.  I tied it to the high line using a resistor and all seemed to work on the power front.

Next I discovered that if I wired up the buttons as I had drawn in my first diagram current would flow back through the lines I’d connected together and buttons that pulled only one line low (up and down) no longer worked after I connected those lines together on one side of some of the memory set buttons.  To fix this I used electronic one way valves, aka diodes with a circuit like this:

This worked great and I was on to programming the microcontroler.  This proved to be a bit challenging because the trinket I had chosen was so limited in pins and codespace.  Because it did not have a hardware UART I had to use the SoftwareSerial library.  For controlling the LED display I used the I2C connection and Adafruit’s library.  However, because of the limited code-space to get my binary to fit I had to comment out parts of Adafruit’s library that was for the matrix displays.  Here is the code I wrote for the trinket:

Here is the final circuits and a picture of my prototyping setup:

Once I proved that it all worked I soldered it all together on a prototyping board and assembled the box.  To mount the pcb I used hot glue to secure some standoffs.  I also used hot glue to secure the display in it’s spot.

Lastly I cutout the spot for the ethernet jack with a dremel and screwed the whole thing together.  I now use it on my desk at work and it is awesome.

Two down and still no reviews

We’ve had two wonderful guests and our third is in the house.  Both left the house in great condition and were easy to communicate with.  However we don’t have any reviews yet.  I wrote good reviews of them.  I know it will work out in the end, I’m just anxious and am wondering if there is anything we could do to communicate to our guests how important reviews are too us without asking for reviews.  I hate it when people ask me for reviews.

I shouldn’t really worry because the real measure of our success is our bookings and on that front we are doing great.  We are booked through the end of October, once in November and the week over Christmas.  So far that is great, because we have yet to have an unbooked day.  Percentage of booked days over time and the average nightly price should be the real measure, not reviews.  However a review really would feel good.

What we learned from our first guests

Today we cleaned the house after a guest for the first time.   Because we booked back to back with a guest checking out at noon and another checking in at 3pm we only had 3 hours to clean.  This was a bit stressful thought we got through it just fine.  The guests that checked out were nice and left the house relatively clean.  However, there was a couple extra things we had to address.  The new washer and dryer needed a stack kit, I needed to adjust one of the gate sensors, and we wanted to install a key lockbox on the house.  That last one is because our first guests managed to lock the door handle on the front door and there was no key down there for it.  This way if a guest does this we can tell them how to get into that lockbox and they can get back into the house.  We also put a key in there for the deadbolt in case somehow the electronic parts of it fail.  One thing this made us realize is that doing this on a weekday could be really difficult and if a guest leaves the house really dirty or something breaks of no fault of our guest there would be no way for us to fix it before the other guest can check in.  As a result we enabled a feature on Airbnb that blocks off the day before and after each reservation to allow us to clean the place easier and fix things if need be.  I’m a little sad about this because it will mean we make less money but it will probably make our lives less stressful.

The second thing that our first guests taught us was that our automated messaging from Smartbnb is too spamy and they don’t read it, that is because it sounds automated.  Also, if they don’t have the airbnb app it texts them the first little bit of the message and they probably just ignore the rest as it would show up in their email.  We are going to have to find some way to shorten these messages or get them to read all of them in their email if they don’t have the app.

Also, they were awesome and left a couple pins in our map:

Here is a link so you can check out the listing:

We keep changing the title of our listing, here are a few of the ones we’ve tried:

  • The Hideaway — quiet/comfortable/private
  • Designer Renovated Secluded Adventure Hideaway
  • Modern Updated Hideaway w/ Patio and Firepit
  • The Hideaway: Whole Home w/ Private Patio, Firepit