Gravity Gun - Half-Life 2

elementsnstuff

New Member
At the request of other members, and because I have no idea about the etiquette of this forum, I started my own thread about my own Gravity Gun. Probably should've thought better than hijacking someone else's thread, but hindsight is 20/20.
Latest pics (reposted from the thread I hijacked):
P1050377.jpgP1050378.jpgP1050379.jpgP1050380.jpgP1050381.jpgP1050382.jpg
 
Looks good so far, looks like most of it is stock PVC tube and fittings?
Did you have the clear acrylic laser cut?

- Tom
 
Haha, no. I am currently lacking a laser. Everything here is hand-cut, sanded, painted, etc.
Hand-cutting the stuff leads to a lot of inaccuracy and breaks, but what can ya do.
 
Unfortunately, the plate holding the round parts to the polygonal part of the back has broken. Fortunately, this leaves me with a lot of wiggle room to stick electronics in.
 
Inch by inch, progress is made.
P1050422.jpgP1050423.jpgP1050424.jpg
This shows the 3 layers that make up the barrel. One has those 18 evenly-spaced trapezoidal holes in it, the middle has those 18 inner rectangles that show on the inside of the barrel, and the last is simply to connect to the main barrel. Fun.
The last picture shows some of the parts I've made: 2 of the parts that connect to the 'claws', 2 of the parts that will move the claws up and down (reaching all the way back to the trigger area) and a wood master for the claws themselves.
I've also been making a mold out of PlasterCloth (essentially Plaster of Paris on cloth), and it seems to be going well so far. No idea how well it'll hold, but we'll see. I have plenty of wax to cast into crystal shapes.
 
Pretty much restarted this, because the plastic and PVC approach didn't end too well in terms of weight distribution and such.
On the other hand, I plan to include some neat tricks in this new one.
1) It'll be welded together from sheet steel and/or possibly aluminum, for an actual metallic feel and weight.
2) It'll include a Hall Effect-based neodymium magnet levitator, as well as an additional electromagnet-spring system to 'launch' the magnet (and whatever it's glued to). All of this will have accompanying gun movement and sound effects.
3) LED crystals! Cast in hot glue, and two colors:
P1060034.jpg
P1060035.jpg
The magnetic levitation is accomplished through a 6V DC/150V DC boost converter circuit connected to a 32 AWG wire electromagnet, which in turn is connected to a MOSFET on an Arduino UNO. 2 Hall Effect Sensors are placed at the front and back of the electromagnet, and vary the strength of the electromagnet depending on the magnetic field it receives. Hopefully, the electromagnet should be strong enough to be unaffected by 'moving' the neodymium magnet around - although if not, I have a few ideas for that as well.
The second electromagnet is a 9V battery connected to 50 feet of 12 AWG solid wire, with a spring welded to the iron core and an aluminum rod welded to the spring. This electromagnet is controlled via a second MOSFET to the Arduino, and is all enclosed in a plastic tube (which the 12 AWG wire is wrapped around on the iron core end). The magnet is almost constantly on, except for when a button is pressed, then the magnet stops attracting the spring, which expands outward. The aluminum rod is to prevent the neodymium magnet from just being attracted to the spring, and 'punts' the magnet forward.
Apart from that, there's not much in there other than a speaker (for sound effects) and a servo (to move those claw things).
Pretty much none of the Gravity Gun itself has been built yet - apart from the bike handle, which was kept from the previous project. Electronics are almost done, though - just missing the 2 logic-level N-Channel MOSFETs required to drive the electromagnets from Arduino.
The only problems I can foresee with this setup are:
a) the gun is going to be really heavy, I'm guessing 10 pounds or so - but this is canon (see Episode 2), so it's okay.
b) the first electromagnet may not be strong enough to prevent the oscillation of the neodymium magnet from going out of control, in which case I would need to get 2 more electromagnets and 4 more Hall Effect Sensors, each placed in the other 2 claws, to prevent sideways movement. (In which case, there wouldn't be a lot of room left for the magnet...)
c) the second electromagnet wouldn't attract the spring towards it, although if the spring constant is less than 450 N this shouldn't be an issue, according to this video: Easy-to-Build Electromagnet lifts over 50 lbs - YouTube
 
Amazing project! If that magnet levitation thing works out you'll probably win the internet! ;) How far is this already tested / build? With all that technobabble I'm kinda lost what is still theory and what actually build! ;)

Looking forward to see more of this project! :)
 
