Adjustable Book Stand

A couple of days ago, I was reading my usual book(Learning Python by Mark Lutz) on my bed. It later became difficult to concentrate on my book because I kept shifting reading positions which led to continuously adjusting the book stand’s back support.

DING! And an idea came to mind. What if I make an adjustable book stand so I don’t have to adjust it manually from behind?

Hmm… And it seemed like a pretty feasible idea.

The Adjustable Book Stand

So I made an adjustable book stand that uses Servo motors to control the book stand angle. The controls are two button switches that adjust to the user’s preferred reading angle.

Materials Used:

  • 1 Arduino Uno
  • 2 Analog Servo Motors
  • 2 Momentary Switch
  • 2 LEDs (Green and Red)
  • Tons of wires
  • Corrugated Board
  • Masking Tape
  • Basswood

The Challenges:

Without having a decent design and hardware-creation background, I was struggling to determine which materials work best in this scenario. So I had been a frequent visitor at the AboveGround Art Supplies and Curry’s Art Supplies Stores for days, continuously checking to see how each material would fit in my (1) budget, and (2) the book stand.

Another intriguing challenge was building the book stand from scratch! It was the first time  that I have used a saw and a drill gun without adult supervision. Well, my grandparents checked up on me for a while, just to (1) tease me about the mess in my room, and (2) checking if all my appendages are still intact. But yay! I was and will continue to be proud of myself for that.

While closing the enclosure for the controls, one of my momentary switches broke apart. So I had to cut the wires for the broken part, resolder a new switch and reconnect the wires. It was a good thing that I had a backup switch then, else I would’ve ran from my place to the nearest electronic shop for that.

Future Iterations:

I would probably work on finding better design solutions to the book stand so it can be a portable and nifty gadget. Also, since the Servo motors couldn’t handle heavy weights, I may look into designing better gear design solutions so I could change it into a DC motor or any similar motor which uses gears and belts.

Source Code: 

/*
*  @date 10/11/12
*  @author Ruzette Tanyag
*  @version Book Stand Source version 1.3
*  @description:
*      Source code for adjustable book stand. It uses two Servo motors to
*      adjust the angle of the stand. User interacts by pushing either two of
*      the momentary switches to determine the desired angle of the book stand.
*  @link
*  @license
*      This program is free software: you can redistribute it and/or modify
*      it under the terms of the GNU General Public License as published by
*      the Free Software Foundation, either version 3 of the License, or
*      (at your option) any later version.
*      This program is distributed in the hope that it will be useful,
*      but WITHOUT ANY WARRANTY; without even the implied warranty of
*      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*      GNU General Public License for more details.
*
*      You should have received a copy of the GNU General Public License
*      along with this program.  If not, see <http://www.gnu.org/licenses/>.
*
*/

#include <Servo.h>

#define LEFT_SERVO_PIN 3
#define RIGHT_SERVO_PIN 5

#define DOWN_CTRL_MOMSWITCH_PIN 8
#define UP_CTRL_MOMSWITCH_PIN 9

#define DOWN_CTRL_LED_PIN 6
#define UP_CTRL_LED_PIN 7

/*
 *  Servo declarations
 */
Servo leftCtrlServo;
Servo rightCtrlServo;

/*
 *  Stores angle activity to pushed to the Servo motors.
 */
int rotateCtr;

  /*
   *  Arduino Constructor
   */
  void setup(){
    initPinMode();
    initNumbers();
  }

  /*
   *  Arduino Loop
   *
   *  Reads momentary switches activity. If either one is turned on, it lights the
   *  corresponding LED, increments/decrements the rotateCtr by 2 and pushes the value
   *  to the Servo motors.
   *
   */
  void loop(){
    int downCtrlRead = digitalRead(DOWN_CTRL_MOMSWITCH_PIN);
    int upCtrlRead = digitalRead(UP_CTRL_MOMSWITCH_PIN);

    if((downCtrlRead == HIGH) && (upCtrlRead == LOW)){
      digitalWrite(DOWN_CTRL_LED_PIN, HIGH);
      if(rotateCtr >= 0){
        rotateCtr -= 2;
        servoWrite(rotateCtr);
      }
    }else if((downCtrlRead == LOW) && (upCtrlRead == HIGH)){
      digitalWrite(UP_CTRL_LED_PIN, HIGH);
      if (rotateCtr <= 90){
        rotateCtr += 2;
        servoWrite(rotateCtr);
      }
    }else{
      digitalWrite(DOWN_CTRL_LED_PIN, LOW);
      digitalWrite(UP_CTRL_LED_PIN, LOW);
    }
    delay(20);
  }

  /*
   * Initializes pins on the Arduino board.
   */
  void initPinMode(){

    leftCtrlServo.attach(LEFT_SERVO_PIN);
    rightCtrlServo.attach(RIGHT_SERVO_PIN);

    pinMode(DOWN_CTRL_MOMSWITCH_PIN, INPUT);                            // Set INPUT on Down Control Momentary Switch
    pinMode(UP_CTRL_MOMSWITCH_PIN, INPUT);                              // Set INPUT on Up Control Momentary Switch

    pinMode(DOWN_CTRL_LED_PIN, OUTPUT);                                 // Set OUTPUT on Down Control LED
    pinMode(UP_CTRL_LED_PIN, OUTPUT);                                   // Set OUTPUT on Up Control LED
  }

  /*
   *  Initializes counters for counter increments and debugging purposes.
   */
  void initNumbers(){
    Serial.begin(9600);                                                 // Initializing Serial class for debugging purposes
    rotateCtr = 0;                                                      // Initialize rotateCtr var
  }

  /*
   *  Writes value to both Servo motors
   */
  void servoWrite(int ctr){
    int temp = map(ctr, 0, 179, 179, 0);
    leftCtrlServo.write(temp);
    rightCtrlServo.write(ctr);
  }

Living Room WIP Update

It surprises me how I’m enjoying modelling this living room scene since I’ve only modelled separate household objects on a per-assignment basis. And it’s been a challenge putting them all together.

Nevertheless, I learn different techniques and tricks as I go along. And I love every bit of it. It also helps me kill time when I playblast my FX shots.

What I intend to do is make this room feel as cozy as possible. I still have to put some chairs, lamps and other smaller accessories before it’s finished. My classmates have already taken photos of themselves for the photo frames as a contribution to my living room scene. :P

WIP : Living Room Scene

3 – 2 – 1… And… I’m back!

This is one of the WIPs that I’ve been doing recently. I’m modelling a living room for a Bungalow type of house. I started this project 2-3 weeks ago and I try to finish modelling 1-2 furniture pieces once a week. There are also accessories and furnitures which needed to be modelled before I start lighting and texturing it.

Until then! :P

Resizing Window Problem with Ubuntu 11.10

I started using Ubuntu 11.10 (Upgraded from 11.04) lately because my 2-yr old Macbook White has been experiencing kernel panics which deems unusable at the moment. So far, I am very much liking Ubuntu and would probably keep using it for work and quick hacks. However, one problem that arises with my Ubuntu is that it blanks out when resized.

To fix this :

  • Go to System Settings -> Additional Drivers
  • Activate NVIDIA accelerated graphics driver (version 173)
  • Reboot your computer

A more graphical how-to can be seen at http://askubuntu.com/questions/66652/windows-go-blank-when-resizing. Credits to the guy who was able to solve this!