Hi, I'm using a pic a npn resistor and diode to drive a small dc motor, everything works fine if i feed the motor the same + supply as the pic but when i change the + supply for the motor it's always on, all the ground is the same basically i want to power the motor before my 7905...
PWM A Dc Motor W/Seperate Supply
Nov 23, 2006
8 Replies
Doesn't make sense that it works as you describe. Something is miswired. Did you reconnect the motor diode to the higher positive supply? Do you have a bypass capacitor between the NPN emitter and the positive supply connection of the motor and diode?
Got a schematic?
Nope don't got this .... what would you suggest?
Do you have a bypass capacitor between the NPN emitter and the positive supply connection of the motor and diode
2n3904 base wired to ground on breadboard, emitter to ground on breadboard collector to motor gound
motor wired to +12v before regulator diode towards + supply
if i wire it after the regulator it works, but if i wire it before the regulator it doesn't
really strange
(snip)
I think it should be perfectly workable if you connect a diode across the motor) cathode end to the supply).
The purpose of the bypass capacitor is to provide a small local charge storage right at the point where the PWM driver will consume current pulses, so that the wiring inductance back to the source (especially the ground leg) doesn't develop high frequency ringing on each edge, that could upset the micro. I would probably use a 100 uF to 470 uF electrolytic.
Do you have access to a digital camera? Email me a photo of the circuit when it doesn't work.
Are you sure you have not reversed the emitter and collector. This will work (at reduced gain) at 5 volts, but the emitter to base junction breaks down around 6 volts, and won't hold back higher voltage. Looking at the flat side, with the leads going down, the order is E B C.
Humm I thought
collector -> motor - emitter -> ground base res pic
according to the 2n3904 datasheet if yur looking top down with the curve facing you you have collector base emitter, but if i flip it around it works as it should ?!?
you have it wired incorrectly.
Connect one pole to the voltage source you want to run the motor on. Connect the other pole to the collector of a driver transistor. The Pic will PWM the transistor by pulling the series load via the motor to common. This way, your percentage of duration from the PIC will be the percentage of your source voltage for the motor.
"I\'m never wrong, once i thought i was, but was mistaken"
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required