Ping Blog WWW.ElectronicsCircuits.TK: Major Projects
Showing posts with label Major Projects. Show all posts
Showing posts with label Major Projects. Show all posts

Sunday, 20 November 2011

Electromagnetic Levitator Circuit


This circuit creates a stunning display of the "magic" of magnetism by suspending a small metal object in mid air. Using an electromagnet, photo sensor and closed loop control, small and light metal objects can be floated just underneath the magnet, enclosed in a decorative arch. "No strings" are easily demonstrated by the ability to pick the metal object out of the air and place it back under the magnet at will. With the object floating about 1/4" under the magnet (exact distance will depend on the weight of the object), an LED and photo transistor arrangement let a feedback circuit know it's position. The circuit controls current to an electromagnet to maintain an equilibrium between the force of the magnet and gravity. Thus, the object floats. Impart a bit of a spin to the object and momentum will carry it for quite a long time as the only friction working against it is between the object and the air.

Circuit Assembly


This project is built in two sections; the circuit and then the enclosure/base. Assembly of the circuit should take place on a printed circuit board to minimize the chance of oscillation and to keep the assembly need and compact. A printed circuit board pattern is provided below. Before using it as a template for your board (using either a photographic or laser process) it is important to check its dimensions when printed. Make a test print on regular paper and then measure the result, comparing it to the measurement shown on the board pattern. If they don't match, you will need to adjust your printing settings or scale the pattern in the photo editing software of your choice. While a tiny amount of variance will not make much of a difference, about 1MM is enough to make fitting ICs very difficult. Once you are satisfied your pattern is correct, etch the board using the method of your choice and then drill out component lead holes.
Assemble the parts onto the board using the parts placement diagram shown below. Make sure to check the position of all polarized parts against the schematic before they are soldered into the board. ICs, diodes, transistors, electrolytic capacitors and LEDs must be placed properly or they will not function and may be damaged.
As the board will be mounted into a case, some components are mounted off board with wire leads connecting them to the PCB. D1, D3, Q1, R9, L1 and S1 should be connected to the board via wire leads. S1, R9 and D3 should be on leads about 6" to allow mounting on the front of the case. Q1 and D1 will require longer leads (about 8-10") as they will be mounted on the bracket supporting the electromagnet. L1, the magnet, needs enough lead length to get it to the top of that bracket so use between 12" and 14" of wire.
L1 is the electromagnet coil assembly from a Potter & Brumfield KUP11D15-6VDC relay. Pull the relay casing off and then remove the coil assembly by snapping its bracket from the plastic bottom. Be careful not to damage the coil windings or the fragile leads connecting the coil to the pins. The KUP11D15 is available from many online suppliers and quite likely through your local electronics store. It was commonly used in HVAC so if you are having trouble locating it through an electronics supplier, try a heating and cooling supplier. The relay is in a socket type case with a clear plastic cover. Substitutions are also available from several manufacturers and most relays having similar physical dimensions will also work as long as the coil voltage is the same. If you can't find the P&B relay or you wish to experiment you can of course wind your own coil. Use very thin magnet wire (34 or 35 gauge) and wind about 100 feet onto a 1/4" bolt which has been cut to a lenth of 1.5". By chucking the bolt into an electric drill you can make winding easy but be very careful to control the wire speed as it will turn into a razor blade if moving quickly.
The circuit runs on 12V supplied from a 12VDC 500MA "wall wart" power adapter. This keeps the size of the base small and desk-friendly.

Schematic


Schematic of the Electromagnetic Levitator

Printed Circuit Board Layout


PCB of the Electromagnetic Levitator

Printed Circuit Board Parts Placement


PCB parts placement of the Electromagnetic Levitator

Parts

