Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: dsesmg on August 07, 2009, 01:39:17 AM

Title: DC motor
Post by: dsesmg on August 07, 2009, 01:39:17 AM
I need to ask a very basic question for switching a DC motor.
I am trying to turn on a DC motor when I push a microswitch.
I will push a microswitch when the motor is in contact with power supply.
I prepared a picture. Please take a look
http://www.flickr.com/photos/[email protected]/3796873111/sizes/o/
The motor will be attached with the microswitch So, the microswitch can be with the motor at any time.
But, the power supply should be seperated from them.
How can I turn on this DC motor by pushing the microswitch(Normal open) while avoiding short circuit?

Title: Re: DC motor
Post by: SmAsH on August 07, 2009, 01:59:09 AM
the simplest i can see is to have battery+ connected to no and motor+ connected to com...
this will result in the motor spinning while the switch is down...
Title: Re: DC motor
Post by: dsesmg on August 08, 2009, 12:08:37 AM
It works very well.
Thank you very much.
Have a great day.
Title: Re: DC motor
Post by: SmAsH on August 08, 2009, 12:15:39 AM
great to hear!
just a note: if you want to reverse the operation (turn when switch not pushed down)
change battery+ to nc and it will go when its not pushed down ;D
Title: Re: DC motor
Post by: dsesmg on August 11, 2009, 09:46:03 AM
Hi, how are you?
Yes, I just tested and it works very well, too.
Thank you so much for teaching me.
I appreciate that very much. :)
Title: Re: DC motor
Post by: SmAsH on August 11, 2009, 03:54:24 PM
im always happy to be of help ;D
Title: Re: DC motor
Post by: dsesmg on August 16, 2009, 12:51:56 AM
hi,  how are you?
This is the current method I used to turn on and off a motor. http://www.flickr.com/photos/[email protected]/3811240545/sizes/o/in/photostream/
And, right now, I am trying to test a photo transistor like this one http://www.eleparts.co.kr/epdf/SENSOR/ST-3811.pdf) and an infrared emitter like this onehttp://www.eleparts.co.kr/epdf/SENSOR/EL-1KL3.pdf
I need to use this photo transistor as a switch, and this emitter as the swtich's trigger wire so that I could turn on and off the motor.http://www.flickr.com/photos/[email protected]/3813222826/sizes/o/
Could you please advise me how to achieve this?
I've tried to search for information about this but I am lost. :-[
Title: Re: DC motor
Post by: SmAsH on August 16, 2009, 01:18:00 AM
the last link is to a servo, why is this?
the photo attached is the general setup of how it works.
it works just like any other transistor except the base is now the amount of light.
Title: Re: DC motor
Post by: dsesmg on August 16, 2009, 01:43:02 AM
Hi, James, Thanks a lot.
I just tested with the schematics.
The motor doesn't start. I tested in a complete darkness but it is the same.
oh.. by the way, the motor I am using is a DC geared motor. It is just in a servo housing.
Title: Re: DC motor
Post by: SmAsH on August 16, 2009, 01:50:08 AM
first off, have you tried with the transistor in backwards? it may be backward...
and for the wavelengths of both, the transistor is rated for 700-1000nm, what is the emitter rated for?
i cant get its datasheet to load on my pc...
Title: Re: DC motor
Post by: dsesmg on August 16, 2009, 02:18:22 AM
Yes, I tried to reverse the transistor.
oh.. sorry for the link. You can see the data sheet of the emitter from here.
http://www.eleparts.co.kr/epdf/SENSOR/EL-1KL3.pdf
Title: Re: DC motor
Post by: SmAsH on August 16, 2009, 02:24:19 AM
i cant see it :-\ can you upload screenshots of the pages for me?
Title: Re: DC motor
Post by: dsesmg on August 16, 2009, 02:42:30 AM
oh,, I'm sorry. Here are the screen shots of the emitter specification. If this also doesn't work, please let me know.
http://www.flickr.com/photos/[email protected]/3825092211/sizes/o/
http://www.flickr.com/photos/[email protected]/3825079541/sizes/o/
http://www.flickr.com/photos/[email protected]/3825092215/sizes/o/
http://www.flickr.com/photos/[email protected]/3825079427/sizes/o/
Title: Re: DC motor
Post by: SmAsH on August 16, 2009, 02:51:24 AM
nope, those work...
i don't think its a problem with the wavelength... its at 940nm...
have you made sure the ir led is working?
Title: Re: DC motor
Post by: dsesmg on August 16, 2009, 03:02:06 AM
no.. actually, what i did with your schematics is, I made a circuit and I shed some light on the transistor to see how it's reacting. Please correct me if I am wrong.
On emitter side, I didn't do anything yet. :-[
Could you advise me how the emitter should be wired?
Title: Re: DC motor
Post by: SmAsH on August 16, 2009, 03:05:37 AM
well, the emitter chews up [email protected]
so, depending on your supply voltage.. you should work up a resistor and try it up..
this is probably why the circuit hasn't been working ;)
the transistor requires a certain wavelength to operate.
Title: Re: DC motor
Post by: dsesmg on August 16, 2009, 03:18:11 AM
I see, then, I will contact the supplier and ask for some help.
When I do it, I will post some result.
Thanks a lot, James.
Title: Re: DC motor
Post by: SmAsH on August 16, 2009, 03:22:41 AM
why do you need to contact the supplier? do you have the led yet?
Title: Re: DC motor
Post by: dsesmg on August 16, 2009, 04:03:36 AM
no, I have the sensors right now.
I thought I need to ask for some information on how much resistance needs for this transistor to work.
I just tested with 10k ohm and 100k ohm but it doesn't seem to work, so...
Title: Re: DC motor
Post by: SmAsH on August 16, 2009, 04:13:53 AM
you need the led for the transistor to work!
the resistor is for the led!
Title: Re: DC motor
Post by: dsesmg on August 16, 2009, 04:20:09 AM
Please correct me if I am off from your point.
So, I put LED on the positive side of the transistor and I put resistors on the positive side of LED?
I am sorry. I am very new with electrics.
Title: Re: DC motor
Post by: SmAsH on August 16, 2009, 04:32:04 AM
the led and transistor can be different circuits completely.
the leds light is what activates the transistors "switch".
without light in the right wavelength the transistor will not function.
Title: Re: DC motor
Post by: dsesmg on August 16, 2009, 04:51:01 AM
I see. then, Could you advise me how to make a circuit for the LED to switch the transistor?
Title: Re: DC motor
Post by: SmAsH on August 16, 2009, 05:09:08 AM
yes, its treated like any other led circuit.
+battery--resistor--(led+ led-)--battery-
Title: Re: DC motor
Post by: Soeren on August 16, 2009, 12:11:21 PM
Hi,

