Shop OBEX P1 Docs P2 Docs Learn Events
Basic Stamp 2 Board of Education output pins — Parallax Forums

Basic Stamp 2 Board of Education output pins

gtmeloneygtmeloney Posts: 13
edited 2010-01-08 15:15 in BASIC Stamp
I've been programming with the Basic Stamp 2 BOE for several months now and have run into a situation that I can't explain. I'm trying to use the BOE with a pair of bluetooth modules and the DS1620 temperature sensor to monitor the temperature in a bedroom. Everything works great except recently the bluetooth module has stopped powering up when I power it through the output pin (I do something like: BT_PWR PIN 1·... HIGH BT_PWR). This used to work, but now for some reason it does not power up the module. If I wire the module directly into VDD then it works fine.

I wired an LED up to pin 1 and it did light as expected. My question is: is it possible that the BOE is not outputting enough amperage through the output pin to power my bluetooth module? Furthermore, why did the module previously power up when wired through the output pin?

I believe that powering through VDD suffices to·show that the module is functioning just fine.

**note: I checked the voltage through the output pin and it was ~ 5 volts.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-01-07 05:20
    The issue you're running into is that the Stamp I/O pins have a limited ability to furnish current. The BS2 uses a PIC microprocessor that can supply about 20mA maximum from an I/O pin. I suspect that the Bluetooth module needs more than that. Who knows why it worked for a while. Maybe you changed something. There are overall current limits for the whole microprocessor and for each group of 8 I/O pins (like 0-7 and 8-15 ... 40mA per group).
  • gtmeloneygtmeloney Posts: 13
    edited 2010-01-07 06:29
    Thanks Mike,

    I suspected that something like that was going on, so I elminated everything else from the BOE and still, no luck. Is there a workaround for this?
  • James LongJames Long Posts: 1,181
    edited 2010-01-07 06:32
    gtmeloney said...
    Thanks Mike,

    I suspected that something like that was going on, so I elminated everything else from the BOE and still, no luck. Is there a workaround for this?

    Yes there is,

    You could put a mosfet to use as an electronic switch for the bluetooth module. That way you could power it up whenever you needed to with the stamp.

    James L

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James L
    Partner/Designer
    Lil Brother SMT Assembly Services

    Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
  • gtmeloneygtmeloney Posts: 13
    edited 2010-01-07 08:01
    Thanks James,

    That does the trick.
  • gtmeloneygtmeloney Posts: 13
    edited 2010-01-07 22:02
    I did some research today and found the datasheet for the bluetooth module. The manufacturer claims that it only draws 3 mA when powered on and not connected to another module. 3 mA does not sound like too much for the BS2 (I found some documentation that said the BS2 can handle 20 mA at each output pin). If the BS2 can put 20mA to each pin and I only need 3mA, then why wouldn't the bluetooth module power on?

    **Note: my problem has been solved by way of a transistor, but I'm curious as to why I really needed the transistor for my setup.

    Thanks
  • allanlane5allanlane5 Posts: 3,815
    edited 2010-01-08 15:15
    So, how much does the Blue-tooth draw when it IS "connected to another module"? I assume it's way higher than 3 mA.

    It could also be your batteries are tired.

    And yes, you really should NOT power external chips through the BS2 I/O pins.· They source and sink that much current so they can be used for various I/O purposes that require more than a few milli-amps.· But pulling too much current through them will destroy the I/O pin drivers -- and when you're powering a chip, you don't have a lot of control over how much current it pulls.
Sign In or Register to comment.