Camera connection to the Arduino
About this video
This video shows how an Arduino can turn a camera on and off and trigger its shutter. Two NPN transistors, each with a 10k ohm base resistor, act as switches driven by Arduino pins 4 and 5. Thin magnet wire from the camera's button contacts is stripped, wrapped onto thicker 22-gauge hookup wire, soldered, and insulated with heat shrink tubing so it can connect to the breadboard.
You'll be able to
- explain how a transistor acts as an electronic switch controlled by a small Arduino signal.
- explain why thin magnet wire is joined to thicker hookup wire before it goes on a breadboard.
- describe why each solder joint is insulated with heat shrink tubing.
Key words
- NPN transistor
- A three-leg semiconductor that switches a larger current on or off using a small signal on its base.
- Base resistor
- A resistor, here 10k ohm, that limits the current flowing into the transistor's base.
- Magnet wire
- Very thin insulated wire with a lacquer coating, used in coils and fine connections.
- Heat shrink tubing
- Plastic tubing that shrinks when heated to insulate a joint and prevent shorts.
- Pinout
- A labeled connection pin on a microcontroller such as an Arduino.
Transcript
So in this video, we're going to show you how to turn on and off the camera using transistors, and also how to control the shutter function. So we're just using NPN transistors. They are 2N222A transistors, and 10k Ohm resistors. So we're connecting the 10k Ohm resistor just like we did for the sound module to the base, or the center wire of our transistor.
And then we're just cutting 22-gauge hookup wire, and connecting that to the pinouts on our Arduino. So we're connecting that to pinouts 4 and 5. And 4 goes to the shutter-- I'm sorry 4 goes to the power, 5 goes to the shutter. And then we have our magnet wire that we connected to the actual contacts for the buttons that turn on and off the camera.
And we're going to strip away the lacquer coating on the outside of that wire, using the edge of our break-off blade knife. And it's important that you rotate the wire as you do this, so that you can get the lacquer on the backside and on the edges. It's really easy to miss that, and you won't get as good a connection if you don't strip all the lacquer off.
So the lacquer acts as a really thin insulator. Those thin wires made it easy to connect to the power connections for our switches. But it's definitely not the right wire to connect to our breadboard, because it's too small a gauge. It won't stick, it won't stay in place.
So we need to connect it to a thicker wire. So we're using a 22-gauge hookup wire. And we just twisted the magnet wire around the hookup wire, and now we're just soldering the two pieces together. And you want to make sure that solder travels all up and down the joint, to make sure it's a good solid connection.
And then to prevent any shorting, we're going to take some heat shrink tubing, and connect it, just slide it right over that joint, and use our pliers to pull it down just a little bit. We want about 1/4 inch exposed. And then we're going use our heat gun to get that heat shrink tubing to shrink around our wire, and protect the new connection.
And so we can just bend that wire right into place. And that goes on the left side of our transistor, and that is going to be our emitter side. And now we're going to do the collector side. And we're just stripping off the lacquer coating. And again we'll wrap it around that 22-gauge wire.
And then we'll solder it in place, and we'll heat shrink tubing that wire as well. And that's going to allow us to get a nice good connection, and also to protect from the-- again, from shorting with the heat shrink tubing there. So we'll connect that to the other side of our transistor, right there.
And so that will allow our Arduino to send a small voltage to the transistor to turn the camera on and off. And so now we still have our shutter button, the most important button, and we are going to wire up that the same way we did our power button. So we twisted our-- stripped our magnet wires, and twisted them around 22-gauge wire, and then soldered them in place.
And now we're putting our heat shrink tubing over those wires, and trimming off any excess there, and then getting that heat shrink tubing on. And we'll use our heat gun to cause that tubing to shrink in place and protect those new connections. And again, we'll just put those wires on both the emitter and the base, I should say on both the emitter and collector on the transistor.
And now we can control our camera with our Arduino.
Video © Khan Academy, used under CC BY-NC-SA. Watch on Khan Academy. Puzzicle is not affiliated with Khan Academy.