Magnetic Levitation Train

by benjaminkostroun in Circuits > Electronics

904 Views, 1 Favorites, 0 Comments

Magnetic Levitation Train

1.jpeg (2).jpg
Magnetic Levitation Train (Test)
1.jpeg.jpg

Trains powered by electricity make up the backbone of many transportation systems around the world. There are many different designs and methods for converting electrical power to propulsion, but one relatively popular method is a linear motor. A linear motor uses a series of dynamically alternating electromagnets along a track to interact with permanent magnets fixed to a train, pushing it forward. In this project, we will create a small model of a linear motor, utilizing dynamic sensors to detect the train’s location and electromagnets to push the train along. We will also create a simple magnetic levitation system in order to reduce friction and increase performance of our design (as well as look really cool!)

Thus, our magnetic train will be based on two ideas: levitation and propulsion.

Supplies

Electrical

  • 2 labjacks (U3-HV)
  • 5 hall effect sensors (US5881LUA)
  • 5 relay switches (HK19F-DC3V)
  • 5, five-kiloohm resistors.
  • 1, two-channel power supply
  • 1 large breadboard
  • 1 computer
  • A lot of wires (various lengths) and solder
  • A lot of insulated copper wires (diameter~0.7mm)

Other materials

  • 10 iron-core nails (our nails are 0.4cm*7.62cm)
  • 2 plexiglass walls 6 high strength ferromagnets, six cm long, one cm tall, three mm wide
  • 5 strips of adhesive glue, same dimensions as the magnets
  • 10 small screws
  • Various supports, in our case different lengths of 80-20

Tools

  • 1 wire stripper
  • 1 razor
  • 1 drill
  • 1 hot glue gun

Create Electromagnets

2.jpeg.jpg

We are going to make five pairs of electromagnets (EM), each pair has one N+ (the nail head is north if the positive terminal is connected to the nail head end) and N- (the nail head is north if the positive terminal is connected to the nail tail end). This is because our train, which is a bar magnet, will be attracted or repelled by both EMs when it passes through. (You can actually make the handedness of your windings however you want, but you would need to keep track of which is which, and connect the positive and negative ends differently than in our later steps in order to achieve the desired effect).

For each iron nail, begin tightly wrapping insulated copper wire starting at the head, and finish wrapping after the windings fill 2 cm down the length of the nail. Make sure to leave a small length of wire unwrapped at both ends of your windings. Use your razor to strip off the insulation of the wire, in order to prepare it for soldering. The N+ EMs will go on one side of the track, and the N- EMs will go on the other side.

Create the Track

4.jpeg.jpg
3.jpeg.jpg

Drill around 5 holes in each sheet of plexiglass centered 1 cm from the bottom, spaced out differently from each other. Use the adhesive to attach 5 of the magnets lengthwise 2 cm above the bottom of the plexiglass oriented in the same direction (such that there should be resistance when you try to glue them next to each other).

Using these holes, attach the plexiglass to some 80-20, and press together so that the glass is only separated by the width of the magnets and adhesive. Add more supports around structure to keep everything in place.

Glue Hall Effect Sensors

2.jpeg (1).jpg

The hall effect sensors from adafruit have three legs: power, ground, and output. As shown in the diagram above, the output leg is soldered to an independent wire that directly goes to the labjack; and all the GND legs are in series and connected to the GND channel of the power supply; all the VDD legs are in series and are connected to the positive terminal of the power supply.


On the plexiglass, glue a correctly soldered hall effect sensor (see diagram) at the very edge of one side, centered 3.3 cm from the top of the track magnets (parallel to the levitating train). Repeat in a line for each of the other sensors, spaced 4 cm apart from each other down the length of the glass.

Place Electromagnets

1.jpeg (1).jpg
2.jpeg (2).jpg

Create a stable platform, perhaps using 80-20, to fix the electromagnets at the same height as the hall sensors, outside either side of the glass. Each pair of electromagnets should face directly across from each other, and be connected by a wire running underneath. The head of each nail should be 1.5 cm from the face of the glass. The first pair should be 2 cm from one edge of the glass, and each subsequent pair should be spaced 4 cm down the length of the glass. In this way, every 2cm along the track, there should be one component, alternating between an electromagnet and a hall effect sensor.

Build Circuit

4.jpeg (1).jpg
3.jpeg (2).jpg

Wire everything as shown, the colors are not meaningful other than to provide clarity of the different parts of the circuit. The spacing is not to scale, this diagram displays the circuitry only!


The electromagnet circuit should have a stable current of roughly 1.7 amps, but this can be changed depending on how powerful you want your electromagnets to be. Be careful after 2 amps, however, as this will start making the wires very toasty, and even dangerous! The power supply voltage should be around 25-30V in this case. The hall sensors should be powered at around 7V from the power supply, compared with the power supply ground.

Program Control System

1.jpeg (3).jpg

The hall sensors are now connected to the AIN inputs, and the electromagnet's polarity is controlled via the DAC outputs. For the spacing we’re using, this means that, when the train is in front of sensor 1, electromagnet 2 should be attracting, and electromagnet 1 should be repelling, and so forth. This will propel the train forward. More complicated behavior, including systems that dynamically move the train depending on its history and current location, are possible through code, especially when scaling up this design. The AIN input will change depending on the relative difference between the ground of the power supply and ground of the labjack. The DAC output should be binary: 0V for switch off, and 5V for switch on.

Our code is below in python, note that the labjack serial numbers will be different for your setup, and the input and output pins may be aligned differently depending on your choice of how to plug in the labjacks. The AIN input values may also vary depending on the ground of your labjacks and power supply.

Conclusion

This was a very challenging, but fun, project. Designing the levitation system took many weeks of tinkering and iterating to get right. We also initially tried powering the electromagnets in parallel instead of in series, but the current required to power them all became too high. Connecting them in series requires much less current, and uses high voltage instead. Still, even our tiny project was maxing out our power supply’s voltage, so figuring out ways to more efficiently power the train would be crucial if one were to scale this design up.

In any case, we hope you enjoy and can improve our design!