0
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

hi,

in the above circuit, why wont the motor run? connecting the motor - to Drain of the mosfet and the motor starts spinning. and how do you rename a "custom device" - i would like to change P1/U2.

U2 = ULN2003a

http://www.irf.com/product-info/datasheets/data/irlb8743pbf.pdf http://www.ti.com/lit/ds/symlink/uln2003a.pdf

\$\endgroup\$
  • \$\begingroup\$ Why do you feel that you need a ULN2003 to drive the MOSFET? \$\endgroup\$ – brhans Mar 21 '16 at 17:45
  • 1
    \$\begingroup\$ And what is the MOSFET, really? \$\endgroup\$ – WhatRoughBeast Mar 21 '16 at 18:11
0
\$\begingroup\$

Did you connect the negative terminal of the motor supply to the ULN2003's ground and to the AVR ground? Everthing requires a common ground reference.

\$\endgroup\$
  • \$\begingroup\$ only got a 5v supply for the circuit and the motor. if i connect gnd directly to the motor it will run permanently..wont it? \$\endgroup\$ – James Baker Mar 21 '16 at 17:33
  • \$\begingroup\$ Don't ground the motor - ground the negative terminal of the motor's power supply (V1) to the ULN2003 and AVR grounds. \$\endgroup\$ – Peter Bennett Mar 21 '16 at 17:36
  • \$\begingroup\$ oh now i see, i did not put that into the circuit. but theres only one ground for all components. as mentioned, if there would be a way to rename the "custom" part i would also add a avr with proper namings \$\endgroup\$ – James Baker Mar 21 '16 at 18:00
  • \$\begingroup\$ Double-click the custom part. Hit the (+) icon on each pin you wish to enable. Click on the pin to edit its comment. There are three text placeholders in the part. Click on any one of them to edit. Double-click on the elsewhere on the schematic to exit custom part editing. In this case it might be clearer if you just show the one internal transistor of the ULN2003A that you are using with its base resistor and draw a box around it and label it as 1/8 ULN2003A. \$\endgroup\$ – Transistor Mar 21 '16 at 18:40
2
\$\begingroup\$

There is only one remaining thing other than a misconnected or faulty part (which will be very difficult or impossible for us to diagnose).

If you grounded pin 9 ("COM") on the ULN2003 the output voltages will be clamped at about 0.7V which will be insufficient to turn on the MOSFET. I suspect that is the case, since you've shown two wires to the ULN2003 that are grounded. Of course "E" must be grounded- that's the emitters of the Darlingtons.

Leave "COM" open, or connect it to +5V. It's there to clamp inductive loads to a higher voltage such as the supply voltage (or higher in some cases). Since you do not have an inductive load on the ULN2003 it is not required.

To diagnose, in general, follow the signal through your circuit and record what is going on. Verify the input voltage to the ULN2003 off and on. Verify the output voltage is what you expect (about 5V and 0.8V for on and off). And finally verify the voltage across the motor.

And, as others have stated, you can drive this particular MOSFET just as well by connecting the 10K directly to the microcontroller- in fact you can reduce the resistor to a few hundred ohms and drive it better. You only need the ULN2003 if you intend on using a non-logic-level MOSFET and a higher supply voltage (such as 12V) for the gate driver.

\$\endgroup\$
  • \$\begingroup\$ must have been a loose wire, now the motor turns. but it also never stops. a small pwm program from a avr that has a duty cycle of 5second 50% and 5 seconds 0% only makes the motor go slower but not stop. in between the motor keeps spinning up and down - irregular intervals. according to the datasheet the threshold voltage of the mosfet is min: 1.35v but the ULN2003a Uce sat voltage is typ: 1.2v. so looks like these components do not match well. is there a easy way to get rid of some volts? i could place a resistor in series, but without knowing the motors resistance - which one to choose? \$\endgroup\$ – James Baker Mar 21 '16 at 19:11
  • \$\begingroup\$ What you should be getting rid of is the ULN2003. You don't need it. Also, its inverting the control signal to your MOSFET, so what you think is 0% duty-cycle is actually 100%. So what you'll be seeing with your current circuit is 5 seconds at 50% and 5 seconds at 100%. Sound familiar ... ? \$\endgroup\$ – brhans Mar 21 '16 at 19:23
  • \$\begingroup\$ ah yes the inverted output signal got me. with a IRF3205 it works fine now. probably with the other one too. thank you very much. \$\endgroup\$ – James Baker Mar 21 '16 at 19:25
  • \$\begingroup\$ You're only switching 500uA with the output, so the low output voltage won't be anything like 1.2V. More like 0.7V at room temperature, which is why I didn't comment on it. But you don't need the driver. \$\endgroup\$ – Spehro Pefhany Mar 21 '16 at 19:31
  • \$\begingroup\$ yes for 35ma motor a driver is not needed. but what about high frequency pwm. isnt current like: i=Gate Charge/time to switch on? wouldnt that "strain" a avr output over the long run? as far as i understand it mosfets can come on very quickly, like 81ns for the irlb8743 (charge: 146nC)which would be 146nC / 81ns = 1.8A? so for a short ammount of time the avr would need to provide maximum current which is like 40ma(short term) for one pin? \$\endgroup\$ – James Baker Mar 21 '16 at 19:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.