I guess I should explain some of the technobabble, then. ;)
MOSFET - Metal Oxide Semiconductor Field Effect Transistor. Think of it as a switch, which is flipped when it receives a voltage to a certain gate (allows electrons to pass through the other gates). Through this, you can control a really high-power circuit with a really low-power one.
Arduino - a microcontroller. You can program it to do stuff - mostly sending signals to different 'pins' which are hooked into different objects like motors and stuff.
DC boost converter - a circuit that turns a lower voltage into a higher one.
Hall Effect Sensor - A tiny little component that outputs a voltage proportional to a magnetic field it receives (called, unsurprisingly, the Hall Effect).
Aluminum - no reaction to electromagnets whatsoever, in fact I think it's slightly repelled by them. Hence the use.

As for the magnetic levitation, Hall-Effect based stuff has been around for a while:
Tutorial and Experiments on Magnetic Levitation - YouTube
Magnetic Levitation (Hall Effect) - YouTube
As for build: My main problem right now is that I need a truly ridiculous heat sink for the MOSFET for the boost converter - the thing heats up enough to boil water in a few seconds. Voltage was measured at 150V, so the current running through the levitating electromagnet is about 0.8 A (off memory). Given that the strength of any electromagnet is determined by H = NI, where I is current and N is number of turns of wire, my magnet should be very strong once I get it up and running - and for the few seconds I was able to test it, it did in fact seem stronger than with lower voltages (the voltage drops quickly if the heat on the MOSFET is not dissipated).
So, a quick review:
-Voltage boost converter circuit is done. Converts 6V, 4.5Ah to 150V.
-Electromagnet 1 (the one that levitates) is done. This is just a whole bunch of magnet wire wrapped around a large iron nail.
-Arduino programming is, for the most part, done. Once I get the magnets up and running, then I have to write something to send a signal to each electromagnet when their respective buttons are pressed. Arduino also controls a servo (for those claws), and sound effects - all that's done. Still need two logic-level N-Channel MOSFETS (signal voltage is low enough that Arduino can handle it) to control the two electromagnets.
-Lights are, for the most part, done. Still need to do that odd 'disc' just in front of the crystals (the claws attach onto it), as well as the barrel itself - but those will be a piece of cake compared to the previous stuff.
-Electromagnet 2 (the launching one) is not done. I still need to run down to Home Depot and pick up 50 feet of 12-gauge wire for about $13 (a bit low on funds at the moment...) The spring and aluminum rod don't exist yet either.
-The actual body of the gun is not even started, except for the few miscellaneous non-metal parts. Thing is, now that I'm making this out of sheet steel, I need to weld it together. So, I asked my high school Welding teacher. He said he'd do it, but not in a hurry - and we're still working out the details. Fortunately, most of this stuff should be easy - that polygonal shape in the back of the gun, for instance.
In short, most of the electronic stuff is built and running already. Most of the body is not.
 
Not much in terms of progress, but I did finish most of that odd 'disc' in front of the crystals that lights up.
P1060048.jpgP1060046.jpgP1060045.jpgP1060049.jpg
What I'm wondering is, should I paint this the same way the 'crystals' are painted (thin coat of black, to give the appearance of red-hot dirty iron)? I've never seen it in detail to determine for sure.
Ah hell, I'll give it a shot. Can always sand the paint off later...
 
Well, here's the initial paint job. I must say, it isn't doing too good a job of diffusing the LEDs - the light still appears very centralized around where they are. Oh well...
P1060051.jpgP1060052.jpg
I have also figured out that I need two more electromagnets on the other two claws to control sideways oscillations, so I can wave this thing around like an idiot without fear of consequences. Given that this also requires 4 more Hall Effect Sensors, 2 more MOSFETs, and a whole bunch of copy-pasting to do in my Arduino coding, that will probably cost an additional $15-25. Worth it? Probably.
 
A quick update - I've decided to wire 3 more electromagnets (winding hundreds of feet of magnet wire is such a pain). Here's one:
P1060053.jpg
The core is a standard 3" iron nail. The resistance is 25.5 ohms, meaning that there are about 156 feet of 32 gauge wire on this thing, and at the 150V of the boost converter, this thing will be running very hot at 5.88 amps! Fortunately, this actually is solved (for the most part) by having 3 electromagnets in parallel: The voltage remains the same but the current is a third, at about 1.96 amps. Still pretty high for such a low amount of wire, but I'm *hoping* the open-air atmosphere will be enough to cool it down - if not, I could always encase it in water. Except that would be so annoying...
Anyway, with the 6V lead-acid battery I tested it with, this thing was *strong* - much more so than any of my previous magnets. I may have hit close to some lucky combination of wire turns and amps, or something.
Now, the only issue is winding 2 more electromagnets with the same statistics. If I had something to measure and hold the length of the wire, I could just measure out 155.4 ft. and that would be it. However, unless I find some really long measurement method, that's not going to work...
 
