Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

New Member - Bunch of questions :D

Status
Not open for further replies.

Peter_wadley

New Member
Hi all,

Ive been a guest to this website for a while and I thought it is time to make a thread of my own!

I have been in my own little world of circuits for the last year and have learned a good amount of things that will help make next year alot easier as I am going to university for computer engineering in September.

Here are a few questions which are all fair game in this thread:

1) How much current can AAA,AA,9V,D and C batteries shell out, will they over heat and leak acid if they are overloaded? Can I run a 6.3v .25amp lamp with maybe 4AA batteries in series? (its for a fridge light)

2) Right now I am training with the PIC16F84a, I wanted to run a small DC motor from one of the PIC's outputs so I used the output, which has a low current capacity (20ma?), to switch a power transistor on which in turn powered the motor.

Problem: The output which I used to turn the transistor on now only reads @ 1V... even after reprogramming the PIC.. Did I overload and kill the output?? Note: this has happened to 2 seperate outputs on 2 seperate PIC's :mad:

To find the output - transistor base resistor I calculated:

5v-.7= 4.3v ;since transistors turn on when the base has a voltage of .7v I needed a resistor which will take 4.3v of the 5v's coming out of the output.

Since I didnt want to pull more then 20ma and kill the pic I chose a resistor value that would take the 4.3v at 5 ma..

V=I*R
R = V/I
R = 4.3v/.005
R= 830

So, I used a 860:eek:hm: resistor.

This went to the base of an NPN TIP31C power transitor.

The emitter went to ground and the collector to one lead of the motor (other lead went to 5+)

Did I mess this up and ruin the pic output?

3) I would like to try and use an infrared reciever as a switch for the pic. Is this possible? Ie IR ray is directed over the IR reciever input goes 1 or 0 - motor goes on.

Thanks all,
Peter W
 
1) Four AA batteries will have no problem powering your 6.3V bulb but you might want to consider using LEDs as they're more efficient.


2) The value of base resistor is determined by the motor current. To ensure the transistor is fully turned on the base current needs to be 1/10th of the load current.

Suppose your motor requires 1A:

Ib needs to be 0.1A therefore:
[latex]Rb = \frac{5-0.7}{0.1}=43 \Omega[/latex]

The only problem is your PIC can't supply more than 20mA so you need to use another buffer transistor.

I wouldn't bother though, I would use a MOSFET like the IRL540 that doesn't require any drive current. All you need is a small 10:eek:hm: resistor in series with the gate to prevent oscillation.

3) Easy, you can buy infrared phototransistors fairly cheaply and infrared recievers are even beter for remote controlled applications.
 
Hi Hero,

Thanks for replying!

1) Can you go into a bit more detail regarding buffer transistors and MOSFET (I know nothing about MOSFET)

ok the motor is being driven at .30 amps (300ma) @ 5v

300/10 = 30ma

So what your saying is that I tryed to pull 30ma out of the 20ma(max) pic, right

Good news, the pics arent damaged after using a different .asm I was able to get them back to normal.


2) I do have an emitter and reciever pair of IR LEDS - Could you please describe how the reciever would be used to switch the pic inputs on/off. 1/0


Thanks
 
Go to www.energizer.com and click on Technical Info at the top of the first page.
On the second page on the left, select the battery type then select which battery to see its detailed datasheet.

Each datasheet shows the battery voltage dropping with amount of load current and how long it lasts.

Four alkaline cells start at about 6V then drop to 4.8V fairly quickly. Then the voltage drops slower until the cells are considered to be dead when their total voltage is only 4.0V.

The 9V alkaline battery has tiny AAAA cells inside and is very weak.
AAA cells have double the capacity as AAAA cells. They are still fairly weak.
AA cells have 2.3 times the capacity of AAA cells.
C cells have 3 times the capacity of AA cells.
D cells have 2.5 times the capacity of C cells.
 
Great Link! Thanks Guru!

Hero,

Since the base of transistors need 1/10th the current going through the collector to the emitter is this accurate:

The motor is 5V with a current of .3A (300mA)

300mA/10 = 30mA

So basically I was telling the output to give me 30mA when really it could only shell out 20mA? right?

Goodnews, the PICS werent permentatly damaged! After reprogramming they fixed themselves.

I had no idea batteries could pump out 15+ amps!!!!!

