Shop OBEX P1 Docs P2 Docs Learn Events
Solid State Relay to overcome timing challenge? — Parallax Forums

Solid State Relay to overcome timing challenge?

bradharperbradharper Posts: 64
edited 2011-02-24 08:10 in General Discussion
<newbie-disclaimer>
First off, I'm on the fence as to whether or not this type of question is inappropriate for the forum. It's certainly a query regarding general EE knowledge - which I obviously lack a good bit of - as opposed to Parallax/Propeller specific expertise but it is framed in the context of direct interaction with the Propeller, and quite frankly I admire the demeanor of our local experts.

If this is the wrong place to ask questions of this nature, just say the word and I'll know from now on.
</newbie-disclaimer>

One function of my application controls the brightness of multiple LEDs by interacting with a constant current (1A) led driver ( STCS2 - http://www.st.com/internet/analog/product/194396.jsp).

My voltage source of between 6-12Vdc is directly connected to the driver, so I get a brief flicker of light during the Propeller boot phase from the time I power up until my code establishes connection with the driver. I need to find a way to eliminate that flicker.

My first inclination is some type of switch that I close with the prop after I connect to the driver - a solid state relay is my best guess. That relay could either activate the input current to the chip, or activate the "enable" pin on the chip which would default to off.

Am I on the right path? Any relays to avoid or consider? Are there any better solutions?

Any insights appreciated. Thanks for your time and patience.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-02-02 08:24
    This is a prime example of a class of mistakes occasionally known as "Trying to fix a problem with 'X' before understanding the problem".

    Your real problem is that a Prop I/O pin defaults to a high impedance state (input mode) when the Propeller is reset and you're trying to control something like a constant current LED driver which expects a logic low or logic high at that point and you don't have that until the Propeller finishes initializing itself a couple of hundred microseconds later.

    You didn't say how you have the current source connected. If the enable pin is tied high to enable the device all the time and the PWM pin is connected to the Propeller, you could use something like a CMOS 555-type timer to hold the enable pin low for maybe 10ms to allow the Propeller to do its initialization. Look at some 555 timer datasheets and application notes for theory / practice / sample circuits.

    This is a good forum to discuss this sort of thing. It's really a general design question, not specific to a Propeller or Stamp or whatever.
  • bradharperbradharper Posts: 64
    edited 2011-02-02 08:47
    That's correct, the enable pin is tied high. Thanks for that... I'll definitely check out 555's. One additional restraint is available board real estate - I have very little - so part count makes a big difference.
  • Mike GreenMike Green Posts: 23,101
    edited 2011-02-02 09:07
    Other options:

    You could use a simple RC timer, but you need a Schmitt trigger buffer for reliability. I've seen some very small single gates in SOT type packages. One of those plus a resistor and a capacitor would make a simple time delay for the enable.

    Something like this
  • PropabilityPropability Posts: 142
    edited 2011-02-02 09:29
    If you are going to use a prop pin for the enable then just use a weak pull down on it and just drive it high when needed.
  • tonyp12tonyp12 Posts: 1,951
    edited 2011-02-02 12:44
    Becuse when the prop is rebooting, the line would be left floating as you have two inputs on both sides.


    As above post says, just use 47k weak pulldown. 10k as in pic below is also OK but as you probably will leave pin high most of the time a higer R value is better as not to drain power.

    gt_15.gif

    Most other ICs have inverted enable, and in that case you would use pull-up instead.
    And you would use tri-state (pin as input) and output with a 0 to control the signal.
  • bradharperbradharper Posts: 64
    edited 2011-02-22 10:41
    If you are going to use a prop pin for the enable then just use a weak pull down on it and just drive it high when needed.


    Ok, after a board revision adding a line from a propeller pin to the "enable" pin of the led driver with a pull-down, I'm still getting power to the driver as soon as I connect power. I'm wondering what I'm missing. The LED output looks dimmer, which makes me suspect that the pin is still floating to some extent. The pull-down is 10K, should it be more? Any insights appreciated.
  • tonyp12tonyp12 Posts: 1,951
    edited 2011-02-22 11:17
    So you have the 10k resistor layout as a T and one end connected to ground.
    and the mcu line is set as an input (the default at boot up)
    but the LED driver still turns on the LED during bootup?
    You are not using pin 30 or 31, I hope.

    Try a different 10k, as the one you have may be fried
    or try a 4k7 for a stronger pulldown.
  • bradharperbradharper Posts: 64
    edited 2011-02-22 11:27
                               ___
                       -------|___|-GND
                       |       10k                     |
                       |                --------------||-7.4V
     Prop Pin ---------|                |              |
                       |               Vcc.---------.
                       |                  |         |
                       -----------------En|  STCS2  |
                                          |         |
     Prop Pin 2------------------------PWM'---------'
    
    

    Just to clarify my schematic...
  • tonyp12tonyp12 Posts: 1,951
    edited 2011-02-22 13:39
    curcuit is correct.

    Some testing to do.
    Can you disconect the prop pin 1 and just connect the line to grnd?
    The Led driver should not be able to turn on LED even after you start your code.

    You should be able to save a prop pin,
    by tying En to Vdd and using 10k pulldown on PWM,


    En and PWM pretty mush does the same thing except
    a low En completly shuts the chip down to save power.
  • bradharperbradharper Posts: 64
    edited 2011-02-22 20:30
    Well, now I'm even more perplexed. Replaced the 10K, no change. Replaced with a 4.7K, and power stays off until I drive it high, but thereafter I have no control over the driver with the PWM pin (which worked perfectly when the enable was tied) and driving the ENABLE pin hi/lo only results in a subtle change in brightness. Basically, I can't shut it down... and oddly enough, at times when I connect power after having been disconnected for 10-15 seconds, the light instantly enables on boot - before I drive the pin high! Seems like its remembering the last state, and has some current from somewhere to use. Do these symptoms seem familiar or indicate something obvious that I'm missing?

    Apparently, I've really misunderstood some fundamentals!
  • bradharperbradharper Posts: 64
    edited 2011-02-24 08:10
    tonyp12 wrote: »
    You should be able to save a prop pin, by tying En to Vdd and using 10k pulldown on PWM,

    I came across another reference to this usage today... I'm thinking this might be the correct approach.
Sign In or Register to comment.