Shop OBEX P1 Docs P2 Docs Learn Events
Powering the bs2 rev g — Parallax Forums

Powering the bs2 rev g

Rob311Rob311 Posts: 83
edited 2006-03-29 22:52 in BASIC Stamp
So I normally use the parallax boe usb for all my projects.· My latest project however does not have the required space for this carrier board.· I know I can buy smaller boards but I would much rather build it myself.·
My question is this:· How do I power the stamp?· Right now I have a 12v 1000mA ac => dc power supply plugged into the Vin and Vss pins.
While running my test program (blink an led) the stamp appears to keep resetting itself once the led turns on.
If I connect a 9v battery to the Vin and Vss pins the program works just fine.
Looking at the boe I see it has a 1000 micro f, 10v capacitor.· Will putting this into my circuitry allow for the stamp to not reset?
~Rob

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2006-03-26 22:29
    I'm going to assume that your DC adapter is NOT "regulated". Which is not a problem, as there IS a linear regulator on the BS2 itself, on the Vin pin. However, yes, you should have a 20 micro-F, 20 volt electrolytic in parallel with your Vin and Vss pin. That should filter enough 'ripple' from the unregulated input to let it work. Note the BOE uses a 1000 micro-F capacitor, because it could be feeding a much larger load (I believe the BOE regulator can drive 1 amp).

    I'm also assuming you're not using more than about 50 mA for your circuitry besides the BS2. The on-BS2 regulator is so small, it can't provide any more than that.

    If you DO need more than 50 mA, an inexpensive 7805 regulator and a couple of capacitors is all you need to drop the 12 volts down to a regulated 5 volts that you can feed into the BS2 "Vdd" pin.
    ·
  • Rob311Rob311 Posts: 83
    edited 2006-03-26 22:46
    So is my assumption that the stamp is resetting correct?
    ·
    All this stamp will be doing is reading inputs from 4 buttons, and outputting to 12 transistors, so I don’t believe the amperage will be a problem.
    But like I said, as of right now all that’s connected is 1 led
    ·
    What do you mean by it will filter out enough “ripple”?
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-03-27 00:20
    Well, one of two things is probably happening.

    An "unregulated" AC to DC supply usually has a half-wave, or full-wave rectifier on the output side, to generated the DC. Now, without enough capacitance on the output (especially next to your circuit) this signal can have lots of 60-hz 'ripple' on the output.

    If there were NO capacitance on the output, the voltage waveform would look like a half-wave (or full wave) rectified version of AC -- meaning the signal would go from zero to 12 volts, then back to zero, then back to 12, 60 times a second (for half-wave) and 120 times a second for full-wave. The capacitance on the output (and I'm SURE there must be SOME capacitor inside the wall-wart itself) stores charge for the descending part of the cycle, so the DC doesn't go to zero. However, even with a perfect amount of capacitance, the capacitor will discharge some (feeding current to your circuit) and so its voltage will drop a bit. The next positive going pulse will charge it up again. This small drop in the voltage, and restoration of it, is what is called "ripple", because on an O-scope it looks like a rippling voltage sitting on top of the average DC voltage.

    So, I assumed that if there weren't enough capacitance close to your circuit, and if there weren't enough in the wall-wart itself, this could cause your circuit to reset.

    A second, more likely scenario is that you're trying to pull too much current through the on-BS2 regulator, and it's over-heating and resetting itself (which it has special circuit inside itself to protect itself by doing that). If so, you really need an external regulator (not expensive) for your circuit.

    Note that 50 mA is not a lot of current. If your LED takes 12 mA to light, and each transistor takes 4 mA on its base lead to saturate, (and where is the voltage coming from for the collector lead, anyway?) then you're already at 60 mA -- 50 mA over the max, and at 12 volts I would not be surprised if your on-chip regulator was over-heating and shutting itself down.

    Short answer -- you MUST measure the currents on those transistors, and INSURE you're not pulling 50 mA from that poor little surface mount regulator on the BS2. The best solution is an external linear regulator. (which consists of a three-terminal LM7805, an input capacitor, and an output capacitor, so this is NOT a lot of circuitry to give you a rock-solid 1.0 Amps at 5 volts).


    Post Edited (allanlane5) : 3/27/2006 12:23:11 AM GMT
  • Rob311Rob311 Posts: 83
    edited 2006-03-27 02:18
    Ok, it just so happens that i have a 5 volt regulator here. I pull exactly 4.10 volts out of it. close enough? or did I buy a bad brand of regulator?
  • ForrestForrest Posts: 1,341
    edited 2006-03-27 02:35
    Voltage regulators do an excellent job as long as you're feeding enough voltage into it and you're not exceeding the current rating of your batteries. My guess is your battery is undersized for your application. Your AC supply could supply 1 amp. A 9V battery can only supply about 1/4 of that power. Are you powering alot of servos and motors? If so, you should look into getting a 6 cell NiMh rechargeable battery pack and a smart battery charger. They produce 7.2V and have current ratings of 1500 to 3500 mAh.
  • Rob311Rob311 Posts: 83
    edited 2006-03-27 19:11
    So is the 4.10 volts coming out of the voltage regulator enough to power the stamp?
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-03-27 20:08
    I'm not sure where they have the Stamp's "brown-out reset" voltage set to. Possibly it's 3.5 volts, in which case 4.1 volts might work, but you're on the hairy edge. Personally, I like reliability in my equipment, so I avoid the hairy edge.

    IF your regulator is putting out 4.1 volts, it's unlikely to be good. Is it a 7805? I've never had one that bad.

    Note a 7805 needs its input voltage to be at least 2 volts above its output voltage for it to regulate. Thus the popularity of all these 7.5 volt AC adapters. A 2840-5 is a 'low-drop-out' regulator, and will regulate down to 0.5 volts difference. It costs twice as much, but $3.00 compared to $1.50 won't break the bank.
  • Rob311Rob311 Posts: 83
    edited 2006-03-27 22:39
    Yeah, im using a radioshack 7085.
    Im inputing 12v and pulling out 4.10v.
    Could it be a bad wall power supply? i know im getting 12.55 volts out of it (measured with my multi) but could it be that "rippling" effect thats causing the voltage to sag so low?
  • ForrestForrest Posts: 1,341
    edited 2006-03-28 00:13
    Do you have the appropriately sized electrolytic capacitors on both the input and output sides of the 7805 regulator? Check the 7805 data sheet for typical values. I normally use a 100uF on the input side and a 10uF on the output side, plus a .1uf monolythic capacitor connected as close as possible to the Stamp's VDD pin.

    A 7805 will typically output 4.8 to 5.2 volts under load, and 5.0 volts with no load.
  • Rob311Rob311 Posts: 83
    edited 2006-03-28 01:29
    No im currently running capacitor less.
    What type of capacitors should i be using? 12v 100uF and 5v 10uF?
  • ForrestForrest Posts: 1,341
    edited 2006-03-28 03:35
    I've seen an unregulated 12V power supply hit 19V when not under load, so to be safe you should use 25V 100uF on the input and a 16V 10uF on the output.
  • Rob311Rob311 Posts: 83
    edited 2006-03-28 03:51
    so let me get this clear.
    12v wall power supply => 25v 100uF => 7805 regulator => 16v 10uF => stamp?
  • ForrestForrest Posts: 1,341
    edited 2006-03-28 04:31
    Sounds good. Make sure you install the capacitors using the correct polarity - see the 7805 datasheet for this info.
  • Tom WalkerTom Walker Posts: 509
    edited 2006-03-29 16:31
    Just to clarify...
    12 wall power supply HOT (+) to top of 25V 100uF cap (+) to input side of regulator.
    Ouptut side of regulator to top of 16V 10uF cap (+) to Stamp Vdd.
    12 wall power supply GROUND (-) to bottom of 25V 100uF cap (-) to GROUND of regulator to bottom of 16V 10uF cap (-) to Stamp Vss.

    This assumes that you are using polarized caps and that I have had enough caffeine [noparse]:)[/noparse]

    Schematics are soooo much easier.

    P.S. if you put the caps "in-line" (i.e. wall-wart to one side of cap and the other side of cap to regulator) you will NOT get the desired results.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-03-29 16:41
    Tom Walker said...(trimmed)
    This assumes that you are using polarized caps and that I have had enough caffeine [noparse]:)[/noparse]
    Schematics are soooo much easier.
    Tom,

    ·· Your post reminded me that I'm glad the accuracy of my replies is not directly related to my caffeine intake or I would be in serious trouble, since I don't drink coffee or soda at all!· =)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Tom WalkerTom Walker Posts: 509
    edited 2006-03-29 18:26
    Chris:
    Heathen [noparse]:)[/noparse]

    Actually, I don't drink coffee, either...but I do enjoy the occasional Diet Coke...even better if it is caffein-free...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2006-03-29 22:40
    HI EveryOne

    Now if i had a 7805 that only 4.01 volts i would not use it

    I would check another 7805 reg to get one that read 4.85 at MIN and a MAX 5.15

    But that me

    I have seen 7805 reg read as high as 5.15 i have use them but i keep an eye on them for a little while and if they go any higher ..........

    I do not use them on a BS2 project

    I hope this help you

    But what i said is just what i do

    Sam
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-03-29 22:52
    Actually, a 7805 is an active device (meaning it has a few transistors inside of it). It acts as a very fast variable resistor, to provide a more-or-less constant voltage drop from its input to its output, so its output stays at 5 volts (give or take 0.1 volt or so), no matter how much ripple is on its input, and no matter what the current being used (up to 1 amp or so).

    But, to do that it needs some capacitance, both on its input and its output. If you try to run it with NO input and output capacitor, then you are using it in a way it was not designed for, and all bets are off. There's documentation on-line regarding how to use a 7805, I highly recommend finding it and following it.
Sign In or Register to comment.