On capacitors and Transistors

I have been running through Jeremy Blums arduino tutorials and find the programming aspect very easy to comprehend however, I struggle with the actual EE application. I am on tutorial 5 and am working towards powering a simple dc motor. The video shows a pnp transistor being used with a 1k resistor running between the base and the wiring to pin 9 on the arduino. On the collector a 1uf capacitor is used as well as a diode. My question is how do capacitors differ in applications such as this? What would happen if I tried to use a 220uf capacitor instead of just a 1uf? Would this burn out the transistor?

Capacitors in these circuits have several interrelated functions.

One function is to "store" some power from the power supply, so that if the motor temporarily needs more current, it can get it from the capacitor without attempting, and sometimes not succeeding, in getting it from the power supply.

A second function is to provide a low impedance path for high frequency signals coming into or out of the motor.

And a third function is to provide a place for current to go to, when the motor current suddenly stops or reverses for some reason. The motor coil being an inductive component, when the supply voltage is removed, the motor current cannot stop instantaneously. It will decline rapidly and stop, but it cannot stop instantaneously. This current needs somewhere to go, otherwise it can create a high voltage which can damage other components. That is also what the diode connected across the motor terminals is for.

The size of the capacitor depends on all of these factors , as well as the size and voltage of the motor, and how you are driving it , like plain DC or PWM.

I am trying to control the speed of the motor using pwm and got the motor to run through my program loop successfully 2 or 3 times before it just stopped. My transistor was incredibly hot and as I said I was trying to use a 220uf capacitor when in the tutorial only a 1uf capacitor is used. For some reason (if not the capacitor) my transistor seems to be overheating. I have the positive of the motor going to the 9v supply being used and the negative going with the diode, capasitor, and collector terminal of the transistor (all of which are also run back to the positive of the 9v supply) The emitter end of the transistor is run back to ground.

I have the positive of the motor going to the 9v supply being used and the negative going with the diode, capasitor, and collector terminal of the transistor (all of which are also run back to the positive of the 9v supply) The emitter end of the transistor is run back to ground.

That does not sound right, though I can't be sure without a picture/diagram. With a PNP transistor, you would usually have the motor in between the transistor and GND. +V--ePNPc--Motor--GND (with the diode and cap across the motor for "noise removal", but not "logically" part of the circuit.)

http://jeremyblum.com/wp-content/uploads/2011/01/Episode-05-Schematics.zip
This is the schematics and im doing the one for the dc motor

KvotheComplex:
http://jeremyblum.com/wp-content/uploads/2011/01/Episode-05-Schematics.zip
This is the schematics and im doing the one for the dc motor

But that is not a PNP transistor in the schematic it is an NPN.

The video shows a pnp transistor being used with a 1k resistor running between the base and the wiring to pin 9 on the arduino.

But the diagram does not match.
You sure you got it right?
The value of the capacitor will not make much odds in this circuit and will not explain why your transistor is hot. It is hot because it is passing too much current for it. So get a smaller motor or a bigger transistor.

Nah thats my biggest problem is I am not sure that I have it right lol. I know that I have all the coding done correctly but the EE aspect of it is all foreign to me. I am sure the problem is in my wiring I am just not sure where. Sounds like it is in the way I have the diode, capacitor, and the collector end of the transistor hooked up. I have them all running with the ground wire of the motor and the other end of the diode and capacitor I have going to the positive of the motor.

So post a picture of what you have done and we will see if it matches with the schematic.

Also: what exact transistor are you using? (part number.)

The transistor is a p2n2222a transistor.
I will post a few more pictures as it is kind of hard to see. These pictures are all without the 9v battery plugged up.

20131208_181432[2].jpg

20131208_181439[1].jpg

will post one more.

20131208_181442[1].jpg

I'm sure it is some small newbie mistake I am making but I am still terrible with schematics.

20131208_181455[1].jpg

It is hard to tell but it looks like you have a short across that capacitor, both wires seem to be going I to the same track.