Part
Total Qty.
Description
Substitutions
R112K 1/4W Resistor
R21560 Ohm 1/2W Resistor
R313.3K 1/4W Resistor
R4112K 1/4W Resistor
R5, R6, R14, R1641K 1/4W Resistor
R71470K 1/4W Resistor
R8, R102100K 1/4W Resistor
R9110K Linear Pot
R111150K 1/4W Resistor
R121360K 1/4W Resistor
R13182 Ohm 1/4W Resistor
R1512.2K 1/4W Resistor
C11330uF 25V Electrolytic Capacitor
C210.1uF Ceramic Disc Capacitor
C310.22uF 50V Polyester Capacitor
D11TLN110 IR LED
D211N4001 Silicon Rectifier Diode1N4004, 1N4007
D31Red LED
Q11IRD500 NPN Phototransistor
Q212N3906 PNP Transistor
Q3, Q422N3904 NPN Transistor
Q612N2907 PNP Transistor
Q71TIP41A NPN Power Transistor
U11LM78L09 9V Linear Regulator IC
U21LM358N Dual Op-Amp IC
L11Potter & Brumfield KUP11D15-6VDC Relay Coil(See Text)
S11SPST Switch
MISC1PC Board, Sockets For ICs, 12VDC 500mA Power Adapter, Wire, Knob For R9, Heatsink For Q7, Holder For D1 and Q1, DC Power Jack

Enclosure and Base Aessembly


With the circuit complete, the next task is to assemble the physical structure. It is divided into two parts; the enclosure (which houses the magnet) and the base (which houses the circuit).
The enclosure is built out of a 1" wide section of 4" OD 1/8" wall aluminum square tubing. You can find this tubing at the local metal supplier but you may be forced to buy a 10, 12 or 20 foot length. Most communities have a retail metal shop that will sell in smaller quantities. These same shops will often also cut to the dimensions you need for free or a small fee. If you don't have a retail metal shop handy then check out the big box home improvement stores, or a local farm supplier. Drill a hole of an appropriate diameter (this depends on your coil) in the middle of the top of the tubing. Now mount the coil, running the wires down the back of the tubing. Then, drill a hole on each side 1" down from the top. Size the hole according to the LED holder you are using as this size can vary. Be sure to keep the holes as perfectly aligned as possible. If you are going to experiment with a different electromagnet or objects of various sizes, it will be helpful to make two slots instead of holes so that the LED and photo transistor can be moved up and down. Lighter objects can float farther from the coil which requires the optical components to be moved down to the same level. Mount the LED and photo transistor in their respective holders and secure them to the tubing using the nut or snap ring supplied with the holder.
Drill the front of your base to accept S1, R9 and D3 and mount the components. The exact project case you choose for your base will depend on your individual tastes and how you wish to decorate the bracket. Wherever you position these components, make sure they will not interfere with the top of the base or your ability to mount the circuit board.
Mount a jack to match your DC power adapter at the back of the base.

Enclosure and Base Assembly Diagram


Diagram of the levitator enclosure and base assembly

Final Assembly


Mount the enclosure assembly to the top of your base using two small bolts and appropriate nuts. Whether you chose to center it or mount if off to one side will depend on how you intend to decorate it. Left raw, the enclosure is best positioned in the center as the exposed machinery will create a more precise look. If decoration is used, turning the levitator into a pencil holder for example, the enclosure is best mounted to one side so the pencil cup can be placed beside it.
Using a bit of creativity, covers for the exposed tubing and mechanical components can be made using many common materials. Cardboard, Plexiglas, Lexan, wood, glass and stone are some possibilities. Chose your material based on the types of objects you are most likely to float.

Testing And Operation


