Re: Calculating resistors required
From: Danny T (danny_at_nospam.oops)
Date: 12/31/04
- Next message: Danny T: "Re: Calculating resistors required"
- Previous message: BobGardner: "Re: How to build a microwave gun ? ? ? ? ?"
- In reply to: Anthony Fremont: "Re: Calculating resistors required"
- Next in thread: Danny T: "Re: Calculating resistors required"
- Reply: Danny T: "Re: Calculating resistors required"
- Reply: Anthony Fremont: "Re: Calculating resistors required"
- Reply: Peter Bennett: "Re: Calculating resistors required"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 31 Dec 2004 16:30:27 +0000
Anthony Fremont wrote:
> Or, as you should probably do, you could use a linear voltage
> regulator with a low dropout.
Excellent. I'm just looking @ Rapid Electronics, and they seem to be
available in lots of different packages! Some look like ICs, and some
have 3 legs. How do I figure out what I need?
http://www.rapidelectronics.co.uk/rkmain.asp?PAGEID=20671&CTL_CAT_CODE=30416
> You *will* want to use resistors to limit the current thru your LEDs,
> otherwise the PIC will attempt to supply a very large amount of current
> to the LED. This is likely to result in damage to the LED and/or the
> PIC output pin circuitry. (you can kill a PIC one pin at a time) LEDs
> (like most diodes) are not voltage controled devices, they need current
> limiting or they will burn out.
Righto. I've seen a formular for figuring out what resistors I need for
LEDs as:
1000 * (supply.voltage - voltage.needed) / current
Does this look right? And is this for LEDs only, or can it be used for
other things too?
> The goal is to never have an input pin in a "floating" state. They are
> suggesting that you use a pull-up resistor on the pin so that when the
> switch isn't closed(pressed), the input pin sees a logic 1 (+5V) via the
> juice feeding thru the pull-up. Then you have the switch so that it
> shorts the pin directly to ground when pressed. The pull-up resistor
> will limit how much current is flowing to ground, and the input pin will
> "see" a logic 0. This way, the input pin is always connected to a
> voltage reference of 5V or 0V.
My only question here, is that a switch would then give logic 0. I
thought it would be reversed, and a 1 would mean the switch is pressed.
Is that the usual way of doing things?
> You would want to use a transistor for this. For highish currents (like
> motors), I suggest looking into the wonderful and inexpensive
> logic-level n-channel MOSFETs. These are used allot like generic NPN
> transistors, but have extremely low "on resistance" (milliohms usually).
> The logic-level part means that you can connect the gate (base equiv)
> directly to the PIC output pin and you don't even need a current
> limiting resistor going into it since the MOSFETs gate input impedance
> is really high. You connect the source pin (emitter equiv) directly to
> ground. You stick your load (motor, lights, electric-chair or whatever
> ;-) between the drain pin (collector equiv) and your +6V supply. When
> the gate is high (+5V) the motor will run at full speed, when it's low
> (0V) it will be turned fully off.
Right - getting somewhere now! :)
So, for a circuit with two switches, one driving an LED and one driving
a motor, would this be correct? (I know the PIC is redundant, since the
inputs directly drive the outputs, but this wouldn't always be the case!)
Excuse the bad ascii, I've never used that program before!
VCC
+
|
o----------o-------o----------o----------------------o---------
| | | |
| | | ,---.
| | | | X | MOTOR
| | | PIC '---'
| | | + __ - |
.-. .-. '-o| |o---------------)------.
R | | R | | '-------o| |o--------. | |
| | | | | .----o| |o-----. | | |
'-' '-' | | .o|__|o--. | | | |
| '----' | | | .-. | ||-+ |
| | | | | | | | ||<- MOSFET
|-------)-------' | | |R| '---||-+ |
| | | | '-' | |
| | | | | | |
| | .-. .-. '---. '--. |
| o | o R | | R | | | | |
|=|> |=|> | | | | ,---. | |
| o | o '-' '-' | X |LED | |
| | Unused Unused '---' | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
o----------o-------o-----------o--------o------o--------o---o--'
|
===
GND
(created by AACircuit v1.28.4 beta 13/12/04 www.tech-chat.de)
Two switches on the left. Two pins unused, one LED, and one motor. That
right?
Many thanks,
-- Danny
- Next message: Danny T: "Re: Calculating resistors required"
- Previous message: BobGardner: "Re: How to build a microwave gun ? ? ? ? ?"
- In reply to: Anthony Fremont: "Re: Calculating resistors required"
- Next in thread: Danny T: "Re: Calculating resistors required"
- Reply: Danny T: "Re: Calculating resistors required"
- Reply: Anthony Fremont: "Re: Calculating resistors required"
- Reply: Peter Bennett: "Re: Calculating resistors required"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|