Can anyone explain MOSFETS and BUFFER transistors (Hero was referring to them) I can find the information on WIKI but it is worded very complicated, well to me.

I do have 2 IR LEDS, 1 reciever and 1 emitter, can someone please explain how you would go about using the reciever as a switch for a PIC input?

I would really like to make a robot with my pic16f84a - I do however first need understand how NOT to fry my chips like this! So please any links or help with using the small currents from the PICS outputs to drive high current things such as motors would make my day!

Thanks
Peter W
 
Where PICs are concerned, you're best off having a look through Nigel's tutorials, there he explains all about things like IR and interfacing with transistors. Also, if you don't understand something there, you can ask him about it.
 
There are two types of transistor buffer, there's the darling ton pair and compound pair. The darlington has the advantage of being able to use the same type of transistor but suffers from a high voltage loss. The compound pair has a lower voltage loss but requires both PNP and NPN transistors.

Using a MOSFET is the best solution since it has virtually no voltage loss and requires no drive current from the microcontroller. The only disadvantage is MOSFETs are more sensitive to static electricity than BJTs.
 

Attachments

  • MOSFET1.GIF
    MOSFET1.GIF
    3.1 KB · Views: 170
  • DARLINGTON1.GIF
    DARLINGTON1.GIF
    3.1 KB · Views: 177
  • COMPOUND1.GIF
    COMPOUND1.GIF
    3 KB · Views: 174
Aren't totem pole drivers required for buffering? Those examples are really half buffers, they aren't able to sink and source to the load symetrically. For the Mosfet example, you'd need both and N and P channel (a half h-bridge)
 
I assumed the totem pole buffer was built-in to the PIC.

You don't need a full bridge unless you want both foward and reverse.
 
Hi all,

Thanks for helping me with this!

Except for RA4, which is an open collector/drain output.

What exactly is meant by this? This is the output I was using too! :|

Where PICs are concerned, you're best off having a look through Nigel's tutorials, there he explains all about things like IR and interfacing with transistors. Also, if you don't understand something there, you can ask him about it.

I will be checking out Nigels' site soon as I hear great things about it, everywhere.

There are two types of transistor buffer, there's the darling ton pair and compound pair. The darlington has the advantage of being able to use the same type of transistor but suffers from a high voltage loss. The compound pair has a lower voltage loss but requires both PNP and NPN transistors.

Using a MOSFET is the best solution since it has virtually no voltage loss and requires no drive current from the microcontroller. The only disadvantage is MOSFETs are more sensitive to static electricity than BJTs.

Ok, I have been researching MOSFETS and FETS. I Understand NPN completely - PNP - I dont know why but I can understand the difference between PNP and NPN

Is this the right idea?: NPN's need voltage of .6v on the BASE compared to the voltage on the EMITTER - when this requirement is met ELECTRON flow can go FROM the collector(+) TO the emitter (-)

Whereas PNP's turn on when there is a voltage of 0v on the base then... wait if PxP is Postive on both sides... see this is where I get confused :mad:. Out of all my questions, I know I have alot :), an explanation of the differences between NPN and PNP would be great!

MOSFETS - Metal oxide supplementary feild effect transistors? I understand somewhat..

Depletion: Works as a semiconductor resitor when no voltage is applied to the GATE

Enhancment: is pretty much just an NPN resistor that doesnt suck current with the GATE... which is ideal for microcontroller outputs?

Hero, If you could explain the darlington pair and compound pair buffers...

Where is the voltage lost in the darlington pair?

I dont see, maybe because I dont fully understand PNPs, how, if the output of the controller is 1 (5v), the motor would turn on.. Since the base of the pNp needs a voltage of 0V to turn on? right?

Thanks again to all of you who are demystifing electronics for others and I!!

Sorry for trying to cover such a large amount of information in one thread also!

Peter Wadley
 
Ok, wait a minute ... SO BJTs are just NPN and PNP transistor!!! All this time I thought they were a totally differenet type of semi!!

As for PNP if this is correct:

PNP transistors are commonly operated with the collector at ground and the emitter connected to a positive voltage through an electric load. A small current entering the base prevents current from flowing between the collector and emitter.

Then I understand now!
 
The base of a BJT transistor operates with current. The gate of a Mosfet operates with voltage.