The Electromagnetic Levitator is best operated in a location away from strong light sources that may interfere with the optical components. Enclosing them in some kind of decoration will go a long way to both improving the aesthetics and minimizing interference. Make sure that S1 is turned off, then plug in the power adapter and turn R9 fully counterclockwise. D3 should be of at this point. Slowly turn R9 and observe D3. At some point, D3 should turn on. If you keep turning R9, it will turn off again. Adjust R9 just to the point where the LED is off, which should be about half way.
You need an object to levitate so find a small and light steel object. Something like a key chain trinket, small hallow steel globe or beer bottle cap is ideal. The size of the object will depend on how close you are willing to keep it to the coil (by adjusting the position of D1 and Q1) and the coil you use. The specified relay coil is best suited for very light objects. Slowly lift your object towards the coil while making sure not to block the IR beam with your fingers. If R9 is adjusted properly the object will be lifted from your hand as you bring it near the coil, and suspended in mid air. If it oscillates up and down, back off on R9 slowly.
Non-metallic and heavier objects can be levitated by attaching a small magnet. Remember that the polarity of the magnet must be opposite of the coil as to be attracted and not repelled so if your object is shot away from the coil, reverse the magnet.

Computerize Your Room/House


So you've read about my Computerized Room or have seen those nifty home automation products advertised in the back of electronics magazines? Or perhaps someone you know has done something similar. At any rate, you have decided to try it yourself. The first thing I will say, however is that it is not cheap.
You will first need a computer, but since your reading this, I assume that you already have that taken care of. Second, you will have to buy about 20 IC's and a very expensive ISA experimenters prototyping board. These boards cost anywhere from $16 to $45, and can be purchased from your local electronics store or from Jameco Electronics (See Where To Get Parts). They have a fairly wide selection. Buy the 8 bit version, the 16 bit varsion is not needed for this project.
Since this is a major project, it will be presented in sections, starting with the Simple Parallel Port Interface. The 8 Bit Output Card will come next, followed by the 8 Bit Input Card. All three interfaces came from the book "The Robot Builders Bonanza", by Gordan McComb.
I must also stress that this is a major project and should not be attempted unlesss you have a good understanding of electronics. If done wrong, you run the risk of not only destroying the circuit, by also destroying an expensive computer as well. Double, no, triple check your work to make absolutely sure that is free from errors before installing it in any computer.
DISCLAIMER: I am not responsible for any damages caused due to a lack of knowledge or mistakes in the circuit when building and using these projects.
Now then, with that out of the way, on to the Parallel Port Interface.

Parallel Port Interface


Description

This is about the most basic interface you will see. It uses only 3 74376's (74LS367). This interface provides 8 outputs (plus 3 address lines) and 5 inputs. This is usually enough for one room, providing you make use of some demultiplexers and the address lines. You could have up to 128 output lines using the address lines, a 74LS138 and 8 74LS154's.
Begin construction by mounting the IC sockets on the board. I used a experimenters universal solder board due to the large number of wires that must cross. If a PC board were used, you would need either a multi-layer board or many, many jumpers.
Now, solder wires along the top and bottom of the board, making all the connections between the IC sockets. Do not install the IC's yet. Assemble the cable using 26 conductor ribbon cable and a 25 pin crimp connector. You will have one conductor left over so just "peel" it off. Connect the cable to the board and wire it into the circuit. I used an 18 pin socket to make connections to the outputs and inputs on the interface easy. You could do the same if you like, or use a terminal strip.

Schematic Of The Parallel Port Interface

This is the schematic of the parallel port interface

Parallel Port Pin-Out

This is the pin-out of a standard parallel port

Parts


Part
Total Qty.
Description
Substitutions
U1,U2,U3374LS367. Buffer7437, 74HC37
MISC1Sockets, 18 Pin Socket (For Output), Board, Ribbon Cable, 25 Pin Connector
You operate the interface by sending bit patterns to the printer port. BASIC, GWBASIC or QBasic are the languages of choice since most computers already have them installed (in your DOS directory). If you wish, you can download control software from my files section.
The command you use is the OUT command. The decimal address of most printer ports (assuming LPT1) is 888. Use this with the OUT like this:
OUT 888,X
X is a number from 0 to 255 that represents the binary bit pattern.
Although designed primarily to get data out of the computer, the printer port has 5 input lines (on some computers it could be less). You access these lines with the INP function. This time, however, the decimal address is 889. The syntax of the INP command is:
Y=INP(X)
Y is the variable used to store the decimal value that is returned. X is the port number, which in this case is 889.
You may also use the OUT command to send data to the address lines. Just use address 890 instead of 888. Remember that there are only 4 address lines.

