This levitator was built primarily to make a interesting free suspension motor. The levitator build is fairly conventional, I used a faster microcontroller, an inexpensive STM32F103 "Blue Pill" running at 72 Mhz instead of the Arduino Uno at 16 Mhz for quieter operation. I found that while an Uno worked, it produced a loud buzzing sound which was amplified by my large (140 mm diameter) acrylic sphere. The faster STM32 allows reading the potientiometer (and has a 12 bit A/D instead of 10 bit). The pot simplifies adjustment, since the levitation distance influences the resonance of the solenoid and sphere. Greater distance gives a lower resonance, and a smaller distance a higher resonance, and the stand has its own resonance. I think the key to operation without PID control is to make sure the stand resonance is sufficiently different than the solenoid and sphere resonance, and the stand should also have good damping.
I used a TLE5205-2 H bridge, good for 5 amp continuous current (though the levitator uses only 0.2 amp normally).
The sphere is kept spinning via a IR reflective sensor which in turn activates a P Mosfet and a coil of #36 awg wire. 8 ea. 1/8" x 1/8" cylinder magnets are glued around the equator of the sphere (inside) and are attracted to the coil at the appropriate time. The activation of the coil starts with IR from the sensor reflecting back to the IR detector (via reflective tape on the sphere). It is important that the motor coil not have a lot of strength, as the frictionless levitation design does not require it; also too much strength would start a back and forth oscillation. Therefore, with relatively weak torque and a heavy (110g) big sphere, it takes good 10 minutes to go from 2 or 3 rpm to 20 rpm.
The power source for the levitator and motor is 16 ea. 52mm x 52 mm solar cells epoxied to a folding wooden base. A 3000uF capacitor keeps the power stable during brief shadow events. An external 8 volt power supply is used to power the device at night or indoors. I added a safety system to the program code so that if a suspended item gets knocked off, or sticks to the coil, coil power is cut off. In normal operation the coil runs cool at 200 mA, but if the coil is left pushing or pulling constantly, current can go up to well over 1 Amp (especially if powered by a high current capacity plug in power brick), possibly melting the plastic or even starting a fire.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Parts
1 ea. STM32F103 "Blue Pill" ebay 72 Mhz, 32 bit microcontroller (program with Arduino IDE)
1 ea. A1302 or A1308KUA-1-T hall sensor 1.3 mV/gauss digi-Key
1 ea. 1K potientiometer
1 ea. 6.8K resistor
1 ea. 1K resistor
1 ea. TLE5205-2 ebay 5 amp H bridge
2 ea. Sch. 40, 1-1/4" (US) PVC elbow, hardware store
1 ft. Sch. 40, 1-1/4" (US) PVC pipe (cut one section 8.5", and 2 others 1.25")
1 ea. Sch. 40, 1-1/4" (US) PVC adapter to male pipe threads
1 ea. rubber 1-1/4" drain pipe to 1-1/4" drain pipe coupler to isolate vibrations
1/2" h x 4" x 2.5" plywood base reinforcement
3/4" h x 4" x 9.5" plywood base
1/4" d. dowel x 6" to support IR sensor and coil
8 ea. 1/8" d x 1/8" long cylinder magnets K&J inside sphere for motor
3 ea. 1.26" x 1/8" cylinder magnets Amazon for lifting, placed at top of sphere
1 ea. 140 mm clear acrylic sphere (plastic ball ornament) Amazon
1 ea. IR reflective sensor board ebay
1 ea. P type Mosfet FDT434P ebay
50 ft. #36 awg copper enamel wire ebay
1 ea. 40 pin female header header
1 ea. 1/4" id x 3/8" od x 1.5" L. steel spacer, hardware store
1 ea. 1/4" x 3" grade 2 (soft) bolt, hardware store
2 ea. 1/4" x 1.5" stainless steel fender washers, hardware store
2 ea. 1/4" stainless steel nuts, hardware store
1 ea. 1N4004 diode placed in reverse across #36 motor coil to shunt high voltage
16 ea. 52 mm x 52 mm solar cells, similar to Aliexpress
2 ea. 1/8" thick plywood sheets 6" x 9.5", craft store, for solar panel
1 ea. 1/16" thick balsa 4" wide x 3' long, craft store, cut for solar panel spacers
2 ea. small hinges for solar panel, hardware store
4 ea. rubber feet, hardware store
28AWG Electric Copper Core Flexible Silicone Wire, ebay
hot melt glue
Step 2: Construction
Make the solenoid lifting coil.
Start by rounding the hex head on the bolt, use a file or grinder to get the head to circular instead of hex shape, so that the magnetic field will be more uniform. Then assemble the coil form by placing a stainless steel fender washer on the bolt, then the 1.5" spacer, then another fender washer, and the 2 nuts. Tighten the nuts. Wind some wire neatly on the coil form leaving 6" lead to the side, securing it to the fender washer closest to the nuts with tape. Use a cordless drill to speed coil winding- just insert the threaded end of the bolt into the chuck. Put the bulk wire on a dowel supported so that wire can feed easily off the wire spool. Start the drill at low speed, feeding the wire onto the coil form with your other hand, keeping the wire neat without jumbling it on top of other turns. You can wrap each coil layer with transparent tape, that helps keep the next coil layers from getting jumbled up, and you can then fit more wire onto the core. More is better. Also, be sure the nuts and fender washers are stainless to avoid distorting the magnetic field. Attach the Hall sensor to the iron core with double sided foam tape, and cover with hot melt glue. The hot melt glue cushions the force of the sphere against the Hall sensor should something go wrong in the testing phase. Test the coil operation before installing it in the PVC elbow.
Assemble the stand.
The 1-1/4" (US spec, pipe O.D. is 1.675", I.D. is about 1.35") schedule 40 PVC water pipe was perfect, stiff enough to support the levitation coil, and has enough room to fit the microcontroller and H bridge inside it. Cut the pipe into a vertical section of 8.5" and 2 small 1.5" sections for the horizontal pipe sections. Drill a hole for the adjustment potientiometer near the base. None of the pipe sections need to be glued together, a friction fit is quite sturdy. Push the 8.5" pipe into the PVC male threaded adapter. Drill a hole in the plywood base and plywood reinforcement to fit the pipe threads. This will require a hole saw and some filing to get the plastic pipe threads to screw into the plywood. Secure the reinforcing plywood to the base plywood with wood glue and 2 wood screws. Add the 4 rubber bumpers to the base.
Fit the one of the 90 degree PVC elbows to the top of the 8.5" long vertical pipe, then fit one of the 1.5" long horizontal pipe sections into the elbow. Slip one end of the 1-1/4" rubber drain pipe connector over the 1.5" long PVC pipe. Do the same thing for the next elbow, slipping the other end of the rubber connector over the second 1.5" PVC pipe stub. Secure the coil in the elbow using a bit of 1/8" balsa wood with a hole cut in it for the coil- the balsa wood should fit between the two nuts at the end of the coil. Hot glue the balsa wood support into the elbow. Hot glue between the stainless steel fender washer (at the end of the coil near the hall sensor) and the elbow for additional support.
You can program the $2.00 STM32F103 several ways, see youtube video to get setup with the Arduino IDE. I used a serial connection to the STM32 and a FTDI232 USB to serial adapter (set for 3.3 volts). I just moved the Boot 0 jumper as shown in the video to download code, then put the jumper back to run the program. It is also necessary to hit the STM32 reset button right after clicking on the Arduino IDE program button. Due to the location of the STM32 hidden inside the PVC pipe, I found it a pain to disassemble the PVC just to get access to the jumper and serial programming header. Therefore I recommend installing a Boot 0 SPDT switch at the base, and extending wires for the serial header and reset to the base as well. Remove the Boot 0 jumper, solder a wire to the middle header pin, extend it to the common center terminal of the SPDT switch, and solder a wire from 3.3 volts to one of the remaining switch pins, and ground to the other. Hot glue the switch to the base. The serial programming header and reset switch are also hot glued to the base. See pictures.
The Arduino IDE Tools tab should have the following selected- Board: Generic STM32F103C series, Speed :72 Mhz (normal), Upload method: serial. The H bridge has input (pin IN2) pin connected to microcontroller pin PA6, used to select current direction through the coil. The other input pin to the H bridge (IN1) is an enable pin. It connects to pin PA7. If the sphere is not in range, the coil polarity will not cycle between pulling and pushing, and the program will compare the number of polarity changes in 15 seconds- if less than 6 changes, pin PA7 goes high and the H bridge circuit is disabled. Otherwise, the circuit is left enabled, the number of changes is cleared, and new 15 second window begins.
Wire up the potientiometer to the STM32 3.3v and ground connection, with wiper to PA1. While that worked to adjust the levitation distance, the range really needed a narrower control. Therefore I added a 6.8K resistor, the pot, and a 1K resistor with the wiper then able to select the fine distance control. Add a voltage divider to the Hall output because at full range, the Hall outputs 5 volts while the PA0 input should see a maximum of 3.3 volts. See wiring diagram. Thanks to ArduinoDeXXX for the Bang-Bang code.
Motor setup (to spin the levitating globe)
Adjust the distance pot while holding the sphere about 1/2" from the coil. If it is working correctly, you should feel the sphere's weight being picked up by the coil as you adjust the pot. As the sphere gets too close to the coil, the coil should push the sphere away.
Attach the 8 small cylindrical magnets inside the sphere near the equator line with hot glue equally spaced apart. A circle drawn on paper the same diameter with 8 equal angles can help align the magnets. Place reflective aluminum tape on the outside (over the position of the inside magnets). Construct the TCRT500 IR sensor and motor coil assembly per the wiring diagram.
The coil form I used for the motor coil was an 1/8" dia. brass shaft with 3/4" circular plywood end caps drilled for the 1/8" shaft. The inside plywood cap was glued to the shaft, while the end plywood was retained by a small circlip made of stainless steel safety wire; the end of the rod was filed in a circle to accept the circlip. Finally, 2 disks of 1mm teflon sheet were cut to fit against the end plywood disks. The purpose is to prevent epoxy glue, placed on the coil after winding, from sticking to the plywood. Grease the 1/8" shaft before winding so the coil comes off easily. Place the shaft of coil form in a cordless electric drill and wind on the wire as neatly as possible. Coat with epoxy. After the epoxy has set, remove the coil from the form, and epoxy the ends of the coil. Then, remove some insulation from the wires and test the strength of the coil (power with 5 volts) against a magnet- it should be fairly weak, but a visible pull from a 1/4 inch away if suspended near the magnet. Add some flexible heavier gauge wires to the coil wire, and hot glue to the coil to relieve stress from the wires. Position the coil about the distance between 2 magnets apart on some wood or foam core and hot glue. Support the assembly using a 1/4" dowel to the base. Run ground and 5 volts from the 5 volt regulator to the motor assembly. To make connection easier than soldering wires directly to the TCRT 5000 board, use a 4 pin 0.1" female pin header and solder to the PCB pins of the header (I just buy the 40 pin version and snip it to the 4 pin header length). The P mosfet can be glued to the female header as well.
Attach the hinges to the 1/8" thick plywood, use balsa spacers to raise the hinges above the 1/8" plywood by another 1/8", so that when folded, the solar cells will not touch each other. Use flush fit beveled machine screws and drill holes to attach. Position two 1" x 9.5" x 1/16" balsa spacers and one 2" x 9.5" balsa spacer on each piece of plywood as per dimensions on drawing; super glue balsa to plywood. The purpose of the balsa wood is to cushion the fragile solar cells and leave a channel in the middle of the cells for a wire to fit- otherwise, the cell would not lay flat on the balsa wood. That would increase the chance that the cell would break. Wire all 16 solar cells in series, using flexible silicone wire. Solder wires front side of one cell to back side of the next cell and so on; do 4 cells like this leaving about 10 mm between cells. See drawing (only one half of solar cells are shown in the drawing, solar cells are on both sides of the plywood). Be careful as the cells break easily at this point; on the other hand, the cells are really cheap, and if you bought them in a lot of 50 for $10.00, breaking a few is no big deal. Brush 30 minute epoxy on one side of the solar panel balsa spacers, then carefully place the solar cell string on the glued balsa strip, then do the same to the next 4 cells in the string. Then do the other side of the panel, leaving a bit of wire slack between panels. Test the solar panel output in sunlight, the output voltage should be 9.5 volts or so open circuit. Mark the positive and negative wires and attach a connector to the panel and a mating connector to the levitator.
Step 3: Operation and Future Improvements
Place the solar panel in sunlight, then adjust the distance pot so the sphere is steady. Once the levitation of the sphere is steady, position the motor coil about 1/2" from the sphere. The IR sensor output light should be on only when near the reflective tape. If not, adjust the IR sensor's sensitivity potientiometer so this occurs. Note that bright sunlight will overpower the IR sensor, causing it to be on all the time. Bring the levitator to a shady area if that is happening, leaving the solar panel in the sun. The sphere needs a slight spin to get the motor working, you should see the output light blinking over each piece of tape. It takes 10 minutes or so to reach maximum speed of 20 rpm. Don't position the motor coil too close to the magnets, as this will start a sideways oscillation of the sphere. You might improve its operation by adding a second coil 180 degrees from the first motor coil (coil in parallel operation with the first coil), so the torque forces are even.
I added a wireless energy transmission system powered by an external 1.5 volt battery, and the led inside the sphere worked well during night operation (see instructable for construction). I found that you can full wave rectify the output from the receive coil (with 1000uf filter capacitor) to power a self flashing led. I included it in the sphere, alongside another coil and led that is always on, see photo.
The solar panel was easily able to power the levitation and motor, a different design from the levitated solar powered Mendicino motor. In the Mendicino motor, for the magnetic levitation to be stable the magnetically levitated rotating part has to be in contact with a glass support. Thus there is point contact friction between the needle point at the end of the of the rotor and the glass.
However, even with no apparent friction in this build (in contrast with the Mendicino motor), there is still air drag. Without the motor coil on, globe will spin for many minutes before air drag slows it down. With the motor coil driving the sphere, the spinning rate increases until the force provided by the motor coil equals the drag force of the air which is then the top speed of the globe (about 20 rpm).
The build was rewarding, it is fun to see this unusual brushless dc motor spinning in thin air. Possible uses for it might be a garden ornament, a fancy disco ball (if powered by batteries) or a science fair project.