When a small current is fed to the base of a BJT transistor its base to emitter voltage becomes about 0.7V (it is a diode) and its collector current can be much more than the base current. A PNP BJT transistor is the same as an NPN (with 0.7V from its base to its emitter when it has base current) except the voltage polarities are reversed.

The gate of a Mosfet doesn't draw current, except it has a high capacitance that takes current to charge it quickly.
A P-channel Mosfet is the same as an N-channel one except the voltage polarities are reversed.
 
audioguru said:
The base of a BJT transistor operates with current. The gate of a Mosfet operates with voltage.

When a small current is fed to the base of a BJT transistor its base to emitter voltage becomes about 0.7V (it is a diode) and its collector current can be much more than the base current. A PNP BJT transistor is the same as an NPN (with 0.7V from its base to its emitter when it has base current) except the voltage polarities are reversed.

The gate of a Mosfet doesn't draw current, except it has a high capacitance that takes current to charge it quickly.
A P-channel Mosfet is the same as an N-channel one except the voltage polarities are reversed.

Are MOSFET transistors generally expensive?
 
Not particularly. No more so than BJT's at least. As he said with the static comment though there are other design considerations. And there's more than just the gate voltage to worry about. There is actually a parasitic BJT (parasitic means something that acts just like the described device) inside of a Mosfet which can switch on if the drain source voltage is snapped on too fast causing the device to conduct. The gate drive voltage actually has a leakage current to take note of and the source-drain voltage directly effects the on resistance of the FET, make BJT's more efficient in high voltage applications.
 
Peter_wadley said:
I Understand NPN completely - PNP - I dont know why but I can understand the difference between PNP and NPN
Simply, PNPs work of negitive voltages and NPNs work from positive voltages, if you build a circuit using NPNs then swap them all for PNPs you need reverse any capacitors and diodes and the power supply for it to work.


Whereas PNP's turn on when there is a voltage of 0v on the base then... wait if PxP is Postive on both sides... see this is where I get confused :mad:. Out of all my questions, I know I have alot :), an explanation of the differences between NPN and PNP would be great!
No, an NPN transistor turns on when its base it 0.7V above the emitter and a PNP transistor turns on when its base is 0.7V below the emitter.


Enhancment: is pretty much just an NPN resistor that doesnt suck current with the GATE... which is ideal for microcontroller outputs?
You want an enahancement N channel MOSFET that turns fully on when the gate is 5V above the source.

Where is the voltage lost in the darlington pair?
0.7V plus the saturation losses or two transistors, therefore about 1.4V and more as the current increases, a compound pair looses just 0.7V.

I dont see, maybe because I dont fully understand PNPs, how, if the output of the controller is 1 (5v), the motor would turn on.. Since the base of the pNp needs a voltage of 0V to turn on? right?

The compount pair I've illustrated behaves like a large PNP transistor, connect the base to 0V in order for it to turn on.

Thanks again to all of you who are demystifing electronics for others and I!!
I am happy to help but some of these questions and be answered in more detail from Google.

https://www.google.com/search?client=opera&rls=en&q=MOSFET+tutorial&sourceid=opera&ie=utf-8&oe=utf-8
https://www.google.com/search?num=1...hs=UHB&q=darlington+pair+tutorial&btnG=Search
https://www.google.com/search?num=1...hs=NIB&q=compound+pair+transistor&btnG=Search
 
Hero999 said:
1)
I wouldn't bother though, I would use a MOSFET like the IRL540 that doesn't require any drive current. All you need is a small 10:eek:hm: resistor in series with the gate to prevent oscillation.

I picked up an IRF540 today and it is just what I was looking for.

The gate of a Mosfet doesn't draw current, except it has a high capacitance that takes current to charge it quickly.
A P-channel Mosfet is the same as an N-channel one except the voltage polarities are reversed.

There is actually a parasitic BJT (parasitic means something that acts just like the described device) inside of a Mosfet which can switch on if the drain source voltage is snapped on too fast causing the device to conduct.

Yes, I can tell there is a small charge delay when it is switched on.

When I was at the store I also picked up this IR RECEIVER (Picture attached)

The box did not have a schemtic of the reveiver so I do not know what each pin is for. Any guesses?
 

Attachments

  • PB290002.JPG
    PB290002.JPG
    234.8 KB · Views: 159
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top