Shop OBEX P1 Docs P2 Docs Learn Events
Hi newbie question about electronics — Parallax Forums

Hi newbie question about electronics

cameroncameron Posts: 33
edited 2008-05-18 00:20 in Learn with BlocklyProp
Hi here is my issue sorry I am really new at this. I have a basic stamp with a power supply running at 5Volts DC with 50mA.

How can I reduce my current but keep the 5volts. I was going to use a resistor but then I thought if I resisted the current it would also resist the voltage. Is this correct how should I go about this thanks.

Cameron.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-13 15:36
    I assume that you've measured the current and that's where you got the 50mA figure. I also assume that you would like to reduce the amount of current drawn, probably because you're running the Stamp off batteries and you'd like the batteries to last longer. You are right about a resistor reducing the voltage as well as the current.

    When the Stamp is running at full speed it requires some tens of mA to work. You can't really reduce this although you can make the Stamp shut down for periods of time and reduce the average amount of current drawn. Keep in mind that any I/O (like LEDs) attached to the Stamp will draw current and that will add to the current needed by the Stamp. You'll need to switch off any external devices like LEDs when they're not needed unless they already drop into low power mode when they're not in use.

    Look at the chapter in the Parallax Basic Stamp Manual on the NAP and SLEEP statements. These will put the Stamp to sleep for a specified period of time and reduce the amount of current drawn to microAmps for that period of time. If the Stamp spends most of its time asleep and only wakes up occasionally to check the status of pushbuttons or other sensors, then the average amount of current used will be much lower than the 50mA you mentioned.
  • cameroncameron Posts: 33
    edited 2008-03-13 15:40
    HI Mike,

    I'm sorry I don't think I explained my self very well.

    The power is coming from a power supply that is supplying somewhere between 50mA to 80mA at 5Volts Direct Current I read that the BS2 shouldn't take more then 40mA. So I need to bring down the amps without effecting the voltage.

    I hope this makes more sense.

    Thanks for your quick reply by the way your super fast [noparse];)[/noparse]

    Cameron.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-13 16:03
    I still don't understand quite what's going on. A BS2 (not some other BS2 model like the BS2pe) should only draw 3mA by itself. Like I said, anything you connect to it will take some additional current. Any individual I/O pin can supply about 20mA to its load (like an LED) and each group of 8 I/O pins can supply a total of 50mA. The whole chip can't draw more than 100mA. More than that and the current could burn out the microscopic wiring on the chip. If you're trying to control some external device that draws more current than that, you need to use an external transistor to control the device while the Stamp just has to control the transistor.

    There's a section in the Industrial Control tutorial around page 90 on this subject (download link here: www.parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/List/1/ProductID/309/Default.aspx?txtSearch=industrial+control&SortField=ProductName%2cProductName).
  • David H.David H. Posts: 78
    edited 2008-03-13 16:03
    I believe you should be able to use this with the stamp with no problem because of the 50mA-80mA rating. The stamp will only use what it needs, and this rating is only the Available mA. Anyone else, please correct me if I'm wrong.
    Good luck with the projects.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    David


    There are 10 types of people in this world,...
    Those that understand binary numbers, and those that don't!!!
  • cameroncameron Posts: 33
    edited 2008-03-13 16:27
    Hi Mike,

    Thanks for the information I was under the impression that I cannot send anymore then 40 mA to the Basic Stamp 2 but from what you are saying to me its okay as long as the input current going into the basic stamp does not exceed 100mA.

    Is that correct in what you are saying?

    Thanks,

    Cameron.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-13 16:31
    Please read my posting again. The details matter and those current ratings are absolute maximums.
    How about explaining what you want to do? You'll get much better information and advice if you give details.
  • cameroncameron Posts: 33
    edited 2008-03-13 16:36
    Thanks David, so is 100mA the official maximum you can put into a basic stamp what pins would you connect for a +5v regulated power supply
  • cameroncameron Posts: 33
    edited 2008-03-13 16:39
    Hi Mike,

    Okay maybe I am getting confused. sorry about this

    I do not want to do anything with the basic stamp at the moment apart from power the basic stamp. I do not want to do anything with the output pins the only thing i want to do is power the chip.

    The power supply I have outputs 5 volts direct current at 80mA. If I plug this into my Basic Stamp 2 will this fry the chip?

    Thanks,

    Cameron
  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-13 16:56
    OK, that makes your question clearer. David is correct in that the Stamp draws only as much current as it needs to function.
    Typically this is 3mA plus whatever is drawn by stuff connected to the Stamp. The power supply's current rating is a maximum.
    It actually supplies only what is required by the load (the Stamp and anything connected to it). You could use a power supply
    rated for 1A or 5A or 20A and the Stamp would still draw only what it needed. Again, the power supply rating is a "maximum
    allowed" value.

    Your power supply is regulated and its output voltage is +5V which is what the Stamp requires ... Check!

    You are going to connect this +5V to the Vdd pin of the Stamp which is where a regulated +5V supply gets connected ... Check!
    You are also going to connect the ground terminal of the power supply to the Vss (ground) pin of the Stamp ... Check!

    The power supply needs to be able to produce at least as much current as the Stamp requires (50mA maximum > 3mA actual) ... Check!
    The power supply needs to be able to produce enough current for any external devices connected to the Stamp ... ????? you have to figure this

    By the way: The Stamp does include its own voltage regulator. You can connect an unregulated DC power source in the range 6-12V to the Vin pin (and Vss/ground) and the built-in regulator will produce +5V for you which comes out the Vdd/+5V pin. This regulator is limited to 50mA and will overheat and shut itself off for protection if you try to draw more current than that through it.

    Post Edited (Mike Green) : 3/13/2008 5:04:41 PM GMT
  • cameroncameron Posts: 33
    edited 2008-03-13 17:17
    Thanks Mike,

    Your answered my question great! Thanks for your time! but for future reference. What could you do to drop the current down but not the voltage is the way to do this?

    Thanks,

    Cameron.
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2008-03-13 17:36
    Most device consume a certain amount of power, which is the supply voltage and the current they draw. They only draw as much as they need to operate. To some devices, this power and current can be reduced by putting them into a low-power mode, such as sleep or standby.

    One of the few devices you need think about how to reduce the current they draw is the LED as it doesn't resist current flow. A normal LED needs around 20mA of current to be very bright. Based on 5V, to limit the current to 20mA (0.2 A), we can find the size of the resistor needed: R = V / I = 5V / .02A = 250 ohms.

    Also, if you have a pull-up or pull-down resistor on a switch (a resistor between +V and ground), the resistor will need to be sized to limit the current flow.

    But, again, in general, a circuit draws the current it needs to operate on and we shouldn't restrict that current flow, though HOW we design the circuit sometimes comes into play.

    Good luck! You'll be learning a lot!
    -Martin Hebel

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    SelmaWare Solutions - StampPlot GUI for controllers, XBee and Propeller Application Boards

    Southern Illinois University Carbondale, Electronic Systems Technologies

    American Technical Educator's Assoc. Conference·- April, Biloxi, MS. -- PROPELLER WORKSHOP!
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-03-14 13:09
    To simplify even further:

    1. A BS2 will take 6 to 12 volts on the "Vin" pin. It has a voltage regulator to drop this voltage to the 5 volts the on-module electronics needs. The BS2 will 'sip' only as much current as it needs to operate.

    2. You CAN drive the BS2 with 5 volts between Vdd (+5) and Vss (Ground). The BOE has an onboard regulator which does this. Again, the BS2 will 'sip' only as much current as it needs to operate.

    3. In general, most electronic devices are "voltage" devices. This means you put a specific voltage across them, and they 'sip' the resulting current. The equation which describes this for resistors is "V = IR", or "Voltage == Current * Resistance". Actually, it's "Current == Voltage / Resistance" (which is the same thing).

    4. So, the only thing you need to worry about in your power supply is, "Is it the right voltage?", and "Is it too weak?". If your supply can't give ENOUGH current at the rated voltage, then the voltage will drop, and your BS2 will detect that loss of voltage and 'reset' itself. This means you don't WANT to limit the current, the device itself will only 'sip' what it needs if the voltage is correct.
  • cameroncameron Posts: 33
    edited 2008-03-14 13:30
    Thats perfect allanlane5 thats exactly what I need to know does this in general apply to most micro controllers because one time on an SX i tried to send a high output from a pin but the current requirement was too high and it blew the chip

    So basically the circuit tried to take too much current out of the port.

    Thanks,

    Cameron
  • P!-RoP!-Ro Posts: 1,189
    edited 2008-05-18 00:20
    I did that with a BS2 once, it made me mad. It blew out pin 0, then, in my stupidity, I did it again destroying the devise. Now, it plays the same song over and over and over again very quietly. I tryed re-programming it, but it doesn't work anymore.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The Pi Guy
Sign In or Register to comment.