In building Simple Bots, we are going to use a series of photo-coupled devices called modules. But, before we can do this, we need a good photo-couple to use as a light-activated switch. To make one of these switches, we will be using a special OSRAM-brand photo transistor and any standard NPN transistor (like a 2N2222, 2N3904, BC546, etc.). These switches will allow the motor to spin in direct correlatoin to how much light it senses. In other words, the more light, the faster the motor goes and the less light, the slower.

Step 1: Go Get Stuff

You will need:

(x1) OSRAM-brand photo transistor
(x1) NPN transistor

Step 2: Line Up

Lay the phototransistor atop the NPN transistor such that the base of the NPN transistor aligns with the emitter (longer leg) of the phototransistor and the collector of the NPN transistor aligns with the collector of the phototransistor.

Step 3: Twist

Twist together each lined-up pair of NPN transistor and phototransistor leads.

Step 4: Solder

Solder together the connections of each twisted pair of transistor leads.

Step 5: Trim

Trim the middle pair of wires such that it is shorter, but the connection between the base of the NPN transistor and the emitter of the phototransistor remain soldered together.
will this work to power leds?
I would guess it should. Not 100% sure though.
Any other substituent for osram based phototransistor? Thanks
it is so helpful to me!!! <br>now i know more on sensors <br>!! <br>
Wow. I hate to see what this would look like if I did this. SOLDER BLOBS IN MEH EYES!
very clean. while I like circuit boards for organization, free-form circuitry is always really cool when you can pull it off.
If I make this light switch, which lead would I attach to the load and which would I attach to the power?
Randy, this is very interesting, but lacks some explanations for those as me, that are almost absolutely ignorant in electronics. Please add a circuit of how it is connected to activate a motor.<br> <br> How many volts can it handle? How many watts?<br> <br> When I redo my solar cooker, this can be a very simple device to keep it aligned with the sun. The cooker will have <a href="http://en.wikipedia.org/wiki/Equatorial_mount" rel="nofollow">equatorial mount</a>, so with only one movement, only one motor, it will be aligned.&nbsp; That can be done easily putting your light switch into a black tube, or behind a black screen for when clouds hide the sun for a while.
Don't expect too much current handling for to92 packages. The most usual are 100-200mA (to92 with metallic can reach 800mA). Voltages are variable, usually around 40V in C-E. <br>But they are hard to be cooled and these parameters usually are the maximum. <br> <br>More flexibility can be achieve with the to220 packages, usually TIP series, for example... there're many different types of transistors for resuming here xD
Thanks for the data, gomibakou. I want use it to feed a 12V motor with reductor, those used in car glass lifts. I think the intake is not so high. <br> <br>Do you suggest to replace the Phototransistor? Forgive my ignorance.
The phototransistor works in this example like a &quot;current regulator&quot;. The transistor works in saturation but the saturation current depends on the current in the base. Because the phototransistor varies it's output current with the light, then the main transistor will vary it's outoput current with the light, indirectly. <br> <br>This is important because the phototransistor current will determinate the transistor current across it's gain. <br> <br>https://www.instructables.com/id/How-Electronic-Switches-Work-For-Noobs-Relays-and <br>https://www.instructables.com/id/Simple-Transistor-Switch <br> <br>Basicly any transistor can handle 12V. The problem is the current. You should measure this current in different stages: when the motor is moving freely, moving with load and when it's stalled. The worst case is when it's stalled (max resistence max current consumption), because the transistor will have to deal with such currents. <br> <br>For example a small DC 5V motor while moving freely can drain few mA (for example 100mA), but when it has a load current increases and if you stop it, then it can reach easily 5 or 10 times more current (depends on the motor). <br> <br>You also have to keep in mind the peaks. When motor starts moving it has high currents (the same when the motor stops due to the energy kept in the coils), and it can destroy easily the transistor, solution is easy: protection diodes like used in the relays. <br> <br>For transistor, it's hard to find one here and the most common is the BPW40, i think it's easy to find over any country. But you need to keep it protected from light sources because it's very sensitive. <br> <br> <br>In this site, recommended for all newbie phanatics on robotics you can find some information/experiments really easy: <br> <br>http://www.robotroom.com/HBridge.html <br>http://www.x-robotics.com (spanish) <br> <br>Also you could use RELAYs, and add a circuit to trigger the relay (just a transistor to supply the few mA the relay needs to perfom its action), a common circuit easy to find. <br> <br>All depends on what you need: high speed of conmutation? transistor, high current? power transistor + heatsink or relay, speed control? transistor, ... ... <br> <br>For example, the BC457 can handle aprox. 40V and 100mA (teorically xDDD). Really it can handle that but it starts working in the non linear zone then it can have a strange behaviour sometimes. It's safe to buy a transistor capable of deal the double currento you need: if you need 100mA then buy one of 200mA at least (and surely will have more protection against surges). <br> <br>I'd try first to know how much current your motor drains... it's the key. Connect a multimeter in current mode to the motor (i say if you don't know: <br> <br> [Motor +] -----------------------------------------------------------VCC <br> [Motor - ] ----------[red probe] [black probe]----------GND <br> <br>And measure the current, when it is stopped and starts (if you have time to see!! xDD), in nominal operation, when it has a load, and when you force it to stop. Think if someday the window gets stuck, and you didn't prepare your circuit against it, then you'll fry it sure. <br> <br>Knowing the Voltage (12V), and Max current (protection diodes helps to minimize peaks even a startup capacitor), calculate the power dissipation. With these data you can find a suitable transistor (or relay if better in the situation). Take the datasheet and calculate the necesary data to make the transistor work in saturation (google: transistor like switch). <br> <br>As i learnt recently (humans never learnt), do things step by step. Avoid using a phototransistor as switch because they can be little tricky (specially if you didn't read the datasheet before). Test your circuit with a normal switch. When working as expected then you can add the phototransistor. <br> <br>Recently i had to redesign and make new pcbs, after having a finished circuit for not following my own rule, all after testing again in a breadboard... a waste of time. Lesson learnt? dunno only time will tell :D
WOW, this is an exhaustive explanation! Thanks, I will study it tonight.
One thing more... i was talking about BJT transistors, but usually for high current MOSFET are a good deal, they can manage more current at lower price but: <br> <br>1-mosfet are driven by voltage instead current (bjt). <br>2-the ON umbral is really wide. It can vary from 0.7-3V easily. You should apply a voltage over it to make the transistor working in saturation (for the example). With BJT the voltage is usually 0.7-1V. <br>3-mosfet are quite sensitive to ESD (electrostatic discharge). Many of them have built-in protection diodes (i talked about them in previous post), otherwise it's wise adding them. <br>4-As bjt there're 2 kinds: N and P (channel). P are really expensive in comparation with N. There are some tricks to use N mosfet as P (or very close). <br>5-Mosfet introduces a resistence when they are ON. it can be important or not... <br> <br>6- Chek the BS170, common N-channel Mosfet. <br> <br>http://www.fairchildsemi.com/ds/BS/BS170.pdf <br> <br>Params: 500 mA, 60 Volts, RDS(on) = 5.0 Ohm. Max ratins of course. <br>About $0,10. It can control easily a standard futaba 3003 RC servo. <br> <br>7- Oh, and one important thing: take care of commutation speed. Mosfet can become really hot if they switch fast, burning and you won't realize why. It's not an issue for what i think you need, but it's important for speed control for example. <br> <br>Normally for motor driving MOSFET are used because their current capabilities. So if you look for motor control you will see the mosfet are widely used. <br> <br>ah, it's not exhaustive... really it's far beyond of being exhaustive. It's a mix, an overviewl about the most common points that you will face. <br> <br>
OK, thanks. <br><br>For my knowledge, this is very exhaustive, yes. <br><br>I know that transistors are those little black things, normally soldered on a little board...
hehe ok. <br> <br>If you can deal with English, in this site there is nice information to start, simple, accurate, with pictures and basic examples: <br> <br>http://www.electronics-tutorials.ws/transistor/tran_1.html <br> <br>(you can select 8 pages of tutorial). <br> <br>Buy a bunch of NPN and PNP general purpose transistors and play! <br> <br>Ouf, i found this site (i never knew it before) and looks great! <br> <br>http://alltransistors.com/ <br> <br>Big dabase for many transistors, with multiple languages :)
Thanks, gomibakou. Your info is very valuable, despite my &quot;yes Bwana&quot; English. <br><br>Electronics is one of the many things I would like to know, but I'm too lazy to learn. Maybe next winter (here in south it is coming) I decide to study a little. <br><br>Don't know electronics today is almost as don't know to read.<br><br>
Hi rimar2000; <br> <br>Take a look at this solar cooker solar tracker: <br> <br>http://www.redrok.com/electron.htm#ledcooker3 <br> <br>https://www.instructables.com/files/deriv/FCG/4P2R/H1YOHJLW/FCG4P2RH1YOHJLW.THUMB.jpg <br> <br>This circuit is perfect for use with solar cookers with relatively small motors. <br>It can be powered with batteries or a small solar panel. <br> <br>Duane
OK, thanks very much. I will keep them in account when do my equatorialyl mounted solar cooking. It will use only one motor.
Very good idea! Simple, robust and cheap! <br>But you should include a schematics for people using different transistors. And maybe a hint to figure out which leg on a transistor is what. Not all transistors have the same C-B-E ordering of their legs!
You have are have a mistake in the first sentence :) <br> <br>James
When I look at the link, it appears that the photo transistor is out of stock. Is there any others I could use, and what properties make that phototransistor the correct one?
I am not sure about a suitable replacement, but what made that one ideal is that it had it was very responsive in the visible light spectrum. Most of these are fine-tuned for IR.
Perhaps try this one: http://www.mouser.com/ProductDetail/OSRAM-<a href="http://www.mouser.com/ProductDetail/OSRAM-Opto-Semiconductors/SFH-314/?qs=K5ta8V%252bWhtbR6gV8hNfmATd6ftDkb0eH0AduyQe8MSk%3d">Opto-Semiconductors/SFH-314/?qs=K5ta8V%252bWhtbR6gV8hNfmATd6ftDkb0eH0AduyQe8MSk%3d</a><br /> <br /> Its datasheet places it at 460 nm to 1080 nm
Does it need to be the &quot;OSRAM-brand photo transistor&quot;? Why not any LDR? Thanks, I'll keep it in my favorites
A photoresistor is going to require more additional circuitry to work.
Great idea! Simple, easy and practical!

About This Instructable




Bio: My name is Randy and I founded the Instructables Design Studio. I'm also the author of the books 'Simple Bots,' and '62 Projects to ... More »
More by randofo:Build a Mad Scientist Light Useless Machine Instructions LED Flashlight 
Add instructable to: