Shop OBEX P1 Docs P2 Docs Learn Events
Basic stamp 2: How to — Parallax Forums

Basic stamp 2: How to

soniquesonique Posts: 15
edited 2010-07-14 20:27 in BASIC Stamp
Hey Guys,
there is a problem very hard for my understanding.
Nowadays, I read BS2 manual but I didn't found a question to my dilemma:

How·can I·computate the number of external peripheral I can connect to pin-out?

I don't use on-board regulator but external regulator 78L05, generally I use a 9V battery to power my BS2 and some other peripheral like LED, SFR05, BUTTON, several SENSORS. For example, the servo are connect with other 6V battery package.

Some suggestion? Some answer?

Thanks

Daniele·

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2010-07-14 13:32
    A typical 9-volt battery "transistor" battery is limited in capacity. So is a 78L05.

    The way you compute this is by finding out what current the external peripherals take. Worst case, put an ammeter in the line to the devices, most Digital Volt-Meters (DVM) will act as ammeters.

    An external 6-volt battery for your servo's is a very good idea -- make sure the grounds of the 9-volt and 6-volt packages are connected together.
  • soniquesonique Posts: 15
    edited 2010-07-14 13:45
    Thanks Allane for the response,

    What is a transistor battery?

    78L05 supplies about 1A.

    Then, if I compute for everyone peripheral the current absorption, I have to sum the current?
    What is the total current that BS2 can suppplies?
    What is a ammeter idea.gif·, I try to translate in italian but don't find the transaltion freaked.gif

    If I want use a dedicated supply for sensors, then I must connect the GROUND of every other battery package with BS2 ground?

    Thanks a lot

    Greetings from Italy·
  • Mike GreenMike Green Posts: 23,101
    edited 2010-07-14 14:03
    1) "transistor battery" - a 9V battery, originally intended to power a radio using transistors, now used for other things as well.

    2) No. A 78L05 is limited in power because of the small case and lack of heat sink. It can supply at most 100mA.

    3) The BS2 can supply approximately 50mA at 5V. Some of the 50mA is used by the BS2 itself.

    4) it.wikipedia.org/wiki/Amperometro

    5) Yes, you must connect all the grounds in your circuit (it.wikipedia.org/wiki/Messa_a_terra).
  • soniquesonique Posts: 15
    edited 2010-07-14 15:04
    Great Mike,

    1) Thanks for historical explanation blush.gif

    2) OPS!!!!! 100mA not 1A. OK

    3) Great point·is it·Mike,·can you explain better? Do you speak about sink/source current? But 50 mA totally? Or 50 mA on every pinout?



    Thanks
  • hover1hover1 Posts: 1,929
    edited 2010-07-14 15:10
    Follow the link to this page:

    http://www.parallax.com/ProductInfo/Microcontrollers/BASICStampComparison/tabid/436/Default.aspx

    and click on the Basic Stamp in question. It will tell you the current per pin and total current per 8 pins.

    Jim
    sonique said...
    Great Mike,

    1) Thanks for historical explanation blush.gif

    2) OPS!!!!! 100mA not 1A. OK

    3) Great point is it Mike, can you explain better? Do you speak about sink/source current? But 50 mA totally? Or 50 mA on every pinout?



    Thanks
  • soniquesonique Posts: 15
    edited 2010-07-14 15:17
    Thanks Hover,
    Put here that values:

    attachment.php?attachmentid=74077

    There is a problem!!! smhair.gif

    I'dont know how I can interpret them shocked.gif·····
    417 x 55 - 2K
  • Mike GreenMike Green Posts: 23,101
    edited 2010-07-14 15:20
    50mA is what the Stamp's voltage regulator can supply. When you connect power to Vin, the regulator provides a source of regulated 5V for powering the circuitry on the Stamp module. Any current supplied by (sourced by) the I/O pins is also provided by this regulator. Current absorbed by (sinked by) the I/O pins doesn't count against the regulator's output. You can leave Vin unconnected and provide your own regulated 5V supply to Vdd. In that case, the 50mA doesn't apply.

    The I/O pins themselves have limits. The Stamp comparison chart (www.parallax.com/tabid/436/Default.aspx) gives the limits for each of the Stamp models.

    There is a maximum amount of current that can be provided from each I/O pin (to ground - sink or to Vdd - source). There is also a maximum amount of current for each group of 8 I/O pins (P0-7 / P8-15) and a maximum amount of current for the whole processor.

    Post Edited (Mike Green) : 7/14/2010 3:26:31 PM GMT
  • soniquesonique Posts: 15
    edited 2010-07-14 17:06
    Oh Thanks Mike, then please, can you verify my understanding?

    - Every pinout of the stamp can supplies 30 mA for basic stamp 2e.
    - Every pinut can absorbe 30 mA for external peripheral

    I use an external regulator, then I take this 30 mA from my regulator.

    Now, if I want connect anything to pinout I must know how much current it takes (source current) and I can't over 30 mA.
    But if I connect a peripheral to pin in input configuration, I can't over 30 mA (example: Temperature sensor).

    It's Right?

    Now, what mean that Pins 0-7 and Pins 8-15 source 60 mA and sink 60 mA?

    For example, if I put on pin1 and pin2 two peripherals in whic one take 15 mA and other take 30 mA, then the current supplies from my regulator is 15 + 30 = 45 mA?
  • allanlane5allanlane5 Posts: 3,815
    edited 2010-07-14 18:43
    Each pin can source or sink 30 mA. But the device as a whole can only source or sink 60 mA total.
    So, you could do two pins at 30 mA == 60 mA,
    or three pins at 20 mA each == 60 mA,
    or six pins at 10 mA each == 60 mA,
    or... I think you get the picture.

    Now, the BS2 pins were not really designed for POWERING things. That "source or sink" specification is so you could use the I/O pin to drive a signal over some distance like 50 feet. "drive a signal", not "power some other device". Though it's handy for driving LED's directly (through a current limiting resistor) too.

    So, typically, you'd have some regulator to provide power. You'd connect the BS2 to Vdd(+5) and Vss(ground). You'd attach your other devices to +5 and Ground. Then you'd route signals between the BS2 I/O pins and your device signal pins.
  • soniquesonique Posts: 15
    edited 2010-07-14 20:27
    Great!!!!

    I think that I'wouldn't have problem with for four DC motors (whit Driver motor --> use only one serial pinout ), 2 SERVO (2 pinout), 1 LCD (1 serial pinout I think), some sensors (light, temperature, nearness, SFR04), 1 fox board, some LED with high resistence...right?
    Obviously, I use external regulator, power supply for DC motors and servo (6 V) and 9 VOLT for BS2 and SFR04 and I think LCD.


    Whato do you think?
Sign In or Register to comment.