Well one side of the capacitor is run to the positive of the 9v rail. The other side is run horizontally across the board in line with the collector of the transistor, the ground of the motor, and the diode. The other side of the diode was run to the 9v rail. So yes both sides of the capacitor would be running to the positive on the 9v rail. Is the diode supposed to run to ground?

KvotheComplex:
I have been running through Jeremy Blums arduino tutorials and find the programming aspect very easy to comprehend however, I struggle with the actual EE application. I am on tutorial 5 and am working towards powering a simple dc motor. The video shows a pnp transistor being used with a 1k resistor running between the base and the wiring to pin 9 on the arduino. On the collector a 1uf capacitor is used as well as a diode. My question is how do capacitors differ in applications such as this? What would happen if I tried to use a 220uf capacitor instead of just a 1uf? Would this burn out the transistor?

In the schematic given the 1uF capacitor is mainly reducing RF interference by the motor
by "shorting out" the terminals at high frequency. Brushed DC motors potentially generate
sparks at the commutator and sparks generate a huge amount of noise at all frequencies
that usually interfere with radios, TVs, etc. The 1uF capacitor at RF frequencies is effectively a dead short, so that these transients are killed at source.

You are right to think that the cap value matters - if it was 220uF it would be a "dead short"
at lower frequencies (at which the transistor can operate), and be a large current load for
the transistor to drive. The value is a compromise and depends partly on how fast the
transistor can switch. I would personally chose a smaller capacitor, 10nF perhaps, allowing
PWM control of the motor.

The diode is there to catch the big inductive spikes when the transistor turns off, but the
capacitor will also be helping a little. With a suitably sized resistor and capacitor "snubber"
circuit you can do away with the diode - necessary for an AC motor of course.

MarkT:

KvotheComplex:
I have been running through Jeremy Blums arduino tutorials and find the programming aspect very easy to comprehend however, I struggle with the actual EE application. I am on tutorial 5 and am working towards powering a simple dc motor. The video shows a pnp transistor being used with a 1k resistor running between the base and the wiring to pin 9 on the arduino. On the collector a 1uf capacitor is used as well as a diode. My question is how do capacitors differ in applications such as this? What would happen if I tried to use a 220uf capacitor instead of just a 1uf? Would this burn out the transistor?

In the schematic given the 1uF capacitor is mainly reducing RF interference by the motor
by "shorting out" the terminals at high frequency. Brushed DC motors potentially generate
sparks at the commutator and sparks generate a huge amount of noise at all frequencies
that usually interfere with radios, TVs, etc. The 1uF capacitor at RF frequencies is effectively a dead short, so that these transients are killed at source.

You are right to think that the cap value matters - if it was 220uF it would be a "dead short"
at lower frequencies (at which the transistor can operate), and be a large current load for
the transistor to drive. The value is a compromise and depends partly on how fast the
transistor can switch. I would personally chose a smaller capacitor, 10nF perhaps, allowing
PWM control of the motor.

The diode is there to catch the big inductive spikes when the transistor turns off, but the
capacitor will also be helping a little. With a suitably sized resistor and capacitor "snubber"
circuit you can do away with the diode - necessary for an AC motor of course.

Can you see anything in the wiring that might be causing me grief or do you think it is just the capacitor. I find it odd that one end of the capacitor goes to the positive on the 9v rail and the other end runs between the collector and the diode with the diode also going back to the positive rail? Should the diode be running to the ground here? Or is this set up correctly but not running properly due to the bigger capacitor I have tried to use?

I'm hitting a radioshack in the a.m and will pick up some new transistors and caps. After I experiment a little more tomorrow hopefully I can give a sure fire answer to what is going on with it. Until then, I just built myself an automated night light that flashes leds like lights on an emergency vehicle lol. Just to occupy my time today

Hey guys after building a circuit to run the dc motor with a digital output after a light sensor detected that the lights were off ( I had done this with leds already) I reset up the motor to run with PWM and I am still unsure as to what I had wrong the first time I set this up but I must be getting better with schematics because the motor is running fine now lol. I am still using a 220uf cap and everything is working fine. Wanted to let everyone know this was resolved and working fine for me now. Just had to rewire it and understand the schematics better. Thanks for all the help guys!!

Well done. :slight_smile: