This is my first time using Arduino, or any microcontroller. I'm glad it worked out so well but my wife may not be, due to the stacks of microcontrollers that will being showing up on our doorstep soon for future projects. Any feedback or questions are welcome, as are votes in the Arduino Contest.
I love watching sports, my family loves watching sports, and we all love cheering on our local college team (Go Dawgs). This leads to lots of watch parties on game day. Since there are usually upwards of 15 people we use a projector so everyone has a good view. The downside is the screen. In the past this was just a white sheet tacked to the wall. This was decent but left a lot to be desired.
A motorized, Android and Arduino controlled, Bluetooth enabled, screen. The screen itself is made of white blackout material, giving a smooth bright projection surface. The whole unit is stored above a drop ceiling which the screen is deployed through, into the room (if you don't have a drop ceiling where you use your projector don't worry, you can just mount to the ceiling or wall).
New Screen Pros
Step 1: Materials and Tools
Show All 17 Items
Step 2: Calculations
Screen Size Calculations
Use the THIS great website to decide on a screen size. Here are some things to consider when picking a screen size.
Motor & Rod Calculations
Once you've decided on a overall size based on room size, available space, optimal viewing distances, etc. you should run some quick calculations to determine how much minimum torque you will probably need from your motor. The numbers in these calculations are examples, you will need to input your own values.
Now you know exactly what you need in a motor and rod. When trying to find a motor for the most part lower RPMs means higher torque. I found a few motors that were rated 12V, 60 RPM that had a stated torque of 30 N*cm as a point of reference.
Step 3: Circuitry Introduction
Since the circuits, besides maybe the software, take the most time due to testing and troubleshooting we'll begin there. There are three separate circuits interfacing with the Arduino: the motor and it's controller, the Bluetooth module and it's Android interface, and the potentiometer. Each page describes how to setup the relevant circuit and provides a test program, in both code and plain text so you can review the code without the Arduino software installed, that tries to mimic how the circuit will be used in the final product. The circuits can be assembled and tested in any order.
Step 4: Motor Circuit
Getting the motor running is pretty simple because of the motor control shield. Its just a matter of getting wires plugged in the right places.
Start by attaching leads to your motor if this hasn't been done already. These don't need to be really long, a few inches, but it is easier to cut them shorter than longer later, so err on the side of caution. With the motor shield attached to your Arduino, place one of the motor leads into the MA1 slot and the other into the MA2 slot on the motor shield. Grab one of your 9V (or otherwise if needed) battery clips and place the black, ground, wire in the GRD slot on the shield and the red, positive, wire into the Vcc slot, again on the board. That's it, quick and painless, or so it seems so don't celebrate until you've ran the test program below or developed your own.
Attached is an Arduino program to test the functionality of your motor. The program simply runs the motor in one direction for 5 seconds, waits for 3 seconds, reverses the motor for 5 seconds, and waits 3 more seconds and repeats this ad nauseum. If your motor control shield is different you probably will have to rewrite the motor controls in all the sketches. My shield came with a library, I don't know if this library is universal or if it is specific to the L239D chipset. Also attached is the necessary library if you want to give it a try (It's the zip file).
Step 5: Potentiometer Circuit
The pot is used to tell the Arduino what position the screen is in.
Your pot should have three posts, make sure there is a lead wire attached to each one. These wires will probably need to be fairly long, as they will eventually reach from one end of the screen to the other where the Arduino is located. For now just attach jumpers to the pot and plug them straight into the Arduino. The three posts on the pot should be arranged with two on the outside and one between them. Connect the V+ pin to the 5V Arduino pin and the V-, or GND, post to the Arduino's ground pin. The third, or sweep, pin is attached to an analog pin, I used A0. The motor shield I bought covers all of the header pins on the Arduino but breaks them out on the board. This is fine, it just means I had to solder the pot to the motor shield for the final build. For testing the pot I just attached the pot straight to the Arduino's headers.
The attached test program uses the pot to control the built in pin 13 LED on the Arduino in a similar fashion to how it will control the motor in the final program. The program sets the top and bottom 5% of the analog input as thresholds, then as you sweep the pot the LED is on between the thresholds but turns off when you get close to the limits of the pot.
Step 6: Bluetooth Circuit
The Bluetooth module is the bridge between the Android app and the Arduino.
Before you start you need to check the voltage requirement for your module. Many of these modules require 3.3V which the Arduino can provide without problem but the digital Tx output pin on the Arduino is 5v so you will have to build a simple level shifting voltage divider. Before you build the shifter solder leads onto the Bluetooth module. You need a lead on the Rx, Tx, 3.3V, and GND pins. Now for the level shifter grab the 10 and 20 kOhm resistors. Attach one leg of the 20 kOhm resistor (or 2x 10kOhm resistors in series) to ground, and the other to one leg of the 10 kOhm resistor. Add the end of the Bluetooth modules Rx pin to the connection between the two resistors. Finally connect the the other leg of the 10kOhm resistor to the Arduino's Tx pin. The last three connections from the Bluetooth module are simply GND to Arduino GND, 3.3V to Arduino 3.3V, and Tx to Arduino Rx. Once again the Arduino's headers are covered by the motor controller on the final build. Thanks to a1r, without whose Instructable I would have probably cooked my first Bluetooth board.
In the end I got a different Bluetooth module off of ebay that had the Vcc, GND, Tx, and Rx lines boken out to header pins and included a header cable. This unit was also 5v meaning the level shifter was not necessary. If you have a 5v module simply connect Vcc to the Arduino 5v pin, GND to Arduino GND, Tx to Arduino Rx, and Rx to Arduino Tx.
This test program for the Bluetooth also doubles as the test program for the Android app. A simple test you can run before getting into the Android stuff is to simply check if your phone can pair and connect to the Bluetooth module. The actual test code below blinks the led slow for 10 seconds when up is pressed in the app, and blinks the led fast when down is pressed in the app. It also cancels the led if either button is long clicked. Remember that the Bluetooth needs to be unplugged from the Arduino while you upload the sketch.
Step 7: Assemble the Final Circuit
Show All 10 Items
Because I bought a much cheaper motor control shield the unused pins did not have headers but, for the most part, they were broken out into through hole pads on the shield. This was the case for the 5 volt pin, GND pins, and analog pins, meaning I simply had to solder the leads into the proper holes, but not the digital pins 0 and 1 for the Bluetooth. To get access to the digital pins I de-soldered and pulled out the pins and then broke off the short plastic headers. This left just enough room to put a jumper wire bent 90º in the Arduino's headers. For the Arduino power and the Bluetooth module I soldered and attached the leads directly between the components and the shield. For the potentiometer, which will be on the opposite end of the rod, I attached short jumpers to both the pot and the shield which will be connected with long wires later. This approach allows me to easily change the distance between the Arduino and the pot meaning I can upgrade to a larger screen easily in the future without messing with the Arduino.
Step 8: Arduino Software
With the Arduino side hardware fully assembled, it's time to load the final program to your Arduino. If you don't care how the program works just download the sketch below and load it to your Arduino, if you do care keep reading. There is a .txt version of the code attached as well so you can view it without the Arduino software.
Once the program starts and everything is initialized in the setup the Arduino begins waiting for serial input to become available. When a command, a single byte, is sent from the app the Arduino saves the command, either a '1', '2', or '3', and then decides whether to put the screen down, up, or cancel current movement. This decision is based on two things, First, if the command was a 1, 2, or 3. Second, what position the screen is already in, based on the potentiometer's reading. If the screen is up and a down command is received the Arduino turns the motor on in the down direction and begins monitoring the pot's output. When the pot's value hits the lower threshold the motor is stopped and we loop back to the beginning, waiting for another command. If the screen is down and the command received was up then the processes is the same for down except the motor is halted when the pot reaches the upper threshold. If a '3' is received while the motor is running it halts the motion and the program begins again from the beginning. Any other time a '3' is received it is ignored. All other serial commands or combinations, screen up with up command or screen down with down command, are ignored and the Arduino keeps checking the serial port for commands.
As with the motor test program, if your motor control shield uses a different library you will have to correct all the motor calls in the program. (The motor shield's library is attached to Step 4.)
Warning: If you use a screen with a different height you MUST calibrate the thresholds in the program to prevent overshooting the up and down positions!
Step 9: Android App
In simple terms the app first connects to the specific Bluetooth module attached to the Arduino with a press of the Bluetooth symbol button in the app (The module must first be paired. This is a one time operation done outside the app). Once a connection is made you can either select a button to bring the screen up or one to put the screen down. When the down button is picked a single byte, '1', is sent over the Bluetooth connection to the Arduino which then does it's thing. For up the byte '2' is sent. The long click action for both up and down sends the byte '3'. Long clicking the Bluetooth button disconnects the module.
Attached is the Android source code (zip file) so you can view it, mod it, and deploy it with your computer, via USB. The .apk for unmodified installing is attached as well. Currently the app may have to personalized for your Bluetooth module. So far I haven't had any luck getting the app to pick the module itself so I put the address of my BT module in directly. I'm not a BT expert so I don't know if the address is unique to each module or if two of the same modules will have the same address. You can find your modules address in your Bluetooth settings or with any number of free apps. If I ever get this worked out I will upload the app to the app store.
LINK to the full size image of the code blocks. Sorry there are no pictures of the actual app, you have to have a rooted device to take screenshots.
Step 10: Prepare the Rod
Show All 10 Items
Since attaching the screen to the rod is done in a later step the modifications to the rod here are simple but not necessarily easy. You need two holes, one on each end, in the center the rod. One of these holds the grommet that interfaces with the pot, the other slip fits with the motor shaft. Finally a set screw holds the motor in place. I recommend not cutting the rod down to size yet if it is longer than you need. This will give you a chance or two to try again if you mess up.
There are several methods you can use for finding the center of the dowel. I tried using calipers set to the radius, using a square to find diametrical lines, and finally settled on using a compass. If you have a better or different method please post it for others to see.
With one side done move to the other repeating the steps above. The two exceptions are: cut the rod to length first ( the width of the screen plus leave an inch or two on each side, maybe more in case of mistakes), and drill the hole to the exact size of the motor shaft.
Finally to make sure the motors rotation is transferred to the rod it is secured with a set screw. Drill a hole, just smaller than the thread size of the screw, on a center line through to the axial hole you have already drilled. This position of the hole is a little tricky, to close to the edge and the threads will split the wood. To far away from the edge and the screw won't seat completely on the shaft. With a clearance hole drilled, use the set screw to cut threads, or if you have a tap use that of course. When cutting the threads, run the screw backwards and forwards as you go, don't just run it all the way down. You will get much nicer threads if you do this.
Step 11: Build the Housings
Show All 8 Items
The potentiometer is mounted in one of the wall boxes, probably the smaller of the two.
Start by finding a flat spot on one of the sides of the box and marking the spot you want the pot's shaft to stick out with your center punch. Now drill a clearance hole at the mark just big enough for the threads and any bosses on the pot to pass through. Place the pot in the box and put the shaft and threads through the hole, orienting the wires so they come out the top of the box. Fix the pot in place with the flange nut, or panel nut and star washer.
Motor and Arduino Housing
Similar to the housing for the pot but larger so it can hold the motor and the electronics.
I chose to mount the Arduino board vertically on the back wall with the USB plug up, allowing easy future access. I knocked out one of the wire pass-throughs in the bottom of the box and fed the Bluetooth module through in an attempt to preserve as much range as possible. This box also holds the two batteries. I simply drop these into open spaces once they are attached later on.
Step 12: Final Assembly
Show All 12 Items
Now that all the pieces of the puzzle are in place assembling the end product can be accomplished in three steps: wiring the potentiometer, attaching the screen to the rod, and assembling the housings and rod.
Wiring the Pot
Both the pot and the Arduino should have leads attached by this point, unfortunately it isn't as simple as connecting the two sets of leads. You need to make sure that when the screen goes up the pot is reading in the right direction and vice versa. To do this you need to decide which side the motor will be on when you face the screen. Then run the app and select either up or down and note which way the rod turns. At this point I used trial and error since there are only two possibilities and hooked the pot up to the Arduino using temporary connections. Now with the pot, NOT engaged in the rod, turned all the way to what should be the up position try running the screen up. It should ignore the command, if it does you are good to go, make the pot connections permanent. If it starts to run you need to simply switch the V+ and GND wires between the Arduino and pot. Do this and test again to make sure, then make the connection permanent.
You can also orient the motor and pot directions by modifying the Arduino sketch and the Android app but honestly it is much easier to swap the polarity on the pot.
Attaching the Screen
My pictures show the rod attached to both the housings in a few of the pictures pertaining to attaching th screen, in hindsight it is easier if you remove the housings and just place the rod on the floor. Just make sure the motor shaft's flat is facing up and the set screw hole on the rod should facing up too.
Finding the width of the screen is easy, simply measure the available length of the rod, leaving .25"-.5" on each edge, mark the width, and cut.
For the height you need the correct length that keeps the screen in aspect (16:9) plus you need to compensate for the distance between where you want the top of the image and where the rod will sit. Longer is better because you can either cut some off the end or keep some rolled up in the next step, calibration.
With the screen cut to size (and ironed if necessary) push the edge up to the rod so that it is in contact with the rod (check the pictures, they are probably clearer). When placing the screen you need to take into account which way the rod will be turning and which side of the material will be projected on. When everything's facing the right way and the screen is as square as possible to the rod, place small pieces of tape along the length to hold everything in place. Use an automatic center punch or knife to mark the place where the screws will go through the screen, near each edge and 6"-10" apart in between. Widen the holes in the screen by pushing the center punch through and then place a screw and small washer in each position. Once all the screws are in you may want to trim, or tape down, the edge of the screen that sticks out past the screws. It tends to stick out and then the screen doesn't roll up as cleanly.
Assembling the Pieces
This one is easy, I promise. Before you start, turn the potentiometer all the way to what will be the down position, then turn it back a 1/2 turn. Put the motor's shaft in the proper place, tighten the set screw (onto the shaft's flat if it has one), and press the potentiometer into the grommet on the opposite end.
Step 13: Calibration
The definition of calibration tells us that it is a case by case basis so your screen probably will require more or less adjusting. This is a trial and error process.
Step 14: Mounting
Show All 19 Items
This is where a lot of you may have to do a little problem solving. I have a drop ceiling, like in schools or offices, in my basement which means I can easily hide the screen above it and clear a little gap for it to deploy through into the room below. I'm guessing most of you don't have ceilings like this and will instead choose to mount the screen to a wall or directly to the ceiling. If you are going with an exposed mounting you may want to take the time to build a simple plastic or sheet metal cover for everything so it looks cleaner. I think everyone can handle hanging this on a wall or ceiling, all the same rules apply for this that apply for hanging or mounting anything else, so I'll focus on how I mounted the screen in the drop ceiling.
Preparing the Ceiling
You'll need at least one more pair of hands for this part. Also, test everything before you get to far and have to undo your work.
Step 15: Finishing Touches
This project has lots of room for expansion and improvement and I will probably be coming back to it in a while after we're more settled into the house. Some of my ideas are below.
Currently there is just a gap in the ceiling where the screen comes out but at some point I would like to develop a gate/door that blends into the ceiling better.
I also would like to experiment with different screens. While researching screens for this project I came across some people that claimed that a light gray screen will actually give better contrast. and I'd like to try it to see.
I envision an entire system controlled from one app where at the press of a button the screen deploys, lights dim, a projector deploys and starts, and hidden speakers are revealed. That's probably overkill for a system that I'll use 20 times a year but a guy can dream.
Back in reality all that's left is to dim the lights, fire up the projector, sit back, and relax. Thanks for reading!