Tag Archives: thoughtbubble

Portal Gun – Electronics

The circuitry of the gun was by far the hard part and most complicated. However, it doesn’t need anything more complicated than a basic knowledge of secondary/high school electronics/physics. Trust me, YOU CAN DO THIS.

Let’s get the important theory out of the way first – using LEDs with batteries you need resistors. A good resistor calculator is available here. You’re after the calculated resistance value. You’ll find that resistors aren’t always available in the exact value you need, so round UP. You get slightly more resistance and you don’t risk burning out the LED.

but if you like knowing the maths, read this instructable about how it’s calculated. I like knowing, and did my own calculations (on paper no less!) before buying my resistors. If you’re buying more than one value, learn which are which before you start so you don’t confuse them, they have colour coded rings to show you.

I added my LEDs and resistors in parallel with a resistor for each LED, hoping that if one failed I wouldn’t lose all my lights.

Ok, let’s talk supplies. For your wiring you will need:

LEDs in Blue and Orange. I bought 20 of each as they were cheap.
Resistors for your LEDs
Cat 5 cable – this has 5 pairs of colour coded cable so you know what you’re wiring, it’s fab stuff.
A switch (more on that later)
Battery case and attachment
Soldering Iron (ebay, £7 for mine) and solder
Electrical tape in black and white
Wire strippers.

Here’s my box of bits and pieces, I am quite proud of it!

IMG_4573

You want to wire up each LED in parallel, otherwise all your calculations are for nothing! I’ve read you can wire them up in series, but you then need to compensate with a much higher input voltage from the batteries, which will take up space inside the gun. You do then only need one resistor, but if you break it, the whole circuit can burnout. I was also connecting three different numbers of LEDs to one power source, so by connecting in parallel the values are all the same and it doesn’t go squiffy. I started with the operational end of the device, and started by wiring individual LEDs. You want a positive wire, then the resistor, then the positive leg of the LED. this is indicated by it being the longer lead. then to the shorter leg you want to attach your negative wire. for this part you can leave the negative wire off for now as it will get in the way in this piece. 5mm LEDs fit almost perfectly into a normal office hole punch hole, which is handy for placement. I cut a circle of card to fit the lid end of the black tube (operational end), and tried to evenly space a circle of 16 holes, as I decided 8 LEDs made a good circle of light, and you need orange and blue in there.

IMG_4716 IMG_4722

In the second picture you can see the positive wires (branching out, they’re orange but the joins are covered with electrical tape to prevent short circuits, so you can’t see much orange this close up!), the tiny blue resistors, the back of the LEDs, and the negative wires joining in the centre to be soldered to one negative wire to go back up the gun.

IMG_4720 IMG_4723

Here you can see the mess of the blue LEDs (the resistors got covered on these too) with the blue positive wires and blue/white striped negative wires. Then there’s the neat(ish) end plate with the LEDs in place. They wouldn’t sit nice and flat, which is part of the reason I decided to cover the end with a plastic cover, to make it look a bit more finished. Once you’ve connected all the positive wires together and negative wires together for each colour you have to cover all the wiring in the back, without leaving any bare wires that might touch each other. In the end I did a layer of electrical tape over the orange wiring before putting the blue in, and then an extra layer of card on to help hold things in, and more tape.

IMG_4781

Here you can see the + and – wires for blue and orange. Make sure you leave it long enough to reach back to your batteries.

Next, the core. I was going to try to make some kind of diagram to show you the parallel connections for this one but good old google to the rescue:

ledparaYou can add as many LEDs as you like this way. I went for 7 of each colour in separate circuits, and then I used a glue gun to put them in the recesses on the plunger handle. Again, lots of electrical tape to insulate.

IMG_4707 IMG_4705

Excuse the awful lap shot, it was daytime and that was the only darkish place to see the light. You can see the battery case and wires there too, which at the end cal simply be connected.

IMG_4738These pairs of LEDs are for the indicator light. They were the easiest bit, just connect in parallel again (don’t forget your resistors) and connect in. Because it’s all in parallel and calculated for the same battery power, I was able to run it off one source, using one switch for simplicity. The switch I used was a on-off-on, double pole double throw switch. If you’re lost, don’t worry! It’s much easier to use than it seems. You can see it in the pictures below, it’s quite small! technically you don’t need double pole (the poles are where you connect the wires underneath) but there was so much getting connected it was nice to have extra bits. You can connect the wires to each other first and then to the switch, so it’s all neat and tidy.

IMG_4562 IMG_4799

Double throw – this means you can have the switch on to one part of the circuit and not the other. This means you can connect the orange circuit to one side and blue to the other, so when the switch is in the centre, all is off. switch to one side and it’s orange on, switch to the other side and it’s blue on. Hence it’s on-off-on description. This meant it was easy for Ethan to operate without him having to faff about and look at it! It sounds more complicated than it is! I’m afraid I don’t have pictures of the next bit as I was so busy getting it actually done I forgot. But it’s easy! The positive wire from the power source connects to the central pole(s) of the switch. The positive blue wire for the blue circuits attaches to the pole(s) on one end, and orange positive wire on the other. The negative wires from both circuits simply connect back to the negative wire to the battery. Now you have one circuit, that can be switched on and off at one point. Ta-Da! The battery holder case I bought came with a connector so I can disconnect the batteries and replace if needed. Let’s see the innards:

IMG_4918Ok. You can see the red switch. The green wire is the positive lead to the batteries, with positive orange and blue wires on each side. If you look at the left you can see at the black electrical tape where the blue and orange wires split off for different things. Up at the top is the indicator light, in the centre of the black tube is the core/plunger handle, and at the bottom of the black tube right by my hand you can just see where the wires for the operational end. They go in there, and between the two black tubes down to the end unseen. On the right you can see where I’ve condensed the negative wires down to one orange/white striped wire going off to the batteries. Once everything was connected I could glue/tape it all in place and make a bodged housing for the battery from some foam so it wasn’t knocking about but still able to get the batteries out.