Ugh. I discussed this with a physics professor and a guy who builds electromagnets for speakers, and ran into some problems.
First off, the thing with the three small electromagnets is dicey, but it should still work. Apparently, repelling electromagnets exist - which, from my experiments with neodymium magnets, should not be a thing. Anyway, they advised me to use those on the bottom two claws - but trying to figure that out when I already have a system would be depressingly hard.
Second, the system with the electromagnet and the spring and aluminum rod won't work at all. What I didn't think about is that when the spring is welded to the iron core, it effectively becomes part of the iron core. One pole of the electromagnet is now at the end of the spring, and the two poles of one magnet really hate coming together, according to the physics guy. Ah well. Anyone know how to build a self-reloading railgun, or anything of the sort? A coilgun could also work, provided there is some way to get the shot projectile back into the barrel (and not have it be attracted to the neodymium magnet too).
No new pictures, because I don't really have anything new today. I did find out that the electromagnet shown earlier reaches quite the temperature after 2 minutes of being constantly on - and that was at 6V. Hopefully the pulsing system of the Arduino will keep that from becoming too much of a problem...
 
I could also use a railgun for the launching system. Provided a large enough capacitor bank, this could easily reach the acceleration I need. Plus, the aluminum used as 'ammunition' won't react to the neodymium magnet, which is convenient. Now I just need to design some way to automatically reload the railgun every time it fires. I could probably just put something on the end of the two 'rails' to stop the punting rod from actually escaping, but I would still need some way to pull the punting rod itself backwards. Maybe reverse the polarity of the railgun, on low power?
 
Yep, turns out that can work. I can reverse the polarity with an H-Bridge circuit (yay, more MOSFETs. I think this brings the total up to 8?).
Problem is, I'm running out of pins to use for my Arduino Uno! I'll have to see if I can reconfigure some stuff.
 
Got the coding for the electromagnetic levitation/railgun finished. Now all I need to do is wire the other 2 electromagnets, and (when I get the rest of the parts) wire everything up and test it (which, according to my luck, will be an ordeal in and of itself). Then I'll have to wait for the welded body of the gun to be finished - presumably sometime in May/June?
I made a quick-and-dirty stand shaped (very roughly) like the Gravity Gun in order to test placement of parts - so far, I did figure out that the wires for one of the Hall Effect Sensors are too short. Fun.
 
Unfortunately, progress has been rather slow. However, a few changes were made to my magnetic levitation system. It is now comprised of the analog hardware found here (http://www.bis0uhr.de/projekte/schwebekugel/english.php%99https://www.google.com/]|bis0uhr| Frequenzen - eigene wissenschaftliche Projekte[/url]), and is under construction (the Arduino was not fast enough to monitor magnetic levitation stably).
Got the battery case under construction too. There's a bit of an odd story behind this one. I took the scale of the back polygonal part, and mapped out the largest possible battery case I could 'slide' into that trapezoidal area where light comes out facing the player. I then printed this out on paper, and did a test fitting with most of the batteries I would use:
tumblr_n1n2sneTQy1ri4na2o4_250.jpg
Curiously, it was a near-perfect fit, with just enough wiggle room for the batteries to easily slide out. Pretty good for a battery case! I then cut the rough shape of the actual case (not the trapezoid bit, that will be made of sheet metal to match the rest of the prop) out of fiberglass, and did another test fitting. Tighter fit now, but it still worked. I also put the on/off switch and the orange/blue switch inside here, as it was the most unobtrusive and convenient place to put them.
tumblr_n1n2sneTQy1ri4na2o5_250.jpg
tumblr_n1n2sneTQy1ri4na2o6_250.jpg
tumblr_n1n2sneTQy1ri4na2o8_250.jpg

I wish I could say this project was going faster, but a lot of this is basically relying on the help of more skilled people (such as people who actually know how to weld), so I'm not going to rush them. Anyway, just letting you guys know this project isn't dead...
 
Welding is finally underway!
Ditched the previous battery case for a more 'plug-in' format, and am now running the entire gun (including the Arduino) off of a 12V car battery.
P1060137.jpgP1060136.jpg
Here you can clearly see the on/off switch and color switch, as well as the USB port for the Arduino. The reason the USB port is there is because I have replaced the LED boards used previously with some new RGB LED strips - using Arduino, I can make this Gravity Gun any color on the visible spectrum. One of these strips is visible on the left photo, facing the part of the battery cage that outputs light (for some reason). The cover to the cage will likely swing on a hinge, possibly secured by magnets or some other method.

Circuitry is still being worked out - the magnetic levitation circuit is working exactly as it's supposed to, but apparently the magnet I've been using for testing is far, far too small. What made the above website's schematic work is that the 1" neodymium ball he levitated was actually doing most of the lifting, and the electromagnet wasn't very strong at all.
 
Back
Top