Help with simple Motor control
logan996
Posts: 281
Hi, i am using a BS2 homeworkboard to try and control a small motor (about 3/4 the size of a 9V), The motor runs great when connected to a 4x AA holder and will run using the BS2's Vdd and Vin when the BS2 is connected to the batteries instead of a 9v. I have tried powering the BS2 with the 4 AA batteries using a simple circut that has the motor connected to a a pin (pin 8) and ground, i tried to put the poin pn high to turn it on but that wouldnt work, but it does work when it is directly connected to the Vdd and Vss. I gave that up and took the transistor (2N3904) in my WAM? kit and used a schematic in the kit that uses a pot and the transistor to change the brightness of the LED, i tested the circut with the LED and made it work, but when i connected the motor it failed to work (with the AA's or the 9v), i tried again disconnecting the motor from the BS2 and made it run off 4 external AA's (the BS2 was on a 9v) and it still wouldnt twitch, so i replaced the pot with a dierct connection to the BS2 I/O pin, i tested the LED (worked) then tried the motor again and it didnt work then i tried the external AA's and still it would not work!!!· Is this beacause of the transistor rating? or what? ans also the batteries were brand new out of the box and the transistor is sold by parallax (look up it up on their store for the data sheet) and the schematic for the circut i used is on page 273 in the What's a Microcontroller book pdf on the store page on the parallax store.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"When the government is afraid of the people there is liberty, when the people are afraid of the government, there is tryanny"
· Thomas Jefferson
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"When the government is afraid of the people there is liberty, when the people are afraid of the government, there is tryanny"
· Thomas Jefferson
·
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"When the government is afraid of the people there is liberty, when the people are afraid of the government, there is tryanny"
· Thomas Jefferson
·
Also, the transistor you are using is only good for about 200 mA, so its marginal at best. Even a 2n2222 would be a better choice.
Do this:
1. Connect + of your battery pack to one lead of your motor.
2 Connect the other lead of the motor to the Collector of the transistor.
3. Connect the Emitter of the transistor to 0 volts of your battery pack. ( Some call it ground). Also tie this point to 0 volts on the Stamp.
4 From your Stamp pin, go to one side of a 2.2K resistor. (any value from 1K to 10K should work).
5 From the other side of the resistor, go to the base of the transistor.
6. Put a diode across the motor terminals, cathode to the positive side.
6 When the pin is HIGH, the motor will turn on.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk
http://www.siskconsult.com
·
The resistor between the white pin on the daughterboard and the base of the transistor is 2.2K ohms.
Prior to this, i was trying to using the transistor to power a small relay without any success either.· The relay is a radio shack 5VDC relay (275-0240 or OEG OUAZ-SS-105D)
Do i need to use a larger voltage supply, like 4 AA batteries?· Or am i doing something else wrong?
Any help would be much appreciated.
Thank you!
B
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
Curious why my current transistors will not do the task gating current to the motor, and leaving the relay out of the circuit entirely?
thanks,
bd
Or I like these.......a power Mosfet: IRF 510
Both available from Radio Shack. The problem you might have is, the motor will pull A LOT more power starting that it does at idle. Use the relay, or a larger transistor. Either of those two I listed above will scoff at your little motor [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"puff"...... Smile, there went another one.
IT WORKS LIKE A CHARM!!!!! AWESOME! Bought ALL of the above electronics, but started with the TIP 120 and it works great. The motor spins reliably and i can hear the click of the relay, even with it being so small!
THANK YOU FOR THE HELP!!!!
Since my BS2pe appears to only put out 15mA from the pin i am using, i was not sure the Reed Relay would work, since erco state it might need 20mA to flip the relay. Still....may try it to see how it performs.
bd
Now play with PWM.....Pulse Width Modulation..... to control the speed of the motor [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"puff"...... Smile, there went another one.