You can't drive your motor directly from the photo transistor!
It simply hasn't got enough power handling for this, so you need to use the photo transistor for driving another transistor which can.
When you have the right setup, you can use a flash lamp, a desktop lamp, sunshine, the LED or whatever to turn it on.
Title: Re: DC motor
Post by: dsesmg on August 17, 2009, 09:00:18 AM
Could you advise me how to set up the transistors correctly?
Title: Re: DC motor
Post by: dsesmg on August 21, 2009, 07:10:08 AM
Hi, I've been thinking of how to turn on and off 5VDC geared motor using a photo transistor I have.
http://www.eleparts.co.kr/epdf/SENSOR/ST-3811.pdf
http://www.flickr.com/photos/[email protected]/3813222826/sizes/o/
The motor looks like a servo, but it is not a servo. Just a geared motor in a servo housing for better installation. :)
So, I am thinking of arranging the circuit like this to turn on and off the motor using the photo transistor.
http://www.flickr.com/photos/[email protected]/3842705484/sizes/l/
Could you advise me whether this circuit is ok?
Title: Re: DC motor
Post by: SmAsH on August 21, 2009, 07:17:17 AM
im not too familiar with the tip102 but wouldn't a low signal at base turn it off?
if it works like i think it does, look at my attached version and try that.
Title: Re: DC motor
Post by: Trumpkin on August 21, 2009, 02:16:19 PM
Quote
im not too familiar with the tip102 but wouldn't a low signal at base turn it off?
That is correct. It is an NPN Transistor therefore a low signal would turn it off.
Title: Re: DC motor
Post by: SmAsH on August 21, 2009, 05:00:25 PM
i think i might've used it once before on a small blinking led project i found on instructables ;D
i knew it was npn from the symbol, but i just wasnt sure because of the way dsesmg had it drawn.
Title: Re: DC motor
Post by: dsesmg on August 21, 2009, 07:24:25 PM
Hi, thanks a lot.
I just tested with the circuit you proposed and it works great.
when I exposed the photo transistor to the sunlight, the motor spins.
Also, when i beam TV remote control light to the photo transistor, the motor spins a little.
I think it is because, the TV remote control doesn't beam the light continuosly even if I keep the button pressed.
I hope i could make a circuit for the infrared emitter and test with this photo transistor circuit.
As you know, the current emitter i have is this specification.
http://www.flickr.com/photos/[email protected]/3825092211/sizes/o/
http://www.flickr.com/photos/[email protected]/3825079541/sizes/o/
http://www.flickr.com/photos/[email protected]/3825092215/sizes/o/
http://www.flickr.com/photos/[email protected]/3825079427/sizes/o/
But, I have little knowledge about this.
I need to control this emitter by using some microcontroller signal.
Could you advise me how to wire up the emitter?
Title: Re: DC motor
Post by: SmAsH on August 22, 2009, 01:54:50 AM
wait, what do you want to control?
the current flow from the collector to emitter?
there you will put the base to a digital pin... am i getting you?
Title: Re: DC motor
Post by: dsesmg on August 22, 2009, 02:02:31 AM
Hi, James,
Yes, I need to control the current flowing from the collector to emitter so that I can control the on/off mode of the emitter.
Yes, I will put a digital pin to the base of the TIP102 so that the TIP102 transistor could act like a switch. :)
Title: Re: DC motor
Post by: dsesmg on August 22, 2009, 02:05:55 AM
is this circuit OK?
http://www.flickr.com/photos/[email protected]/3845028272/sizes/l/
Title: Re: DC motor
Post by: SmAsH on August 22, 2009, 02:11:26 AM
yeah, that will work...
just a word, you don't need the diode if you are controlling something like an led...
the diode is just to stop back emf from motors or other coils.
Title: Re: DC motor
Post by: dsesmg on August 22, 2009, 02:20:06 AM
Thanks a lot, James.
OK, I will take out the 1N4004.
I will test with this circuit and I will get back with the result. :)
Title: Re: DC motor
Post by: SmAsH on August 22, 2009, 02:27:14 AM
ok, your testing it with a microcontroller right?
Title: Re: DC motor
Post by: Soeren on August 22, 2009, 09:02:11 PM
Hi,

