November 23, 2024, 10:33:41 PM

News:

Got VSA?  Want to use your Prop-SX?  Now you can!  See the VSA section of the Library forum for Prop-SX code that works with VSA.


Trying to figure out mixed voltages

Started by GOT, October 05, 2011, 03:28:40 PM

Previous topic - Next topic

GOT

I guess I don't quite understand using the OUTs.  I have just figured out that you can not control PIN1 and OUT1 independently.  However, I am a little confused about using you own power supply.  I am thinking that if I wanted to run some LEDs at 5V using the PINs but also run a 12VDC relay I would:

1) Turn on the PROP1 with the power switch in position 1.
2) Attach my LEDs to the three-pin outputs (Px).
3) Attach my 12V power supply with the positive wire clamped to the V+ and the ground wire clamped to GND. 
4) Attach my relay with the positive wire also clamped to V+ and the ground wire clamped to OUTx.

Did I get that right or do I not attach anything to the V+ but run the 12V positive lead directly to the relay.

Is that smoke I'm smelling?

JonnyMac

1) In position 1 you will have no connection between V+ and the front side of the regulator, hence there will be no power to the system.

2) Be careful how many LEDs you attach; the Px pins connect directly to the processor hence there is not a lot of current available.  The ULN2803 acts like a current buffer so you may want to use the OUTx connections, even for your LEDs.  The only change is the current limiter for the LED circuit.

3) Yep, connect your external supply between V+ and GND; to get the board to work the power switch has to be in position 2.

4) Yes, relay connects between V+ and OUTx.
Jon McPhalen
EFX-TEK Hollywood Office

JackMan

GOT,
   I'm a little confused with item #3. What are you powering the Prop-1 with? How much current does your relay draw? I don't see the need for an additional power supply from your explanation. If you are powering the Prop-1 with a 12V power supply you can energize your relay (unless it's huge) directly from V+ and OUTx (switch in position 2). LED's usually need a resistor even when using 5V so V+ and OUTx will work as Jon mentioned. If for some reason you want 5V, you can use any of the R pins to the positive side of the LED's and use OUTx for the negative connection (you may still need resistor depending on your application).

GOT

OK, Jonny, but in your documentation you have a bomb with...

NOTE: When powering external devices from a voltage source other than that used to power the
Prop-1 controller board, do not place the power switch in position 2. Doing so could cause damage to
the Prop-1 and external circuitry.

I guess I don't know what this warning is trying to tell me since I think you told me to do just that.  How many LEDs (20mA) would you be comfortable with running off the pins at a time?

JackMan

GOT,
    That's what is confusing about your original post. It sounds to me like you are using 2 power supplies, is this correct? If this is the case, read my post above.

bsnut

You are wondering how many LEDs at 20mA you can connect to one I/O pin? One. Most LEDs draw around 20mA and this at maximum for each I/O, which can sink or source at 20mA.

This means that you need to connect your LEDs to the OUTx, as suggested by Jack and Jon. These OUTx can handle around 80mA per pin (see the ULN datasheet in the docs section in forum home page), since the ULN2803 is buffering the voltage and the current.  This way you can turn on 2 or 3 LEDs per OUTx determining on the current of your LEDs that you have.

The best thing you can do is, tell more about your application so we can better help you.
William Stefan
The Basic Stamp Nut

JonnyMac

October 06, 2011, 12:54:24 AM #6 Last Edit: October 06, 2011, 12:56:26 AM by JonnyMac
QuoteNOTE: When powering external devices from a voltage source other than that used to power the
Prop-1 controller board, do not place the power switch in position 2. Doing so could cause damage to
the Prop-1 and external circuitry.

The key is "external devices" -- that is to say that if you're using a power supply for the PCB and another supply for external devices, you do not want them to mix.

QuoteHow many LEDs (20mA) would you be comfortable with running off the pins at a time?

None; remember those pins come right out of the processor and that procesor on the chip is an older generation part -- it's not going to take 20mA LED circuits.  On our trainer board we're running just a milliamp or so through those LEDs.  Use the OUTx terminals for your leds as those outputs can handle 250mA each with a bunch running.
Jon McPhalen
EFX-TEK Hollywood Office

GOT

Here is a picture for what I think you want me to do.  Unfortunately, now my LEDs are at 12V and not 5V (which I can fix with more resistors).  Do I need the second power supply or will the Prop1 board supply 12V to V+ already?  Are the pins then useful only for small servos and small relays?  I am surprised you can't run a single LED off it.

Call me dense but I don't get it.
"The key is "external devices" -- that is to say that if you're using a power supply for the PCB and another supply for external devices, you do not want them to mix." -- But I am running the external device (the relay) with an external power supply (the 2nd 12VDC).  Are you considering the second power supply attached to V+ as an additional power supply to the PCB since it is attached to V+?

bsnut

October 06, 2011, 08:54:48 AM #8 Last Edit: October 06, 2011, 09:13:40 AM by bsnut
Now, I understand what you are trying to do.

If you want to power the relay and the LEDs with an external power supply the power switch on the Prop-1 needs to be set in position 1 and what you are showing with the power switch set in position 2 will not work.
QuoteNOTE: When powering external devices from a voltage source other than that used to power the
Prop-1 controller board, do not place the power switch in position 2. Doing so could cause damage to
the Prop-1 and external circuitry.
What will work, with no problems at all is powering the Prop-1 through the 2.1mm center-positive barrel connector by itself and you don't need an external power supply to do what you want to do.

If, you need a drawing showing how relay and the LEDs are connected, I can provide you one if you want.
William Stefan
The Basic Stamp Nut

JonnyMac

Your drawing is correct; just don't connect anything to the 2.1mm barrel connector.

QuoteWhen powering external devices from a voltage source other than that used to power the Prop-1 controller board, ...

This in fact is the clarifying statement.

Jon McPhalen
EFX-TEK Hollywood Office

JackMan

GOT,
      I pretty much answered your dilemma in the 3rd post of this thread. If your relay is a small PCB type you don't need a second power supply. You can use any of the "R" pins to supply 5V positive to your LED's (with resistors) and use the OUT terminals for negative. The "R" pins can handle plenty of current as they are directly connected to the 5V side of the voltage regulator, the "B" pins are constant ground.  The "W" pins are connected to the processor and can't tolerate much current, that's why you have to use the OUT terminals for negative control of your LED's.

JonnyMac

QuoteIf your relay is a small PCB type you don't need a second power supply. You can use any of the "R" pins to supply 5V positive to your LED's (with resistors) and use the OUT terminals for negative.

That's not really a good idea as there is a bit of a voltage drop through the ULN.  Use V+ and OUTx for relays (12v version); don't  use 5v relays with the board.
Jon McPhalen
EFX-TEK Hollywood Office

GOT

I tried JackMan's setup and it didn't work anyway.  The LED was always lit.  It just got brighter when it was supposed to turn on.

JonnyMac

That's leakage current through the flyback protection diodes inside the ULN2803.
Jon McPhalen
EFX-TEK Hollywood Office

JackMan

QuoteI tried JackMan's setup and it didn't work anyway.  The LED was always lit.  It just got brighter when it was supposed to turn on.

I'm sorry, but you are doing something wrong. I've wired up plenty of LED's and 5V relays this way and they work fine. Do as Jon has instructed you, after all, it's his product and I don't want to give bad advice.  ;)