PWM A Dc Motor W/Seperate Supply

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...

Reply to
Chris
Loading thread data ...

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?

Reply to
John Popelish

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

Reply to
Chris

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

Reply to
Chris

(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.

Reply to
John Popelish

Do you have access to a digital camera? Email me a photo of the circuit when it doesn't work.

Reply to
John Popelish

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.

Reply to
John Popelish

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 ?!?

Reply to
Chris

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
Reply to
Jamie

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.