yeah, that will work...
... If a LED with internal current limiting is used, yes, otherwise, just for a split second ;D
Title: Re: DC motor
Post by: SmAsH on August 22, 2009, 09:05:36 PM
why is that, because of no resistor?
Title: Re: DC motor
Post by: Soeren on August 22, 2009, 09:24:14 PM
Yes.
Title: Re: DC motor
Post by: dsesmg on August 22, 2009, 10:18:52 PM
Hi, yes,I am using it with a microcontroller.
then, how much ohm resistor do I need to use?
Because, I tested with the circuit after taking out 1N4004 from the circuit.
The emitter doesn't show any result.
So, I replaced the emitter with a normal LED. The LED blinked well so I brought it close to the transistor and the motor spinned very well.
I thought the emitter is broken or something.
Could you advise me how much ohm do I need to use and where should it be connected?

Also,the photo transistor only responded to red colored LED.
I have red,green, yellow LEDs and tested with them all.
Anyway, only the red colored LED is giving effect on the photo transistor.
Title: Re: DC motor
Post by: SmAsH on August 22, 2009, 10:25:00 PM
well, if you are giving the led 5v as your supply i would say something in the 150-250 ohm region would work well.
the resistor should just be placed in between the led +(anode) and your supply.

the reason it only reacts to certain leds is because of its operating wavelengths...
it will only turn on with wavelengths from a certain range. the leds that work must be in that range ;)
Title: Re: DC motor
Post by: dsesmg on August 22, 2009, 11:03:45 PM
Thanks a lot, James.
Then, I will test it with 150~250 ohm resistors.
I don't have them right now, so I will order them today.
By the way, I am trying to find better emitter and detector.
Below is the emitters.
* S13317-H
http://www.flickr.com/photos/[email protected]/3847545598/sizes/o/
http://www.flickr.com/photos/[email protected]/3846755227/sizes/o/
http://www.flickr.com/photos/[email protected]/3846755305/sizes/o/

* EL-1CL3
http://www.eleparts.co.kr/epdf/SENSOR/EL-1CL3.pdf

And below is the detectors.
* SP-1CL3
http://www.eleparts.co.kr/epdf/SENSOR/SP-1CL3.pdf
* ST-1CL3H
http://www.eleparts.co.kr/epdf/SENSOR/ST-1CL3H.pdf

I am trying to choose one of those emitters and detectors.
I don't quite familiar with the specification of such sensors.
Could you advise me which emitter has the longest beaming distance and which detector is less sensitive to the visible light?

Title: Re: DC motor
Post by: SmAsH on August 22, 2009, 11:25:14 PM
dude! do you have enough programs open :P

well, you will want to look for a set that are in the same wavelength...
if you want them not to be too affected by visible light then go for a pair in the infrared spectrum...
i cant really give advice on those ones as i think i have a virus or something thats screwing with my adobe >:(
as far as range goes, try to go for a non-diffused emitter as it is generally brighter...

as for the resistors, they will need to change according to your emitters, use the following formula to choose
a resistor: supply_voltage-led_operating_voltage/led_operating_current_in_amps...
eg 5-2=3, 3/.02=150... resistor =150 ohms.
remember to recalculate accordingly...
Title: Re: DC motor
Post by: dsesmg on August 23, 2009, 02:35:59 AM
Thank you, James.
It's very helpful.  :)