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 🙂

Advertisements

Leave a comment

Filed under Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s