IMG_5521

You can also see the handle I put in there and that the switch is glue gunned into a place near his fingers so he can flick it easily. Handily, the glue also insulates the poles so the wires can’t create a short. With the batteries in you can also see the red positive wire from the battery connector, this connects to the green one mentioned above as they are only short ones. And that’s your lot, electronically. I had an absolute blast making it and learning new skills, I’m itching to try something else now! If you follow the Aperture Science or Portal tags on the bottom of this post, you can see the rest if you’ve not found it yet. Thanks for reading! Any questions I’d be happy to help with, comments below 🙂

Leave a comment

Filed under Uncategorized

The Portal Gun

Or to give it it’s full name, the Aperture Science Handheld Portal Device. Here’s a reference picture of it:

chell

And here’s ours!

IMG_5025

 

Let me start by saying I would have got absolutely nowhere without these two instructables: Build your own Aperture Science Portal Gun and Budget Portal Gun from Recycled Materials. These were fantastic and I would definitely recommend checking them out before you start.

Obviously we took a little artistic license, but we’re both really pleased with how it turned out!

Let’s start with the tube-y part with the lights in. I’ll do a separate post on the electronics side of it, so if you want to make it with the lights, don’t glue it all together before you plan out your circuits. I used two of these tubes from Lush for the central black part. tubesI think these actually might have been the most expensive part. Anyway, the top and bottom pop off, and the tube opens up flat. I sketched out the shape of the hole I wanted and cut it out of both. I slid one inside the other to strengthen it, make it black both sides, and to leave a space to insert the ‘glass’ cover and run cables back to the hand end from the ‘operational end of the device’. To make one slide into the other, the inner one had to be opened out flat and trimmed down, with also meant I had to make new slots for the tabs to fit, but it worked. a bit of electrical tape over the tabs to secure the join and it was done. I also taped the join on the outer tube to give a clean finish on the outside. I had to trim the ends of the inner tube down too to get the lids back on, but the plastic was easy enough to cut with scissors

IMG_4756 IMG_4758
For the glass I tried to find a similar width drinks bottle or something. I actually had one at home that I had in mind to use, but as soon as I wanted it, it disappeared! I couldn’t find a suitable replacement until I realised a cut down 2 litre pop bottle would do the job. It has a ridge in the middle, but I at least made it straight so it looked like it was supposed to be there! It was two wide so I cut a section out and wedged it between the two black tubes, for now. It can be glued in place later after you use it to hide the wiring.

IMG_4757 IMG_4721

The central core was a clear plastic handle from a plunger. I really lucked out actually on this as it was cheap from ebay and had two brilliant recesses where I was able to stuff the LEDs rather than trying to light it up from the ends as I saw on instructables, which looked way harder! I sanded the plastic so the lights would be diffused better. It also just happened to be almost the perfect length. For the operational end, I cut through the lid of the tube and used cardboard and craft foam to hold the LEDs in place. The lids are very thick plastic so I had to use a heated needle to punch lots of holes and then sand off the mess. for the back end of the tube I just put a small hole in the lid to fee the wires through, and a hole in the middle to hold the handle/lightstick.

IMG_4915  IMG_4916

To bulk up the end I found some guttering parts at B&Q (hardware shop). I think they were kind of brackets. I removed the fixtures and seals and they just about fit right. I decided to cover the LEDs with a thin piece of plastic and foam so it’d look a bit neater.

IMG_4986 IMG_4994

The front white piece is the side of a large conditioner bottle, cut down to size and shape. The bottom edge should really have been curved but again we went for time and money saved. The claws I cut from the plastic left over from the black tubes, and glued together with a small piece of craft foam to cover the join and look like a bracket, two on the white part, and one on the top of the black end. I did the same when gluing on the cables, as they’re not functional. In fact I actually glued them into the same bits of craft foam on the claws.

IMG_4918 IMG_4991

The back end was two large bleach bottles. I could only find ones with handles so I had to cut those out and overlap the two (hence the big hole!), and cut the top off to fit the black tube in. After it’s all been glued in place, you can use black and white electrical tape to give really nice clean edges. As you can see there’s a whole mess of wiring to figure out too! I put a length of pvc pipe in for a handle so Ethan could easily hold it and still flip the switch.  You can see on the top of the inside of the bottle where the wires lead to the indicator light (the second picture). The indicator was just a small circle cut into the bottle, and I found a curved piece of plastic to cover it, that I stuck in from the inside for neatness. I think it was from a vending machine pod, with a little toy in. I put the tape on for a stripe and then covered the extra glow through the plastic with an aperture logo. This is a visual change I didn’t love to be honest, but it had to be covered or as you can see the glow looked ridiculous. We consoled ourselves by deciding that Ethan was a test subject from before the big GLaDOS meltdown, so the gun was a slightly earlier model than Chell’s!

IMG_5522

You can also see where I used black tape between the bottle and the black tube to neaten it up.

I used the bottom of one of the bottles to give the end a cleaner look, so it wasn’t just the cut off end of the bottle, and cut a hand hole into the bottom for access. A bit of white electrical tape around the edge stopped it being scratchy and looking messy. I also used white tape to cover the joins of the two bottles and neaten it all up.

And there you have it for the physical build! Check out the second post for information about the wiring side of it. Any questions are more than welcome, if I seem to have skipped any steps or you want clarity, comments would be great 🙂

 

 

Leave a comment

Filed under Uncategorized