My name is Noam and I go to Ramaz High School. My starter project was an Adafruit MintyBoost boost converter to charge a phone with AA batteries and my main project was a MagLev train. I choose the MintyBoost because I am often left on a bus,train or car with no phone because my battery runs out. This project was simple and useful and has even allowed me to do research for my main project while on the go when my phone’s battery would normally be dead. I chose my main project because I wanted a challenge and I wanted to learn more electronics. A MagLev train was not in the project book so I designed it myself after extensive research and asked for this to be my project. I was at Bluestamp 2 years ago and built a bicycle speedometer. I enjoyed it a lot but I wanted to develop different skills and work on a more difficult project. This year I wanted a project with less coding and more complex electronics. MagLev technology is the future of travel and MagLev trains are breaking speed and efficiency records as they pop up around the world so I wanted to learn more about this and build one myself.
After demonstrating the principle of Magnetic Levitation trains with my version one project, I decided to redesign my train and track so it not only jolted forwards but actually moved the full way across the track, smoothly. I also made both the train and the track sturdier. Version two was built all at home and designed mostly at home on my own.
Main Project: MagLev Train
Version 2 Final Video
Here is a Schematic of V2: MagLevV2Schematic
Here is my Code for V2 (Run from arduino IDE): MagLevV2Code
After totally redesigning my train and track I continued to have problems with my circuit. A tiny bug in my code burned out my MOSFETs, and after replacing them with high power transistors (there were no MOSFETs left at radioshack) I continued to have issues with these. Small issues with my wiring, inductive load spiking and some code bugs that would cause the train to switch the polarity of the magnets too quickly caused the loss of 4 or 5 transistors and MOSFETs. I decided to add high value resistors between the the input to MOSFETs directly to ground so that in case current is forced through a closed MOSFET (which due to too much power dissipation could destroy it), it would have an alternate path through the resistor. This would not harm my circuits function at all because as the resistors are very high value, only a negligible amount of current only flows through the resistors normally. Another issue I had was getting the arduino to properly process and interpret the information from the hall effect sensor to switch the polarity of the coils at the right time. Once I figured out where the coils would be relative to the magnets when the hall effect sensor sensed a change in the polarity of the magnets on the track, I realized that my hall effect sensor isn’t very precise and doesn’t always sense when it is within 1 inch of a magnet. it could be 3/4 of an inch away before it senses the magnet nearby, or sense it early over an inch away. Sometimes it never indicates a change in the polarity of the magnets ahead of it on the track especially when the train is moving quickly. to solve this I added a function in my code to switch the polarity of the coils after a second whether or not the hall effect sensor sensed anything changing. This functions as a reset in case the train is stuck and also helps to keep it moving in case the hall effect sensor doesn’t do its job properly. As a result of this my train is still not completely smooth.
Some future modifications I could make are:
1. Replace the hall effect sensor with a photoresistor, that would sense black strips on the track to tell the train where it is. This would allow my arduino to determine precisely where the train is in the track and when to switch the polarity of the coils for most efficient operation of the train.
2. Making my train remotely controlled by Xbee radios, and writing start, stop, backwards and forwards functions into my code.
3. remaking the track for better placement of the magnets. Although the one inch distance is fine they are not all straight or equally spaced due to the difficulty of making grooves in wood. Instead of cutting the grooves out, I would make them by gluing pieces of acrylic to the wood with spaces in between for the magnets. The acrylic would also be a smoother surface for my train.
Overall the experience of working at home was very different than BlueStamp, but also very rewarding. I had less guidance and sometimes less motivation to work, but I applied the knowledge, and experience that I got at BlueStamp and persevered just as I did in BlueStamp to finish Version 2 and get my MagLev Train moving across the track as I had envisioned it going into the BlueStamp program.
First Modification Video – Making Version 2
I totally redesigned my train and track for increased stability. The magnets are aligned so they are tall and skinny within the track so the train will be pulled towards them but not spend very long passing them because the train is propelled when it is between magnets not next to one (see diagram below). The track is stronger and the train is held in place by the magnets and the wheels on the side of the train, as opposed to in the original design where the train occasionally twist if even a slightly uneven force was applied (either by friction, or uneven thrust from the electromagnets). One of the major issues I had was that the train would knock against the magnets that I glued onto the inside of the track, so I had to remove them and make grooves to house them so they would be flush with the surface. I also had a bit off a balance issue which I solved by building a lego arm in the back that would balance the train and although lego is very light compared to the other components due to torque even a very small amount of weight put on the arm can make a big difference in the balance of the train. My train is now built of lego, and some stress points are glued together for increased strength. it is much lighter smoother and sturdier than the original design. I’m very excited to hook it up to power and see how it moves.
Although my train still has some friction with the track and often needs a push to help it start out, my circuit works and the polarity of my coils switch based on where the train is on the track pulling my train forward by pushing and pulling against magnets on the side of the track (See the image below). I needed to have wheels on the sides of the train to keep the train in the middle of the track because it is impossible to keep a levitating permanent magnet stable using only permanent magnets. This can be proved from Earnshaw’s theorem and is one of the reasons maglev trains are so hard to make and so expensive in the real world. My design does not fully levitate but it is a hybrid concept with wheels and magnets to minimize friction. My relay switches the direction of the current, and a transistor controls the relay. I also have a hall effect sensor and circuit to tell my code where the train is on the track (when the train passes a magnet to be next to a magnet of the opposite polarity).
Since my second milestone I have redesigned the track and train to be sturdier and make my train move with less friction. I also remade my coils to be bigger (700-900 feet of magnet wire per coil), and used a ferromagnetic (Iron) core, which would align with the magnetic field of the coil and make my electromagnetic Solenoid much more powerful.
Overall Bluestamp was a great experience. I learned a huge amount this summer, from equations to calculate the back EMF that was destroying my transistors, to Earnshaw’s theorem, to how to use epoxy. I designed this project on my own from the circuitry to the track and worked very hard coming in for 6 or 7 hours most days instead of 4, and I managed to finish this extremely difficult project. It was tough but 100% worth it.
Here is a Schematic (developed using EagleCAD):
My circuit works! After burning out some transistors I decided to make current calculations and found that my coils were pulling close to the maximum current for the transistors. So I bought new transistors that could handle much higher currents and they seemed to work until I switched the polarity of my electromagnetic coils and they immediately began smoking and stopped working. So I wondered if the voltage was being dropped over the transistors instead of the coils and 20V and .4A makes 8W which exceeds the maximum power rating even on these higher power transistors. After replacing my transistors with N-channel MOSFETS that could handle such high power, voltage and current, my components stopped burning out! After extensive research I learned about a phenomenon called inductive load spiking. When the voltage across an inductor (a coil) is changed the inductor resists a change in current and for just a split second generates an EMF (electromotive force) that continues pushing current through the inductor even after there is no more voltage being supplied to it. This is due to the magnetic field around the coil. When the current across an inductor is changed there is energy stored in the magnet field caused by original current, that due to conservation of energy must go somewhere. This energy forces current to keep flowing as it was through the coil just for a very short period of time. But in my case when I switched the polarity of the coils the transistor leading the current in that direction to ground opened stopping current from flowing through and the one on the other side closed in order to allow current to flow to ground the other direction through the coil, but due to inductive load spiking my coils forced current through the open transistor, even though they were open. In order to pass through the open transistor the EMF generated by inductive load spiking was huge so there was a voltage across these transistors and although the current did not exceed the limit, the power and voltage (EMF) did, even though only for a split second. This EMF, normally called a back EMF, could have been over 100V!
Also for my second milestone I built the track and train. I wasn’t able to 3D print my train and its track due to technical difficulties so I got creative and built a train and track out of cardboard wood and styrofoam. Although there are issues, and the train is not fully frictionless, it does levitate above the track.
In my first milestone I have an H-bridge switching the polarity of the Solenoid (electromagnet). This H-Bridge is an electronically controlled switch which changes the paths input. I am inputting 9V into the H-bridge and based on the data sent to it by the Arduino (either HIGH- 5V, or LOW – 0V) the 9V from the input goes to one of the sides of the Solenoid. when the Arduino changes the data sent for example goes from HIGH to LOW, the path will change and electricity will go the opposite direction through the H-bridge.
Starter Projcet: Minty-Boost Portable Charger
Today I finished my starter project: The Adafruit Minty-Boost. This is a Boost converter that I soldered together from a kit. It converts 3 volts from two AA batteries to 5 volts which can be used for devices via USB. This works by using an inductor’s resistance to change in current to force current into a capacitor and by doing so increase the voltage across it and across the output (to the USB) in parallel to the capacitor. The transistor chip Q1 is simply a switch that switches between open and closed. When the switch is closed current flows through the inductor (L1) through the switch. Then the switch opens and because the inductor does not allow the current through it to change quickly it forces current through it, that goes through the diode (D1) and into the capacitor (C1) pushing the capacitor’s current up. This as a result pushes the capacitor’s voltage up beyond the voltage of the battery, and the diode prevents this current from discharging back into the battery as it normally would. The voltage across the capacitor must equal the voltage across the load because they are in parallel. In order to maintain this higher voltage the transistor must go from open to closed and repeat continuously. The square wave below represents the frequency of switch switching open to closed. On a Minty-Boost the switching occurs within the IC that creates the square wave which turns the transistor on and off.