8 Bit Output Card


OK. With the basic parallel port interface done, you can build the more advanced 8 Bit Output Card.

Description

This is much more complicated then the parallel port interface, mostly because of the address lines used by the computer to send data to different devices plugged into it's bus.
This interface is constructed on an IBM 8 bit prototyping board. These are available from Jameco Electronics (see Where To Get Parts).Connections are made with point to point soldering or wire wrap. Note that if you use the wire wrap method the board will require about 1/2 inch clearence on the connection side.
Use sockets for all IC's. Begin construction by first mounting the sockets. Depending on which board you buy, you might have lots or very little space. Connect the IC's together using either point to point or wire wrap. I used a 36 pin connector to facilitate connection to the back of the computer, but you can use any other method. Whatever the method, install that connector and wire it into the circuit now. You may now wire the connections to the bus (the gold contacts on the bottom of the card). If you need a reference as to what the bus connections are, check out The IBM Bus Pinout (I apologize for the poor image quality). It is a good idea to bypass power supply pins with .1uf capacitors to avoid problems with interference, power supply spikes, etc. Triple check your work before installing the circuit in any computer. The simple circuit to connect the interface to relay's is showen after the schematic.

Schematic

This is the schematic of the 8 bit output card

Parts


Part
Total Qty.
Description
Substitutions
U1174LS04 Inverter7404, 74HC04
U2174LS00 NAND Gate7400, 74HC00
U3174LS32 OR Gate7432, 74HC32
U4174LS374 Buffer74374, 74HC374
U5174LS30 8 Input NAND Gate7430, 74HC30
MISC18 Bit IBM Prototyping Board, Connector (For Output/Input), Sockets, Capacitors For IC Bypass, Wire.

IC Power Pins

The power connections were left off the schematic for clarity. Here they are: 
Chip
Vcc
GND
7400147
7404147
7430147
7432147
743742010

Relay Driver Circuit

This is the schematic of the relay driver circuit

8 Bit Input Card


This input circuit can be built on the same board as the output circuit, and share the same bus connections. This circuit is necessary if you wish to use almost any type of remote control circuit, which will most likely require more then 5 inputs as provided by the printer port.

Description

Since this is quite similar to the output circuit, I won't go into the details again. Only the parts list and schematic will be showen, as well as the "power pins" chart.

Schematic Of The 8 Bit Input Card

This is the schematic of the input circuit
CAUTION: Be sure that the signals being sent to the input card do not exceed 5 volts or fall below ground!

Parts


Part
Total Qty.
Description
Substitutions
U1174LS04 Inverter7404, 74HC04
U2174LS00 NAND Gate7400, 74HC00
U3174LS32 OR Gate7432, 74HC32
U4174LS244 Buffer74224, 74HC224
U5174LS30 8 Input NAND Gate7430, 74HC30
MISC18 Bit IBM Prototyping Board, Connector (For Output/Input), Sockets, Capacitors For IC Bypass, Wire.
The power connections were left of the schematic for clarity. Here they are: 
Chip
Vcc
GND
74LS00147
74LS04147
74LS30147
74LS32147
74LS2242010

Controlling The Input And Output Cards


Controlling the cards is straight forward, using the basic INP and OUT statements as explained in the Simple Parallel Port Interface. The only difference is the address. The address for the input card is decimal 701 while the output card is decimal 703.

Choosing The Right Computer


This is the last section of this document. Choosing the right computer is getting harder these days. Since new computers no longer come with ISA slots, that basically means you are stuck using older machines. In a way this is good since it's no great issue if you fry one. Pentium class machines are essentially junk these days and basically free. Pentium II and III machines are quickly dropping into that catagory. Just make sure that you triple check your work before installing it into any computer.
Well, thats it. For more information on programming the parallel port, see Programming The Parallel Port In QBasic or Programming The Parallel Port In Visual Basic.