Rotating Monitor CircuitI have finalized the wiring of my rotating monitor circuit largely due to the patience of DaOldMan and with some help from others on the board. I'm going to try to summarize how to go about doing this yourself for those interested. This post will probably take a bit of time to finish off and likely require me to go back and snap a few additional pictures. Feel free to comment in the meantime.
Highlights - All parts can be ordered online and delivered to your doorstep or picked up locally at RadioShack
- Command Line driven software rotation allows any Front End to reorient your monitor.
- Circuit can be completely powered by a 5v connection to a PC power supply.
Warnings - User must be able to operate a soldering iron with a moderate skill level. Some of these parts are small, and it's easy to accidentally solder small things together due to sloppy soldering.
- When soldering and powering things to your computer, you assume all risk involved. It is not my fault if you blow up your rig. These instructions have been implemented at least three times and been proven to work if done properly. Credits - DaOldMan: Created the wiring behind the logic board and the software to drive the monitor rotation! (BIG Thanks goes out!)
- Weisshaupt: Introduced BYOAC to the treasure that is the Secret Motor Driver "H-Bridge" kit and friction drive pieces necessary to accomplish powered rotation.
- Psychotech: Your simple manual rotation method using switches
- Cornchip, Koz, Edge: Other rotators who've inspired me to this achieve this point today.
Shopping List PCB Parts:
1x 240 hole or smaller Perf Board (RadioShack)
3x 2.2k-Ohm Resistors (Radioshack catalog # 271-1325)
3x 2N3906 PNP Transistors (Radioshack catalog # 276-1604)
Wires and etc.
1x
DB25 to RJ45 converter 1x CAT 5 (ethernet) cable.
1x roll of 18-22 gauge wire (RadioShack)
1x 12 block small terminal strip (RadioShack)
2x limit switches
1x box of wire crimps (blue and red things that attach wires to switches)
1x box of various plastic C-Clamp style wire tie downs + 1/2" screws (or something to mount loose wires to your wooden rig)
Motor Parts
1x
GM3 motor (easier to mount than the GM2)
1x
Regular Motor 2 upgrade 1x
The mounting Bracket 1x
A wheel 1x
A Extra Grip Tread (it is a friction drive after all- the more tire that meets the road)
Electronics: H-Bridge
1x
A Chip socket (optional)
1x
The secret Motor Driver Kit ( incomplete, to be filled in shortly )
Tools - Soldering Iron
- Solder
- Wire cutters
- Needle Nose Plyers
- Desoldering Braid (yes.. you'll use this more then you'd like!)
- Crimping Tools
- Utility Knife
- Multimeter cable of measuring volts and testing for connectivity
Step 1 - Determine what your Parallel port does during Bios Load/Windows BootupBefore you attempt to hook up anything to your parallel port, it's important to realize that you are powerless over the voltages supplied from the printer port during Bios load and Windows Bootup. During these times, pins can and most likely WILL fluxuate from either low to high or high to low. Low is to be considered in a state of "off", or reading below 1.5 volts, which High is considered to be "on", and will read anywhere between 4.5 and 5 volts. Reading reveals this is probably due to Plug N Play trying to figure out what is attached on the parallel port. Any time a single pin swaps from high to low or vice versa, you risk a signal being sent to your motor which will turn it on or off. While this is the desired behavior when SOFTWARE controls the circuit, it is highly undesired that your motor randomly decides to rotate while your cabinet powers up.
Our goal is to prevent the monitor from moving before we are ready. So your first step is to determine the bootup voltage changes. This is pretty easy if you have a multimeter, and 20 minutes or so of spare time lying around. Here is an example of the chart I ended up with:
How did I get to these numbers?
1. Grabbing a parallel port cable and plugging it into the computer with the cpu power turned off.
2. Create a blank chart with 24 numbers across the top, starting at 1, ending at 24. These represent the results of all 24 pins.
3. Create a Start row on your blank chart. This row represents the initial reading before the computer decided to change the value during any point of bootup.
4. Create an End row on your blank chart. This row represents any change in voltage during any point the bootup process.
5. Cut two 6" lengths of small wire, the same kind you plan to use to wire your switches anyways. This will work better if your inner wire is stiffer rather then tiny strands.
6. Strip both ends of both 6" lengths of wire.
7. Take the first stripped wire, wrap one stripped end around the negative probe tip of your multimeter's ground (black) wire.
8. Take the second stripped wire, wrap one stripped end around the positive probe tip of your multimeter's positive (red) wire.
We do steps 7 and 8 because the probe tips of my multimeter were too fat to shove into the female end of the printer cable.
9. Take the exposed end of the wire attached to the ground probe of your multimeter, and shove it into pin 25 (ground) of your printer cable's female end (assuming the cable is all ready attached to your computer in step 1, there is only 1 end left to use, so this shouldn't be confusing.) Make sure this wire is not loose and fits snugly down into the hole. Think of this wire as a single pin going into the cable, temporarily attached to the printer cable.
10. Turn on your Multimeter and set it to read volts. (see your multimeter's instructions on how to do this, mine had a yellow "v" on the settings dial)
11. Take the exposed end of the second wire attached to the positive probe of your multimeter, and shove it into pin 1 of your printer cable's female end (same end as step 9). You will be moving this wire 24 times during our testing.
You are now ready to begin charting!
A.) You should be able to lay the multimeter down, have it turned on, and both probe ends are connected to two different pins via 6" wire extensions.
B.) With the red probe extension shoved in pin 1, and the black extension shoved in pin 25, turn on your computer.
C.) Take note of the voltage number reading on your multimeter. This number goes in your start row under column 1
D.) WATCH the meter readings as windows goes through the Bios startup, through the XP Progress bar screen, and up until you see the start bar on your desktop.
E.) Note any changes in voltage readings in the End row, column 1
Congrats! You've charted 1 of the 24 pins!
F.) Shut down the computer.
G.) Now take the positive (red) probe extension, remove it from pin 1 and shove it into pin 2 hole.
H.) Keep the negative (black) probe extension shoved in pin 25
I.) Turn on your computer, noting start and end voltages just as we did above.
J.) When windows displays the start bar, go back to step F and repeat steps F-J advancing the red probe extension to the next pin in counting order until you've charted all 24 pins.
Once you have this chart created, you have a giant piece of the puzzle necessary to create the printer port logic switching circuit.
Step 2 - Secret Motor Driver "H-Bridge"When a DC motor is supplied with power, it's default behavior is to run in only one direction. If you want it to spin the other direction, you must reverse the polarity supplied to the motor. This can be done
manually with switches, but in this example we will build an H-Bridge to automate the reversal of our motor direction once it completes a 90 degree rotation.
There are many ways to go about building one of these. In my example I used a tiny robotics kit from Solarbotics.com.
Since it's a kit, it comes as a package of loose parts. It's up to you to solder everything together. The awesome thing about the kit to me is that it's a kit, you don't have to worry if you picked up the right parts or not. If you can put together an Ikea desk and have used a soldering iron before, then you're in business. If you are up in the air about your soldering skills, then I'd buy the optional chip socket while you're shopping. There are many small solder points needed to be made under the PCB, so you might want to practice a bit before taking on this kit. Also note, that the rainbow ribbon supplied with the motor kit is very fragile after soldered on. I recommend using CAT 5 (Ethernet cord) strands instead, as they are much more durable.
Follow the instructions accompanied in the kit to create the above completed circuit. Give yourself a good 6" of extra wire coming out of main connections where it says to use the rainbow ribbon, and a good 2' of wire coming out of M1 and M2.
Step 3 - Limit switch logic boardNow that you've built your H-Drive, we need a way to know if your monitor is currently rotated horizontal or rotated vertically. To achieve this takes many pieces including rotation logic software, limit switches, an H-Drive, and the limit switch logic board we are about to build which connects all these components together.
We are going to create the yellow PCB pictured above and then piggy-back our H-Drive from Step 2 on top. You could decide not to couple the H-Drive and the Logic Board all in one unit, but by doing so you have less to mount and it just looks nicer. Since no one is likely going to ask you to rip out your rotating monitor rig, appearance probably doesn't matter that much. But this is BYOAC and you know you will have to post images of your work, so make it count.
The circuit necessary to create this logic is going to feel overwhelming when you first look at it. It's really not that bad to solder together if you take it slow and are organized about how you go about it. Here is an overview of the entire circuit as I currently have it implemented:
click image to enlarge.To make this easier to remove from the monitor housing, and to quickly swap around ClockWise and Counter Clockwise logic pins (without the use of software) I spit the above circuit up into three sections, separated by screw top terminal blocks:
A.) Incoming Limit Switches
B.) The logic board and H-Drive circuit
C.) Motor Leads
( ... todo: Create image to demonstrate )
With all the things that can go wrong with the circuit, you'll thank yourself later for compartmentalizing your wiring this way.
Step 4 - Interfacing logic board with limit switches ( to be filled in shortly )
Step 5 - Interfacing logic board with Motor ( to be filled in shortly )
Step 6 - Interfacing logic board with Parallel Port ( to be filled in shortly )
Step 7 - Powering the rotation circuit ( to be filled in shortly )
Step 8 - Rotation Software ( to be filled in shortly )
Step 9 - Integrating with MaLa Frontend ( to be filled in shortly )
-csa