BS2 : What would happen if i overload a programmable pin?
IceFirePro
Posts: 86
i.e. if i attach a LED that draws more than 20 mA ?
Would the board go broken, or would it just stuck, stop working, overheat? How do i know?
Would the board go broken, or would it just stuck, stop working, overheat? How do i know?
Comments
Second, the I/O pins have a couple of transistors on the chip behind the pin -- one to bring the pin "high", one to connect the pin to ground and bring it "Low". These transistors have a maximum rating they will supply before acting like a fuse and burning out. If you manage to burn one out (by attaching too low a resistance to it) it won't be able to pull that pin 'high' or 'low' (depending on which transistor you burnt out.)
You can still use the pin as an input, though.
If a frog had wings would his tail ever touch the ground?
If.
Do you understand Ohm's Law?
Note that many Stamps are rated to source 20 mA, yet they can sink 25 mA. That is, connect your load from a Stamp pin to Vdd instead of Vss. Then you turn your load on with a LOW command and turn it off with a HIGH command.
Bottom line, it would be a shame to wreck your $50 Stamp by drawing too much current. When in doubt, use the Stamp pin to switch a transistor (like a 2N2222) through a bias resistor, around 330 ohms. You can switch several hundred mA that way, even more with a power transistor or MOSFET.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
I aggree with Franklin, your questions are getting annoying.
You have some reading to do young man.
LOL!!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA
You can feel stupid by asking a stupid question or You can be really·stupid by not asking at all.
·
You can only run small wires to the key starter switch. There is not enough room to run big wires.
And they use a gizmo called a starter relay or solenoid which uses a small amount of electricity to switch the larger amount of electricity (current/amps) which the starter motor needs to run.
Same thing with a microcontroller. This has small wires in it and can only provide a little electricity. So you need to use an external gizmo like a relay, transistor, opamp, darlington chip, etc. to power things which use a lot of electricity.
You would use an amp meter (or ammeter), or the amperage setting on a multimeter to measure amperage.
Be aware that in addition to a "per pin limit", there is also a "per chip total limit". So you can't have too many things on with multiple pins all at the same time or you will overload the entire chip!
And be sure to check how much current things like relays use. Also be aware that a relay is a coil and when the power is turned off, this can create a large voltage which will zap a chip or transistor. So a "flyback diode" is installed "backwards" to protect the chip/transistor. More on that here...
http://www.physics.unlv.edu/~bill/PHYS483/relay.pdf
-What is the total-per-chip amperage for BS2 (It's not in the manual)!
-What components do I need in order to start off with, say, turning on the 50mA diode? Can I connect the diode directly to Vdd/Vss and turn it on via a transistor and some relay switch (what kind of)? I've been greatly helped with IR receiver, and as soon as I got a reply, I bought it and I'm learning how to include it in a program - so believe me, I'm not just popping out questions like crazy for nothing. Thanks!
Anyway no one was born knowing this stuff, so ask. I'll try to explain how you can find this information yourself.
Anyway many chips and electronic things have a "data sheet". Those are the key words. On these will be the electrical specifications. So search for a particular electronic component along with the term "data sheet" in quotes and that will hopefully find all the info for that part.
With that said, I looked through my Basic Stamp documentation folder and could not find a data sheet!
Perhaps I never copied it to my folder?
Anyway documentation for the Basic Stamp is scattered all over the place. I copied everything·I could find into a folder called Basic Stamp\Documentation.
Poke around the program files area and folders and look for pdf files. Then look in all other Stamp related folders to find all this stuff.
For finding documentation which you don't have, you can go to the Parallax store...
Click on the Parallax logo above and that will take you to the main Parallax page. Then click on Store. Then click on Microcontrollers. Then click on Modules. Then click on Basic Stamp 2 Module (if that is what you have).
Then on the lower right it says...
[*]Source/Sink Current per unit: 40 mA / 50 mA per 8 I/O pins.
Further down is documentation you can download. I clicked on Basic Stamp Documentation and don't see a data sheet listed...
...but I do see "BASIC Stamp Technical Comparison" and on this is the same information as above.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Then Radio Shack has all sorts of components like resistors, diodes, transistors, relays, LED's, etc.
Or you can buy these online. Search for the terms...
electronic components cart
The word·"cart" refers to the word in "shopping cart", so adding the word cart will hopefully give you a search with more stores where you can buy things. Many electronic things have all sorts of technical discussions on the internet, so searches for electronic things will find all sorts of non-shopping pages.
Then as said above, there are data sheets (or specifications) for electronic things. Here is a relay at Radio Shack. It says 90 mA, So WAY too much current!...
http://www.radioshack.com/product/index.jsp?productId=2062480
Here is a typical relay data sheet...
http://www.components.omron.com/components/web/pdflib.nsf/0/B9B1B32CFA49FCB185257201007DD585/$file/G6K_0609.pdf
Or a data sheet for a chip....
http://www.allegromicro.com/en/Products/Part_Numbers/6276/6276.pdf
As to setting up your own circuits,·I would advise going through the documentation for the Stamp and·find a circuit in·one of the books which will do what you want, then just wire it the way they have shown.
That would be the easiest. Otherwise there is a bit of math to all this. Might find a book or two on basic electronics. Look thtough the pages first and see if it is written in English or Einstein. If written in "Einstein", might want to find something easier to start out with!