Mosfet Trouble
Hey,
I have been trying to use a mosfet (IFRZ44N) as an on/off switch for a motor, but as soon as I compleate the circuit and turn on the BOE, the motor turns on and won't turn off untill I disconect the power.· It's like the gate doesn't do anything.· Please Help!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
I have been trying to use a mosfet (IFRZ44N) as an on/off switch for a motor, but as soon as I compleate the circuit and turn on the BOE, the motor turns on and won't turn off untill I disconect the power.· It's like the gate doesn't do anything.· Please Help!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
bmp
866K
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
You've had exactly this problem before, I remember.· [noparse]/noparse] [color=red]Post Edit addition[/color] -- [url=http://forums.parallax.com/showthread.php?p=590196]http://forums.parallax.com/showthread.php?p=590196[/url][color=white]·[/color
With a 10K from Gate to Ground, alternately apply +5V to the Gate through a 2K2 (no STAMP) and then Ground the Gate through the 2K2.· What then are the results?
The diode across the D-S of your FET is backward in your drawing (anode should be at Ground -- it should be "backward biased", not forward-biased.)
Post Edit -- see DWG atttached.
2nd Post Edit -- I've verified circuit how_to.jpg, using an IRF620; on/off totally good (as I knew it would be.)· You can go full-tilt without the 2K2, but I dunno if I'm really into that (it's a judgement call, IMHO.)· But, the 10K, definitely --·or the Gate will stay charged (there's a capacitive element involved) keeping the FET "on".
Post Edited (PJ Allen) : 7/10/2006 4:44:52 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
Post Edited (bennettdan) : 7/10/2006 6:53:23 PM GMT
My bet is on an IRFZ44N. The original was just a bit dyslexic, as I've done many times before :-)
FWIW, that datasheet is attached.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
I usually dont use a 2k2 resistor from the stamp I usually use a 220 ohm but I put a 2k2 in my breadboard and it works fine for me with a IRF510.
I'm a software guy, and NOT an analog guy by any means, so please forgive my query. Isn't the relationship between the source/drain (I forget which) and the gate important, if this isn't a logic level MOSFET? I didn't get the impression that it was a logic level MOSFET.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
A small-signal FET, like an MPF-102, is different -- you can swap D & S.
The hexfet you have has an internal diode plus you need the external one.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
Anyways, I think you should swich to a standard NPN transistor (see attached pic).· Any one should work.· When you use a MOSFET, you just need to remember that they are EXTREMELY sensitive and will respond to the slightest change in voltage.· Only JFETS·can be·more sensitive.
Also, what are you trying to run using this circuit?· Why are you using a transistor in the first place?· You don't really need one; unless you connect the drain (MOSFET) or collector (NPN) to Vin, you won't get much more power, if any.· Also, you have to remember that you are using a motor, not a servo; servos can be very precise, but motors are generally either going or they aren't.
So basically, I think your just working with the wrong parts for this circuit.· You're working with precision parts when you should be working with standard parts.
P.S. Excuse the bad attachment; lol
Post Edited By Moderator (Chris Savage (Parallax)) : 8/5/2006 1:49:30 AM GMT
· The best solution is to connect the relay in a common emitter circuit, if it's a 5V coil/relay,·between +5V and the collector with the emitter at ground (assuming NPN.)· And this is·only cool with the BoE whose LM2940 has current aplenty, if not infinite, to spare.· The HomeWork Board and its LM293 (approx 100mA) doesn't have the current to spare from its VDD for running relays and motors.
· What's more, with the common emitter, you can use any coil provided your V+ is = to the relay's coil.· It's the most efficient, too
· But, as you'll see around here, people·too often·have it wrong, knowing nothing, wanting to do·thus & sundry·and·see the answer as little more than to just cram some wires in a breadboard and not to learn right things,·because "working" (ha-ha)·is in the eye of the beholder:
Post Edit --
e.g.
(This thread)
http://forums.parallax.com/showthread.php?p=598355
http://forums.parallax.com/showthread.php?p=599176
http://forums.parallax.com/showthread.php?p=590196
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When you get 1st Place in the "Darwin Awards", you're a Winner & a Loser.
Post Edited (PJ Allen) : 8/5/2006 4:34:26 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
·· I must respectfully disagree with you on MOSFETs in this use.· If connected properly they are completely suitable for this task, and in fact are commonly used in H-Bridges.· The fact that they don't consume current to drive them makes them even more appropriate for logic signal control, whereas transistors usually require a Darlington pair.·
·· In fact, your transistor circuit has a few flaws, some of which have been pointed out, but on top of that you have no resistor shown on the base of your transistor, which would likely damage the I/O pin connected to it.· I would recommend a little more research on transistors and MOSFETs.· Beau Schwabe has posted to this forum several times, a nice tutorial.· Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Right Way - Picture posted by - PJ Allen
http://forums.parallax.com/forums/attach.aspx?a=8297
Hope it is ok that I ask a couple of questions about these -
What is the G, S & D
And it looks like the middle one is connected to the bottom one on the drawing. I assume they go to ground, the both of them? So if I understand it right, this is what you have:
Some kind of voltage regulator and the middle and bottom pin in the drawing both go to ground. And the bottom also goes to pin1 on the BOE. Then a diode of some kind connects from the same ground to the negative terminal on the motor. And the positive terminal of the motor goes direct o power supply? And the ground is the VSS on the BOE?
I am learning and trying to understand this thread with all the drawings. Thanks
Post Edited (Mike Green) : 8/13/2006 4:18:32 AM GMT
Couple of more questions -
One is -- how do I know if mine would or would not have a diode already part of it?
Two is -- I hooked up the circuit like your picture shows. Used it to power a LED and works fine. But when I tried it with the little 3-5v motor from radio shack and it did not work. So not sure if I did something right or wrong.
"Not plugged in using BOE. Just a breadboard and direct 2 AA power for the LED and then a 9v for the 3v motor"
I am not using same chip. Still 3-prong like your drawing. but it is a 7805 5DC voltage regulator. Saw in some google searches people were using this chip for their h-bridge and they had it at radio shack so got it for now.
Thanks
HAPPY ME!@!@
Now try with the BOE.
problem - one of my books said have a resistor between the input pin and what ever was plugged there. Took it out and it works fine.
I assume the positive is the VDD?
Thanks -
I put the positive on the VDD to see what happen and made sure the other was on VSS and the LED lit up. Then put the positive on pin0 and sent the following from the PBASIC
DO
DEBUG "on", CR, CR
HIGH 0
PAUSE 2000
DEBUG "off", CR, CR
LOW 0
LOOP
LED came on and then off. Now tried same with the motor in the circuit instead of LED and nothing happened. Put LED back in and it worked.
I am thinking maybe I hooked it up wrong, but if LED work then would think it is correct. Maybe not enough power for the motor when coming off the BOE? Can I have seperate power supply for the motor?
input pin to p0
ground pin to vss
output pin to resister which goes to negative side of my led
positive side of my led goes to vdd
high 0 --- turns led off
low 0 --- turns led on
But that does not work with the motor.
This is my motor:
1.5 to 3VDC Hobby Motor
http://www.radioshack.com/product/index.jsp?productId=2102822&cp=&origkw=3v+motor&kw=3v+motor&parentPage=search
I want to use bigger motors. but using this to setup and learn from for now.
Thanks
Thanks
When I do what Mike says about the battery to positive side of motor and negative to vss of the board. It just runs without any signal from the output of my chip. Right now testing with LED before doing motor though. If it works there should work with something else.
Input to pin0 and from your drawing it should also be connected to vss. Tried it with and without it connected and get same results.
Ground to vss
Output to negative of LED
2 AAAA Battery positive to positive of LED and negative to vss.
LED stays on and not even connected the 9v battery to the BOE yet.
Thanks
EDIT: -
I tried same thing using seperate 2 AAA battery pack as seperate power source with motor but use the 2N3904 transistor that came with the "What is a Microcontroller" kit instead of the 7805 that I was using. And it worked. I guess now I need to figure out why and figure out how to know when to use what size of transistors and when to use resistors & capacitors·for XYZ motors.
Thanks again.....
Post Edited (studysession) : 8/13/2006 7:07:45 PM GMT
one thing i do for fun is to tear apart old printers , and other gadgets ppl have thrown away....
if you look where a stepper motor ( for ex) was plugged into a printer motherboard and follow the traces , you will come to a chip that is probally a stepper controller..
you can look it up using google on the web ( type in various part numbers on the chip ) and find a datasheet.. this will give you a pinout of that paticular chip. and by looking at how it was connected , you might be able to see how the expert engineers used it... then emulate it on your breadboard...
this is also a way to get some free parts if you have more time than money. have found lots of good parts on old boards, just stay way from tv's due to the high voltages inside .
dan
I do have another question -
Now that I got it working and powering my motor with the 2N3904 - How can I reverse the direction? Thanks again for everyones help/
dan