Shop OBEX P1 Docs P2 Docs Learn Events
Power question — Parallax Forums

Power question

dtalvacchiodtalvacchio Posts: 36
edited 2006-07-24 14:19 in BASIC Stamp
I had built a clock (which many of you have helped me with along with way) and had the prototype working on a Homework Board. I was powering this board with an adaptor I bought at Radio Shack (3 - 12 V, set at 6 V) so that I could use wall electricity instead of batteries.

I then brought everything over to a Carrier Board (www.parallax.com/detail.asp?product_id=27120) and wire-wrapped it. When I used the adaptor on this board, the clock would run for roughly a minute, and then just stop. If at this point I tried to re-run the program, the error message would say "No Basic Stamps Found." I then switched to a 9V battery instead of the adaptor, and it worked fine, until the battery died.

Are the Carrier Boards not designed to handle these wall adaptors? Does it have something to do with a voltage regulator? Most importantly, how can I use wall electricity to power the Carrier Board?

Thanks much.

Dominick

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2006-07-23 16:24
    You have to make sure that the voltage going into the Stamp is correct. Wall warts are notorious for not being regulated very well. Even at the 6 volt setting you may be subjecting your stamp to voltages near 10 volts.

    You don't state where you were connecting the wall wart power supply. If its on the same terminals as the 9 volt battery, why isn't the wall wart set to 9 v?. If you're connecting to the Vdd terminal on the Carrier, it needs to be 5 volts, no more , no less.

    If you don't connect directly to Vdd at 5 volts, and decide to use the same terminals as the 9 volt battery, you are limited to the capabilities of the regulator on the Stamp chip. It cannot supply current for much circuitry.

    Its much better practice to add a proper 5v regulator on the Carrier board, feed it with 9 to 15 volts from a wall wart, and use the regulated 5 volts on pin Vdd.

    Cheers
  • dtalvacchiodtalvacchio Posts: 36
    edited 2006-07-23 16:58
    Thanks for responding . . . This makes some sense, but I'm still a little confused about something, maybe should have asked in the first post:

    What exactly is the difference between Vin and Vdd? I see traces on the board from Vin to the battery terminals, but I don't see traces from Vdd to anything. All the power connections in my circuit are going to Vdd.

    I have the wall wart going to the 9V battery terminals. You're saying that even if I switch the adaptor to 9V, this is still not a very good idea, and that I should instead install a 5V regulator? Where would this regulator be connected?
  • aalegadoaalegado Posts: 66
    edited 2006-07-23 18:04
    Vin = A DC input voltage. Usually greater than 6V (regulated, more if unregulated) and may be connected to a battery, a wall-wart, or any other type of external power supply. Vin is supplied to a regulator either on the development board or on-board the BS2 chip itself. In the case of Carrier board, there is no on-board regulator so the Vin is supplied to the BS2's on-board regulator.

    Vdd = The regulated 5V DC from the on-board regulator of the development board you are using or, as in this case, the output of the on-board regulator of the BS2 chip itself. You can also connect Vdd to an external, regulated 5V DC power supply in which case the on-board regulator is not used.
    stamptrol said...
    You don't state where you were connecting the wall wart power supply. If its on the same terminals as the 9 volt battery, why isn't the wall wart set to 9 v?. If you're connecting to the Vdd terminal on the Carrier, it needs to be 5 volts, no more , no less.
    dtalvacchio said...
    I have the wall wart going to the 9V battery terminals. You're saying that even if I switch the adaptor to 9V, this is still not a very good idea, and that I should instead install a 5V regulator? Where would this regulator be connected?

    By this stamptrol is wondering why you wouldn't connect the wall-wart to the 9V DC input and set the wall-wart to any setting between 9V and 12V rather than 6V. If your wall-wart isn't regulated and you've set it for 6V, the actual voltage applied at Vin is probably 6V +/- 2V or more. You're OK as long as you're on the high side but when you're on the low side, the Vin is below the output voltage of the BS2's on-board regulator and so it shuts off. When the voltage rises again, the BS2 should come back on as if nothing happened.

    In other words, the unregulated 6V of your wall-wart is too low to safely use. You should set the wall-wart to 9V or more (note that the 9V input is NOT limited to 9V, it's just using the standard 9V battery snap connector. You can supply any voltage from about 7V up to 15V or whatever the limit is for the on-board regulator) so that when its output drops a little due to the poor regulation, the Vin is still over 6V. The actual minimum voltage is about 0.5V more than the output voltage of the BS2's on-board LDO (low drop-out) regulator (about 5.5V) but it's better to have more than the minimum. 6V (regulated) is good but 7V or more (regulated or unregulated) would be better.

    FYI: A conventional voltage regulator like a 7805 would need a minimum input voltage of about 7V to provide a 5V output. The LM2940-5 regulator, a LDO design, can supply 5V with an input of 5.5V, only 0.5V more. The 0.5V is the drop out voltage that is referred to by the "Low drop-out" designation.

    You wouldn't need a 5V regulator if the circuits external to the BS2 draw 40mA or less. This limit is set by the BS2's on-board regulator. Note that 40mA isn't very much current. I wouldn't routinely rely on the BS2 for the regulated power for an entire project unless I was working on a deliverately power-constrained project.

    You also wouldn't need a regulator if your wall-wart provided regulated output voltage.

    If, however, your wall-wart is unregulated and your external circuitry draw more than 40mA then you cannot rely on the BS2's on-board regulator and you must provide a separate, 5V regulator like thethe LM2940-5 (this is the same part Parallax uses on the development boards with on-board regulators). This is a three pin device: Vin, Vout, and Ground. Vin would be connected to the positive connector of the 9V snap connector (you will have to cut the trace on the PCB so that the positive connector is isolated from the rest of the Carrier board), Vout to Vdd, and Ground to Ground.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I wouldn't connect that if I were you...

    Vive Le Tour!
    July 1 - July 23

    Post Edited (aalegado) : 7/23/2006 6:26:09 PM GMT
  • dtalvacchiodtalvacchio Posts: 36
    edited 2006-07-23 22:09
    Thank you very much for all this detailed and useful info. What's still puzzling me is that apparently the Power Adapter I'm using does provide "regulated and filtered output". So if I had it set at 6V, shouldn't that mean that it was a steady 6V (without the + or - 2V you mentioned)? And so wouldn't it then work fine?

    I switched it to 9V and it is working just fine, but I'm still curious about what was happening before . . .
  • aalegadoaalegado Posts: 66
    edited 2006-07-24 01:34
    Not sure what's happening either. This is a case where you might solve the mystery by doing some tests but if all your problems go away if you keep it set to 9V then why bother with testing?

    If you want to test something...with the wall-wart set to 6V measure the no load voltage of the wall-wart, connect the Stamp circuit and measure the voltage, and finally measure the voltage when the Stamp cicuit shuts-down. I'd expect the voltage is close to 6V at the start but decreases on successive measurements. The wall-warts temperature might tell you something too: Is it really hot when the Stamp circuit shuts down?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I wouldn't connect that if I were you...

    Vive Le Tour!
    July 1 - July 23
  • Tom WalkerTom Walker Posts: 509
    edited 2006-07-24 14:19
    Typically, a voltage regulator requires a certain amount of "overhead" to function correctly. Each type is different, but requiring an extra couple of volts is not uncommon. This would explain why things aren't happy at 6V but work at 9V.

    In short, very few regulators will take 5.2V and give you regulated 5V out...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
Sign In or Register to comment.